conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix improper deferral of network overhead to Query layer with large data sets" }, { "from": "human", "value": "module FogTracker\n\n # Tracks a single Fog collection in a single account\n class ResourceTracker\n\n attr_accessor :collection\n\n # Creates an o...
ruby
chosen
[ { "from": "system", "value": "Revert \"Prevent constant problems on nested controllers\"\n\nThis reverts commit 23d696036683164af5ad4c656f3e44d8f9fc2a43.\n" }, { "from": "human", "value": "module Guachiman\n module Authorizable\n extend ActiveSupport::Concern\n\n included do\n before...
ruby
chosen
[ { "from": "system", "value": "Add CSV options to CsvProcessor\n" }, { "from": "human", "value": "require_relative 'batch_processor'\n\nmodule Processor\n module Data\n class CsvProcessor < BatchProcessor\n def initialize(file, separator = \";\")\n @file = file\n @separator...
ruby
chosen
[ { "from": "system", "value": "Add a simple seed for the dev test user.\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside th...
ruby
chosen
[ { "from": "system", "value": "Add seed data for commits\n" }, { "from": "human", "value": "require 'faker'\n\nusers = 3.times.map do\n User.create!(\n :name => Faker::Name.name,\n :email => Faker::Internet.email,\n :login => Faker::Internet.user_name\n )\nend\n\nstacks = 3.times.map ...
ruby
chosen
[ { "from": "system", "value": "Fix count when enumerable yields multiple values\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Enumerable#count\" do\n before :each do\n @ele...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for 0.5.3, fix deps.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'rightscale-cli'\n s.version = '0.5.1'\n s.date = '2014-02-17'\n s.summary = \"rightscale-cli\"\n s.description = \"RightScale ...
ruby
chosen
[ { "from": "system", "value": "Upgrade rubicure version to \"~> 0.4.7\"\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubicure_fuzzy_match/version'\n\nGem::Specification.new do |spe...
ruby
chosen
[ { "from": "system", "value": "Add bundler as a development 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 'cheat/version'\n\nGem::Specification.new do |spec|\n spec.add_d...
ruby
chosen
[ { "from": "system", "value": "Fix email address to avoid spam.\n" }, { "from": "human", "value": "#-*-Mode:ruby;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-\n# ex: set ft=ruby fenc=utf-8 sts=4 ts=4 sw=4 et:\nGem::Specification.new do |s|\n s.name = 'cloudi'\n s.v...
ruby
chosen
[ { "from": "human", "value": "Add a simple smoke test for Bindex.current_bindings\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass CurrentBindingsTest < BaseTest\n test 'first binding returned is the current one' do\n assert_equal __LINE__, Bindex.current_bindings.first.eval('_...
ruby
chosen
[ { "from": "system", "value": "Define class used in migration.\n" }, { "from": "human", "value": "class CreateEnterpriseFeeRecordsForProductDistributions < ActiveRecord::Migration\n def up\n ProductDistribution.all.each do |pd|\n calculator = pd.shipping_method.calculator.dup\n calc...
ruby
chosen
[ { "from": "system", "value": "Add attributes wrapper at more logical place\n" }, { "from": "human", "value": "require 'allowing/wrapping_builder'\nrequire 'allowing/validation_builder'\nrequire 'allowing/dsl'\nrequire 'allowing/validations_group'\n\nmodule Allowing\n class WrappedValidationBuil...
ruby
chosen
[ { "from": "system", "value": "Add more attributes to Sense\n" }, { "from": "human", "value": "require 'virtus'\n\n# Sense\nclass Sense\n include Virtus.model\n attribute :id, String\n attribute :antonyms, Array[OpenStruct]\n attribute :cross_references, Array[OpenStruct]\n attribute :cross_...
ruby
chosen
[ { "from": "system", "value": "Remove TODO since bundler complains\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = \"guard-si...
ruby
chosen
[ { "from": "system", "value": "Update authors and restrict Rails version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'warden_skeleton_key/version'\n\nGem::Specification.new do |spe...
ruby
chosen
[ { "from": "system", "value": "Update the order-summary when either address is updated\n" }, { "from": "human", "value": "module OnePageCheckout\n class OrderSummaryWidget < Apotomo::Widget\n helper Spree::BaseHelper\n helper Spree::OrdersHelper\n\n responds_to_event :shipping_address_u...
ruby
chosen
[ { "from": "system", "value": "Add the AcmCertificateArn property to CloudFront\n" }, { "from": "human", "value": "require_relative '../resource_property'\n\nmodule Convection\n module Model\n class Template\n class ResourceProperty\n # Represents a {http://docs.aws.amazon.com/AWS...
ruby
chosen
[ { "from": "system", "value": "Use test-unit gem to support plugin development with Ruby 2.2 and to write data driven test\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |gem|\n gem.authors = [\"Muddy Dixon\"]\n gem.email = [\"muddydixon@gm...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.4.3.0 to 0.4.4.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.4.3.0'\n s.description = '...
ruby
chosen
[ { "from": "system", "value": "Add passing digits integration test" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Zxcvbn::Matching::Digits do\n let(:matcher) { subject }\n let(:matches) { matcher.matches('testing1239xx9712') }\n\n it 'sets the pattern name' do\n matches....
ruby
chosen
[ { "from": "system", "value": "Increase version from 0.0.1.1 to 0.0.1.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'virtual'\n s.version = '0.0.1.1'\n s.summary = 'Virtual method declaration'\n s.description = ' '\n\n s.authors = ['...
ruby
chosen
[ { "from": "system", "value": "Fix title test - capybara uses a different syntax than webrat.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe HomeController do\n render_views\n\n describe \"GET 'index'\" do\n it \"returns http success\" do\n get 'index'\n respo...
ruby
chosen
[ { "from": "system", "value": "Define helper methods and write descriptions for them in comments\n" }, { "from": "human", "value": "module ApplicationHelper\nend\n" }, { "from": "gpt", "value": "module ApplicationHelper\n\n # uses everything and returns a full response object to send...
ruby
chosen
[ { "from": "human", "value": "203: Add spec for throttling of direct_auth requests\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'throttling for xml requests' do\n\n let(:limit) { 30 }\n\n before(:each) do\n Rack::Attack.cache.store = ActiveSupport::Cache::MemoryStore.ne...
ruby
chosen
[ { "from": "system", "value": "Remove require that was causing warnings\n" }, { "from": "human", "value": "require 'spec_helper'\n\nshared_examples 'a numerical type submatcher' do\n it 'implements the allowed_type method' do\n expect(subject).to respond_to(:allowed_type).with(0).arguments\n ...
ruby
chosen
[ { "from": "human", "value": "Add migration for new GHG keys\n\nRename old keys to closest matching new keys. Set other new keys to zero.\n" }, { "from": "gpt", "value": "class NewGreenHouseGasKeys < ActiveRecord::Migration[5.2]\n OLD_NEW_KEYS = {\n 'other_emission_agriculture': 'non_energeti...
ruby
chosen
[ { "from": "human", "value": "2163: Add migration to remove unassigned users from whitelist\n" }, { "from": "gpt", "value": "class RemoveUnassignedUsersFromWhitelist < ActiveRecord::Migration\n def up\n execute <<-SQL\n DELETE wl\n FROM whitelists wl\n INNER JOIN forms f\n ...
ruby
chosen
[ { "from": "human", "value": "Add email_alert_type to email signup items\n\nThis will support the email-alert-frontend by providing it with the\ninformation it needs to correctly construct a subscription request for\nthe email-alert-api.\n" }, { "from": "gpt", "value": "class AddSignupTypeToEmail...
ruby
chosen
[ { "from": "system", "value": "Update sha256 checksum for Vivaldi.app (Snapshot)\n" }, { "from": "human", "value": "cask :v1 => 'vivaldi-snapshot' do\n version '1.0.190.2'\n sha256 'ec0c8e79d566a815626f208d09e88102e78932a4c857eb293328415d7ecc02e9'\n\n url \"https://vivaldi.com/download/downloa...
ruby
chosen
[ { "from": "system", "value": "Improve admin variants controller create action, it doesn't try to set on_hand and on_demand if there are previous errors in the variant\n" }, { "from": "human", "value": "require 'open_food_network/scope_variants_for_search'\n\nSpree::Admin::VariantsController.clas...
ruby
chosen
[ { "from": "system", "value": "Fix class reference in product concern\n" }, { "from": "human", "value": "module Spree\n module BulkDiscounts::ProductConcerns\n extend ActiveSupport::Concern\n\n included do\n belongs_to :bulk_discount, class: Spree::BulkDiscount\n end\n end\nend\n"...
ruby
chosen
[ { "from": "system", "value": "Change spec to verify unicode support\n" }, { "from": "human", "value": "# encoding: utf-8\n\nRSpec.describe TTY::ProgressBar, ':head' do\n let(:output) { StringIO.new('', 'w+')}\n\n it \"animates head\" do\n progress = TTY::ProgressBar.new(\"[:bar]\", output: ...
ruby
chosen
[ { "from": "system", "value": "Add test to grid elements\n" }, { "from": "human", "value": "require_relative '../../lib/vida/grid'\n\ndescribe Grid do\n it \"should respond to rows\" do\n expect(Grid.new.respond_to?(:rows)).to eq true\n end\n it \"should respond to columns\" do\n expect(...
ruby
chosen
[ { "from": "system", "value": "Enable `should` syntax for RSpec\n\nWe can always get rid of this if we switch all of the specs to use\n`expect` instead, but until then we should probably make our RSpec\nconfiguration match how our specs are written.\n" }, { "from": "human", "value": "require 'bun...
ruby
chosen
[ { "from": "system", "value": "Remove parentheses for method definition\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"octokit\"\nrequire \"compare_linker\"\n\nmodule BuPr\n module Handlers\n class Github\n attr_reader :base\n attr_reader :current_bran...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec, is MIT\n\nSee https://github.com/bf4/gemproject/issues/1" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"codeclimate-test-reporte...
ruby
chosen
[ { "from": "system", "value": "Bump up version to 0.4.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"BTNavigationDropdownMenu\"\n s.version = \"0.4\"\n s.summary = \"The elegent navigation dropdown menu\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Change promotion_choice default choice to 'none'\n\nWe change the default_presentation_toggles promotion choice to `none` to\nreflect the fact that when a user opts for no promotion, the form in fact\npasses back `none`.\n" }, { "from": "human", "value": "module Pre...
ruby
chosen
[ { "from": "system", "value": "Split out a separate test for `terms`\n\nRather than just asserting that the lists have the same number of\nelements, or an entry with the same name, actually test that the lists\nfor each are the same.\n" }, { "from": "human", "value": "require 'test_helper'\n\ncla...
ruby
chosen
[ { "from": "system", "value": "Add tests for next? and previous? methods.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TestQueryResultCollection < Test::Unit::TestCase\n \n def setup\n options = {\n :username => 'myusername', \n :password => 'mypassword',\n ...
ruby
chosen
[ { "from": "system", "value": "Update privacy notice spec test to account for new content\n" }, { "from": "human", "value": "require 'feature_helper'\n\nRSpec.describe 'When the user visits the privacy notice page' do\n it 'displays the page in English' do\n visit '/privacy-notice'\n expec...
ruby
chosen
[ { "from": "system", "value": "Fix to the 0.13.2 version of libcloud that will be installed.\n" }, { "from": "human", "value": "ohai = Ohai::System.new\nohai.all_plugins\nif ohai[:languages][:python][:version] =~ /^2\\.6\\..*/\n %w{ordereddict argparse}.each do |pypkg|\n python_pip \"orderedd...
ruby
chosen
[ { "from": "system", "value": "Switch schema to work with Devise 2.1\n" }, { "from": "human", "value": "class CreateTables < ActiveRecord::Migration\n def self.up\n create_table :users do |t|\n t.cas_authenticatable\n t.rememberable\n t.string :email\n t.timestamps\n en...
ruby
chosen
[ { "from": "system", "value": "Improve the matcher for showing actual value\n" }, { "from": "human", "value": "RSpec::Matchers.define(:have_instance_variables) do |expected|\n match do |actual|\n expected.each do |instance_variable, expected_value|\n expect(actual.instance_variable_get(i...
ruby
chosen
[ { "from": "system", "value": "Add extension to file name\n" }, { "from": "human", "value": "require_dependency \"nexaas/async/collector/application_controller\"\n\nmodule Nexaas\n module Async\n module Collector\n class AsyncResourceController < ApplicationController\n\n def show...
ruby
chosen
[ { "from": "system", "value": "Fix typo in opening hours params\n" }, { "from": "human", "value": "class OpeningHoursController < ApplicationController\n\tbefore_action :set_opening_hour, except: %i(index create)\n\n\tdef index\n\t\t@opening_hours = policy_scope(OpeningHour)\n\n\t\tif params[:res...
ruby
chosen
[ { "from": "system", "value": "Make sure panopticon slug checks don't get stuck because slugs are too long\n" }, { "from": "human", "value": "class PanopticonSlugValidator < ActiveModel::EachValidator\n def claim_slug(endpoint_url, attributes_to_send)\n uri = URI.parse(endpoint_url)\n res ...
ruby
chosen
[ { "from": "human", "value": "Add migration to add visibility_level to datasets table\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass AddVisibilityLevelToGdataDatasets < ActiveRecord::Migration[5.2]\n def change\n add_column :gdata_datasets, :visibility_level, :integer...
ruby
chosen
[ { "from": "system", "value": "Update test environments / Update podspec iOS version.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MantleArrayExtension'\n s.version = '2.0.2'\n s.summary = 'MantleArrayExtension support mutual conversion betw...
ruby
chosen
[ { "from": "system", "value": "Remove left-over method from initial impl\n" }, { "from": "human", "value": "module Dry\n module Validation\n def self.Result(input, value)\n Result.new(input, value)\n end\n\n class Result\n attr_reader :input, :value\n\n def initialize(inp...
ruby
chosen
[ { "from": "system", "value": "Remove extra \\n from jslint report\n" }, { "from": "human", "value": "module Iridium\n class JSLintReport\n def initialize(files, io = $stdout)\n @files, @io = files, io\n end\n\n def print(result)\n if result.empty?\n @io.print \".\"\n ...
ruby
chosen
[ { "from": "system", "value": "Add tags option to excel import\n" }, { "from": "human", "value": "class Podio::Importer < ActivePodio::Base\n \n class << self\n def process_file(file_id, app_id, mappings)\n response = Podio.connection.post do |req|\n req.url \"/importer/#{file_id...
ruby
chosen
[ { "from": "system", "value": "Remove ||= usage in ModuleBuilder\n" }, { "from": "human", "value": "module Virtus\n\n class ModuleBuilder\n\n def self.call(&block)\n config = Configuration.new.call(&block)\n builder = self.new(config)\n builder.add_included_hook\n builder...
ruby
chosen
[ { "from": "system", "value": "Update middleware for new middleware API\n" }, { "from": "human", "value": "require 'faraday'\n\n# @api private\nmodule Faraday\n class Response::RaiseError < Response::Middleware\n def self.register_on_complete(env)\n env[:response].on_complete do |respons...
ruby
chosen
[ { "from": "system", "value": "Fix ordering of executables in gemspec" }, { "from": "human", "value": "require File.expand_path(\"../lib/dotenv/version\", __FILE__)\nrequire \"English\"\n\nGem::Specification.new \"dotenv\", Dotenv::VERSION do |gem|\n gem.authors = [\"Brandon Keepers\"]\n ...
ruby
chosen
[ { "from": "system", "value": "Update user schema, add email field and uniqueness constraints\n" }, { "from": "human", "value": "Sequel.migration do\n change do\n\n # rw_attribute :id\n # rw_attribute :authz_id\n # rw_attribute :first_name\n # rw_attribute :last_name\n # rw_attrib...
ruby
chosen
[ { "from": "system", "value": "Fix cron timing of new task\n\nThe previous configuration, despite being generated by specialist website(!)\nwas not recognised by the service\n" }, { "from": "human", "value": "# https://github.com/ssoroka/scheduler_daemon for help\nclass PerformancePlatformCostPer...
ruby
chosen
[ { "from": "system", "value": "Delete unnesesarry method and variable\n" }, { "from": "human", "value": "require \"rake_shared_context/version\"\nrequire \"rake\"\n\nbegin\n require \"rspec/core\"\n shared_context \"rake\" do\n let(:rake) { Rake::Application.new }\n let(:task_name) {...
ruby
chosen
[ { "from": "system", "value": "Rename refund's authorization_id to charge_id\n" }, { "from": "human", "value": "require 'accepton/api/utils'\n\nmodule AcceptOn\n module API\n module Refunding\n include AcceptOn::API::Utils\n\n # Refunds a charge by the specified amount\n #\n ...
ruby
chosen
[ { "from": "system", "value": "Use better way to load yml file\n\nFor some reason the yaml file is not found when using the gem with an\napplication. Apparently that problem was not hit when using json.\n\nUsing a better more absolute approach of loading the yaml file. I took\nthis pattern from rubocop gem.\...
ruby
chosen
[ { "from": "system", "value": "Remove temp variable in do_turn\n" }, { "from": "human", "value": "module TicTacToe\n class Console\n attr_reader :game\n\n def initialize(console, game)\n @console, @game = console, game\n end\n\n def prompt_move\n @console.print \"Enter your...
ruby
chosen
[ { "from": "system", "value": "Remove headers with a nil value\n" }, { "from": "human", "value": "require 'httparty'\nrequire 'diesel/utils/inflections'\n\nmodule Diesel\n class RequestContext\n include Diesel::Utils::Inflections\n\n attr_reader :options, :group, :endpoint, :attributes\n\n...
ruby
chosen
[ { "from": "system", "value": "Change deserialize to get list of vars from yaml\n\nThe self might not have all the instance vars created yet (since we\ndon't define them all in init), so we now get the instance vars from the\nobject read in from the yaml & assign them to self. This way we get\neverything bac...
ruby
chosen
[ { "from": "system", "value": "Upgrade Android Studio.app to v0.6.0 build-135.1212210\n" }, { "from": "human", "value": "class AndroidStudio < Cask\n url 'http://dl.google.com/dl/android/studio/ide-zips/0.5.9/android-studio-ide-135.1195882-mac.zip'\n homepage 'https://developer.android.com/sdk/...
ruby
chosen
[ { "from": "system", "value": "Add connect and query method\n" }, { "from": "human", "value": "class Midori::Postgres\n def initialize(socket)\n @db = EM.connect_unix_domain(socket)\n end\n\n def connect(dbname, username, password)\n Promise.new(->(resolve, _reject) {\n @db.connect(...
ruby
chosen
[ { "from": "system", "value": "Use an alternative suhosin patch for 5.3.18\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'abstract-php')\n\nclass Php53 < AbstractPhp\n url 'http://www.php.net/get/php-5.3.18.tar.bz2/from/this/mirror'\n sha1 '561b7ed1ad147346d97f4ca...
ruby
chosen
[ { "from": "system", "value": "Extend lib to accept a hash for scripts and a hash for options.\n\nThe options hash is only used to grab an api key to pass on to google\nservices at the url. (Google maps api key)\n\nThis is NOT currently backwards compatible. (hopefully the update)\n\nTODO:\n * Make backward...
ruby
chosen
[ { "from": "system", "value": "Change require for HTTParty to httparty\n" }, { "from": "human", "value": "# Retrieves a URL and return the Nokogiri representation of that page\nrequire 'HTTParty'\nrequire 'nokogiri'\n\n# Class for retrieving a Nokogiri tree from a URL\nclass PageRetriever\n def ...
ruby
chosen
[ { "from": "system", "value": "Update CAQE to version 2.0\n" }, { "from": "human", "value": "class Caqe < Formula\n desc \"CAQE is a certifying solver for quantified Boolean formulas (QBF) based on the CEGAR-based clausal abstraction algorithm\"\n homepage \"https://www.react.uni-saarland.de/to...
ruby
chosen
[ { "from": "system", "value": "Docs: Update emails and URLs in the 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\nGem::Specification.new do |spec|\n spec.name = 'fuubar'...
ruby
chosen
[ { "from": "human", "value": "Add unit test for CampaignReport\n" }, { "from": "gpt", "value": "require_relative 'test_helper'\n\nclass CampaignReportTest < MiniTest::Unit::TestCase\n\n describe 'CampaignReport' do\n\n before do\n @attrs = {name: 'Report 1', campaign_id: 123}\n @rep...
ruby
chosen
[ { "from": "system", "value": "Fix specs for candidate offer application\n\nA Candidate should not be able to post an offer application without a\nfilled out profile, as this causes a fatal error when sending the\napplication via e-mail to the employer.\n[ad69651] added a redirect to prevent application when...
ruby
chosen
[ { "from": "system", "value": "Add general route for testing purposes.\n" }, { "from": "human", "value": "RailsApp::Application.routes.draw do\n # The priority is based upon order of creation:\n # first created -> highest priority.\n\n # Sample of regular route:\n # match 'products/:id' => ...
ruby
chosen
[ { "from": "system", "value": "Fix dependencies so tests still work for Ruby 1.9.3.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gitlab/version'\n\nGem::Specification.new...
ruby
chosen
[ { "from": "system", "value": "Add RSpec as a development dependency\n\nSigned-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>\n" }, { "from": "human", "value": "require File.expand_path('lib/wopen3/version.rb', File.dirname(__FILE__))\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Fix test for user profile\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe PublicPagesController, type: :controller do\n describe 'GET #search' do\n it 'returns http success' do\n get :search\n expect(response).to have_http_s...
ruby
chosen
[ { "from": "system", "value": "Use MockProject for testing Roger Rack middleware" }, { "from": "human", "value": "require \"test_helper\"\nrequire File.dirname(__FILE__) + \"../../../../lib/roger/rack/roger\"\n\nmodule Roger\n module Rack\n # Test Roger Rack\n class ServerTest < ::Test::Un...
ruby
chosen
[ { "from": "system", "value": "Set empty string when signature is not defined\n" }, { "from": "human", "value": "class MessageMailer < ActionMailer::Base\n include SummaryHelper\n include NicknameHelper\n include MarkdownHelper\n include ConversationHelper\n\n # Public: Triggered on Message ...
ruby
chosen
[ { "from": "system", "value": "Use :format option in property declaration rather than validates_format_of\n" }, { "from": "human", "value": "class Language\n\n include DataMapper::Resource\n\n # properties\n\n property :id, Serial\n\n property :code, String, :required => true, :unique => tr...
ruby
chosen
[ { "from": "system", "value": "Remove LRImageManager from podspec dependencies\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'LRTVDBAPIClient'\n s.version = '0.1'\n s.license = 'MIT'\n s.summary = 'Objective-C wrapper for TheTVDB.'\n s.homepage = 'https://github.c...
ruby
chosen
[ { "from": "system", "value": "Add support for tvOS 9.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'LRNotificationObserver'\n s.version = '0.1.2'\n s.license = 'MIT'\n s.summary = 'A smarter, simple and better way to use NSNotificationCenter with RAII.'\n s.hom...
ruby
chosen
[ { "from": "human", "value": "Add integration tests for Network model/collection\n" }, { "from": "gpt", "value": "require \"helpers/integration_test_helper\"\nrequire \"securerandom\"\n\nclass TestComputeNetworksCollection < FogIntegrationTest\n DEFAULT_REGION = \"us-central1\".freeze\n DEFAULT...
ruby
chosen
[ { "from": "system", "value": "Fix test where shoulda context did hide setup.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass DayTest < ActiveSupport::TestCase\n setup do\n @day = Factory.build(:day, :gross_turnover => 100.0, :net_turnover => 80.0)\n end\n\n should \"outpu...
ruby
chosen
[ { "from": "system", "value": "Fix tests for new rootfs v0.7.2\n" }, { "from": "human", "value": "describe file('/etc/hypriot_release') do\n it { should_not be_file }\nend\n\ndescribe file('/etc/os-release') do\n it { should be_file }\n it { should be_owned_by 'root' }\n its(:content) { shoul...
ruby
chosen
[ { "from": "system", "value": "Use profile instead of logged user\n" }, { "from": "human", "value": "class FbAppPluginMyprofileController < OpenGraphPluginMyprofileController\n\n no_design_blocks\n\n before_filter :load_provider\n before_filter :load_auth\n\n def index\n if params[:tabs_ad...
ruby
chosen
[ { "from": "system", "value": "Update Pod spec with all authors and new version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Granola\"\n s.version = \"0.1.0\"\n s.summary = \"A healthful serializer for your HealthKit data.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add docs to test helpers\n" }, { "from": "human", "value": "module AsyncHelper\n def eventually(options = {})\n timeout = options[:timeout] || 1\n interval = options[:interval] || 0.0001\n time_limit = Time.now + timeout\n\n loop do\n begin\...
ruby
chosen
[ { "from": "system", "value": "Fix a JS race in a spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Projects > Settings > User changes default branch' do\n include Select2Helper\n\n let(:user) { create(:user) }\n\n before do\n sign_in(user)\n\n visit project_sett...
ruby
chosen
[ { "from": "system", "value": "Remove mysql dependency, as depended by database\n" }, { "from": "human", "value": "name 'racktables'\nmaintainer 'Oregon State University'\nmaintainer_email 'bramwelt@osuosl.org'\nlicense 'Apache 2.0'\ndescription 'Manages deploying ...
ruby
chosen
[ { "from": "system", "value": "Use \"refute\" instead of \"assert !\"\n\nRemove FIXME tag from abstract adapter test.\n" }, { "from": "human", "value": "require \"cases/helper\"\n\nmodule ActiveRecord\n module ConnectionAdapters\n class AbstractAdapterTest < ActiveRecord::TestCase\n attr...
ruby
chosen
[ { "from": "system", "value": "Revert \"Wait for field to be filled\"\n\nThis reverts commit d02268060050a18e9668f6e723b0fba0b6f49d0a.\n" }, { "from": "human", "value": "module Page\n class Organization\n include Capybara::DSL\n include Capybara::RSpecMatchers\n\n attr_accessor :new_org...
ruby
chosen
[ { "from": "system", "value": "Update description and summary in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubiks/version'\n\nGem::Specification.new do |gem|\n...
ruby
chosen
[ { "from": "human", "value": "Add NullRelation for Bootstrap version of WillPaginate\n" }, { "from": "gpt", "value": "module ActiveRecord\n # = Active Record Null Relation\n class NullRelation < Relation\n def self.page(options)\n self\n end\n \n def self.total_pages\n 0\n...
ruby
chosen
[ { "from": "system", "value": "Include migration files in gem\n\nFixes #31245\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nversion = File.read(File.expand_path(\"../RAILS_VERSION\", __dir__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s...
ruby
chosen
[ { "from": "system", "value": "Make comment more explicit, less confusing\n" }, { "from": "human", "value": "module Bluecap\n class Identifier\n\n def handle(data)\n name = data[:identifier]\n id = Bluecap.redis.hget('user.map', name)\n if id.nil?\n id = Bluecap.redis.in...
ruby
chosen
[ { "from": "system", "value": "Fix LIKE: Revert \"Don't add % for body\"\n\nThis reverts commit c7e3336ba6f4a9cc6e1ad6f77fbad25576c13f1c.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SearchHelper\n def self.parse_search_params(params, symbol, user)\n input = para...
ruby
chosen
[ { "from": "system", "value": "Sort Shift recount and scrutiny dates\n" }, { "from": "human", "value": "module ShiftsHelper\n\n def shift_vote_collection_dates(polls)\n date_options((start_date(polls)..end_date(polls)))\n end\n\n def shift_recount_scrutiny_dates(polls)\n date_options(pol...
ruby
chosen
[ { "from": "system", "value": "Remove redefinition of the wikidata method in Area\n\nSince the Area class is a subclass of an Entity, and Entity defines\nthe identifiers method already, there is no need to redefine it in\nthe subclass again.\n" }, { "from": "human", "value": "module Everypolitici...
ruby
chosen
[ { "from": "system", "value": "Update to new kramdown syntax highlighting API.\n" }, { "from": "human", "value": "# = Markdown plugin\n#\n# This plugin provides Markdown post markup via\n# the kramdown RubyGem.\n#\n# == Configuration\n# None.\nmodule MarkdownPlugin\n include Chessboard::Plugin\n...
ruby
chosen