conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Create the symlink before \"deploy:finalize_update\".\nFix a regression with Rails 3.1 applications.\nPrecompiling the asset pipeline needs a correct config/database.yml file.\n" }, { "from": "human", "value": "Capistrano::Configuration.instance(:must_exist).load do...
ruby
chosen
[ { "from": "human", "value": "Add new OperationArrowhead server stats\n\nReally, this just extends the Base class with some method_missing magic.\n" }, { "from": "gpt", "value": "# -*- coding: UTF-8 -*-\n\nrequire 'rmuh/serverstats/base'\n\nmodule RMuh\n module ServerStats\n # TODO: Documenta...
ruby
chosen
[ { "from": "system", "value": "Add some properties to all items\n\n- affect-bottom-margin\n- follow-stretch\n\nCo-authored-by: kosappi <1a72c3adb8cf451abd36cfcfa35039fbab5efb3b@misoca.jp>\nCo-authored-by: Katsuya HIDAKA <2f1e5d0fd7c5b5529f5d591c063df911b29bc9d1@gmail.com>\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Add CSS class to Page link drop\n" }, { "from": "human", "value": "module BlueberryCMS\n module LiquidTags\n class PageLink < Liquid::Tag\n def initialize(tag_name, markup, options)\n super\n\n @options = Hash[markup.split(',').map { |kv| kv.s...
ruby
chosen
[ { "from": "system", "value": "Fix ConnectionPoolProxy Ruby 3.0 compatibility\n\nFix: https://github.com/nateware/redis-objects/pull/258" }, { "from": "human", "value": "class Redis\n module Objects\n class ConnectionPoolProxy\n def initialize(pool)\n raise ArgumentError \"Should ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warnings: use new protocols for rspec 3\n" }, { "from": "human", "value": "module RSpec\n module JsonMatcher\n class AbstractMatcher\n attr_reader :expected, :parsed\n\n def initialize(expected = nil)\n @expected = expected\n ...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate definition of PopularityAsc\n\nWhich resulted in warnings displayed whenever the library is required.\n\nThe reason it is appearing twice is that because it is defined twice in\nebaySvc.xsd (schema) file and class generator doesn't check uniqueness\nof enumerab...
ruby
chosen
[ { "from": "human", "value": "Add GRANT utils to Myreplicator to use in dropping a table and then re-grant the permission on that table\n" }, { "from": "gpt", "value": "module Myreplicator\n class VerticaUtils\n class << self\n # Example: get_grant({:db => \"bidw\", :schema => \"king\", ...
ruby
chosen
[ { "from": "system", "value": "Add method for extracting session_id/handle_id\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Janus\n # Modules for manipulate responses sending by Janus\n module Responses\n # Response for events me...
ruby
chosen
[ { "from": "system", "value": "Add --full-name option to git ls-files command\n\nThe option was added \"just in case\".\n" }, { "from": "human", "value": "module Suspect\n module FileTree\n module Git\n class Client\n def modified_files\n `git ls-files --modified`\n ...
ruby
chosen
[ { "from": "system", "value": "Fix failing test that seem to require auth\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe InfoBoxesController, type: :controller do\n describe 'GET #index' do\n it 'returns http success' do\n get...
ruby
chosen
[ { "from": "human", "value": "Add secret token to dummy app\n" }, { "from": "gpt", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become invali...
ruby
chosen
[ { "from": "system", "value": "Test if argument passed to a migration is present\n" }, { "from": "human", "value": "module Gitlab\n module BackgroundMigration\n class MigrateBuildStageIdReference\n def perform(id)\n raise ArgumentError unless id.is_a?(Integer)\n\n sql = <<-...
ruby
chosen
[ { "from": "system", "value": "Add Default Nil Values for all Dropdowns\n" }, { "from": "human", "value": "module Plugins\n module Core\n class TreeCell < Plugins::Core::Cell\n def checkboxes\n render\n end\n\n def dropdown\n render\n end\n\n private\n\n...
ruby
chosen
[ { "from": "system", "value": "Remove sleep from Fusion Tables\n" }, { "from": "human", "value": "module Couriers\n class Fusionable\n class InvalidFusionTableError < Exception; end \n \n extend Resque::Plugins::HerokuAutoscaler\n \n @queue = 'couriers'\n \n class << self\n ...
ruby
chosen
[ { "from": "system", "value": "Standardize on a default name that doesn't depend on a Facebook cookie.\n\nChange-Id: Ie20a5957809fbf8ed56cf943e2fa1959634a2e9b\nReviewed-on: https://gerrit.causes.com/5045\nReviewed-by: Chris Chan <711c73f64afdce07b7e38039a96d2224209e9a6c@causes.com>\nTested-by: Chris Chan <71...
ruby
chosen
[ { "from": "system", "value": "Return prefecture name instead of region name\n" }, { "from": "human", "value": "class DojosController < ApplicationController\n def index\n @dojo_data = []\n Dojo.all.each do |dojo|\n @dojo_data << {\n url: dojo.url,\n name: ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Don't fetch emails until migration has run\"\n\nThis reverts commit e073c655a694e13adb670961af12c8157a458577.\n" }, { "from": "human", "value": "class ReposController < ApplicationController\n # before_filter :fetch_email_address, only: [:index]\n\n respo...
ruby
chosen
[ { "from": "system", "value": "Use respond_with_json on tests controller\n" }, { "from": "human", "value": "# Actually there is coverage for this class, but its tests erase the data about it\n# See: spec/controllers/tests_controller_spec.rb\n#\n# :nocov:\nunless Rails.env == 'production'\n requi...
ruby
chosen
[ { "from": "system", "value": "Add check to see if user is signed in\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n before_action :authenticate_user!, only: [:new, :create, :update, :edit]\n\n def index\n @users = User.all\n end\n\n def show\n @user =...
ruby
chosen
[ { "from": "system", "value": "Order documents in descending order\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n before_action :authenticate_user!\n def index\n @users = User.all\n end\n\n def show\n @user = User.find(params[:id])\n @documents = @...
ruby
chosen
[ { "from": "human", "value": "Add another not used file for tests\n" }, { "from": "gpt", "value": "class CollaboratorImporter\n ACCEPT_CONTENT_TYPE = 'text/plain'\n LINE_FORMAT = /\\A\\d{4}\\s+\\d{4}\\s+\\w.*\\z/\n\n include ActiveModel::Conversion\n include ActiveModel::Validations\n\n attr...
ruby
chosen
[ { "from": "system", "value": "Remove association from lookup table\n" }, { "from": "human", "value": "class CostCalculationType < ActiveRecord::Base\n \n # associations\n has_many :policys\n\n #attr_accessible :name, :description, :class_name, :active\n \n # default scope\n default_...
ruby
chosen
[ { "from": "system", "value": "Use Ruby keyword args in ManualWithDocuments\n\nI think that using language features instead of custom code makes this\neasier to understand.\n" }, { "from": "human", "value": "require \"delegate\"\n\nclass ManualWithDocuments < SimpleDelegator\n def initialize(doc...
ruby
chosen
[ { "from": "system", "value": "Update podspec, change tag to 0.0.2" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"HTDelegateProxy\"\n s.version = \"0.0.1\"\n s.summary = \"A class that allows you to assign multiple delegates.\"\n s.homepage = \"https:...
ruby
chosen
[ { "from": "system", "value": "Bump Neon version and add --with-ssl\n" }, { "from": "human", "value": "require 'brewkit'\n\nclass Neon <Formula\n @url='http://www.webdav.org/neon/neon-0.28.5.tar.gz'\n @homepage='http://www.webdav.org/neon/'\n @md5='8c160bc0e358a3b58645acbba40fe873'\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Make date select for event list work\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n\n def index\n @events = Event.includes(:eventable).order(\"event_date DESC\")#.map{|event| event.eventable}\n end\n\nend\n" }, { "fr...
ruby
chosen
[ { "from": "system", "value": "Handle unrecognised subdomains with a redirect to www\n" }, { "from": "human", "value": "class GroupsController < ApplicationController\n def show\n if params[:id]\n @group = Group.find(params[:id])\n else current_group\n @group = current_group\n ...
ruby
chosen
[ { "from": "system", "value": "Use existing predicate method on Member object\n\n`receives_unemployment_income?` is defined in the member object,\ntherefore we can use that to ask the question istead of inspecting the\ncontents of the other_income_types column\n" }, { "from": "human", "value": "m...
ruby
chosen
[ { "from": "system", "value": "Add 'save!' methods to Idea rating counters\n\nSave the changes to the Idea's rating after it has been incremented or\ndecremented.\n" }, { "from": "human", "value": "class Idea < ActiveRecord::Base\n\n belongs_to :owner, :class_name => 'User'\n\n has_many :votes,...
ruby
chosen
[ { "from": "system", "value": "Move the scope to a class method, since it is too long.\n" }, { "from": "human", "value": "#++\n# Freedom - Mind-blowing issue tracker.\n#\n# http://github.com/vesln/freedom\n# Veselin Todorov <hi@vesln.com>\n# MIT License\n#--\n\nclass Task < ActiveRecord::Base\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove trailing ? from Github avatar URL in the hopes that this fixes the seg\"\n\nThis reverts commit 6905de3def0696220adeccc108e98ebd357fdf03.\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n mount_uploader :photo, PhotoUploader\n de...
ruby
chosen
[ { "from": "system", "value": "Add method for converting coords to rgeo points\n" }, { "from": "human", "value": "class Drop < ActiveRecord::Base\n belongs_to :user\n has_many :comments\n has_many :snaps\n validates :user, presence: true\n validate :has_some_content\n has_attached_file :pho...
ruby
chosen
[ { "from": "system", "value": "Add stub groups method to User\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n include Hydra::User\n include CurationConcerns::User\n include Sufia::User\n include Sufia::UserUsageStats\n\n has_many :identities, dependent: :destroy\n has_m...
ruby
chosen
[ { "from": "system", "value": "Fix bug with nil values\n" }, { "from": "human", "value": "class User < ApplicationRecord\n\n mount_uploader :avatar, AvatarUploader\n\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n has_man...
ruby
chosen
[ { "from": "system", "value": "Add has_secure_password to User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n # Remember to create a migration!\n has_many :messages\n\n has_many :sent_messages, foreign_key: \"sender_id\", class_name: \"Message\"\n has_many :receive...
ruby
chosen
[ { "from": "system", "value": "Fix Missing Validation For Email\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n authenticates_with_sorcery!\n\n has_many :user_votes\n has_many :items, through: :user_votes\n\n validates :first_name, presence: true\n validates :last_name, ...
ruby
chosen
[ { "from": "system", "value": "Allow nil for required info\n" }, { "from": "human", "value": "class Raid < ActiveRecord::Base\n belongs_to :account\n has_many :signups, :inverse_of => :raid\n\n has_many :permissions, :as => :permissioned\n\n validates :name, :presence => true\n validates :da...
ruby
chosen
[ { "from": "human", "value": "Remove not null constraint from title and add it to citation\n" }, { "from": "gpt", "value": "class RemoveNotNullConstraintFromReferences < ActiveRecord::Migration\n def up\n change_column :references, :title, :text, :null => true\n change_column :references, ...
ruby
chosen
[ { "from": "human", "value": "Create test for `Providers` module\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass ProvidersTest < ActiveSupport::TestCase\n test 'create instance with :atnd' do\n assert_instance_of Providers::Atnd, Providers.new(:atnd)\n end\n\n test 'create i...
ruby
chosen
[ { "from": "system", "value": "Clear files included in this gem\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mobit/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Edit podfile to bump to iOS 6, add social media URL, and add screenshot.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"VENAppSwitchSDK\"\n s.version = \"1.0.0\"\n s.summary = \"App switch SDK for Venmo.\"\n s.description ...
ruby
chosen
[ { "from": "human", "value": "Fix multiple-providers bug - class variables defining probes weren't being\nstored in the correct class...\n" }, { "from": "gpt", "value": "#\n# Ruby-Dtrace\n# (c) 2008 Chris Andrews <chris@nodnol.org>\n#\n\nrequire 'dtrace'\nrequire 'dtrace/provider'\nrequire 'test/...
ruby
chosen
[ { "from": "system", "value": "gemspec: Add mpv as a runtime dependency.\n" }, { "from": "human", "value": "require_relative \"lib/muzak\"\n\nGem::Specification.new do |s|\n s.name = \"muzak\"\n s.version = Muzak::VERSION\n s.summary = \"muzak - A metamusic player.\"\n s.description = \"A lib...
ruby
chosen
[ { "from": "system", "value": "Add a test covering MarkupRenderer's smartyness.\n" }, { "from": "human", "value": "require \"test_helper\"\n\ndescribe Serif::MarkupRenderer do\n subject do\n Redcarpet::Markdown.new(Serif::MarkupRenderer, fenced_code_blocks: true)\n end\n\n it \"renders lang...
ruby
chosen
[ { "from": "system", "value": "Add rake task for pruning assets not in the current Manifest\n" }, { "from": "human", "value": "namespace :assets do\n desc \"Bundle assets\"\n task :bundle => :environment do\n AssetTrip.bundle!\n end\nend" }, { "from": "gpt", "value": "namespace ...
ruby
chosen
[ { "from": "system", "value": "Change to use a quoted array for the task list\n" }, { "from": "human", "value": "desc 'Run metrics with Heckle'\ntask :ci => [ 'ci:metrics', :heckle ]\n\nnamespace :ci do\n desc 'Run metrics'\n task :metrics => [ :verify_measurements, :flog, :flay, :reek, :roodi,...
ruby
chosen
[ { "from": "system", "value": "Add configuration to the omnibus builds\n\nSome of the configurations files that may be needed by the OpenStack\nservices are not always available from the various config management\nsolutions, therefore, pull in any configs from the repo itself.\n" }, { "from": "human"...
ruby
chosen
[ { "from": "system", "value": "Add data-turbolinks='false' to Solidus Subnav\n\nThis adds a `data` key specifying that the Solidus submenu should not\nbe using Turbolinks. It's harmless with Alchemy versions that don't\nsupport it, and beneficial for ones that do.\n" }, { "from": "human", "value"...
ruby
chosen
[ { "from": "system", "value": "Fix GO_SERVER_URL not being set correctly on windows.\n" }, { "from": "human", "value": "package_path = File.join(Chef::Config[:file_cache_path],go_agent_package_name)\n\nremote_file go_agent_package_name do\n path package_path\n source go_agent_package_url\nend\n...
ruby
chosen
[ { "from": "human", "value": "Add example of list equality\n" }, { "from": "gpt", "value": "require 'kanren/list'\nrequire 'kanren/micro/goal'\nrequire 'kanren/micro/state'\n\nmodule Kanren\n module Micro\n RSpec.describe 'relations on lists' do\n describe 'equality' do\n it 'allo...
ruby
chosen
[ { "from": "system", "value": "Add newfangled syntax to be_valid matcher\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire 'active_support/all'\n\ndescribe \"be_valid matcher\" do\n include RSpec::Rails::Matchers\n\n class TestModel\n include ActiveModel::Validations\n a...
ruby
chosen
[ { "from": "human", "value": "Check in a simple script showing how to process a sale, and void it.\n" }, { "from": "gpt", "value": "$:<< \"./lib\" # uncomment this to run against a Git clone instead of an installed gem\n\nrequire \"paytrace\"\nrequire \"paytrace/debug\"\n\n# see: http://help.payt...
ruby
chosen
[ { "from": "system", "value": "Add deprecation warning for default broker config." }, { "from": "human", "value": "#\n# Cookbook Name:: kafka\n# Recipe:: _defaults\n#\n\nunless broker_attribute?(:broker, :id)\n node.default['kafka']['broker']['broker_id'] = node['ipaddress'].delete('.').to_i % 2...
ruby
chosen
[ { "from": "system", "value": "Use release versions of opal and opal-jquery\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'clearwater/version'\n\nGem::Specification.new do |spec|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix column type and assert conditions\n" }, { "from": "human", "value": "require File.expand_path(\"../../helper\", __FILE__)\n\nrequire \"ancestry\"\n\nActiveRecord::Migration.create_table(\"things\") do |t|\n t.string :name\n t.string :slug\n t.integer :ances...
ruby
chosen
[ { "from": "system", "value": "Fix php meta requirement to allow for non php56 installs\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'homebrew-php-requirement')\n\nclass PhpMetaRequirement < HomebrewPhpRequirement\n default_formula \"php56\"\n\n def satisfied?\n ...
ruby
chosen
[ { "from": "system", "value": "Include empty aggregates and charts in error json\n" }, { "from": "human", "value": "module Effective\n class DatatablesController < ApplicationController\n skip_log_page_views quiet: true if defined?(EffectiveLogging)\n\n # This will respond to both a GET an...
ruby
chosen
[ { "from": "system", "value": "Fix query parameter according to JSON API\n" }, { "from": "human", "value": "class Api::SearchController < Api::ApplicationController\n def search\n search_result = PostSearcher.search(query_params: search_query_params, page: params[:page], site: current_site)\n...
ruby
chosen
[ { "from": "system", "value": "Remove strong parameters and search helpers, they are not used in OFN\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'cancan'\nrequire_dependency 'spree/core/controller_helpers/strong_parameters'\n\nmodule Spree\n class BaseController <...
ruby
chosen
[ { "from": "system", "value": "Fix capybara in generate site job.\n" }, { "from": "human", "value": "module RailsZero\n class GenerateSiteJob\n def run\n RailsZero.pages_config.links.each do |path|\n Capybara.visit path\n end\n end\n end\nend\n" }, { "from": "gpt"...
ruby
chosen
[ { "from": "system", "value": "Put the `APNConnection` class under the `NotifyUser` module.\n" }, { "from": "human", "value": "class APNConnection\n\n def initialize\n setup\n end\n\n def setup\n @uri, @certificate = if Rails.env.production? || apn_environment == :production\n [\n ...
ruby
chosen
[ { "from": "system", "value": "Add Asset Class to Serializer" }, { "from": "human", "value": "module Herd\n class AssetSerializer < ActiveModel::Serializer\n attributes :id\n attributes :created_at, :updated_at, :file_name, :file_size, :content_type, :type\n attributes :width, :height\n...
ruby
chosen
[ { "from": "system", "value": "Add sidebar to invitations controller\n" }, { "from": "human", "value": "class Users::InvitationsController < Devise::InvitationsController\n include Controllers::EnsureProject\n\n before_action :authenticate_user!\n before_action :ensure_project_exists!, except:...
ruby
chosen
[ { "from": "human", "value": "Add in some specs, not implemented" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe GithubAuthorizedKeys do\n it \"complains if the configuration file does not exist\"\n it \"will spit out the original authorized_keys file on error\"\n it \"sends a...
ruby
chosen
[ { "from": "system", "value": "Set ServerStateWorker's interval to 5 mins\n" }, { "from": "human", "value": "# cronotab.rb — Crono configuration file\n#\n# Here you can specify periodic jobs and schedule.\n# You can use ActiveJob's jobs from `app/jobs/`\n# You can use any class. The only requirem...
ruby
chosen
[ { "from": "system", "value": "Make sure the layout and view file exists before setting it, allows themes to inherit from the default theme.\n" }, { "from": "human", "value": "#\n# Blogaze\n# Copyright (C) 2011 Jack Polgar\n#\n# Blogaze is released under the BSD 3-clause license.\n#\n\nclass Cont...
ruby
chosen
[ { "from": "system", "value": "Add explicit requires for csv and zlib\n\nFor some reason these were not being automatically required on\nintegration.\n" }, { "from": "human", "value": "module ContentDumpLoader\n ContentItem = Struct.new(:base_path,\n :content_id,\n ...
ruby
chosen
[ { "from": "system", "value": "Fix rest_client dependency 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)\n\nrequire './lib/cloudbit_client'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "system", "value": "Remove broken spec from adding overhead headers" }, { "from": "human", "value": "require \"spec_helper\"\n\nmodule EventMachine::RTMP\n\ndescribe ConnectRequest do\n\n let :request do\n ConnectRequest.new(Connection.new(nil))\n end\n\n it 'merges attributes an...
ruby
chosen
[ { "from": "system", "value": "Move image file to public folder.\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe PropertyElement do\n\n describe \"presence validations\" do\n it { should validate_presence_of(:name) }\n it { should validate_presence_of(:description) }\...
ruby
chosen
[ { "from": "system", "value": "Return error message when `host` command is not found in PATH" }, { "from": "human", "value": "module Spanx\n module Notifier\n class Base\n\n # Takes an instance of the Spanx::BlockedIp struct.\n # Overwrite this a subclass to define real behavior\n ...
ruby
chosen
[ { "from": "system", "value": "Use a different Redis DB so it's not affected by our hook to flush all our keys\n" }, { "from": "human", "value": "require \"testjour/core_extensions/wait_for_service\"\nrequire \"redis\"\n\nmodule Testjour\n\n class RedisQueue\n\n def self.reset_all\n redi...
ruby
chosen
[ { "from": "system", "value": "Update test to reflect setup changes\n\nFix the test to reflect the changes made to the test setup cookbook\n" }, { "from": "human", "value": "require 'serverspec'\n\nset :backend, :exec\nset :path, '/bin:/usr/bin:/sbin/usr/sbin'\n\ndescribe file('/etc/cumulus/.lice...
ruby
chosen
[ { "from": "system", "value": "Fix order of result groups.\n" }, { "from": "human", "value": "class SearchController < ApplicationController\n def all\n response = Hdo::Search::Searcher.new(params[:query]).all\n @results = []\n\n if response.success?\n @results = response.results.g...
ruby
chosen
[ { "from": "human", "value": "Add Ernst & Young restaurant\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'open-uri'\n\nmodule Restaurant\n class ErnstYoung < BaseRestaurant\n def get_contents(_date)\n url = 'https://zfv.ch/de/microsites/ey-restaurant-platform/...
ruby
chosen
[ { "from": "system", "value": "Update for Rails 4 compatibility\n" }, { "from": "human", "value": "module Spree\n class Gateway::UsaEpay < Gateway\n preference :source_key, :string\n preference :pin, :string\n\n attr_accessible :preferred_source_key, :preferred_pin, :gateway_payment_pro...
ruby
chosen
[ { "from": "system", "value": "Upgrade webmock and switch cache again, this time to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/customerio/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"John Allison\"]\n ...
ruby
chosen
[ { "from": "system", "value": "Improve grammar in test description\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Vcloud\n module Core\n describe EdgeGateway do\n\n required_env = {\n 'VCLOUD_EDGE_GATEWAY' => 'to name of VSE',\n }\n\n error = false\n ...
ruby
chosen
[ { "from": "system", "value": "Fix Authorization specs in Android.\n" }, { "from": "human", "value": "describe Net::Authorization do\n context \"Invalid params\" do\n it \"expects valid token or basic params\" do\n Proc.new { Net::Authorization.new }.should.raise RuntimeError\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Test removing dev dependency versions\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'eway_rapid/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Add refresh token url to example\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'omniauth-redbooth'\nrequire 'multi_json'\n\nclass OmniauthRedbooth < Sinatra::Base\n\n before do\n content_type 'application/json'\n end\n\n get '/' do\n co...
ruby
chosen
[ { "from": "system", "value": "Update warn message for MySQL fix" }, { "from": "human", "value": "# from http://gist.github.com/238999\n#\n# If your workers are inactive for a long period of time, they'll lose\n# their MySQL connection.\n#\n# This hack ensures we re-connect whenever a connection ...
ruby
chosen
[ { "from": "system", "value": "Remove responseType from lock_json api\n" }, { "from": "human", "value": "class Mumukit::Auth::LoginSettings\n LOCK_LOGIN_METHODS = {\n facebook: 'facebook',\n github: 'github',\n google: 'google-oauth2',\n twitter: 'twitter',\n user_pass: ...
ruby
chosen
[ { "from": "system", "value": "Remove defaulting tls to true for actionmailer" }, { "from": "human", "value": "# default action mailer config - can be over-ridden in application.rb or environments/*\nif defined? APP_CONFIG and APP_CONFIG.email_enabled\n am_config = Rails.application.config.actio...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix cookie domain problems by specifying domains manually\"\n\nThis reverts commit b229309ebfe80fec0c071bdf483c2a53e4e9a4c3.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\noptions = if Rails.env.production?...
ruby
chosen
[ { "from": "system", "value": "Make session configuration look like normal code.\n\nIt was distractingly weird and almost incomprehensible.\n" }, { "from": "human", "value": "SERVICE_DOMAIN = (url = ENV['SERVICE_URL']) ? URI.parse(url).host : nil\n\n{key: 'pvbs', expire_after: 20.minutes, httponl...
ruby
chosen
[ { "from": "human", "value": "Add the \"Table 5\" script\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nrequire 'pp'\nrequire 'rdf/raptor'\nrequire 'linkeddata'\nrequire 'rdf'\nrequire 'rdf/turtle'\nrequire 'rdf-lemon'\nrequire 'nokogiri'\nrequire 'pry'\n\nstatistics = Hash.new(0)\n\ni =...
ruby
chosen
[ { "from": "system", "value": "Check should not abort the actual migration\n\nSo we allow for the migration to run.\n" }, { "from": "human", "value": "module Doorkeeper\n module Orm\n module ActiveRecord\n def self.initialize_models!\n require 'doorkeeper/orm/active_record/access_...
ruby
chosen
[ { "from": "system", "value": "Fix middleman-graphviz on my Mac\n\nCouldn't find any other instances of cattr_accessor :options in other middleman modules, so I commented it out and it worked OK." }, { "from": "human", "value": "require 'middleman/graphviz/helpers'\n\nmodule Middleman\n module G...
ruby
chosen
[ { "from": "system", "value": "Fix for displaying changes with clientry\n" }, { "from": "human", "value": "Puppet::Type.newtype(:jboss_confignode) do\n @doc = \"Generic configuration entry for JBoss Application Sever\"\n \n newproperty(:ensure) do\n desc \"Whether a configuration node shoul...
ruby
chosen
[ { "from": "system", "value": "Use bundle exec when running rake db:migrate" }, { "from": "human", "value": "Capistrano::Configuration.instance(:must_exist).load do\n namespace :deploy do\n desc <<-DESC\n Run the migrate rake task. By default, it runs this in most recently \\\n depl...
ruby
chosen
[ { "from": "system", "value": "Read API token from disk\n" }, { "from": "human", "value": "require 'zlib'\nrequire 'archive/tar/minitar'\nrequire 'stringio'\nrequire 'rest_client'\n\nmodule Relish\n module Commands\n class PushCommand\n def initialize(global_options)\n @options = ...
ruby
chosen
[ { "from": "human", "value": "Add mongoid model for saving instance with session number\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Tools\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n #\n # Store instance information\n ...
ruby
chosen
[ { "from": "system", "value": "Update chef client to 12.9.41\n" }, { "from": "human", "value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [\"opscode\"]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"12.0.8-1\"\n\n# Set the ...
ruby
chosen
[ { "from": "system", "value": "Clean credentials in logged URL message\n" }, { "from": "human", "value": "require 'rest-client'\nrequire 'json'\nrequire 'memoist'\n\nmodule Trawler\n module Sources\n class JsonFetcher\n\n class << self\n extend Memoist\n\n def get(url, &err...
ruby
chosen
[ { "from": "system", "value": "Change to enforce ruby 2.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/screen/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Add GitHub provider for getting SSH keys\n" }, { "from": "gpt", "value": "require 'retries'\nrequire 'octokit'\n\nmodule Provider\n # GitHub SSH public key provider\n class GitHub\n # @param [Hash] options GitHub credentials for Octokit::Client\n # @option op...
ruby
chosen
[ { "from": "system", "value": "Fix plural -> singular for generator.\n" }, { "from": "human", "value": "require 'rails/generators'\nrequire 'rails/generators/named_base'\n\nmodule LinkToActions\n module Generators\n class InstallGenerator < Rails::Generators::Base\n desc \"Copy LinkToAct...
ruby
chosen
[ { "from": "system", "value": "Make sure VERSION constant is loaded\n" }, { "from": "human", "value": "require \"scoped_search\"\n\nmodule ScopedSearch\n\n # This module adds an OracleEnhanced adapter to improve the search results on Oracle databases.\n # Simply make sure it is loaded by requir...
ruby
chosen