conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Package version is increased from 1.3.0.2 to 1.3.1.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '1.3.0.2'\n s.summary = 'Common primitives for platform-specific messaging im...
ruby
chosen
[ { "from": "system", "value": "Enable /events endpoints under cache_classes\n" }, { "from": "human", "value": "Magi::Application.routes.draw do\n root to: \"jobs#index\"\n\n resources :jobs do\n resources :builds, only: [:index, :show, :create, :update, :destroy]\n end\n\n resources :event...
ruby
chosen
[ { "from": "system", "value": "Make the gem mountable in rails with `mount Operator::Engine => '/operator'`\n" }, { "from": "human", "value": "Rails.application.routes.prepend do\n post \"operator/:queue\" => \"operator/messages#create\", :as => :process_message\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add test-unit as a development dependency\n\nAnd remove versions\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Make .gemspec {.md,.txt} inclusion more strict\n" }, { "from": "human", "value": "\nGem::Specification.new do |s|\n\n s.name = 'rufus-scheduler'\n\n s.version = File.read(\n File.expand_path('../lib/rufus/scheduler.rb', __FILE__)\n ).match(/ VERSION *= *['\"](...
ruby
chosen
[ { "from": "system", "value": "Address `warning: mismatched indentations` at test_factory_invalid_formatter\n\nThis commit addresses the `warning: mismatched indentations` below.\n\n```ruby\n$ bundle exec ruby -w -Itest test/cases/query_logs_formatter_test.rb -n test_factory_invalid_formatter\ntest/cases/que...
ruby
chosen
[ { "from": "system", "value": "Use x_node instead of inspecting sandbox\n" }, { "from": "human", "value": "class ApplicationHelper::Button::BasicImage < ApplicationHelper::Button::Basic\n def visible?\n @sb.fetch_path(:trees, :vandt_tree, :active_node).blank? ||\n (@sb[:trees][:vandt_tre...
ruby
chosen
[ { "from": "system", "value": "Tweak indent in LoginPage model\n" }, { "from": "human", "value": "class LoginPage < Obj\n attribute :title, :string\n attribute :body, :widgetlist\n attribute :child_order, :referencelist\nend\n" }, { "from": "gpt", "value": "class LoginPage < Obj\n ...
ruby
chosen
[ { "from": "human", "value": "Add benchmark for Krypt::X509::Certificate parsing\n" }, { "from": "gpt", "value": "require 'krypt'\nrequire_relative 'resources'\nrequire 'stringio'\nrequire 'openssl'\nrequire 'benchmark'\n\nBenchmark.bm do |bm|\n\n cert = Resources.certificate\n [1000, 10_000, 1...
ruby
chosen
[ { "from": "system", "value": "[BRAIN] Use phone/email address from data rather than static in CRM neuron" }, { "from": "human", "value": "class CRMNeuron\n MATCHER = /^Find me (?<name>.*)/i\n\n def confidence(message)\n MATCHER.match(message.body).nil? ? 0 : 1\n end\n\n def reply(message)...
ruby
chosen
[ { "from": "system", "value": "Update Podspec with Runes dependency\n\nSince Runes is now available in CocoaPods Trunk, we can depend on it\nhere and bump the version to the most recent.\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'Argo'\n spec.version = '0.2.2'\n ...
ruby
chosen
[ { "from": "system", "value": "Remove (unnecessary) gem post-install message.\n" }, { "from": "human", "value": "$LOAD_PATH << File.expand_path('../lib', __FILE__)\n\nrequire 'functional/version'\n\nGem::Specification.new do |s|\n s.name = 'functional-ruby'\n s.version = Functional::...
ruby
chosen
[ { "from": "system", "value": "Include python support bits in the right place\n" }, { "from": "human", "value": "describe 'python environment' do\n include Support::Python\n\n describe pycommand('python --version') do\n its(:stdout) { should be_empty }\n its(:stderr) { should match(/^Pyth...
ruby
chosen
[ { "from": "system", "value": "Update AppCode to version 3.1.4\n\nThis commit also updates the SHA for the download.\n" }, { "from": "human", "value": "cask :v1 => 'appcode' do\n version '3.1.3'\n sha256 '36a7429ae57d7855a83b2d7d461c3ccf2d61b125249c532a254e6625746561c6'\n\n url \"http://downlo...
ruby
chosen
[ { "from": "system", "value": "Add an appcast to AquaSKK's cask\n" }, { "from": "human", "value": "cask 'aquaskk' do\n version '4.3.4'\n sha256 'fd29284c76ddc361506ad887be3868bc8e020d6424d818e5365d7d9148d19fcc'\n\n url \"https://github.com/codefirst/aquaskk/releases/download/#{version}/AquaSKK...
ruby
chosen
[ { "from": "system", "value": "Remove all the pesky u\"...\" in comments generated by codegen.py\n" }, { "from": "human", "value": "#!/usr/bin/env ruby -i\n# encoding: utf-8\n\n# helpers\ndef pass; end\n\n# main\nbuffer = ARGF.inject(String.new) do |buffer, line|\n # line filters\n line.gsub!(/...
ruby
chosen
[ { "from": "human", "value": "Add migration to create gdata_favorites\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass CreateGdataFavorites < ActiveRecord::Migration[5.2]\n def change\n create_table :gdata_favorites do |t|\n t.references :user\n t.references :...
ruby
chosen
[ { "from": "system", "value": "Change pod spec to point to ticket branch.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DeskAPIClient\"\n s.version = \"1.1.0\"\n s.summary = \"A lightweight wrapper around the Desk.com API, v2.\"\n s.license = { :t...
ruby
chosen
[ { "from": "system", "value": "Fix Seed to Check New Features\n" }, { "from": "human", "value": "#Create Admin For the Site\nUser.create(email:'nzeplowitz@gmail.com', name: 'admin', access: 'admin')\n\n#Create 5 Students\n5.times do\n User.create(email: Faker::Internet.email, name: Faker::Name.n...
ruby
chosen
[ { "from": "system", "value": "Make seed user an admin\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).\n#\n#...
ruby
chosen
[ { "from": "human", "value": "Add seed data based on data in text file.\n" }, { "from": "gpt", "value": "\ncity_models = {}\ncounty_models = {}\nstate_models = {}\n\nf = File.new(File.dirname(__FILE__) + '/../db/seeds.rb')\nf.each do |line|\n \n fields = line.split(/\\|\\|/)\n next if fields.s...
ruby
chosen
[ { "from": "human", "value": "Create interactor for group creation\n" }, { "from": "gpt", "value": "module Interactors\n module Groups\n class Create\n include Pavlov::Interactor\n include Util::CanCan\n\n attribute :groupname, String\n attribute :creator, String\n at...
ruby
chosen
[ { "from": "system", "value": "Add new petition and resident for testing\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db wit...
ruby
chosen
[ { "from": "system", "value": "Fix Session Created in Seed\n" }, { "from": "human", "value": "require 'faker'\n\norganization = Organization.create(name: \"DBC\")\n\n9.times do\n Organization.create(name: Faker::Company.name)\nend\n\nuser1 = User.create(username: 'steph', email: 'steph@steph.com...
ruby
chosen
[ { "from": "system", "value": "Update simplecov requirement from ~> 0.18.5 to ~> 0.19.0\n\nUpdates the requirements on [simplecov](https://github.com/simplecov-ruby/simplecov) to permit the latest version.\n- [Release notes](https://github.com/simplecov-ruby/simplecov/releases)\n- [Changelog](https://github....
ruby
chosen
[ { "from": "system", "value": "Fix warning test ambiguous / .\n" }, { "from": "human", "value": "require 'test_helper'\n\n\ndescribe \"BankAccountStatement::VERSION\" do\n\n it \"uses major.minor.patch\" do\n ::BankAccountStatement::VERSION.must_match /\\A\\d+\\.\\d+\\.\\d+\\z/\n end\n\nend\...
ruby
chosen
[ { "from": "system", "value": "Use File.expand_path for 1.8.7 compat.\n" }, { "from": "human", "value": "require 'chef/cookbook/metadata'\n\nmodule Vendorificator::Hooks\n module ChefCookbookDependencies\n # Add required Chef cookbooks to vendor modules\n def after_conjure_hook\n igno...
ruby
chosen
[ { "from": "system", "value": "Use the correct client name\n" }, { "from": "human", "value": "# This configuration is suitable for development, it should be managed by puppet\n# in production. \n# TODO: Check if this is thread/forked process safe under passenger. Possible risk\n# that client conn...
ruby
chosen
[ { "from": "system", "value": "Use Rack::Lock to prevent concurrency when eager_load is false\n" }, { "from": "human", "value": "require 'capybara'\nrequire 'capybara/dsl'\n\nCapybara.app = Rack::Builder.new do\n map \"/\" do\n if Gem::Version.new(Rails.version) >= Gem::Version.new(\"3.0\")\n...
ruby
chosen
[ { "from": "system", "value": "Fixed: Index name 'index_external_syncs_on_source_and_source_id_and_object_and_o_id' on table 'external_syncs' is too long; the limit is 63 characters.\n" }, { "from": "human", "value": "class CreateExternalSync < ActiveRecord::Migration\n def up\n create_table ...
ruby
chosen
[ { "from": "system", "value": "Fix pattern for finding test files\n" }, { "from": "human", "value": "# This file was automatically generated by Trapeze\r\n# (http://trapeze.rubyforge.org/), the safety-net generator for Ruby.\r\n\r\nDir.glob(\"#{File.dirname __FILE__}/../input/**/*.rb\") do |sourc...
ruby
chosen
[ { "from": "system", "value": "Add minimum Ruby version in gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'unpoly/rails/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Tests: Fix spec that wasn't cleaning up after itself if it failed\n" }, { "from": "human", "value": "require 'rspectacular'\nrequire 'chamber/commands/secure'\nrequire 'fileutils'\n\nmodule Chamber\nmodule Commands\ndescribe Secure do\n let(:rootpath) ...
ruby
chosen
[ { "from": "system", "value": "Add missing dependency for Beaker tests\n" }, { "from": "human", "value": "require 'beaker-rspec/helpers/serverspec'\nrequire 'beaker-rspec/spec_helper'\nrequire 'beaker/puppet_install_helper'\n\nrun_puppet_install_helper\n\nSUPPORTED_PLATFORMS = ['Debian'].freeze\n...
ruby
chosen
[ { "from": "system", "value": "Add extra spec for the default SIGINT handler raising Interrupt\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"Interrupt.new\" do\n it \"returns an instance of interrupt with no message given\" do\n e = Interrupt.new\n e...
ruby
chosen
[ { "from": "system", "value": "Add factory :quote_with_photos, nice DSL\n" }, { "from": "human", "value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :user do\n name 'alice'\n email { \"#{name}@example.com\".downcase }\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix Airbrake so it actually reports data." }, { "from": "human", "value": "module Airbrake\n module Rails\n module Middleware\n module ExceptionsCatcher\n def self.included(base)\n base.send(:alias_method_chain,:render_exception,:airbrake)\n...
ruby
chosen
[ { "from": "system", "value": "Remove old connection flushing code (triggers warnings in AR 3.2)\n" }, { "from": "human", "value": "module Msf\n\n\n ##\n #\n # This module defines all of the DB database tables\n # and creates ActiveRecord objects for each one of them\n #\n ##\n\n class DBM...
ruby
chosen
[ { "from": "system", "value": "Fix issue with undefined local variable or method `ui'\n" }, { "from": "human", "value": "module Vagrant\n module Smartos\n module Zones\n module Command\n # Requires\n #\n # Define a COMMANDS constant, which is an array of method names...
ruby
chosen
[ { "from": "system", "value": "Make sure overrides file for Gtk has been required in tests.\n" }, { "from": "human", "value": "require File.expand_path('test_helper.rb', File.dirname(__FILE__))\n\nclass GtkOverridesTest < MiniTest::Spec\n setup do\n @gtk = Module.new do\n def self.init a...
ruby
chosen
[ { "from": "system", "value": "Test if fog is required\n" }, { "from": "human", "value": "require 'minitest_helper'\n\nclass TestEbsNameSync < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::EbsNameSync::VERSION\n end\n\n def test_that_it_is_a_class\n \tassert_equal E...
ruby
chosen
[ { "from": "system", "value": "Test Donation.amount set to randomly generated float instead of integer\n\nNot the best test, will have false failures every so often\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass DonationTest < ActiveSupport::TestCase\n test \"donation amount r...
ruby
chosen
[ { "from": "system", "value": "Fix autoload deprecation in Rails 6\n\nAfter upgrading an application to Rails 6, I noticed the following\ndeprecation warning:\n\n> DEPRECATION WARNING: Initialization autoloaded the constants\nApplicationController\n\nThis appears to be due to the initializer requiring `Ember...
ruby
chosen
[ { "from": "system", "value": "Remove in-place modification of options when casting to Array.\n\nThis was causing the :class option to be lost, which meant the first\naccess to an Array value would work correctly, while subsequent accesses\nwould return a String.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Make Espresso::Concern work with many included blocks" }, { "from": "human", "value": "require 'espresso'\n\nmodule Espresso\n # Code extracted from ActiveSupport 3.0.0beta\n module Concern\n def self.extended(base)\n base.instance_variable_set('@_dependen...
ruby
chosen
[ { "from": "system", "value": "Remove the need of passing merchant_id to submit_feed\n" }, { "from": "human", "value": "module MWS\n module API\n class Feeds < Base\n Actions = [:get_feed_submission_list, :get_feed_submission_list_by_next_token,\n :get_feed_submission_cou...
ruby
chosen
[ { "from": "system", "value": "Add timezone notes to example.rb\n" }, { "from": "human", "value": "\nrequire File.join(File.dirname(__FILE__), 'lib', 'tickle')\n\n['May 30', '6:30 PM', 'tomorrow at 6:00', 'June 18, 2011',].each {|s|\n print \"s: \", s, \" \", Tickle.parse(s)\n puts\n}" },...
ruby
chosen
[ { "from": "system", "value": "Add constraint to cert resource\n" }, { "from": "human", "value": "include_recipe \"haproxy\"\ninclude_recipe \"x509\"\n\nservice = 'sisense'\nmembers = partial_search(\"node\",\n \"role:#{service} AND chef_environment:#{node.chef_environment}\",\n :keys => {\n ...
ruby
chosen
[ { "from": "human", "value": "Add simple OpenSSH style home directory key export\n" }, { "from": "gpt", "value": "module SSHKeyHub::Exporter\n # Simple key exporter with home directory like subfolders\n class AuthorizedKeysUsers\n def initialize\n @credentials = {}\n end\n\n def a...
ruby
chosen
[ { "from": "system", "value": "Support correct encoding parameter for HTTP.rb 2.x and earlier\n" }, { "from": "human", "value": "module HTTP\n class Response\n def to_webmock\n webmock_response = ::WebMock::Response.new\n\n webmock_response.status = [status.to_i, reason]\n web...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop error \"Syntax - dynamic constant assignment\"\n" }, { "from": "human", "value": "Vmdb::Deprecation ||= begin\n deprecator = ActiveSupport::Deprecation.new(\"D-release\", \"ManageIQ\")\n deprecator.behavior = [:stderr, :log]\n deprecator\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Clean up DeepStruct a little bit\n" }, { "from": "human", "value": "require 'ostruct'\n\n# This is some code to create nested Structs from nested hash tables.\n# Code written by Andrea Pavoni, more information here:\n# http://andreapavoni.com/blog/2013/4/create-recu...
ruby
chosen
[ { "from": "system", "value": "Use the commander for indexing in acceptance specs\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass SphinxController\n def initialize\n config.searchd.mysql41 = 9307\n end\n\n def setup\n FileUtils.mkdir_p config.indices_location\n ...
ruby
chosen
[ { "from": "system", "value": "Fix spec for previous commit\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe ContactsController do\n context \"with a logged user\" do\n let(:user) { FactoryGirl.create(:admin, label_name: \"truc\") }\n\n before(:each) do\n @request...
ruby
chosen
[ { "from": "system", "value": "Add specs to cover class enhancement" }, { "from": "human", "value": "RSpec.describe \"MatchEitherResult\" do\n subject(:match) {\n MatchEitherResult(result) do |m|\n m.success do |v|\n \"Matched success: #{v}\"\n end\n\n m.failure do |v|\n...
ruby
chosen
[ { "from": "system", "value": "Correct spec description to variable spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Danica::Variable do\n describe 'to_f' do\n context 'when variable has no value' do\n it { expect { subject.to_f }.to raise_error(Danica::NotDefine...
ruby
chosen
[ { "from": "human", "value": "Test to ensure the VM has two interfaces, eth0 and eth1\n\nThis test requires a VM to be provision with two IPs, preferably one\npublic and one private.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# This test requires a VM to be provision with two IPs, ...
ruby
chosen
[ { "from": "human", "value": "Write a short spec for APIMock\n" }, { "from": "gpt", "value": "require 'discordrb'\nrequire 'mock/api_mock'\nusing APIMock\n\ndescribe APIMock do\n it 'stores the used method' do\n Discordrb::API.raw_request(:get, [])\n\n Discordrb::API.last_method.should == ...
ruby
chosen
[ { "from": "system", "value": "Fix rspec tests to pass new restaurants table\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Restaurant, type: :model do\n describe \"attributes\" do\n it { should have_db_column(:name) }\n it { should have_db_column(:address) }\n...
ruby
chosen
[ { "from": "human", "value": "Add podspec to support :local installation\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = 'NoticeView'\n s.version = '2.4'\n s.license = 'MIT'\n s.summary = 'A TweetBot-like notice component for iOS.'\n s.homepage = '...
ruby
chosen
[ { "from": "human", "value": "Add test for creating a node that already exists\n" }, { "from": "gpt", "value": "require_relative 'spec_helper'\n\ndescribe \"Noodle\" do\n it \"should fail to create a node with the same name as an existing node\" do\n post '/nodes/jojo.example.com', params = '...
ruby
chosen
[ { "from": "system", "value": "Add group member sign in context.\n" }, { "from": "human", "value": "shared_context \"signs in\" do\n before do\n visit new_user_session_path\n fill_in \"Email\", with: current_user.email\n fill_in \"Password\", with: password\n click_button \"Sign in\"...
ruby
chosen
[ { "from": "system", "value": "Change to https in podspec to pass linter\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"Titanium\"\n\n s.version = \"1.0\"\n \n s.license = { :type => \"MIT\", :file => \"LICENSE\" }\n\n s.summary = \"Image viewer...
ruby
chosen
[ { "from": "system", "value": "Add additional tests to ensure the knapsack_pro detects time correctly\n" }, { "from": "human", "value": "describe 'Time travel with ActiveSupport::Testing::TimeHelpers' do\n context 'travel_back' do\n before { travel_to Time.new(2004, 11, 24, 01, 04, 44) }\n ...
ruby
chosen
[ { "from": "system", "value": "Fix an instance variable name\n" }, { "from": "human", "value": "require 'hensel/builder'\n\nmodule Hensel\n module Helpers\n def breadcrumbs\n @breadcrumbs ||= Builder.new\n end\n end\nend\n" }, { "from": "gpt", "value": "require 'hensel/bu...
ruby
chosen
[ { "from": "system", "value": "Adjust rails dependencies to what's needed only" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'rails-data-explorer'\n gem.version = '0.0.1'\n gem.platform =...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to support spree 2.0\n" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_cdyne_pav'\n s.version = '1.1.2.rc1'\n s.summary = 'Spree integration w...
ruby
chosen
[ { "from": "system", "value": "Use the latest version of bundler\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rakuten_web_service/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update message when creation of tags file is done.\n" }, { "from": "human", "value": "module Mactag\n class Builder\n attr_reader :tags\n\n def initialize\n @tags = []\n end\n\n def <<(tags)\n @tags += Array(tags)\n end\n\n def files\n ...
ruby
chosen
[ { "from": "system", "value": "Add compression-webpack-plugin as a dependency\n" }, { "from": "human", "value": "directory \"#{__dir__}/javascript\", 'app/javascript'\n\ndirectory \"#{__dir__}/bin\", 'bin'\nchmod 'bin', 0755 & ~File.umask, verbose: false\n\ndirectory \"#{__dir__}/config\", 'confi...
ruby
chosen
[ { "from": "system", "value": "Fix gem warning for wrong bin folder\n" }, { "from": "human", "value": "# coding: utf-8\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'clever_tap/version'\n\nGem::Specification.new do |spec|\n spec.name = 'clever_tap'\n spec.version = CleverTap:...
ruby
chosen
[ { "from": "system", "value": "Make store_firm and delete_firm private\n" }, { "from": "human", "value": "module FirmIndexer\n class << self\n def index_firm(firm)\n if !firm.destroyed? && firm.publishable?\n store_firm(firm)\n else\n delete_firm(firm)\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug with ActiveRecord 3\n" }, { "from": "human", "value": "module Camaraderie\n module User\n extend ActiveSupport::Concern\n\n included do\n # Associations\n has_many :memberships, dependent: :destroy, foreign_key: :user_id, class_name: 'Member...
ruby
chosen
[ { "from": "system", "value": "Fix syntax error in create method on News area\n" }, { "from": "human", "value": "module Podio\n\tmodule News\n\t\tinclude Podio::ResponseWrapper\n\t\textend self\n\n\t\tdef create(attributes)\n\t\t\tresponse = Podio.connection.post do |req|\n\t\t\t\treq.url = '/new...
ruby
chosen
[ { "from": "system", "value": "Add expense type seed data\n" }, { "from": "human", "value": "dian = User.create(name: \"Dian\", email: \"dian@example.com\", password: \"abc123\")\njulianna = User.create(name: \"Julianna\", email: \"juls@example.com\", password: \"123456\")\njenny = User.create(na...
ruby
chosen
[ { "from": "system", "value": "Add seed data for development.\n" }, { "from": "human", "value": "# Nothing to see here, yet.\n" }, { "from": "gpt", "value": "# I fear my lack of imagination for this.\n\npseudonyms = %w(svankmajer ricatorta tinchox jp_kakaroto ak|ra codefolk frankie no...
ruby
chosen
[ { "from": "system", "value": "Add admin user for testing\n" }, { "from": "human", "value": "5.times do\n passphrase_generator = Faker::Internet.password\n\n user = User.create!(username: Faker::Internet.user_name,\n password: passphrase_generator,\n pa...
ruby
chosen
[ { "from": "system", "value": "Simplify spec, less method tracing, more response checking\n" }, { "from": "human", "value": "require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))\n\nmodule NoResponseIfPerformedSpec\n # example setup\n class TheController < ActionControll...
ruby
chosen
[ { "from": "system", "value": "Make the class method syntax more explicit and readable\n\nWe only have one class method and there is a lot of indentation\nmaking the code difficult to scan. Using the class << self\nsyntax is a premature optimization in this case.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "human", "value": "Fix db:setup task to allow team creation\n\nSeed data should go to db/seeds.rb instead of being on migrations.\n" }, { "from": "gpt", "value": "unless Role.count > 0\n Role.create!(:name => \"Administrator\", :kind => Role::KIND_ADMIN)\n Role.create!(:name => \"Com...
ruby
chosen
[ { "from": "system", "value": "Add required fields to podspec\n\nCocoapods >= 1 requires `summary` and `author`" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"BVLinearGradient\"\n s.version = \"1.5.2\"\n s.homepage = \"https://github.com/brentvatne/react-...
ruby
chosen
[ { "from": "system", "value": "Use for finding a chapter for a given position rather than the array version\n" }, { "from": "human", "value": "class ChaptersController < ApplicationController\n before_filter :find_book\n \n caches_action :show\n \n def show\n @chapter = @book.chapters.de...
ruby
chosen
[ { "from": "system", "value": "Add missing require for dev_seeds rake task spec\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire 'rake'\n\ndescribe 'rake db:dev_seed' do\n let :run_rake_task do\n Rake.application.invoke_task('db:dev_seed')\n end\n\n it 'seeds the database ...
ruby
chosen
[ { "from": "system", "value": "Add create mvp action in ProjectsController.\n" }, { "from": "human", "value": "class ProjectsController < ApplicationController\n\n def new\n @user = User.find(params[:user_id])\n @project = Project.new\n end\n\n def create\n @user = User.find(params[:u...
ruby
chosen
[ { "from": "system", "value": "Add update logic to add responder\n" }, { "from": "human", "value": "class RequestsController < ApplicationController\n before_action :require_login\n\n def index\n @requests = Request.all\n end\n\n def new\n @request = Request.new\n end\n\n def create\n...
ruby
chosen
[ { "from": "system", "value": "Change assciate user error message\n" }, { "from": "human", "value": "module Ruboty\n module Jira\n module Actions\n class AssociateUser < Base\n def call\n associate\n reply_message\n rescue => e\n message.reply(e.m...
ruby
chosen
[ { "from": "system", "value": "Remove renderer memoization in development\n\nHaving to restart the Rails server to synchronize server- and\nclient-side JS introduces an additional error source in many\ndevelopment scenarios that otherwise don't have anything to do with\nthe SSR/CSR distinction.\n\nTo avoid t...
ruby
chosen
[ { "from": "system", "value": "Fix relative path issue when running ffcrm as an engine.\n" }, { "from": "human", "value": "# Copyright (c) 2008-2013 Michael Dvorkin and contributors.\n#\n# Fat Free CRM is freely distributable under the terms of MIT license.\n# See MIT-LICENSE file or http://www.o...
ruby
chosen
[ { "from": "system", "value": "Add Rails 3 monkey patch to deal with missing ivar prior to load.\n\n * Can't put this in application.rb since dotenv needs to set env before loading other gems.\n * Rails environment must be set prior to load for rspec tests or else the development db is configured\n * http...
ruby
chosen
[ { "from": "system", "value": "Make master branch less restrict on spree versions\n\nNo need to force to 2.1.0.beta as master branch should work as well\nspree 2.0.x releases\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name =...
ruby
chosen
[ { "from": "system", "value": "Use exception-raising method setup functions\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GirFFIGst\n # Override init to automatically use ARGV as its argument.\n module AutoArgv\n def self.included(base)\n base.extend ClassMe...
ruby
chosen
[ { "from": "system", "value": "Use simpler enumerated method call\n" }, { "from": "human", "value": "module Mutant\n module Delegator\n module ClassMethods\n\n private\n\n # Create delegators to object\n #\n # @return [undefined]\n #\n # @api private\n #\n ...
ruby
chosen
[ { "from": "system", "value": "Enable use with Ohm 3.x" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"ohm-validations\"\n s.version = \"1.0.0\"\n s.summary = \"Validations for Ohm models\"\n s.description = s.summary\n s.author = \"Francesco R...
ruby
chosen
[ { "from": "system", "value": "Add bounds to Tile Coordinate\n" }, { "from": "human", "value": "module Tairu\n class Coordinate\n attr_accessor :row, :column, :zoom\n\n def initialize(row, column, zoom)\n @row = Integer(row)\n @column = Integer(column)\n @zoom = Integer(zoom...
ruby
chosen
[ { "from": "system", "value": "Add rake to development dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"nagios_parser/version\"\n\nGem::Specification.new do |s|\n s.name = \"nagios_parser\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Mark updates as confirmed using offset + 1 as described in Bot API\n" }, { "from": "human", "value": "module Telebot\n class Bot\n # Default update time\n DEFAULT_UPDATE_TIME = 2\n\n attr_reader :client, :processed_update_ids, :update_time\n\n def initi...
ruby
chosen
[ { "from": "system", "value": "Fix last commit: require content type header middleware\n" }, { "from": "human", "value": "require 'tent-client/version'\nrequire 'faraday'\nrequire 'tent-client/middleware/encode_json'\nrequire 'tent-client/cycle_http'\nrequire 'tent-client/discovery'\nrequire 'ten...
ruby
chosen
[ { "from": "system", "value": "Allow change protest report type by enviroment.\n" }, { "from": "human", "value": "require 'rack/test'\nrequire 'protest'\n\nrequire_relative '../lib/cassandro'\n\nCASSANDRA = Cassandra.cluster(hosts: ['127.0.0.1'])\nSESSION = CASSANDRA.connect\n\nkeyspace_definitio...
ruby
chosen
[ { "from": "system", "value": "Fix Faraday version to 0.9.0 or later\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'logstash/client/version'\n\nGem::Specification.new do |spec|\n sp...
ruby
chosen
[ { "from": "system", "value": "Remove comments from Game class\n" }, { "from": "human", "value": "require_relative 'tic_tac_toe'\n# decisions vs dependency\n\nclass Game\n\n attr_accessor :gametype\n\n def initialize(gametype = nil)\n @gametype = gametype\n end\n\n def display_intro_msg\n ...
ruby
chosen