conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove requesters argument from the perform function in CleverStudentImportWorker" }, { "from": "human", "value": "class CleverStudentImporterWorker\n include Sidekiq::Worker\n\n def perform(classroom_ids, district_token, requesters)\n puts \"Running Clever stu...
ruby
chosen
[ { "from": "system", "value": "Fix error on Geocoding job\n" }, { "from": "human", "value": "module Resque\n class GeocoderJobs\n @queue = :geocodings\n\n def self.perform(options = {})\n geocoding = Geocodings[options.symbolize_keys[:job_id]].run!\n end\n\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Use nested block when iterating (turns out it is faster)\n" }, { "from": "human", "value": "module ROM\n # @api private\n class Registry\n include Enumerable\n include Equalizer.new(:elements)\n\n class ElementNotFoundError < KeyError\n def initializ...
ruby
chosen
[ { "from": "system", "value": "Remove comment at beginning of gemspec\n" }, { "from": "human", "value": "#$:.unshift('lib')\n#require 'texas'\n\nGem::Specification.new do |s|\n s.author = \"René Föhring\"\n s.email = 'rf@bamaru.de'\n s.homepage = \"http://github.com/rrrene/texas\"\n\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Update Epic Browser to latest version\n" }, { "from": "human", "value": "cask :v1 => 'epic' do\n version '37_4'\n sha256 'b3dcd0d0e101629342d13c8683f3801412517274c75a70645d38813c07030a48'\n\n # rackcdn.com is the official download host per the vendor homepage\n ...
ruby
chosen
[ { "from": "system", "value": "Update Patient factory to sequence phone numbers - necessary with uniqueness constraint on primary_phone\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :patient do\n name 'New Patient'\n primary_phone '123-123-1234'\n spanish false\n ...
ruby
chosen
[ { "from": "system", "value": "Test email and password is set\n" }, { "from": "human", "value": "require_relative 'test_helper'\n\nclass PerfectaTest < MiniTest::Unit::TestCase\n\n describe 'Perfecta client' do\n it 'is initialized with an email and password' do\n client = Perfecta::Clie...
ruby
chosen
[ { "from": "system", "value": "Set dummy `solution_lemma` value for TextResponseComprehensionSolution\nTODO: To revert this commit when lemmatiser is implemented.\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Course::Assessment::Question::TextResponseComprehensionSolutio...
ruby
chosen
[ { "from": "system", "value": "Use the persister strategy from core\n" }, { "from": "human", "value": "class ManageIQ::Providers::Amazon::Inventory::Persister::TargetCollection < ManageIQ::Providers::Amazon::Inventory::Persister\n include ManageIQ::Providers::Amazon::Inventory::Persister::Defini...
ruby
chosen
[ { "from": "system", "value": "Add transpec as a dev dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"wasabi/version\"\n\nGem::Specification.new do |s|\n s.name = \"wasabi\"\n s.version = Wasabi::VERSIO...
ruby
chosen
[ { "from": "system", "value": "Use the branch from the webhook payload" }, { "from": "human", "value": "require 'bundler'\nrequire 'json'\nBundler.require\n\nclass TravisRebuilder < Sinatra::Base\n use Rack::Deflater\n\n configure do\n set :logging, true\n set :dump_errors, false\n set...
ruby
chosen
[ { "from": "system", "value": "Disable sinatra-reloader, because it does not working.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'sinatra/reloader'\n\nget '/' do\n\terb \"Hello! <a href=\\\"https://github.com/bootstrap-ruby/sinatra-bootstrap\\\">Original</a>...
ruby
chosen
[ { "from": "system", "value": "Switch to _index, add a markdown route\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'redcarpet'\nrequire 'pygments'\n\nPAGE_ROOT = ARGV[-1]\nunless PAGE_ROOT\n STDERR.puts(\"usage: app.rb PAGE_ROOT\")\n exit 1\nend\n\nclass HTMLwithPygments < Redc...
ruby
chosen
[ { "from": "system", "value": "Update the server and channel config to be an environment variable\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'cinch'\n\n# Automatically shorten URL's found in messages\n# Using the tinyURL API\n\nbot = Cinch::Bot.new do\n configure do |c|\n ...
ruby
chosen
[ { "from": "human", "value": "Test that the assets are cached\n" }, { "from": "gpt", "value": "require 'net/http'\nrequire 'spec_helper'\n\nRSpec.feature \"Caching headers are provided for assets \", type: :request do\n let(:index_uri) { URI(Capybara.app_host) }\n\n describe \"the index page\" ...
ruby
chosen
[ { "from": "system", "value": "Add helper method for limiting edition access\n" }, { "from": "human", "value": "class Admin::BaseController < ApplicationController\n include Admin::EditionRoutesHelper\n\n layout 'admin'\n prepend_before_filter :authenticate_user!\n before_filter :require_sign...
ruby
chosen
[ { "from": "system", "value": "Add Helpers stuff to environement\n" }, { "from": "human", "value": "ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)\n\nrequire 'sinatra'\nrequire 'pg'\nrequire 'active_record'\n\nrequire 'bundler/setup'\nrequire 'rubygems'\n\nrequire 'uri'\nrequi...
ruby
chosen
[ { "from": "human", "value": "Remove shipping_method_id from order since shipping_method is not related to order\n" }, { "from": "gpt", "value": "class RemoveShippingMethodIdFromSpreeOrders < ActiveRecord::Migration\n def up\n if column_exists?(:spree_orders, :shipping_method_id, :integer)\n ...
ruby
chosen
[ { "from": "system", "value": "Install ruby-dev and bundler v1 on ruby component for backward compatibility and being able to compile gems again\n" }, { "from": "human", "value": "module CloudModel\n module Workers\n module Components\n class RubyComponentWorker < BaseComponentWorker\n ...
ruby
chosen
[ { "from": "system", "value": "Remove another instance of 'localhost' in tests.\n" }, { "from": "human", "value": "Shindo.tests('Excon response header support') do\n\n with_rackup('response_header.ru') do\n\n tests('Response#get_header') do\n connection = Excon.new('http://foo.com:8080',...
ruby
chosen
[ { "from": "system", "value": "Change order of lines to be more redeable\n" }, { "from": "human", "value": "require 'yaml'\nrequire 'open-uri'\n\nURL = \"https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml\"\n\n# All the names will be changed to be readeable for cs...
ruby
chosen
[ { "from": "system", "value": "Remove newline escape before method - (ruby1.8)\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'munin::master', :type => 'class' do\n context 'default' do\n include_context :Debian\n it { should compile }\n it {\n should contain_...
ruby
chosen
[ { "from": "system", "value": "Correct the home page at gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)\n\nrequire \"akephalos/version\"\n\nGem::Specification.new do |s|\n s....
ruby
chosen
[ { "from": "system", "value": "Update factory with page association\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :share_facebook, :class => 'Share::Facebook' do\n title \"MyString\"\n description \"MyText\"\n end\nend\n\n" }, { "from": "gpt", "value": "Fa...
ruby
chosen
[ { "from": "system", "value": "Remove expensive specs that make sure noids can be minted in a multi-threaded environment. The noid library already has tests around multi-threading, and these specs take nearly a minute to finish on Travis.\n" }, { "from": "human", "value": "require 'spec_helper'\n...
ruby
chosen
[ { "from": "system", "value": "Watch for updates on port 3124.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'json'\nset :port, 3123\nset :environment, :production\nenable :lock\nDir.chdir(File.dirname(__FILE__) + \"/..\")\n\npost \"/\" do\n puts \"Recieved pa...
ruby
chosen
[ { "from": "system", "value": "Update Cocoapods Spec to be 1.5\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ns.name = 'SVGgh'\ns.version = '1.4.0'\ns.license = 'MIT'\ns.tvos.deployment_target = '9.0'\ns.ios.deployment_target = '7.0'\n\ns.summary = \"SVG Rendering L...
ruby
chosen
[ { "from": "system", "value": "Make name a required field\n" }, { "from": "human", "value": "class App < ActiveRecord::Base\n validates :name, :format => {:with => /\\A[a-z0-9_]+\\z/, :message => \"Needs to be one word that can be lower case letters, numbers or underscores\"}, :uniqueness => tru...
ruby
chosen
[ { "from": "system", "value": "Destroy remeber me cookie on signout\n" }, { "from": "human", "value": "class Accounts::SignOutController < Accounts::BaseController\n around_filter :render_trigger_event_on_social_account_error\n\n def destroy\n sign_out\n render_trigger_event 'account_succ...
ruby
chosen
[ { "from": "system", "value": "Swap out the raw SQL for ActiveRecord stuff\n" }, { "from": "human", "value": "class Admin::LeaderboardController < AdminController\n def index\n sql = \"SELECT COUNT(*) AS activity_count, (SELECT users.username FROM users WHERE users.id = activities.actor_id) F...
ruby
chosen
[ { "from": "system", "value": "Add support for Sidekiq 5.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 'sidekiq/pool/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Improve logic for show_large_gallery helper\n" }, { "from": "human", "value": "module Storytime\n module Dashboard\n module MediaHelper\n def show_media_insert_button?\n referrer_action = request.referrer.nil? ? nil : request.referrer.split(\"/\").la...
ruby
chosen
[ { "from": "system", "value": "Fix mistake of using @value instead of value\n" }, { "from": "human", "value": "class DialogFieldCheckBox < DialogField\n AUTOMATE_VALUE_FIELDS = %w(required)\n\n has_one :resource_action, :as => :resource, :dependent => :destroy\n\n after_initialize :default_res...
ruby
chosen
[ { "from": "system", "value": "Rename some RPC methods to restful" }, { "from": "human", "value": "methods_for :rpc do\n # Helps the GUI determine whether the call is still active.\n def call_with_destination(destination)\n ahn_log.click_to_call \"Finding call with destination #{destination....
ruby
chosen
[ { "from": "system", "value": "Update CocoaPods spec for 1.1.0 release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Popsicle\"\n s.version = \"1.0.0\"\n s.summary = \"Simple, extensible value interpolation framework\"\n s.ho...
ruby
chosen
[ { "from": "system", "value": "Upgrade rspec to 2.14 first\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-openstack-plugin/version'\n\nGem::Specification.new do |ge...
ruby
chosen
[ { "from": "system", "value": "Configure admin UI using HIGHLIGHT_WORDS_TO_AVOID env var\n" }, { "from": "human", "value": "# this feature flag gets overridden on deploy\nENABLE_WORDS_TO_AVOID_HIGHLIGHTING = !Rails.env.production?\n" }, { "from": "gpt", "value": "if ENV.has_key?(\"HIG...
ruby
chosen
[ { "from": "system", "value": "Update podspec file's author from zhoucheng@qfpay.com to zcheng.1988@163.com\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\ns.name = \"QTPaySDK\"\ns.version = \"0.0.4\"\ns.summary = \"A Pay SDK of QFPay Inc. Include WeChat Pay, AliPay etc...
ruby
chosen
[ { "from": "system", "value": "Fix exception when permalink is number\n" }, { "from": "human", "value": "class ActivitiesController < ApplicationController\n\tdef index\n\t\t @activities = Activity.all\n\tend\n\n\tdef show\n if params[:id] =~ /\\A\\d+\\z/\n @activity = Activity.find(para...
ruby
chosen
[ { "from": "system", "value": "Fix syntax error and url generator method\n" }, { "from": "human", "value": "class Download::Generators::Pdf < Download::Generators::Base\n TYPE = 'pdf'\n\n def initialize(zip_path, identifier)\n @zip_path = zip_path\n @identifier = identifier\n end\n\n de...
ruby
chosen
[ { "from": "human", "value": "Add triggers to update users_full_text_index\n" }, { "from": "gpt", "value": "class UpdateUsersFullTextIndex < ActiveRecord::Migration\n def up\n execute <<-SQL\n SET LOCAL STATEMENT_TIMEOUT to 0;\n CREATE OR REPLACE FUNCTION public.update_users_full_te...
ruby
chosen
[ { "from": "system", "value": "Change default value of render timeout columns\n" }, { "from": "human", "value": "require 'carto/db/migration_helper'\n\ninclude Carto::Db::MigrationHelper\n\nmigration(\n Proc.new do\n add_column :users, :user_render_timeout, :integer, null: true\n add_colum...
ruby
chosen
[ { "from": "system", "value": "Set the version number to 2.0.0 (beta.2). [skip ci]\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Swinject\"\n s.version = \"2.0.0-beta.1\"\n s.summary = \"Dependency injection framework for Swift\"\n s.descri...
ruby
chosen
[ { "from": "system", "value": "Update php-build to fix permissions issue.\n" }, { "from": "human", "value": "default[:phpbuild][:git][:repository] = \"git://github.com/CHH/php-build.git\"\ndefault[:phpbuild][:git][:revision] = \"387e802443af2254576ef386ea16fe87...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix incorrect comment on Gists\"\n\nThis reverts commit 34bf218a9d42fc5467cd4de2f62f2bcc519de3e5.\n" }, { "from": "human", "value": "class Ghee\n\n # API module encapsulates all of API endpoints\n # implemented thus far\n #\n module API\n\n # The Gis...
ruby
chosen
[ { "from": "system", "value": "Fix small gotcha in JSON reference for when there is a URL but no pointer\n" }, { "from": "human", "value": "require \"json_pointer\"\nrequire \"uri\"\n\nmodule JsonReference\n class Reference\n attr_accessor :pointer\n attr_accessor :uri\n\n def initializ...
ruby
chosen
[ { "from": "system", "value": "Check if current version of Redmine supports subissues\n" }, { "from": "human", "value": "require 'redmine_charts/line_data_converter'\nrequire 'redmine_charts/pie_data_converter'\nrequire 'redmine_charts/stack_data_converter'\nrequire 'redmine_charts/utils'\nrequir...
ruby
chosen
[ { "from": "system", "value": "Fix for \"BLOB/TEXT column 'name' used in key specification without a key length\" error when using MySQL (migrations table)\n" }, { "from": "human", "value": "require 'time'\nrequire 'sinatra/base'\nrequire 'sequel'\n\nmodule Sinatra\n module SequelHelper\n def...
ruby
chosen
[ { "from": "system", "value": "Add keyword 'scan' to excluded crawlers for exception notifications\n" }, { "from": "human", "value": "if Rails.env.to_s != 'development'\n EmopDashboard::Application.config.middleware.use ExceptionNotification::Rack,\n :ignore_crawlers => %w{Googlebot bingbot E...
ruby
chosen
[ { "from": "system", "value": "Move devkit to the very end\n\nSigned-off-by: Scott Hain <54f99c3933fb11a028e0e31efcf2f4c9707ec4bf@chef.io>\n" }, { "from": "human", "value": "name \"chef-dk-complete\"\n\nlicense :project_license\n\n# For the Delivery build nodes\ndependency \"delivery-cli\"\n# Thi...
ruby
chosen
[ { "from": "system", "value": "Configure generator for create migration with Active Record [skip ci]\n" }, { "from": "human", "value": "# frozen_string-literal: true\n\nrequire 'rails/generators/active_record'\n\nmodule RubyrabbitmqJanus\n module Generators\n class MigrationGenerator < ::Rail...
ruby
chosen
[ { "from": "system", "value": "Change gemspec to use a singular license\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom'\n gem.version = Axiom::VERSION.dup\n gem...
ruby
chosen
[ { "from": "system", "value": "Update the black-list for ltac2 due to truncated logs\n" }, { "from": "human", "value": "# A list of packages with errors which we chose to ignore (for now). It\n# contains an exact package name together with a string which should be\n# included in the error message...
ruby
chosen
[ { "from": "system", "value": "Use Puppet 3 in acceptance tests\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\ninstall_puppet_agent_on hosts, {}\n\nRSpec.configure do |c|\n # Project root\n module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))\n module_name = mo...
ruby
chosen
[ { "from": "human", "value": "Add specs for the node event base class\n" }, { "from": "gpt", "value": "#!/usr/bin/env rspec -cfd\n\nrequire_relative '../../spec_helper'\n\nrequire 'arborist/node'\nrequire 'arborist/subscription'\nrequire 'arborist/event/node'\n\n\ndescribe Arborist::Event::Node d...
ruby
chosen
[ { "from": "system", "value": "Add gitaly tests for the directory creation\n" }, { "from": "human", "value": "require 'chef_helper'\n\ndescribe 'gitlab::gitaly' do\n let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab::default') }\n\n before do\n allow(Gitlab).to receive(:[]).and_call_ori...
ruby
chosen
[ { "from": "system", "value": "Add json and rspec dependencies\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"json_spec/version\"\n\nGem::Specification.new do |s|\n s.name = \"json_spec\"\n s.version = JsonSpec:...
ruby
chosen
[ { "from": "system", "value": "Update gemspec with current date\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"wkhtmltopdf-heroku\"\n s.version = \"2.12.2.4\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? :required_rubygems_ver...
ruby
chosen
[ { "from": "system", "value": "Fix specs for new base_uri method" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MakePrintable::Client do\n describe '#base_uri' do\n it 'should be created from set configuration' do\n client = MakePrintable::Client.new\n expect(cli...
ruby
chosen
[ { "from": "system", "value": "Fix bug in GeocoderUsageMetrics amount checks\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'active_support/time'\nrequire_relative 'service_usage_metrics'\n\nmodule CartoDB\n # The purpose of this class is to encapsulate storage of usage metrics....
ruby
chosen
[ { "from": "human", "value": "[MODULES-2281] Add acceptance tests for rabbitmq_parameter\n\nThis is an addition to PR 390\n" }, { "from": "gpt", "value": "require 'spec_helper_acceptance'\n\ndescribe 'rabbitmq parameter on a vhost:' do\n\n context \"create parameter resource\" do\n it 'should...
ruby
chosen
[ { "from": "system", "value": "Complete most of SET instruction. Does not implement stack cases\n" }, { "from": "human", "value": "require_relative '../basic_instruction'\n\nmodule DCPU16\n module Instructions\n class Set < BasicInstruction\n\n def initialize\n @opcode = 0x1\n ...
ruby
chosen
[ { "from": "system", "value": "Update URL for Omnioutliner Betas\n\nThe URL pattern used for Omnioutliner was updated. This commit\nupdates the url stanza format, and takes the opportunity to\nupdate the version and sha256 stanzas at the same time.\n" }, { "from": "human", "value": "cask :v1 => '...
ruby
chosen
[ { "from": "system", "value": "Use Dir.tmpdir rather than /tmp in test environment\n" }, { "from": "human", "value": "require \"tmpdir\"\n\nHOMEBREW_TEMP = Pathname.new(ENV[\"HOMEBREW_TEMP\"] || \"/tmp\")\n\nTEST_TMPDIR = ENV.fetch(\"HOMEBREW_TEST_TMPDIR\") { |k|\n dir = Dir.mktmpdir(\"homebrew_...
ruby
chosen
[ { "from": "human", "value": "Add the Apple Lossless Audio Codec decoder formula.\n\nAdd a formula for the alac binary from http://craz.net/programs/itunes/alac.html.\n\nCloses Homebrew/homebrew#13017.\n\nSigned-off-by: Max Howell <mxcl@me.com>\n\nRenamed alac.\n" }, { "from": "gpt", "value": "re...
ruby
chosen
[ { "from": "system", "value": "Add spec for ensuring posts have a word_count after saving.\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Post do\nend\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe Post do\n describe \"creating a post\" do\...
ruby
chosen
[ { "from": "system", "value": "Remove activesupport version specification to work with any Rails version\n\nThis does not mean we ensure clockwork works correctly with any version of activesupport.\nSupport for old version is best effort.\n" }, { "from": "human", "value": "Gem::Specification.new ...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Make sure Firefox shutdown happens even if the RPC fails.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@16693 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n module Firefox\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add comment around top-level RBAC module" }, { "from": "human", "value": "module RBAC\n def self.authorizations\n @authorizations ||= {}\n end\n\n def self.add_authorization(username, auth)\n authorizations[username] ||= []\n authorizations[username] << ...
ruby
chosen
[ { "from": "system", "value": "Add parsley-rails from gem spec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'parsley_simple_form/version'\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "system", "value": "Move the segment generation in another method\n" }, { "from": "human", "value": "require 'configuration/configuration'\nrequire 'yaml'\n\nclass Configuration::Yaml < Configuration\n def load_file(filename)\n @configuration = YAML::load_file filename\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Exclude examples and spec from the gem itself\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'luban/cli/version'\n\nGem::Specification.new do |spec|\n ...
ruby
chosen
[ { "from": "system", "value": "Add YARD docs for Faker::Team\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Faker\n class Team < Base\n flexible :team\n\n class << self\n def name\n parse('team.name')\n end\n\n def creature\n fetch('...
ruby
chosen
[ { "from": "system", "value": "Use class variable for timeout of IO.select\n" }, { "from": "human", "value": "require 'forwardable'\nrequire 'mkfifo'\n\nclass Fifo\n include Forwardable\n \n class Pipe < ::File\n alias :orig_write :write\n def write(*args)\n orig_write(*args)\n ...
ruby
chosen
[ { "from": "system", "value": "Add indexes from promotion code batch\n" }, { "from": "human", "value": "class CreateSpreePromotionCodeBatch < ActiveRecord::Migration[5.0]\n def change\n create_table :spree_promotion_code_batches do |t|\n t.references :promotion, null: false\n t.stri...
ruby
chosen
[ { "from": "system", "value": "Use Ruby 2.0 syntax in pod spec and replace tag with branch\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"FootlessParser\"\n s.version = \"1.0\"\n s.summary = \"A simple parser combinator written in Swift\"\n s.descriptio...
ruby
chosen
[ { "from": "system", "value": "Add file scanning and publishing events, kill the site generation event\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Dimples\n # A Ruby class that can receive events from Dimples as a site is processed.\n class Plugin\n EVENTS = %i...
ruby
chosen
[ { "from": "system", "value": "Use the more stable run_callbacks API method for forward compatiblity.\n" }, { "from": "human", "value": "require \"ar_transaction_changes/version\"\n\nmodule ArTransactionChanges\n # rails 4.0.0: renamed create/update to create_record/update_record\n # rails 4.0....
ruby
chosen
[ { "from": "system", "value": "Improve readability by moving some methods around.\n" }, { "from": "human", "value": "require \"dropbox_sdk\"\n\nclass DropboxSetup\n\n attr_accessor :app_key, :app_secret, :access_token_key, :access_token_secret\n\n def initialize\n @app_key = nil\n @app_se...
ruby
chosen
[ { "from": "system", "value": "Fix selenium error for forcing click on input type=file\n\nThere is a JS event handler on the input field that needs a click event,\nthis needs to be done synthetically as chromedriver no longer allows\nclicking a file input (oddly).\n" }, { "from": "human", "value"...
ruby
chosen
[ { "from": "human", "value": "Add test for secure agreements to anonimous users\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\nclass AnonymousUserCantViewAgreementsTest < Capybara::Rails::TestCase\n include Warden::Test::Helpers\n after { Warden.test_reset! }\n\n def generate_pdf(...
ruby
chosen
[ { "from": "human", "value": "Add WP Font File Read Vulnerability Module\n" }, { "from": "gpt", "value": "##\n# This module requires Metasploit: http://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core'\n\nclass Metasploit3 < Msf::A...
ruby
chosen
[ { "from": "system", "value": "Use https for all GitHub URLs\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Tor <Formula\n url 'https://www.torproject.org/dist/tor-0.2.1.26.tar.gz'\n homepage '...
ruby
chosen
[ { "from": "system", "value": "Add diagnostic messages to Browser.\n" }, { "from": "human", "value": "require 'singleton'\nmodule GitHub\n class Browser\n include Singleton\n \n def self.base_uri\n GitHub.base_uri\n end\n \n def self.get(uri)\n Net::HTTP.get URI.parse...
ruby
chosen
[ { "from": "system", "value": "Extend assert retries to allow for slow setup\n" }, { "from": "human", "value": "require_relative \"../../acceptance/base\"\n\nVagrant::Spec::Acceptance.configure do |c|\n c.component_paths << File.expand_path(\"../test/acceptance\", __FILE__)\n c.skeleton_paths <...
ruby
chosen
[ { "from": "human", "value": "Add machines converter to html select tag\n" }, { "from": "gpt", "value": "module Inpost\n module HtmlHelper\n\n EDITABLE_ATTRIBUTES = %i(id class)\n\n class << self\n def machine_select_tag(collection: [], attributes: {})\n select_tag_template = \...
ruby
chosen
[ { "from": "system", "value": "Allow to send direct messages to a specific user (using @nickname)\n" }, { "from": "human", "value": "module Fastlane\n module Actions\n module SharedValues\n\n end\n\n class SlackAction\n def self.run(params)\n options = { message: '',\n ...
ruby
chosen
[ { "from": "system", "value": "Fix Notifier to new ::Guard::Notifier interface\n" }, { "from": "human", "value": "module Guard\n class Shotgun\n class Notifier\n\n def self.guard_message(result)\n case result\n when 'up'\n \"Sinatra up and running\"\n when '...
ruby
chosen
[ { "from": "system", "value": "Define to_a and to_ary to suppress meaningless query\n" }, { "from": "human", "value": "class Field\n include DataMapper::Resource\n\n property :id, Serial\n property :field_name_id, Integer\n property :entry_id, Integer\n property :value, Text\n property :cre...
ruby
chosen
[ { "from": "system", "value": "Add support for refactoring code contained in files." }, { "from": "human", "value": "require \"metamorpher/refactorer/merger\"\nrequire \"metamorpher/refactorer/replacement\"\nrequire \"metamorpher/builder\"\nrequire \"metamorpher/rewriter/rule\"\nrequire \"metamor...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for SteelSeries Engine 3.\n" }, { "from": "human", "value": "cask 'steelseries-engine' do\n version '3.7.1'\n sha256 '0f50666e3a97c81f2c3b3825d1d7d8fa7ec0d458b12aee4968dd5442af648c0c'\n\n url \"http://downloads.steelseriescdn.com/drivers/...
ruby
chosen
[ { "from": "system", "value": "Fix unwanted root breadcrumbs in the admin.\n" }, { "from": "human", "value": "class Admin::BaseController < ApplicationController\n before_filter :authenticate_admin!\n\n layout \"admin\"\n\n def empty\n render(:text => \"\", :layout => true)\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Add the user to syllabus upon creation." }, { "from": "human", "value": "# Classroom syllabus controller\nclass SyllabusesController < ApplicationController\n\n # Abilities checking for our nested resource\n skip_authorize_resource :only => :create\n\n before_fil...
ruby
chosen
[ { "from": "system", "value": "Fix a problem with Module method inclusion\n\nPreviously if the module was re-included its\nmethods were not being re-defined. This caused\nstrange behaviour in tests and resulted in\nfailures in Admin::AdminGovspeakHelperTest.\n\nI’m not entirely sure why we need this.\n" },...
ruby
chosen
[ { "from": "system", "value": "Fix wrong tooltip placement on guide reset icon\n" }, { "from": "human", "value": "module OverlappedButtonsHelper\n def expand_icon\n overlapped_button_icon :fullscreen, :expand\n end\n\n def restart_icon\n overlapped_button_icon :restart, :undo\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Return string when type does not match for column header\n" }, { "from": "human", "value": "module Spree\n module Admin\n module SlidesHelper\n def get_column_header_by_type(type)\n return Spree.t(:name) if type == :image\n return Spree.t(:pro...
ruby
chosen
[ { "from": "system", "value": "Update return on save antry service\n" }, { "from": "human", "value": "class Entry::SaveEntryService\n def initialize(account, entry_params)\n @account = account\n @entry_params = entry_params\n end\n\n def save_entries\n if @entry_params[:repeat] == '1'...
ruby
chosen
[ { "from": "system", "value": "Use double quotes in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NSData+TDTImageMIMEDetection\"\n s.version = \"0.1.1\"\n s.summary = \"Category on NSData to check if it represents PNG or JPEG.\"\n s...
ruby
chosen
[ { "from": "system", "value": "Add explicit version number for Readline.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Readline < Formula\n homepage 'http://tiswww.case.edu/php/chet/readline/rl...
ruby
chosen
[ { "from": "system", "value": "Switch to dev for workhorse source, again.\n" }, { "from": "human", "value": "module Gitlab\n class Version\n\n def initialize(filename)\n @filename = filename\n filepath = File.expand_path(@filename, Omnibus::Config.project_root)\n @read_version ...
ruby
chosen