conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add spec for specific tags\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ExifGpsInjector::Media do\n let(:media) do\n ExifGpsInjector::Media.new(File.join(File.dirname(__FILE__), '../fixtures/ruby.jpg'))\n end\n\n it 'return tags' do\n ...
ruby
chosen
[ { "from": "human", "value": "Add a happy path integration test.\n\nSigned-off-by: Pete Higgins <e3b6cda228242c30b711ac17cb264f1dbadfd0b6@peterhiggins.org>\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nrequire \"support/shared/integration/integration_helper\"\nrequire \"chef/mixin/s...
ruby
chosen
[ { "from": "system", "value": "Add default scope to withdrawal history\n" }, { "from": "human", "value": "module Referrals\n class WithdrawalHistory < ApplicationRecord\n belongs_to :withdrawal\n end\nend\n" }, { "from": "gpt", "value": "module Referrals\n class WithdrawalHistor...
ruby
chosen
[ { "from": "system", "value": "Update referent values for mass assignment issue/requirement in recent rails 3 versions.\n" }, { "from": "human", "value": "class ReferentValue < ActiveRecord::Base\n belongs_to :referent, :include => :referent_values\n\n # Class method to normalize a string for n...
ruby
chosen
[ { "from": "system", "value": "@thenathanjones: Remove the leading slash on the cache action to expire for the namespace\n" }, { "from": "human", "value": "class ApiSweeper < ActionController::Caching::Sweeper\n observe Category, Entry\n\n def after_save record\n expire_action(:controller =>...
ruby
chosen
[ { "from": "system", "value": "Fix seed file, add 'end'\n" }, { "from": "human", "value": "require 'faker'\n\nUser.delete_all\nQuestion.delete_all\n\n50.times do\n User.create!( name: Faker::Name.name,\n username: Faker::Internet.user_name,\n email: Faker::Internet....
ruby
chosen
[ { "from": "system", "value": "Upgrade dependencies to support Rails 5.1\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ddc/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use sequel < 3.0, it breaks repoman\n\ngit-svn-id: addd40251ba30a5efebfaf2146a7968786ebe177@713 3034c82b-c49b-4eb3-8279-a7acafdc01c0\n" }, { "from": "human", "value": "\nrequire 'rubygems'\n#require 'storage_pool'\nrequire 'uuid'\nrequire 'fileutils'\nrequire 'seque...
ruby
chosen
[ { "from": "system", "value": "Add 2 requires in order to fix apps in the test environment.\nOne require on sass should not be needed and should be investigated.\n" }, { "from": "human", "value": "\nrequire \"config/routes\"\n\nrequire \"rich/cms/actionpack\"\nrequire \"rich/cms/engine\"\nrequire...
ruby
chosen
[ { "from": "system", "value": "[CS] Remove unused code to check for RBX\n" }, { "from": "human", "value": "%w{\n future-resource\n logger\n girl_friday\n countdownlatch\n celluloid/io\n}.each { |f| require f }\n\nclass Logger\n alias :trace :debug\nend\n\nmodule RubyAMI\n def self.new_uuid...
ruby
chosen
[ { "from": "system", "value": "Allow environment variable to override log level\n" }, { "from": "human", "value": "require \"rubygems\"\n\nrequire File.expand_path(File.dirname(__FILE__) + \"/testjour/object_extensions\")\nrequire File.expand_path(File.dirname(__FILE__) + \"/testjour/queue_server...
ruby
chosen
[ { "from": "system", "value": "Add a couple keyboard shortcuts\n\nThis allows the popular Logitech R800 to be used out of the box for full\ncontrol, including screen blanking and code execution. The play button\nwill run code on first tap, then clear results on second.\n" }, { "from": "human", "v...
ruby
chosen
[ { "from": "human", "value": "Add Mailer class to send email to an address, with a subject and message.\n" }, { "from": "gpt", "value": "require 'pony'\nclass Mailer\n def self.send(address, subject, message)\n Pony.mail(\n to: address,\n from: \"government_api_validator@continuity....
ruby
chosen
[ { "from": "system", "value": "Remove String.underscore due to Rails conflict\n" }, { "from": "human", "value": "#\n# Extend the core String class to include `.to_snake`\n#\nclass String\n # Attempts to convert a string into a formatted_snake_case_string\n def to_snake\n self.gsub(/([A-Z]+)(...
ruby
chosen
[ { "from": "human", "value": "Add Facter fact that provides information about the load average, etc ...\n\nThis fact provides information about the load average on the underlying\nsystem for last one, five and fifteen minutes; plus number of currently\nrunning processes and the total number of processes, and...
ruby
chosen
[ { "from": "system", "value": "Test round can be viewed via GET after creation\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass RoundCreationTest < ActionDispatch::IntegrationTest\n test \"rounds are viewable after creation\" do\n get '/'\n assert_response :success\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add rubocop as dev dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"hiera/backend/aws/version\"\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "system", "value": "Remove a spec for the useless validation\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe OauthAuthentication, type: :model do\n describe 'validations' do\n subject { Fabricate.build(:oauth_authentication) }\n\n it 'has a valid fabr...
ruby
chosen
[ { "from": "system", "value": "Change to fix option name\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Necromancer\n module HashConverters\n # An object that converts a String to a Hash\n class StringToHashConverter < Converter\n # Convert string value to ...
ruby
chosen
[ { "from": "system", "value": "Patch updating authorisation per Twitter authentication\r\n\r\nPrevents authorising from opening Allow prompt on every authentication attempt. See: https://dev.twitter.com/docs/api/1/get/oauth/authenticate" }, { "from": "human", "value": "require 'omniauth-oauth'\nr...
ruby
chosen
[ { "from": "system", "value": "Set max_chars 15 for path1 and path2\n" }, { "from": "human", "value": "module Puffery\n module Builder\n class ExpandedAd < Base\n\n # A list of the limits can be found here:\n # https://developers.google.com/adwords/api/docs/guides/expanded-text-ads\...
ruby
chosen
[ { "from": "system", "value": "Fix coverage config in adapters module\n\nCoverage was reporting 0%. This was because simplecov wasn't placed\nbefore the abc-adapters part was loaded. Shuffling that one line fixed\nthe coverage report.\n" }, { "from": "human", "value": "$LOAD_PATH.push File.expa...
ruby
chosen
[ { "from": "system", "value": "Use do..end syntax for multiline-blocks\n" }, { "from": "human", "value": "require 'zip'\n\nmodule Stevenson\n module OutputFilter\n module Zip\n include Base\n\n def output\n Dir.mktmpdir do |dir|\n # Call the parent method\n ...
ruby
chosen
[ { "from": "system", "value": "Tweak sentry to include plugins in app only stacktraces\n" }, { "from": "human", "value": "Raven.configure do |config|\n # httpclient is the only faraday adpater which handles no_proxy \n config.http_adapter = :httpclient\n config.send_modules = false\nend\n" }...
ruby
chosen
[ { "from": "human", "value": "Add a project to build chef in separate directory\n\nWe cannot install vanilla omnibus packages on the machines that build or\ntest omnibus packages because they conflict over the /opt/chef\ndirectory. We could install w/ rubygems but on some platforms omnibus is\nthe only viabl...
ruby
chosen
[ { "from": "system", "value": "Update Translation model to make :locale accessible" }, { "from": "human", "value": "module Globalize\n module ActiveRecord\n class Translation < ::ActiveRecord::Base\n class << self\n # Sometimes ActiveRecord queries .table_exists? before the table ...
ruby
chosen
[ { "from": "system", "value": "Use delete_all instead destroy for removing hydra attributes" }, { "from": "human", "value": "module HydraAttribute\n class AssociationBuilder\n\n def initialize(klass, type)\n @klass, @type = klass, type\n end\n\n def build\n create_associated_m...
ruby
chosen
[ { "from": "system", "value": "Copy parents' mappings instead of accidentally sharing.\n" }, { "from": "human", "value": "module InheritanceIntegerType\n module Extensions\n extend ActiveSupport::Concern\n module ClassMethods\n\n def integer_inheritance=(val)\n self._inheritanc...
ruby
chosen
[ { "from": "system", "value": "Add .js ext to localstorageshim asset path\n" }, { "from": "human", "value": "module Localstorageshim\n module ViewHelpers\n def localstorage_shim\n <<-HTML.strip.html_safe\n<!--[if lte IE 7]>\n <script src=\"#{asset_path 'localstorageshim'}\" type=\"tex...
ruby
chosen
[ { "from": "system", "value": "Fix bug when querying for all database users\n\nThis commit fixes an issue in self.instances of\ndatabase_user where none of the users were actually\nbeing detected.\n\nThere was a accidental '\\' in front of the '.' which \nmeans that it will only consider users that have\none...
ruby
chosen
[ { "from": "system", "value": "Remove pre from Testing Podspec reference\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RKKiwiMatchers\"\n s.version = \"0.20.0\"\n s.summary = \"Provides a rich set of matchers for use in testing RestKit applications with...
ruby
chosen
[ { "from": "system", "value": "Fix podspec to conforms sources to a specific tag\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"OROpenSubtitleDownloader\"\n s.version = \"1.1.1\"\n s.summary = \"An Obj-C API for Searching and Downloading Subtitles from O...
ruby
chosen
[ { "from": "system", "value": "Attach the first user to the first team\n" }, { "from": "human", "value": "class Admins::RegistrationsController < Devise::RegistrationsController\n layout \"login\", except: [:edit, :update]\n before_filter :check_first_user, only: [:new, :create]\n\n private\n\...
ruby
chosen
[ { "from": "system", "value": "Add notes to chapter and section nodes of commodity response\n" }, { "from": "human", "value": "node(:declarable) { true }\n\nattributes :meursing_code\n\nchild :section do\n attributes :title, :position, :numeral\nend\n\nchild :chapter do\n attributes :goods_nome...
ruby
chosen
[ { "from": "system", "value": "Use i18n model_name syntax for promotion rules\n\nThis change opts to use the model_name.human syntax over the previous\nconvoluted Spree.t and demodulize method.\n" }, { "from": "human", "value": "module Spree\n module PromotionRulesHelper\n def options_for_pro...
ruby
chosen
[ { "from": "system", "value": "Add curl test for openx\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe port(80) do\n it { should be_listening }\nend\n\ndescribe port(443) do\n it { should be_listening }\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'...
ruby
chosen
[ { "from": "system", "value": "Mark audit job tests as pending\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe AuditJob do\n before do\n @user = FactoryGirl.find_or_create(:jill)\n @inbox = @user.mailbox.inbox\n @file = GenericFile.new\n @file.apply_depositor_met...
ruby
chosen
[ { "from": "system", "value": "Change default of current_streak to 1\n" }, { "from": "human", "value": "class CreateSkills < ActiveRecord::Migration\n def change\n create_table :skills do |t|\n t.string :title, null: false\n t.integer :current_streak, default: 0\n t.integer :lo...
ruby
chosen
[ { "from": "system", "value": "Remove csv serialization file. Not needed?\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'rexml/document'\nrequire 'net/http'\nrequire 'inherited_attribute'\nrequire 'add_condition'\nrequire 'misc_tools'\nrequire 'db_tools'\nrequire 'blank_to_nil'\n...
ruby
chosen
[ { "from": "human", "value": "Add new subnet topology controller\n" }, { "from": "gpt", "value": "class SubnetTopologyController < ApplicationController\n include TopologyMixin\n\n before_action :check_privileges\n before_action :get_session_data\n after_action :cleanup_action\n after_action...
ruby
chosen
[ { "from": "system", "value": "QUALITY: Add missing is_closed field to ticket serialiser\n" }, { "from": "human", "value": "class HelpdeskTicketSerializer < ActiveModel::Serializer\n attributes :id,\n :student,\n :task,\n :tutorial,\n :target_grade...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to avoid build warning\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'octokit/version'\n\nGem::Specification.new do |spec|\n spec.add_d...
ruby
chosen
[ { "from": "system", "value": "Update reference to Expression class\n" }, { "from": "human", "value": "class Expression\n def self.create(variable_terminals=['x'], depth=0)\n r = rand\n if r < 0.33\n BinaryExpression.new(variable_terminals, depth)\n elsif r < 0.67\n BinaryExpr...
ruby
chosen
[ { "from": "system", "value": "Update iOS podspec docs URL\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = 'Tangram-es'\n s.version = '0.10.0'\n\n s.summary = 'Open source C++ library for rendering 2D and 3D maps from vector data using OpenGL ES.'\n s.descrip...
ruby
chosen
[ { "from": "system", "value": "Move some code to more logic place in Activity.\n" }, { "from": "human", "value": "class Activity < ActiveRecord::Base\n # Associations\n belongs_to :project\n belongs_to :person\n validates :project, :presence => true, :allow_blank => false\n validates :person...
ruby
chosen
[ { "from": "system", "value": "Fix circular dependency while loading Settings [SCI-1004]\n" }, { "from": "human", "value": "class Settings < ActiveRecord::Base\n @instance = first\n\n def self.instance\n @instance ||= new\n end\nend\n" }, { "from": "gpt", "value": "class Setting...
ruby
chosen
[ { "from": "system", "value": "Handle the case where you have the plugin installed but not switched on.\n\n\ngit-svn-id: 40196796c19c0e7557af02d93710b150381d7241@92 f5dbc166-08e2-44d3-850c-36126807790f\n" }, { "from": "human", "value": "require 'dtracer'\nrequire 'dtracer_client'\n\nmodule Dtrace...
ruby
chosen
[ { "from": "system", "value": "Add reverse method for counting product quantity in cart\n" }, { "from": "human", "value": "class CombineItemsInCart < ActiveRecord::Migration\n def up\n # replace multiple products entries by one entry with quantity\n Cart.all.each do |cart|\n # count q...
ruby
chosen
[ { "from": "system", "value": "Make all the lines that create dice be consistent\n" }, { "from": "human", "value": "require_relative 'hand'\nrequire_relative 'loaded_die'\n\ndescribe Hand do\n it \"has five dice, each of which has a known face value\" do\n dice = 5.times.map { LoadedDie.new('...
ruby
chosen
[ { "from": "system", "value": "Include Pony gem in gemspec for email notification\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ruby_git_hooks/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Move Places toward top of search.\n\nWhy:\n\nSearching for \"Bedford\", for example, didn't return desired results --\nto see that municipality. Now, we put the matching municipality on top\nof the search results.\n" }, { "from": "human", "value": "require 'mapzen_s...
ruby
chosen
[ { "from": "human", "value": "Add missing parent test case class\n" }, { "from": "gpt", "value": "require 'cir'\nrequire 'tmpdir'\nrequire 'test/unit'\nrequire 'fileutils'\n\n##\n# Parent test case that will contain shared functionality that we need\n# across various test cases.\nclass CirTestCas...
ruby
chosen
[ { "from": "system", "value": "Add cc.rb CI config for montana cycling branch without /local\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n# The git clone is a bit of a hack, but seems like the easiest solution to pulling in different projects\n#\n# Intentionally doing git clone and r...
ruby
chosen
[ { "from": "system", "value": "Add description and summary in the gemspec\n\nBundler was complaining about FIXME in both of them\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'resque...
ruby
chosen
[ { "from": "human", "value": "Add cask for AppCode EAP with bundled JDK\n" }, { "from": "gpt", "value": "cask :v1 => 'appcode-eap-bundled-jdk' do\n version '141.1399.2'\n sha256 'f9f9b7ae73321a1d4a31aaaed7ebb2d15ada03d65ae9f436756ade1ea29c2f83'\n\n url \"https://download.jetbrains.com/objc/App...
ruby
chosen
[ { "from": "system", "value": "Fix missing parser.rb in packaged gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'reactive_record/version'\n\nGem::Specification.new do |g...
ruby
chosen
[ { "from": "system", "value": "Drop mercurial like it's hot\n" }, { "from": "human", "value": "name 'exabgp'\nmaintainer 'Aetrion, LLC.'\nmaintainer_email 'ops@dnsimple.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures exabgp'\nlong_description IO.read(F...
ruby
chosen
[ { "from": "system", "value": "Make sure newer octobase is used.\n" }, { "from": "human", "value": "# encoding: utf-8\nname 'octohost'\nmaintainer 'Darron Froese'\nmaintainer_email 'darron@froese.org'\nlicense 'Apache 2.0'\ndescription 'Installs/configures octohost...
ruby
chosen
[ { "from": "system", "value": "Update yum dep from 3.0 to 3.2\n" }, { "from": "human", "value": "name 'yum-erlang_solutions'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures yum-erlang_solutions'\nlong_description IO.r...
ruby
chosen
[ { "from": "system", "value": "Update meta to properly reflect testing/support\n\nThis cookbook isn’t tested on Ubuntu 12, and it’s EOL anyway.\n" }, { "from": "human", "value": "name 's3_put'\nmaintainer 'EverTrue, Inc.'\nmaintainer_email 'devops@evertrue.com'\nlicense ...
ruby
chosen
[ { "from": "system", "value": "Use a slightly better compat_resource\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'yum-remi-chef'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache 2.0'...
ruby
chosen
[ { "from": "system", "value": "Update podspec version to 1.4\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SimulatorStatusMagic\"\n s.version = \"1.3\"\n s.summary = \"Enable perfect status bars in the iOS Simulator.\"\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Add all nodes for now in parsing\n" }, { "from": "human", "value": "module JellyfishOdl\n module Provider\n class Odl < ::Provider\n def network_topology\n auth = { username: settings[:username], password: settings[:password] }\n base_url = \"...
ruby
chosen
[ { "from": "system", "value": "Delete associated resources (NIC, IP, VHD, .status)\nwhen deleting a VM\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1348718\n" }, { "from": "human", "value": "module ManageIQ::Providers::Azure::CloudManager::Vm::Operations\n extend ActiveSupport::Concern\n incl...
ruby
chosen
[ { "from": "system", "value": "Add better inspect for Rubinius::Mirror\n" }, { "from": "human", "value": "module Rubinius\n class Mirror\n def self.subject=(klass)\n @subject = klass\n end\n\n def self.subject\n @subject\n end\n\n def self.reflect(obj)\n klass = Rub...
ruby
chosen
[ { "from": "system", "value": "Fix the wrong heredoc format\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'qiita/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Handle SSLError that is effectively Errno::EWOULDBLOCK correctly\n" }, { "from": "human", "value": "require \"socket\"\n\nmodule Bunny\n begin\n require \"openssl\"\n\n # TLS-enabled TCP socket that implements convenience\n # methods found in Bunny::Socket...
ruby
chosen
[ { "from": "system", "value": "Print snippets for undefined Cucumber steps\n" }, { "from": "human", "value": "require 'cucumber/formatter/progress'\n\nmodule Fivemat\n class Cucumber < ::Cucumber::Formatter::Progress\n def before_feature(feature)\n @io.print \"#{feature.file} \"\n @...
ruby
chosen
[ { "from": "system", "value": "Remove useless initialization of user\n" }, { "from": "human", "value": "module Highrise\n class Account < Base\n def self.me\n user = Account.new()\n find(:one, :from => \"/account.xml\")\n end\n end\nend" }, { "from": "gpt", "value": ...
ruby
chosen
[ { "from": "system", "value": "Send SQL logs to stdout\n" }, { "from": "human", "value": "require 'sequel'\nrequire 'sequel/model'\n\nmodule JobBoard\n module Models\n autoload :Image, 'job_board/models/image'\n\n class << self\n def db\n @db ||= Sequel.connect(\n JobB...
ruby
chosen
[ { "from": "system", "value": "Use protocol-independent urls for Yandex and Microsoft CDNs\n" }, { "from": "human", "value": "require 'jquery-rails'\nrequire 'jquery-rails-cdn/version'\n\nmodule Jquery::Rails::Cdn\n module ActionViewExtensions\n JQUERY_VERSION = Jquery::Rails::JQUERY_VERSION\...
ruby
chosen
[ { "from": "system", "value": "Fix bug in depth-first search that would cause an exception when hitting the first leaf node.\n" }, { "from": "human", "value": "require \"attributable\"\n\nmodule Metamorpher\n class Rule\n extend Attributable\n attributes :pattern, :replacement\n\n def a...
ruby
chosen
[ { "from": "system", "value": "Remove typo and unecessary info\n" }, { "from": "human", "value": "module MWS\n module API\n class Feeds < Base\n Actions = [:submit_feed, :get_feed_submission_list, :get_feed_submission_list_by_next_token,\n :get_feed_submission_count, :can...
ruby
chosen
[ { "from": "system", "value": "Make Bra methods module methods.\n" }, { "from": "human", "value": "require 'yaml'\n\nrequire 'bra/launcher'\nrequire 'bra/common/constants'\n\nmodule Bra\n def self.launch_from_config_file(file = nil)\n Bra::Launcher.launch(get_config(file))\n end\n\n private...
ruby
chosen
[ { "from": "human", "value": "Add script to insert test data for concept_tag_results\n" }, { "from": "gpt", "value": "teacher = User.find(498)\n\nactivity_sessions = ActivitySession.completed.by_teacher(teacher)\n\nrandom_session = activity_sessions.order(\"RANDOM()\").first\n\ngrammar_concepts =...
ruby
chosen
[ { "from": "human", "value": "Add Wavefront::Mixin, method to interpolate schema\n" }, { "from": "gpt", "value": "=begin \n Copyright 2015 Wavefront Inc.\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou ma...
ruby
chosen
[ { "from": "system", "value": "Use ActiveSupport::LogSubscriber for colorized messages.\n\nIf the app has turned off colorization it won't be colorized.\n" }, { "from": "human", "value": "require \"whiny_validation/version\"\n\nmodule WhinyValidation\n extend ActiveSupport::Concern\n\n included...
ruby
chosen
[ { "from": "system", "value": "Add do to tags migration\n" }, { "from": "human", "value": "class CreateTags < ActiveRecord::Migration\n def change\n create_table :tags |t|\n t.string :description\n\n t.timestamps null: false\n end \n end\nend\n" }, { "from": "gpt", "...
ruby
chosen
[ { "from": "system", "value": "Use common class to manage apache service in beaker job\n\nDepends-on: https://review.opendev.org/#/c/745246/\nChange-Id: I7fccb5c4fc29a3c5a2d864d9ac7df3d2d181faac\n" }, { "from": "human", "value": "require 'spec_helper_acceptance'\n\ndescribe 'basic trove' do\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add test for matching formula filename/class.\n" }, { "from": "gpt", "value": "#!/usr/bin/ruby\n# This software is in the public domain, furnished \"as is\", without technical\n# support, and with no warranty, express or implied, as to its usefulness for\n# any purpo...
ruby
chosen
[ { "from": "system", "value": "Refactor tests to make future tests easier.\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe StartingBlocks::ResultParser do\n\n it \"should return the result from the text parser\" do\n\n text ...
ruby
chosen
[ { "from": "human", "value": "Write tests for Backups Resource\n\nSimple tests for the list and retrieve endpoints inspired by the existing test created\nfor the Users Resources list and retrieve endpoints.\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\...
ruby
chosen
[ { "from": "system", "value": "Fix copy-paste error in comment\n" }, { "from": "human", "value": "# Monkey-patch Redis::Store to make 'setex' and 'expire' work with namespacing\n\nmodule Gitlab\n class Redis\n class Store\n module Namespace\n # Redis::Store#expire in redis-store 1...
ruby
chosen
[ { "from": "system", "value": "BOS-FF: Remove precompile kontakt io assets\n" }, { "from": "human", "value": "###\n# Copyright (c) 2015, Upnext Technologies Sp. z o.o.\n# All rights reserved.\n#\n# This source code is licensed under the BSD 3-Clause License found in the\n# LICENSE.txt file in the...
ruby
chosen
[ { "from": "system", "value": "Fix REAMDE file name in gemspec.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# The gem's version:\nrequire \"respect/version\"\n\nGem::Specification.new do |s|\n s.name = \"respect\"\n s.version = Respect::VERSIO...
ruby
chosen
[ { "from": "human", "value": "Add routes specs for pages.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe 'page routes' do\n it 'GET /backend/pages' do\n expect(get: '/backend/pages').to route_to('backend/pages#index')\n end\n\n it 'GET /backend/pages/1' do\n expect(g...
ruby
chosen
[ { "from": "system", "value": "Define migration to create questions table\n" }, { "from": "human", "value": "class CreateQuestions < ActiveRecord::Migration\n def change\n end\nend\n" }, { "from": "gpt", "value": "class CreateQuestions < ActiveRecord::Migration\n def change\n cr...
ruby
chosen
[ { "from": "system", "value": "Enable feature for local organics only\n" }, { "from": "human", "value": "require \"chili\"\nrequire \"enterprises_distributor_info_rich_text_feature/engine\"\n\nmodule EnterprisesDistributorInfoRichTextFeature\n extend Chili::Base\n active_if { true } # edit this...
ruby
chosen
[ { "from": "system", "value": "Add sucker_punch to gemspec dev dependency.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rollbar/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Brian Rue\"]\n gem.email = [\...
ruby
chosen
[ { "from": "human", "value": "Add unique index for spree option type lower name\n" }, { "from": "gpt", "value": "class AddUniqueIndexToSpreeOptionTypeName < SpreeExtension::Migration[4.2]\n def change\n return if check_lower_index_exists?\n\n attributes = Spree::OptionType.unscoped.group(:...
ruby
chosen
[ { "from": "system", "value": "Fix migrate tax categories to line items migration\n\nThis is bringing https://github.com/spree/spree/commit/67186f8ca7eed72b20e696d53f3ceb4fa875524f from spree v2.2\n" }, { "from": "human", "value": "# This migration comes from spree (originally 20130802022321)\ncl...
ruby
chosen
[ { "from": "system", "value": "Fix typo of a license name in gemspec\n\n`rake gem:build` warns license name.\n\n```bash\n$ bundle exec rake gem:build\ngem build jmespath.gemspec\nWARNING: license value 'Apache 2.0' is invalid. Use a license identifier from\nhttp://spdx.org/licenses or 'Nonstandard' for a n...
ruby
chosen
[ { "from": "system", "value": "Remove explicit inclusions of now-default modules\n\nThese modules are used by default in version 1.12.14 and so we were\ngetting deprecation warnings:\n\n```\nDEPRECATION WARNING: GraphQL::Execution::Interpreter is now the\ndefault; remove `use GraphQL::Execution::Interpreter`...
ruby
chosen
[ { "from": "system", "value": "Fix tests that broke as a result of a merge\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe FeaturedWorksController do\n describe \"#create\" do\n before do\n sign_in FactoryGirl.create(:normal_user)\n expect(controller).to receive...
ruby
chosen
[ { "from": "system", "value": "Change service listener test to stub new worker\n\nWe have integration tests that ensure that the service listener calls\nthe worker correctly so this test can be changed to stub at a higher level.\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule S...
ruby
chosen
[ { "from": "system", "value": "Change redirect after sign up for FB\n" }, { "from": "human", "value": "module SimpleUser\n class AuthController < ApplicationController\n\n def create\n auth = request.env[\"omniauth.auth\"] \n authentication = Authentication.find_by_provider_and_ui...
ruby
chosen
[ { "from": "system", "value": "Adjust tooltip to use organisation name\n" }, { "from": "human", "value": "class BuildMarkersWithInfoWindow\n\n def self.with(volops, listener, marker_builder = Gmaps4rails, helper = ActionController::Base.helpers)\n new(volops, listener, marker_builder, helper)...
ruby
chosen
[ { "from": "system", "value": "Fix yaml migration for encodings\n" }, { "from": "human", "value": "class FixYamlEncoding < ActiveRecord::Migration\n def self.up\n fix_encoding(Block, 'settings')\n fix_encoding(Product, 'data')\n fix_encoding(Environment, 'settings')\n fix_encoding(Pr...
ruby
chosen
[ { "from": "system", "value": "Break line on another place\n" }, { "from": "human", "value": "require 'pavlov'\nrequire 'cgi'\n\nclass FactUrl\n\n def initialize fact\n @fact = fact\n end\n\n def fact_url\n full_url \"facts/#{@fact.id}\"\n end\n\n def friendly_fact_url\n slug = Pavl...
ruby
chosen
[ { "from": "system", "value": "Fix podspec source files path\n" }, { "from": "human", "value": "#\n# Be sure to run `pod spec lint DPSlideMenuKit.podspec' to ensure this is a\n# valid spec and to remove all comments including this before submitting the spec.\n#\n# To learn more about Podspec a...
ruby
chosen