conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Reset negative count on hand in existing non backorderable stock items\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass ResetNegativeNonbackorderableCountOnHandInStockItems < ActiveRecord::Migration\n module Spree\n class StockItem < Active...
ruby
chosen
[ { "from": "system", "value": "Remove specs for preserving local variables.\n" }, { "from": "human", "value": "require 'stringio'\n\ndef silent\n $stdout = StringIO.new\n result = yield\n $stdout = STDOUT\n result\nend\n\nspec '.now returns the current context' do\n assert Specter.now, :is_a...
ruby
chosen
[ { "from": "system", "value": "Remove preferences validation - an empty hash is not valid.\n" }, { "from": "human", "value": "class Digestifier::Setting < ActiveRecord::Base\n self.table_name = 'digestifier_settings'\n\n belongs_to :recipient, polymorphic: true\n\n serialize :preferences, JSON...
ruby
chosen
[ { "from": "system", "value": "Check email notifications option state before sending notifications.\n\n" }, { "from": "human", "value": "class Portal::ClazzMailer < Devise::Mailer\n default :from => \"#{APP_CONFIG[:site_name]} <#{APP_CONFIG[:help_email]}>\"\n\n def clazz_creation_notification(u...
ruby
chosen
[ { "from": "system", "value": "Fix payload in publishing-api presenters\n\n`details` is now required.\n" }, { "from": "human", "value": "class TaxonPresenter\n def initialize(base_path:, title:)\n @base_path = base_path\n @title = title\n end\n\n def payload\n {\n base_path: base...
ruby
chosen
[ { "from": "system", "value": "Add some more traits for liquid layout factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n\n factory :liquid_layout do\n title { Faker::Company.bs }\n content \"<div class='fun'></div>\"\n\n trait :master do\n title 'master'\n cont...
ruby
chosen
[ { "from": "human", "value": "Add feature tests for creating disclosures" }, { "from": "gpt", "value": "require \"rails_helper\"\n\ndescribe \"Disclosures\" do\n feature \"creating a disclosure\" do\n it \"accepts valid attributes\" do\n visit new_disclosure_path\n\n fill_in \"Title...
ruby
chosen
[ { "from": "system", "value": "Fix logging spec stability issues\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Logging' do\n let(:freddy1) { Freddy.build(logger1, config) }\n let(:freddy2) { Freddy.build(logger2, config) }\n\n let(:logger1) { spy('logger1') }\n let(:lo...
ruby
chosen
[ { "from": "human", "value": ":white_check_mark: Add small spec for PageRelayJob\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe PageRelayJob do\n it 'should broadcast' do\n page = Page.create! title: 'Foo', content: 'Lorem ipsum'\n\n PageRelayJob.perform_now(page)\n\n ...
ruby
chosen
[ { "from": "system", "value": "Check we're writing messages in the right format and buffering correctly\n" }, { "from": "human", "value": "require 'spec_helper'\nmodule ActivityBroker\n describe MessageStream do\n class FakeEventLoop\n def register_read(listener, event, stop_event)\n ...
ruby
chosen
[ { "from": "system", "value": "Use up and down on contacts migration\n" }, { "from": "human", "value": "class RenameCompanyContactToContact < ActiveRecord::Migration\n def change\n if ActiveRecord::Base.connection.table_exists? 'contacts'\n drop_table :contacts\n end\n\n rename_col...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Raise ArgumentError on invalid modifier key.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@15194 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n\n # @api private\n class Keyboa...
ruby
chosen
[ { "from": "system", "value": "Fix for re-editing of change notes\n\nA change note can be edited until publication then a new change note\nmust be provided rather than showing the previous change note.\n" }, { "from": "human", "value": "require \"forwardable\"\n\nclass ManualDocumentForm\n exten...
ruby
chosen
[ { "from": "system", "value": "Add comment to make workaround less confusing\n" }, { "from": "human", "value": "$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))\n\nrequire 'rubygems'\nrequire \"bundler/setup\"\n\nrequire 'rspec'\nrequire 'capybara'\n\nRSpec.configure do |config|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix e-mail star recipient picture links.\n\nClicking on someone's picture in a star e-mail results in going to a URL\nlike http://users/2. Since relative links don't work in e-mails, use the\nuser_url helper instead of the user_path helper to generate this and\nother photo link...
ruby
chosen
[ { "from": "system", "value": "Add TODOs to helper module\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n" }, { "from": "human", "value": "require 'redcarpet'\n\nmodule ApplicationHelper\n def page_title(text, tag_type = :h1, tag_attributes = {}, prepend_n...
ruby
chosen
[ { "from": "system", "value": "Switch Avatar to use an Identicon while Twitter profile pics are unavailable.\n\nI found this service which provides a consistent identicon based on the\npassed information. Pass it an MD5 digest of the username as the unique\ninformation.\n\nThe Identicons are not as good as a...
ruby
chosen
[ { "from": "system", "value": "Fix indenting on authenticate! method\n" }, { "from": "human", "value": "module API\n module V1\n module Defaults\n extend ActiveSupport::Concern\n\n included do\n prefix \"api\"\n version \"v1\", using: :path\n default_format :jso...
ruby
chosen
[ { "from": "system", "value": "Add missing dependencies to gemspec\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'has_addresses/version'\n\nGem::Specification.new do |s|\n s.name = \"has_addresses\"\n s.version = HasAd...
ruby
chosen
[ { "from": "system", "value": "[frontend] Load taxon if params[:taxon] exists in ProductsController\n\nFixes a small bug where searching *twice* for the same term results in the taxon 'scope' being forgotten\n" }, { "from": "human", "value": "module Spree\n class ProductsController < Spree::Stor...
ruby
chosen
[ { "from": "system", "value": "Remove unused url method in poll question answers\n\nThis method would never work because it relies on the `image`\nassociation, instead of the `images` association defined in the\n`Galleryable` module.\n" }, { "from": "human", "value": "module Galleryable\n extend...
ruby
chosen
[ { "from": "system", "value": "Use a nested class to represent a sheet, removing need to disable rubocop\nFix a bug... the first item of every category was getting skipped\n" }, { "from": "human", "value": "class SpreadsheetExporter\n def initialize\n @workbook = Spreadsheet::Workbook.new\n ...
ruby
chosen
[ { "from": "system", "value": "Allow PDF attachments for wiki pages.\n" }, { "from": "human", "value": "require 'paperclip'\n\nclass WikiPageAttachment < ActiveRecord::Base\n acts_as_wiki_page_attachment do\n has_attached_file :wiki_page_attachment, :styles => { :medium => \"300x300>\", :thum...
ruby
chosen
[ { "from": "system", "value": "Add sign_up method to account creation test\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature \"Account Creation\" do\n scenario \"allows guest to create account\" do\n visit new_user_registration_path\n \n fill_in :user_email, :with => '...
ruby
chosen
[ { "from": "system", "value": "Add rspec context Does not use CSV.read\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe RuboCop::Cop::Lint::ForbidCsvRead do\n subject(:cop) { described_class.new }\n\n context 'raise' do\n let(:source){'CSV.read(\"01.csv\")'}\n it...
ruby
chosen
[ { "from": "human", "value": "Add specs for permit signed attributes.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nclass Controller\n include SignedForm::PermitSignedParams\n include RSpec::Mocks::TestDouble\nend\n\ndescribe SignedForm::PermitSignedParams do\n let(:controller) { C...
ruby
chosen
[ { "from": "system", "value": "Remove debugging code in AnalyticsReporter.\n" }, { "from": "human", "value": "class AnalyticsReporter\n\n def self.report_to_ga(args)\n new(args).report_to_ga\n end\n\n def initialize(args)\n @ga_params = args[:ga_params] || {}\n @http_client = args[:ht...
ruby
chosen
[ { "from": "system", "value": "Increase timeout for `brew readall` integration test.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"cmd/shared_examples/args_parse\"\n\ndescribe \"Homebrew.readall_args\" do\n it_behaves_like \"parseable arguments\"\nend\n\ndescribe ...
ruby
chosen
[ { "from": "system", "value": "Fix asw-sdk-v1 dependency version lock." }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'heroku_pg_backups_archive/version'\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Revert :name back in _dashboard view\n\n" }, { "from": "human", "value": "json.extract! dashboard, :id, :full_name, :currency\n\njson.metadata dashboard.settings\n\njson.data_sources dashboard.organizations.compact.map do |org|\n json.id org.id\n json.uid org.uid\...
ruby
chosen
[ { "from": "system", "value": "Add additional user to seed script\n" }, { "from": "human", "value": "require \"colorize\"\n\nattributes = {\n login: \"thedude\", \n email: \"admin@popfizzle.com\", \n password: \"abc123\", \n password_confirmation: \"abc123\", \n terms_of_use: \"1\", \n ...
ruby
chosen
[ { "from": "system", "value": "Add check to avoid crash\n" }, { "from": "human", "value": "SnifferPlugin.send :remove_const, :Opportunity\n\nclass SnifferPlugin::Profile < Noosfero::Plugin::ActiveRecord\n belongs_to :profile\nend\nclass SnifferPlugin::Opportunity < Noosfero::Plugin::ActiveRecord...
ruby
chosen
[ { "from": "human", "value": "Add tests for editing user profile; all tests pass\n" }, { "from": "gpt", "value": "require 'rails_helper'\nrequire 'capybara/rails'\n\ndescribe \"the user editing process\", type: :feature do\n\t\n\tlet!(:user)\t{ User.create(name: \"Kenneth\", email: \"user@example...
ruby
chosen
[ { "from": "system", "value": "Make the manifest import feature spec a postgres only\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature 'Import multiple repositories by uploading a manifest...
ruby
chosen
[ { "from": "system", "value": "Add Rake to gemspec for Travis CI\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bumpspark/version'\n\nGem::Specification.new do |gem|\n gem...
ruby
chosen
[ { "from": "system", "value": "Fix not to destroy other database extension's connection proxy object\n" }, { "from": "human", "value": "module ActiveRecord::Turntable\n module ActiveRecordExt\n module ConnectionHandlerExtension\n extend ActiveSupport::Concern\n\n included do\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix error in ci?\"\n\nThis reverts commit 59e780dbc0c47a2008355d09661beff14dfe4a13.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Day < Sequel::Model\n dataset_module do\n def latest(date = Date.today)\n where(date: sele...
ruby
chosen
[ { "from": "system", "value": "Change some tests to the expect syntax to make them pass on Travis.\n" }, { "from": "human", "value": "require 'helper'\n\ndescribe Potatochop::FileSystemInterface do\n describe '#new' do\n it 'creates a new FileSystemInterface object with the proper source' do\...
ruby
chosen
[ { "from": "system", "value": "Check that last_response is set after a bad request error\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Openlogi::Api::Endpoint do\n\n describe \"#perform_request\" do\n let(:client) { Openlogi::Client.new(access_token: \"foo\") }\n l...
ruby
chosen
[ { "from": "system", "value": "Add the description (progress log) from LoadEvent to the body of the notification email. Also, LoadEvent holds on to the collection of errors now too." }, { "from": "human", "value": "class LoadMailer < ApplicationMailer\n def self.send_notifications(load_event, e...
ruby
chosen
[ { "from": "system", "value": "Add notification to user mailer\n" }, { "from": "human", "value": "class UserMailer < ApplicationMailer\n include WithCertificateRender\n\n def welcome_email(user, organization)\n with_locale(user, organization) do\n organization_name = organization.displa...
ruby
chosen
[ { "from": "system", "value": "Add lambda to devotion day scopes so they update between days\n" }, { "from": "human", "value": "class DevotionDay < ActiveRecord::Base\n belongs_to :season\n has_many :devotions\n\n scope :for_today, where(:publish_date => Date.today)\n scope :published, where(...
ruby
chosen
[ { "from": "system", "value": "Add mutation covering unit spec for Morpher::Evaluator::Transformer::HashTransform\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Morpher::Evaluator::Transformer::HashTransform do\n\n let(:body_a) do\n s(:symbolize_key, 'foo', s(:guard, s(:...
ruby
chosen
[ { "from": "system", "value": "Add link field to Chocolat Cask\n" }, { "from": "human", "value": "class Chocolat < Cask\n url 'http://chocolatapp.com/download?experiment=&token='\n homepage 'http://chocolatapp.com/'\n version 'latest'\n no_checksum\nend\n\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "human", "value": "Add initial coverage on SparkleFormation class for type check\n" }, { "from": "gpt", "value": "require_relative '../spec'\n\ndescribe SparkleFormation do\n\n describe 'Class Methods' do\n\n describe 'Type checks' do\n\n before do\n @template = Sparkle...
ruby
chosen
[ { "from": "system", "value": "Fix flakey scheduled publishing test\n\nWhen running tests in parallell the scheduled publishing worker test has\na tendency to randomly fail. This seems to be because old editions are\nnot properly discarded or are running at the same time which causes the\ntest to fail.\n\nTo...
ruby
chosen
[ { "from": "system", "value": "Use non-bang merge on default hash\n" }, { "from": "human", "value": "module BOSSMan\n class Search \n DEFAULT_COUNT = 10\n DEFAULT_START = 0\n VALID_METHODS = [:web, :images, :news, :spelling, :se_inlink, :se_pagedata]\n \n class << self\n def ...
ruby
chosen
[ { "from": "system", "value": "Raise when asset not found.\n" }, { "from": "human", "value": "module ActionDispatch::Routing\n class Mapper\n\n def mount_push_type(options = {})\n opts = {\n path: '/push_type',\n home: PushType.config.home_node,\n actions: {\n ...
ruby
chosen
[ { "from": "system", "value": "Remove factories from projects cleanup spec\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire Rails.root.join('db', 'post_migrate', '20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb')\n\ndescribe CleanupNonexistingNamespacePend...
ruby
chosen
[ { "from": "system", "value": "Add support for rails 4 with prepared statements\n" }, { "from": "human", "value": "require \"find_as_hashes/version\"\nrequire 'active_record'\nrequire 'active_support/core_ext'\n\nmodule FindAsHashes\n\n module Relation\n def all_as_hashes\n connection.se...
ruby
chosen
[ { "from": "system", "value": "Add more supported swift versions to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Yams'\n s.version = '2.0.0'\n s.summary = 'A sweet and swifty YAML parser.'\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Fix for OS X Leopard [Johan Sorensen]\n\n" }, { "from": "human", "value": "require 'mkmf'\n\ndir_config(\"superredcloth_scan\")\nhave_library(\"c\", \"main\")\n\ncreate_makefile(\"superredcloth_scan\")\n" }, { "from": "gpt", "value": "require 'mkmf'\n\ni...
ruby
chosen
[ { "from": "system", "value": "Change expiration date to 24 hours.\n" }, { "from": "human", "value": "require \"jwt\"\n\nclass JsonWebToken\n def self.encode(payload, expiration = 30.minutes.from_now)\n payload = payload.dup\n payload[:exp] = expiration.to_i\n JWT.encode(payload, CONFIG...
ruby
chosen
[ { "from": "system", "value": "Make a release candidate for 1.0\n" }, { "from": "human", "value": "module Muddle\n VERSION = \"1.0.0\"\n\n def self.version\n VERSION\n end\nend\n" }, { "from": "gpt", "value": "module Muddle\n VERSION = \"1.0.0rc1\"\n\n def self.version\n VE...
ruby
chosen
[ { "from": "system", "value": "Initialize RouteCompiler once per build" }, { "from": "human", "value": "require 'ostruct'\nrequire 'yaml'\n\nmodule Pieces\n class Builder\n def self.build(config)\n new(config).build\n end\n\n attr_reader :path\n attr_reader :route_config\n\n ...
ruby
chosen
[ { "from": "system", "value": "Set instance before calling Runtime initializer\n" }, { "from": "human", "value": "require 'pathname'\n\nmodule Rohbau\n class Runtime\n class << self\n attr_reader :instance\n\n def start\n @instance = new\n end\n\n def running?\n ...
ruby
chosen
[ { "from": "system", "value": "Make sure both modules are defined\n" }, { "from": "human", "value": "module Dockly::Util\nend\n\nrequire 'dockly/util/delegate'\nrequire 'dockly/util/logger'\nrequire 'dockly/util/dsl'\n" }, { "from": "gpt", "value": "module Dockly\n module Util\n end...
ruby
chosen
[ { "from": "system", "value": "Use the new method for removing the existing network adapters 1-4.\n" }, { "from": "human", "value": "require \"householder/version\"\nrequire \"householder/vbox\"\n\nmodule Householder\n def self.import(appliance_filename)\n puts \"\\nImporting VM...\\n\\n\"\n ...
ruby
chosen
[ { "from": "system", "value": "Make sure to insert the string output of nokogiri into the database.\n" }, { "from": "human", "value": "namespace :import do\n desc \"Import the data from the files\"\n task :docs => :environment do\n puts \"Importing...\"\n\n files = \"./spec/fixtures/html\...
ruby
chosen
[ { "from": "human", "value": "Add an example of dispatching work to the mapper.\n" }, { "from": "gpt", "value": "# Worker.run('/some/task', { :id => 100 }, { :tags => 'production' })\nclass Worker\n HEADERS = {\n 'Content-Type' => 'application/json'\n }\n\n class << self\n def run(route,...
ruby
chosen
[ { "from": "system", "value": "Remove stringio dependency and use IOStub\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'pp'\nrequire 'stringio'\n\ndescribe \"PP.pp\" do\n before :each do\n @original_stdout = $stdout \n end\n \n af...
ruby
chosen
[ { "from": "system", "value": "Make concat work now that we're not injecting\n" }, { "from": "human", "value": "module Rupture\n class Seq < Enumerable::Enumerator\n include Sequence\n alias conj cons\n\n def initialize\n super(self)\n end\n\n def each\n s = self\n ...
ruby
chosen
[ { "from": "system", "value": "Update MAMP to version 3.0.1\n" }, { "from": "human", "value": "class Mamp < Cask\n url 'http://downloads.mamp.info/MAMP-PRO/releases/2.2/MAMP_MAMP_PRO_2.2.zip'\n homepage 'http://www.mamp.info/en/index.html'\n version '2.2'\n sha256 'd01d43a881e0c0fbaa06301364b...
ruby
chosen
[ { "from": "system", "value": "Change provider lookup for API\n" }, { "from": "human", "value": "module Api::V1\nclass AuthController < ApiController\n\n def google\n access_token_uri = URI('https://accounts.google.com/o/oauth2/token')\n people_api_uri = URI('https://www.googleapis.com/plu...
ruby
chosen
[ { "from": "system", "value": "Remove methods we're not using\n\nWe can add them back later if we need them.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n force_ssl if Rails.configuration.start_secure_session\n\n protect_from_forgery with: :exception\...
ruby
chosen
[ { "from": "system", "value": "Make devise use the \"outer application\" layout.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\nend\n" }, { "from": "gpt", "value": "class ApplicationController < ActionController::Base\n...
ruby
chosen
[ { "from": "system", "value": "Create iam_user and access_key through the rake task.\n\nuse command: bin/rails ecr:user:create['sample']\n" }, { "from": "human", "value": "namespace :ecr do\n namespace :group do\n desc 'Create Iam Group (rails ecr:group:create[group_name])'\n task :create,...
ruby
chosen
[ { "from": "system", "value": "Update application controller with module CurrentUserHelper.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n prote...
ruby
chosen
[ { "from": "system", "value": "Comment about requiring error classes in the right order.\n" }, { "from": "human", "value": "require \"trade_queen/version\"\nrequire \"trade_queen/client\"\nrequire \"trade_queen/collection\"\n\n#require the rest namespace\nrequire \"trade_queen/rest/client\"\nrequ...
ruby
chosen
[ { "from": "system", "value": "Update logging for implicit controller usage.\n" }, { "from": "human", "value": "module ActionHero\n class LogSubscriber < ActiveSupport::LogSubscriber\n\n def start_processing( event )\n controller_name = \"#{event.payload[:params]['controller'].camelize}C...
ruby
chosen
[ { "from": "system", "value": "Use route method instead of verb methods\n" }, { "from": "human", "value": "module Airship\n module Management\n module Padrino\n def self.registered(app)\n app.extend ClassMethods\n end\n\n module ClassMethods\n def index(options = ...
ruby
chosen
[ { "from": "system", "value": "Remove main adapter by default\n\nThe default behavior on Rails should probably not be to raise an error.\n\nResolves issue #12\n" }, { "from": "human", "value": "require 'rails/generators'\nrequire 'rails/generators/actions'\n\n# This generator adds an initializer ...
ruby
chosen
[ { "from": "system", "value": "Update React Native documentation (0.24)\n" }, { "from": "human", "value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.23'\n self.base_url = 'https://fac...
ruby
chosen
[ { "from": "system", "value": "Update React Native documentation (0.34)\n" }, { "from": "human", "value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.33'\n self.base_url = 'https://fac...
ruby
chosen
[ { "from": "system", "value": "Fix missing require in migrations.\n\n\n" }, { "from": "human", "value": "class TileTracepoints < ActiveRecord::Migration\n def self.up\n add_column \"gps_points\", \"tile\", :four_byte_unsigned\n add_index \"gps_points\", [\"tile\"], :name => \"points_tile_i...
ruby
chosen
[ { "from": "system", "value": "Update PT sans to sha256 checksums\n" }, { "from": "human", "value": "class FontPtSans < Cask\n url 'http://www.fontstock.com/public/PTSans.zip'\n homepage 'http://www.paratype.com/public/'\n version '2.004'\n sha1 '3e14c921c2c9eb524ad5680eff931d1d5cbca00a'\n f...
ruby
chosen
[ { "from": "system", "value": "Load model mixin via Devise.add_module\n" }, { "from": "human", "value": "require 'devise_g5_authenticatable/version'\n\nrequire 'devise'\nrequire 'omniauth-g5'\n\nrequire 'devise_g5_authenticatable/models/g5_authenticatable'\n\nrequire 'devise_g5_authenticatable/co...
ruby
chosen
[ { "from": "system", "value": "Complete list of body categories\n" }, { "from": "human", "value": "PublicBodyCategories.add(:es, [\n \"Administración Central\",\n [ \"ministerio\", \"Ministerios\", \"un ministerio\" ],\n [ \"agencia_estatal\", \"Agencias Estatales\", \"una agenci...
ruby
chosen
[ { "from": "system", "value": "Use different timestamps for migrations\n\nThis commit fixes a bug where add_index created migrations with the same\ntimestamp. This is not allowed by Rails. Migrations are now timestamped\nin 1 second intervals.\n" }, { "from": "human", "value": "module ActiveRecor...
ruby
chosen
[ { "from": "system", "value": "Add code comment for method_missing\n\nThis method's behavior is a bit difficult.\n" }, { "from": "human", "value": "module Nyanko\n module UnitProxyProvider\n extend ActiveSupport::Concern\n\n included do\n extend UnitProxyProvider\n include Helper...
ruby
chosen
[ { "from": "human", "value": "Add Deploy strategy for convenience\n" }, { "from": "gpt", "value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class Deploy < Atech\n\n # Request access to the Codebase API\n option :authorize_params, {:scope => 'deploy'}\n\n ...
ruby
chosen
[ { "from": "system", "value": "Allow passing of params to shift's list\n" }, { "from": "human", "value": "module PayrollHero\n module Api\n module V4\n class Shifts < BaseGroup\n def list\n client.get('/api/v4/shifts')\n end\n end\n end\n end\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Fix Nokogiris parse_io, which had a bad reference\n" }, { "from": "human", "value": "require 'nokogiri'\n\nmodule ROXML\n module XML # :nodoc:all\n Document = Nokogiri::XML::Document\n Element = Nokogiri::XML::Element\n Node = Nokogiri::XML::Node\n\n mo...
ruby
chosen
[ { "from": "system", "value": "Make rubocop happy with my work\n" }, { "from": "human", "value": "module SitePrism\n module ElementChecker\n def all_there?\n Capybara.using_wait_time(0) do\n expected_elements.all? { |element| send \"has_#{element}?\" }\n end\n end\n\n p...
ruby
chosen
[ { "from": "system", "value": "Fix for connections using HTTP 1.1\n" }, { "from": "human", "value": "module ActiveResource\n # Overridden methods to suit SalesKing's nested json format\n # only valid for AR 3.1\n # In the future might add a custom format class, see base.format\n class Base\n\...
ruby
chosen
[ { "from": "system", "value": "Add some fields to AdInsight.\n" }, { "from": "human", "value": "module FacebookAds\n # Ad insights exist for ad accounts, ad campaigns, ad sets, and ads.\n # A lot more can be done here.\n # https://developers.facebook.com/docs/marketing-api/insights/overview\n ...
ruby
chosen
[ { "from": "system", "value": "Tweak DNS Details rake task description\n" }, { "from": "human", "value": "require 'transition/import/dns_details'\nrequire 'transition/distributed_lock'\n\nnamespace :import do\n desc 'Look up CNAME details for all hosts'\n task :dns_details => :environment do\n ...
ruby
chosen
[ { "from": "human", "value": "Add callback style echo server\n" }, { "from": "gpt", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'rubygems'\nrequire 'cool.io'\n\nADDR = '127.0.0.1'\nPORT = 4321\n\nevent_loop = Cool.io::Loop.default\nserver = Cool.io::TCPServer.n...
ruby
chosen
[ { "from": "system", "value": "Make sure exit code is a number\n" }, { "from": "human", "value": "module Net\n module SSH\n class SessionCommand\n attr_reader :command, :output, :exit_code\n \n # Initialize a new session command\n # @param command [String] original command...
ruby
chosen
[ { "from": "system", "value": "Check schema version before connecting to DB\n" }, { "from": "human", "value": "module Abid\n module StateManager\n module Database\n Sequel.extension :migration\n\n # Create a new database object.\n #\n # Abid.config['database'] is used Sequ...
ruby
chosen
[ { "from": "system", "value": "Configure extension when loading ActiveRecord\n\nFixes `create_enabled` not setting in rake tasks.\n" }, { "from": "human", "value": "module ActiveRecordViews\n class Railtie < ::Rails::Railtie\n initializer 'active_record_views' do |app|\n ActiveSupport.on...
ruby
chosen
[ { "from": "system", "value": "Include title in basic HTML.\n" }, { "from": "human", "value": "module Artisan\n basic_elements = %w{body div em h1 h2 h3 h4 h5 h6 head html il nav p pre\n small span strong sub summary sup table td th tr ul}\n\n basic_empty_elements = %w{br}\n\n BasicHTML = Too...
ruby
chosen
[ { "from": "system", "value": "Refactor method for setting metadata\n" }, { "from": "human", "value": "class Genomer::OutputType::Genbank < Genomer::OutputType\n\n SUFFIX = 'gb'\n\n def generate\n build = Bio::Sequence.new(sequence)\n build.entry_id = @rules.identifier if @rules.identifie...
ruby
chosen
[ { "from": "system", "value": "Correct URL in Dropbox Beta" }, { "from": "human", "value": "cask 'dropbox-beta' do\n version '6.3.13'\n sha256 'a497b1fdbb0fce59b1b61dec63a317e923de3aaec3c18f3bd6520be000bb5b2e'\n\n url \"https://clientupdates.dropboxstatic.com/client/Dropbox%20#{version}.dmg\"\...
ruby
chosen
[ { "from": "system", "value": "Simplify and make private CommentEnumerator methods\n" }, { "from": "human", "value": "module Unparser\n class CommentEnumerator\n def initialize(comments)\n @comments = comments.dup\n end\n\n attr_writer :last_source_range_written\n\n def take_eol...
ruby
chosen
[ { "from": "system", "value": "Downgrade worker_processes to 1 - for the free Heroku instance\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:/...
ruby
chosen
[ { "from": "system", "value": "Fix version file require in gemspec\n" }, { "from": "human", "value": "require_relative 'lib/autoprefixer-rails/version'\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'autoprefixer-rails'\n s.version = AutoprefixerRa...
ruby
chosen
[ { "from": "system", "value": "Fix code formatting in gemspec\n" }, { "from": "human", "value": "require File.expand_path('../lib/memoizable/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'memoizable'\n gem.version = Memoizable::VERSION.dup\n gem.authors = [...
ruby
chosen
[ { "from": "system", "value": "Use null: false for timestamp in migration\n" }, { "from": "human", "value": "class CreateSpreeShippingMethodStockLocations < ActiveRecord::Migration\n def change\n create_table :spree_shipping_method_stock_locations do |t|\n t.belongs_to :shipping_method\n...
ruby
chosen
[ { "from": "system", "value": "Add a very simple testcase\n" }, { "from": "human", "value": "require 'helper'\n\nclass Term2IRCTest < Test::Unit::TestCase\nend\n" }, { "from": "gpt", "value": "require 'helper'\n\nclass Term2IRCTest < Test::Unit::TestCase\n test 'simple convert' do\n ...
ruby
chosen