conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Modify config for use in tmuxinator\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Space2dot do\n it 'returns dot included in string' do\n expect(Space2dot.convert(['fuga hoge foo'])).to include('.') # String case\n expect(Space2dot.conv... | ruby | chosen |
[
{
"from": "system",
"value": "Create commit message diff after staging changes\n"
},
{
"from": "human",
"value": "require 'guard/notifier'\n\nmodule Guard\n module Notifier\n module GitAutoCommit\n VERSION = \"0.1.0\"\n\n extend self\n\n # Test if the current directory is mana... | ruby | chosen |
[
{
"from": "system",
"value": "Add output for versions to use\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule Konacha\n module Chai\n module Matchers\n class Collector\n\n\n def update_libraries\n `git submodule init`\n `git submodule update`\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize @user_data like a hash\n"
},
{
"from": "human",
"value": "module OmniAuth\n module Stratagies\n class RemoteUser\n include OmniAuth::Strategy\n\n def validate_remote_user\n if !env['HTTP_REMOTE_USER'].blank?\n env['HTTP_REMOT... | ruby | chosen |
[
{
"from": "system",
"value": "Change to load necessary locale files"
},
{
"from": "human",
"value": "module SpreeI18n\n class Railtie < ::Rails::Railtie #:nodoc:\n initializer 'spree-i18n' do |app|\n SpreeI18n::Railtie.instance_eval do\n pattern = pattern_from app.config.i18n.ava... | ruby | chosen |
[
{
"from": "system",
"value": "Fix privacy policy page for new sites\n"
},
{
"from": "human",
"value": "namespace :pages do\n desc 'Refresh TOS and privacy pages'\n task refresh_tos_and_privacy_pages: :environment do\n # Empty content of all the homepages with page_version set to 1\n Page... | ruby | chosen |
[
{
"from": "system",
"value": "Chore: Add Progress Bar to Curriculum Import Task\n\nBecause:\n* It provides a nicer visual representation of the import progress.\n"
},
{
"from": "human",
"value": "namespace :curriculum do\n desc 'Grab Latest Lesson Content from Github'\n task update_content: :e... | ruby | chosen |
[
{
"from": "system",
"value": "Add option to remove yarn install from the JavaScript build task.\n\nWhen deploying with a Node.js buildpack, the dependencies will already be\ninstalled making this call redundant. The ability to remove it will speed up\ndeployments.\n"
},
{
"from": "human",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Call it an error, not a warning.\n"
},
{
"from": "human",
"value": "\nnamespace :submodules do\n\n desc \"Check the status of the project's submodules\"\n task :check => :environment do\n commit_info = `git submodule status`\n sha, repo, branch =... | ruby | chosen |
[
{
"from": "system",
"value": "Use attribute = true instead of duplicating that\n"
},
{
"from": "human",
"value": "require \"active_support/core_ext/module/delegation\"\nrequire \"active_support/core_ext/time/calculations\"\nrequire \"active_model/type\"\nrequire \"time_for_a_boolean/version\"\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove test_remappings because it isn't comprehensive and it's triggering undesired warnings. This should be re-created as a spec.\n\n\ngit-svn-id: 8d8e29b1fb681c884914062b88f3633e3a187774@668936 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Fix trollop dependency in gemspec\n"
},
{
"from": "human",
"value": "require \"./lib/windowstate/version\"\n\nGem::Specification.new do |s|\n s.name = \"windowstate\"\n s.version = WindowState::VERSION\n s.summary = %{Save and restore window positions and sizes o... | ruby | chosen |
[
{
"from": "system",
"value": "Add more work to increase the chance of triggering GC\n"
},
{
"from": "human",
"value": "require 'tmpdir'\nrequire 'listen'\nrequire 'fileutils'\n\nif ENV['USE_LISTEN'] == '1'\n ('a'..'z').each do |i|\n begin\n puts \"Watching tmp/#{i}... \"\n Listen.t... | ruby | chosen |
[
{
"from": "system",
"value": "Add testing frameworks to dependencies\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = 'rack-zip'\n spec.version = '0.0.1'\n spec.summary = 'Zip file server'\n spec.description = 'Rack::Zip serves files in zip archives.'\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ACAO; we are accessing from the same server\n"
},
{
"from": "human",
"value": "require \"sinatra\"\nrequire \"json\"\nrequire_relative \"src/orders_finder\"\n\nget \"/\" do\n send_file File.join(settings.public_folder, 'index.html')\nend\n\nget \"/:email/:or... | ruby | chosen |
[
{
"from": "system",
"value": "[sample] Remove line items loading, as that's now done with the order creation\n"
},
{
"from": "human",
"value": "require 'spree_core'\nrequire 'spree/sample'\n\nmodule SpreeSample\n class Engine < Rails::Engine\n engine_name 'spree_sample'\n\n # Needs to be ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Keyspan USA-19HS v4 Drivers\n"
},
{
"from": "gpt",
"value": "cask 'keyspan-usa-19hs' do\n version '4'\n sha256 '9a07a07d10c3cee5ea1cf3e67b091c30b26a7e24959602b258ae8060a7bf6ce3'\n\n url \"http://www.tripplite.com/shared/software/Driver/USA-19HS-Driver-v#{versi... | ruby | chosen |
[
{
"from": "system",
"value": "Add necessary charset to HTML check test\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass Nanoc::Extra::Checking::Checks::HTMLTest < Nanoc::TestCase\n\n def test_run_ok\n with_site do |site|\n # Create files\n FileUtils.mkdir_p('output')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests pass the easy way\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass HomeControllerTest < ActionController::TestCase\n test \"should get index\" do\n get :index\n assert_response :success\n end\n\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update to 1.1 for the next release"
},
{
"from": "human",
"value": "name \"flume_agent\"\nmaintainer \"Joshua Hyde\"\nmaintainer_email \"jrh3k5@gmail.com\"\nlicense \"Apache 2.0\"\ndescription \"A cookbook used to set up a F... | ruby | chosen |
[
{
"from": "system",
"value": "Use ' rather than '\n"
},
{
"from": "human",
"value": "name 'cutlery'\nmaintainer \"Peter Donald\"\nmaintainer_email \"peter@realityforge.org\"\nlicense \"Apache 2.0\"\ndescription \"Cutlery is a cookbook containing a collection usefu... | ruby | chosen |
[
{
"from": "system",
"value": "Apply more strict support for operating systems.\n"
},
{
"from": "human",
"value": "name 'consul'\nmaintainer 'John Bellone'\nmaintainer_email 'jbellone@bloomberg.net'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures consul'\nl... | ruby | chosen |
[
{
"from": "system",
"value": "Test Environment doesn't need Test::Rack::Methods module.\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nclass NoodlesEnvironmentTest < Minitest::Test\n include Rack::Test::Methods\n\n def test_development\n assert Noodles.env.development?... | ruby | chosen |
[
{
"from": "human",
"value": "Move find into pair script\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n#\n# Create a list of paired somatic files taking the base path as input. The\n# assumption is that base file names are almost the same, with one different\n# character R or N for norma... | ruby | chosen |
[
{
"from": "system",
"value": "Correct migration to find all duplicate records\n\nand only remove the duplicate with no value\n"
},
{
"from": "human",
"value": "class RemoveAutocompleteOverrideDuplicates < ActiveRecord::Migration\n def up\n find_query = <<-SQL\n select count(id) as count... | ruby | chosen |
[
{
"from": "system",
"value": "Update for minutes and number on x-axis, but better this time.\n"
},
{
"from": "human",
"value": "module StatisticsHelper\n\n def mttr_by_month\n stock_chart mttr_by_month_charts_path, basic_opts('Mean Time to Resolution (MTTR) by Month', 'months')\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Change homepage attribute of podspec\n\nChange homepage attribute of podspec from cloudant.com\nto the Github Repo.\n\nFixes #28\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"ObjectiveCloudant\"\n s.version = \"0.2.1\"\n s.su... | ruby | chosen |
[
{
"from": "system",
"value": "Fix config option typo in jasmine helper\n\n* The config option contains an extra underscore.\n"
},
{
"from": "human",
"value": "#Use this file to set/override Jasmine configuration options\n#You can remove it if you don't need it.\n#This file is loaded *after* jasm... | ruby | chosen |
[
{
"from": "system",
"value": "Use markdown for test contents\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass SidebarTest < ActionDispatch::IntegrationTest\n setup do\n setup_groonga_database\n @post = create(:post, :whatever, body: <<~EOS.encode(crlf_newline: true))\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage and GitHub source.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\ts.name = \"BCDataStream\"\n\ts.version = \"0.1.0\"\n\ts.summary = \"A pair of utility classes for decoding and encoding binary data streams.\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Light Table to 0.6.2\n"
},
{
"from": "human",
"value": "class LightTable < Cask\n url 'https://d35ac8ww5dfjyg.cloudfront.net/playground/bins/0.6.0/LightTableMac.zip'\n homepage 'http://www.lighttable.com/'\n version '0.6.0'\n sha1 '98d881e5e445f74a990fbdb... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in OpenVanilla Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'openvanilla' do\n version '1.0.11'\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add script for console testing\n"
},
{
"from": "gpt",
"value": "p1 = Player.create(name: \"kieran\")\np2 = Player.create(name: \"pragya\")\np3 = Player.create(name: \"mitch\")\np4 = Player.create(name: \"mikee\")\n\n# Start a new game - controller action\ngame = Game... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for serialization with Marshal\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\nclass Serializable\n include Memoizable\n def method; end\n memoize :method\nend\n\ndescribe 'A serializable object' do\n let(:seria... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment about the number of specs that fail in the pending tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Capybara::Session do\n context 'with remote mechanize driver' do\n before(:each) do\n Capybara.app_host = REMOTE_TEST_U... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for AWS ElasticWolf Client Console.\n"
},
{
"from": "human",
"value": "cask 'elasticwolf' do\n version '5.1.6'\n sha256 '32eccff8e2cff1187fbf4b8c614e61056ae9c371ebdba3174e021b413b973542'\n\n url \"https://s3-us-gov-west-1.amazonaws.com/el... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for .escape_for_single_quotes\n"
},
{
"from": "gpt",
"value": "# Copyright 2014 Greg Hurrell. All rights reserved.\n# Licensed under the terms of the BSD 2-clause license.\n\nrequire 'spec_helper'\nrequire 'command-t/vim'\n\ndescribe CommandT::VIM do\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec for new delimiter style\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndef Formula.ld str\n Formula.dump Formula.load str\nend\n\ndescribe Formula do\n atoms :a, :b, :c, :d, :e\n\n let :f do\n FactoryGirl.create(:property, name: 'Escap... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure CI fails when it's supposed to\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Player do\n before(:each) do\n @valid_attributes = {\n :name => \"Ben\"\n }\n\n @new_player = Player.new\n end\n\n it \"should create a new... | ruby | chosen |
[
{
"from": "system",
"value": "Add Idea vote counting methods\n\nAdd methods to adjust the Idea's current rating by the vote's value.\nBoth methods will work for positive and negative votes.\n"
},
{
"from": "human",
"value": "class Idea < ActiveRecord::Base\n\n belongs_to :owner, :class_name => ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle missing batch link reports\n\nThis commit adds an exception handler for 404 errors from link-checker-api. This can happen if the batch link report has been removed, which happens autmoatically on a schedule to prevent build-up of old reports. The app should handle this c... | ruby | chosen |
[
{
"from": "system",
"value": "Change non_admin scope to include null value in admin_roles_mask\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n include Roles::Authorization\n devise :omniauthable,:omniauth_providers => [:nyulibraries]\n has_many :reservations, :dependent =... | ruby | chosen |
[
{
"from": "system",
"value": "Make guest name easier to read\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n\n belongs_to :room, counter_cache: true\n has_many :suggested_answers, dependent: :destroy\n\n def self.from_omniauth(auth_hash)\n auth = Authentication.find_or... | ruby | chosen |
[
{
"from": "system",
"value": "Include the real hamlc helpers when evaluating server-side templates.\n"
},
{
"from": "human",
"value": "module HamlCoffeeAssets\n module ActionView\n module TemplateHandler\n def self.call(template)\n <<-RUBY\n jst = ::HamlCoffeeAssets::Com... | ruby | chosen |
[
{
"from": "system",
"value": "Change the Group model to conform to the information returned by the\nSmarty Street API.\n"
},
{
"from": "human",
"value": "class Group < ActiveRecord::Base\n has_many :users\n has_many :requests\n\n validates :street, :city, :number, :zip_code, presence: true\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add expiration_date method to format date for jquery countdown\n"
},
{
"from": "human",
"value": "class Skill < ActiveRecord::Base\n belongs_to :user\n validates :title, presence: true\n before_save :set_expiration_time\n\n def set_expiration_time\n if self.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use faker for comment author and content"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :comment do\n author 'test'\n content 'Comment about the project'\n project\n end\nend\n"
},
{
"from": "gpt",
"value": "FactoryGirl.defin... | ruby | chosen |
[
{
"from": "system",
"value": "Check for Pling::NoGatewayFound error message in specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Pling::Gateway do\n\n subject { Pling::Gateway }\n\n let(:message) { Pling::Message.new('Hello from Pling') }\n let(:device) { Pling::Devi... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to export content base paths from a taxonomy\n\nThis task simplifies the process of retrieving a list of all content\ntagged to a particular taxonomy. This is useful in a number of ways,\nbut more immediately it's needed as the starting point for the data\nimport s... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n module Serverside\n class Adapter\n VERSION = \"2.0.3\"\n # For backwards compatibility, the serverside version default will be maintained until 2.1\n # It is recommended tha... | ruby | chosen |
[
{
"from": "system",
"value": "Update before trigger action to be generic trigger action\n"
},
{
"from": "human",
"value": "module Vagrant\n module Action\n module Builtin\n # This class is intended to be used by the Action::Warden class for executing\n # action triggers before any ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove version from main module.\n"
},
{
"from": "human",
"value": "module Ifin24\n # The current version of ifin24.\n # Do not change the value by hand; it will be updated automatically by the gem release script.\n VERSION = \"0.0.1\"\n\n autoload :Client, 'ifi... | ruby | chosen |
[
{
"from": "system",
"value": "Make spacing more consistent between methods\n"
},
{
"from": "human",
"value": "module JsonTestData\n module NumberHelper\n def adjust_for_maximum(number:, maximum: nil, step_size: nil)\n return number unless (maximum && number >= maximum)\n\n num = !!... | ruby | chosen |
[
{
"from": "human",
"value": "Add ActiveAdmin tests for OptionalModules controller\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\n#\n# == Admin namespace\n#\nmodule Admin\n #\n # == OptionalModulesController test\n #\n class OptionalModulesControllerTest < ActionController::TestCas... | ruby | chosen |
[
{
"from": "human",
"value": "Complete Exercises in Numbers Section of Pine\n"
},
{
"from": "gpt",
"value": "# @Author: Aswin Mohan <aswinmohan>\n# @Date: 2016-09-06T06:12:04+05:30\n# @Last modified by: aswinmohan\n# @Last modified time: 2016-09-06T06:15:31+05:30\n\n# How many hours are in a ... | ruby | chosen |
[
{
"from": "system",
"value": "Use <=> operator for comparison instead of <\n"
},
{
"from": "human",
"value": "# Selection handles selection sort in ascendant order.\n# It provides two methods, one for sorting the array in parameter and\n# the other to return a sorted copy of the array\n# The ite... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvos as deployment target\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'MZAppearance'\n s.version = '1.1.4'\n s.license = 'MIT'\n s.summary = 'UIAppearance proxy for custom objects.'\n s.homepage = 'https://github.com/m1entus/MZ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec to confirm integration with dry-monads Do notation"
},
{
"from": "gpt",
"value": "require \"dry/monads/result\"\nrequire \"dry/monads/do\"\nrequire \"dry/matcher/result_matcher\"\n\nRSpec.describe \"Integration with dry-monads Do notation\" do\n let(:operat... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to use redis-adapter with redis 4.0.x\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\n\nflipper_redis_files = lambda do |file|\n file =~ /redis/\nend\n\nGem::Specification.new do |gem... | ruby | chosen |
[
{
"from": "system",
"value": "Add licence information to the Gem specification.\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/gem_publisher/version', __FILE__)\n\ngemspec = Gem::Specification.new do |s|\n s.name = 'gem_publisher'\n s.version = GemPu... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for SocialProvider validations rules\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n#\n# == SocialProvider test\n#\nclass SocialProviderTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Create model files before collection files\n"
},
{
"from": "human",
"value": "module Backbone\n class CollectionGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n def copy_collection_file\n template 'col... | ruby | chosen |
[
{
"from": "human",
"value": "Use common_id uuid instead gateway_id bigint\n"
},
{
"from": "gpt",
"value": "class AddCommonIdToSubscriptionsAndSubscriptionPayments < ActiveRecord::Migration\n def change\n remove_column :subscriptions, :gateway_subscription_id\n add_column :subscriptions, :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix link in example cookbook to point to the correct docs site URL\n\nThis page has moved.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n# This is a Chef attributes fi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix .gemspec to use Dir instead of git\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'simple_flash/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "human",
"value": "Add sequel scope all with default scope bench\n"
},
{
"from": "gpt",
"value": "require 'bundler/setup'\nrequire 'sequel'\n\nrequire_relative 'support/benchmark_sequel'\n\nDB = Sequel.connect(ENV.fetch('DATABASE_URL'))\n\nDB.create_table!(:users) do\n primary_key :id... | ruby | chosen |
[
{
"from": "human",
"value": "Add Dwarf Fortress, version 0.40.01\n"
},
{
"from": "gpt",
"value": "class DwarfFortress < Cask\n version '0.40.01'\n sha256 'c4f729f094790671b1fde995c02c5d547d652d87790785b13a6cdc9f35dec6be'\n\n url 'http://www.bay12games.com/dwarves/df_40_01_osx.tar.bz2'\n home... | ruby | chosen |
[
{
"from": "system",
"value": "Update Royal TSX Beta to 3.0.0.3\n"
},
{
"from": "human",
"value": "cask 'royal-tsx-beta' do\n version '2.2.3.1000'\n sha256 '601ada5103428f2bca12941e68be90c5089c4c7b4e2f5a5eef62273f256df19a'\n\n url \"http://v2.royaltsx.com/updates/royaltsx_#{version}.dmg\"\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Update Seafile client to 5.0.3"
},
{
"from": "human",
"value": "cask 'seafile-client' do\n version '4.4.2'\n sha256 'b6f821002f6466ff6a0ec6b6743c484fb8edb38e8052cbca8003d27aea4cbcf7'\n\n # bintray.com is the official download host per the vendor homepage\n url \... | ruby | chosen |
[
{
"from": "system",
"value": "Make JSON equality test robust\n\nIt's hash equality that matters, not the (unreliable) ordering of the\nfields in the JSON.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Peoplefinder::Api::PeopleController, type: :controller do\n rout... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Header.new spec to kill mutations\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Relation::Header, '.new' do\n subject { object.new(argument) }\n\n let(:object) { described_class }\n let(:id) { Attri... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to remove conflicting files\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"coinbase-official\"\n s.version = \"2.1.2\"\n s.summary = \"Integrate bitcoin into your iOS application.\"\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Create the XML list dynamically"
},
{
"from": "human",
"value": "puts \"\"\"\n<?xml version='1.0'?>\n<items>\n <item uid='alpha' autocomplete='alpha'>\n <title>Alpha</title>\n <icon>workflow.png</icon>\n </item>\n <item uid='bravo' autocomplet... | ruby | chosen |
[
{
"from": "system",
"value": "Add CORS confing to allow any origin to GET and POST to /evetns/* resources\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Avoid CORS issues when API is called from the frontend app.\n# Handle Cross-Origin Resourc... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ltsv from runtime dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = \"fluent-p... | ruby | chosen |
[
{
"from": "system",
"value": "Update activesupport requirement from ~> 5.0 to >= 5, < 7\n\nUpdates the requirements on [activesupport](https://github.com/rails/rails) to permit the latest version.\n- [Release notes](https://github.com/rails/rails/releases)\n- [Changelog](https://github.com/rails/rails/blob/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate 'verify_frequency' from Option::ROLES [story:41797815]\n"
},
{
"from": "human",
"value": "class Option < ActiveRecord::Base\n include AuthoredModel\n include SanitizableAttributes\n\n attr_accessible :role, :title, :description, :required\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Bring Stores.reload up to date.\n"
},
{
"from": "human",
"value": "class Stores < Celluloid::SupervisionGroup\n supervise EventTypeStore, :as => :event_types_store\n supervise DataCollectorStore, :as => :data_collectors_store\n supervise StudyLocationStore, :as =... | ruby | chosen |
[
{
"from": "system",
"value": "Create api token for existing users\n"
},
{
"from": "human",
"value": "class Widget < ActiveRecord::Base\n after_initialize :default_values\n\n belongs_to :user\n\n acts_as_api\n include Api::Widget\n\n GEO_FACTORY = RGeo::Cartesian.factory\n\n def provider\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec summary. Remove description.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'keyed_archive/version'\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make the fact work on RHEL6 systems\n\nIn our combined Windows/Linux environment, running puppet 3.8.7, we got this error:\r\n\r\nError loading fact /var/lib/puppet/lib/facter/iis_version.rb: /var/lib/puppet/lib/facter/iis_version.rb:2: syntax error, unexpected ':', expecting k... | ruby | chosen |
[
{
"from": "system",
"value": "Fix check for required options"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'socket'\nrequire 'openssl'\n\nmodule Houston\n class Connection\n class << self\n def open(options = {})\n return unless block_given?\n\n [:certificate, :p... | ruby | chosen |
[
{
"from": "system",
"value": "Drop not null constraint for amount in spree line items\n"
},
{
"from": "human",
"value": "class ChangeSpreePriceAmountPrecision < ActiveRecord::Migration\n def change\n change_column :spree_prices, :amount, :decimal, :precision => 10, :scale => 2\n change_c... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod spec to 1.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"UIColor_Hex_Swift\"\n s.version = \"1.0\"\n s.summary = \"Convenience method for creating autoreleased color using RGBA hex string.\"\n s.homepage =... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct flash (warning)\n"
},
{
"from": "human",
"value": "module Authentication\n def self.included(controller)\n controller.send :helper_method, :current_user, :logged_in?\n end\n \n def current_user\n @current_user ||= Subscriber.find(session[:s... | ruby | chosen |
[
{
"from": "system",
"value": "Add a transform between capapi data and h2o\n"
},
{
"from": "human",
"value": "module Capapi\n module ModelHelpers\n def capapi_id=(new_id)\n if new_id != capapi_id\n @capapi = nil\n super new_id\n end\n end\n\n def capapi\n @c... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to include license.\n\nThe gemspec needs to include the license file so license scanners will\nsee that this gem is licensed under the MIT License.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"activerecord-where-any-o... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'value' method to use the 'attr_reader' version\n"
},
{
"from": "human",
"value": "module Dims\n class Dimension\n attr_reader :value, :precision\n\n class << self\n attr_reader :abbrev, :dimension_name\n end\n\n def initialize(value, precis... | ruby | chosen |
[
{
"from": "system",
"value": "Handle converting `@doc` into a string ourselves\n\nUse `to_html` on every node, UNLESS it has a ‘selected’ attribute. In\nthat case, use `to_xhtml`.\n"
},
{
"from": "human",
"value": "require 'nokogumbo'\n\nmodule Emcee\n # Document is responsible for parsing HTML... | ruby | chosen |
[
{
"from": "system",
"value": "Expand logged backtraces across multiple lines, to improve readability\n"
},
{
"from": "human",
"value": "module Logger\n def Logger.get_path\n root = Pathname.new(__FILE__).parent.parent.parent\n (root + 'log').to_s\n end\n\n def Logger.log(message, except... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to configure a operation timeout for git stat\n"
},
{
"from": "human",
"value": "require_relative 'log_parser'\n\nmodule Gitlab\n module Git\n class GitStats\n attr_accessor :repo, :ref\n\n def initialize repo, ref\n @repo, @ref = re... | ruby | chosen |
[
{
"from": "system",
"value": "Make private methods which should not be accessible to public"
},
{
"from": "human",
"value": "module Guard\n class Migrate\n class Notify\n def initialize(result)\n @result = result\n end\n\n def message\n case @result\n when... | ruby | chosen |
[
{
"from": "system",
"value": "Set the path in the crontab\n\nThe whenever gem uses a relative path for the rails runner command but\njust a `bundle exec rake` for rake tasks. When the crontab is executed\nthe bundle command isn't in the path by default so ensure that it is.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Set up Game and Player classes\n"
},
{
"from": "human",
"value": "#Create a Game class\n#Initialize a new game by setting up a board containing a random code\n#Create a play method to start the game\n\n#Create a Player class\n#Create a method for the player to enter... | ruby | chosen |
[
{
"from": "system",
"value": "Fix UpdateOncokb app job to use correct `create_updater` method\n"
},
{
"from": "human",
"value": "class UpdateOncokb < ApiUpdater\n def updater\n Genome::OnlineUpdaters::Oncokb::Updater.new()\n end\n\n def should_group_genes?\n true\n end\n\n def should_... | ruby | chosen |
[
{
"from": "system",
"value": "Use `try` instead of `repond_to?` and a method call\n"
},
{
"from": "human",
"value": "class AwardEmoji < ActiveRecord::Base\n DOWNVOTE_NAME = \"thumbsdown\".freeze\n UPVOTE_NAME = \"thumbsup\".freeze\n\n include Participable\n include GhostUser\n\n belongs_t... | ruby | chosen |
[
{
"from": "system",
"value": "Validate that public body email addresses at least look like email addresses.\n"
},
{
"from": "human",
"value": "class PublicBody < ActiveRecord::Base\n validates_presence_of :request_email\n\n acts_as_versioned\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Use Subshift::Time instead of ::Time\n"
},
{
"from": "human",
"value": "require 'time'\n\nclass String\n TIME = /\\d{2}:\\d{2}:\\d{2},\\d{3}/\n\n def shift_times(delay)\n gsub(TIME) do |time|\n new_time = Time.parse(time) + delay\n new_time.strftime '... | ruby | chosen |
[
{
"from": "system",
"value": "Use RuboCop::ProcessedSource instead of non-existant SourceParser\n"
},
{
"from": "human",
"value": "require 'pronto'\nrequire 'rubocop'\n\nmodule Pronto\n class Rubocop < Runner\n def initialize\n @config_store = ::RuboCop::ConfigStore.new\n @inspecto... | ruby | chosen |
[
{
"from": "system",
"value": "Print more info on receiving messages\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule PubSub\n class Poller\n\n # Poll for messages across all regions\n def poll\n loop do\n Breaker.run do\n poller.poll(config) do |message|... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.