conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add ruby_parser / code_analyzer compatibility hack, temporary\n" }, { "from": "human", "value": "# For Flog\n# TODO: Do we still need this?\nclass RubyParser\n alias_method :original_process, :process\n def process(s,f,t)\n original_process(s,f,t)\n rescue => ...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec; update description\n\nPrep work for version 3.2.1 release.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"quebert/version\"\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Use AR releation \"count\" method\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Release < ActiveRecord::Base\n include CacheMarkdownField\n include Gitlab::Utils::StrongMemoize\n\n cache_markdown_field :description\n\n belongs_to :pro...
ruby
chosen
[ { "from": "system", "value": "Allow No to be used with animated images\n" }, { "from": "human", "value": "module Teaas\n class No\n # Takes in an image, and adds no to it. Best when used with {Teaas::Turboize.turbo} to generate multiple rotation speeds.\n #\n # @param original_img [Mag...
ruby
chosen
[ { "from": "system", "value": "Handle missing namespace in single sign out XML.\n\nSome XML single sign out requests do not include the samlp XML namespace\nwhich was causing problems with xpath and Nokogiri.\n" }, { "from": "human", "value": "require 'nokogiri'\n\nclass CASRequest\n def initial...
ruby
chosen
[ { "from": "system", "value": "Update location of rubygems.org credentials\n\nNo longer using .gemrc, so tell them to update their .gem/credentials file instead!\r\n\r\nRef: #694" }, { "from": "human", "value": "class Api::V1::ApiKeysController < Api::BaseController\n before_filter :redirect_to_...
ruby
chosen
[ { "from": "system", "value": "Use mas cms client gem for debt management campaign page\n" }, { "from": "human", "value": "class DebtManagementController < ApplicationController\n layout '_unconstrained'\n\n COMPANY_LIST_ARTICLE_ID = 'debt-management-companies'\n\n private\n\n def company_lis...
ruby
chosen
[ { "from": "system", "value": "Add runtime dependency on Mementus\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'fictive/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use Fluent::Config::Element explicitly in test\n" }, { "from": "human", "value": "require_relative 'helper'\nrequire 'fluent/formatter'\nrequire 'fluent/plugin/formatter_tsv'\n\nclass TsvFormatterTest < ::Test::Unit::TestCase\n def setup\n @formatter = Fluent::P...
ruby
chosen
[ { "from": "system", "value": "Update Amazon Music.app to v3.4" }, { "from": "human", "value": "class AmazonMusic < Cask\n version '3.2'\n sha256 'fc003860aceaa3cb4200d9f4e66794fda654dd1db4fa646a88e79502547728a3'\n\n url 'https://images-na.ssl-images-amazon.com/images/G/01/digital/music/morpho...
ruby
chosen
[ { "from": "system", "value": "Update gem summary and description.\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::VER...
ruby
chosen
[ { "from": "system", "value": "Update the URL of logstash jar to download\n" }, { "from": "human", "value": "#\n# Copyright 2011, Peter Donald\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obt...
ruby
chosen
[ { "from": "system", "value": "Change version to 0.0.6 in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'AvitoMediaPicker'\n s.module_name = 'AvitoMediaPicker'\n s.version = '0.0.5'\n s.summary = 'Avito Me...
ruby
chosen
[ { "from": "system", "value": "Modify logic of spec test files.\n" }, { "from": "human", "value": "require_relative '../spec_helper.rb'\n\ndescribe service('zabbix_agentd') do\n it { should be_enabled }\nend\n\ndescribe port(10_050) do\n it { should be_listening.with('tcp') }\nend\n\ndescribe '...
ruby
chosen
[ { "from": "system", "value": "Fix undefined method error when visit /user/favorite_courses\n" }, { "from": "human", "value": "class Users::FavoriteCoursesController < ApplicationController\n include CourseManager\n\n before_action :authenticate_user!\n before_action :redis_state, only: [:show...
ruby
chosen
[ { "from": "system", "value": "Add Ruby 1.9 comment for UTF-8 support in gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = \"lowmagic-migrations\"\n gem.version = \"0.0.1\"\n gem.authors = [\"Jacob Helwig\"]\n gem.email = [\"j...
ruby
chosen
[ { "from": "system", "value": "Return the id on create" }, { "from": "human", "value": "module ActiveRecord\n module ConnectionAdapters\n module Sunstone\n module DatabaseStatements\n\n # Converts an arel AST to a Sunstone API Request\n def to_sar(arel, bvs = [])\n ...
ruby
chosen
[ { "from": "system", "value": "Add activesupport to run time deps\n\nWithout it, use of remote.rb can fail, leading to general\n`GH::Error` when calls to GitHub are made.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Improve live names created by the factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :live, class: 'Live' do\n name 'テストライブ'\n sequence(:date) { |n| Date.new(2000) + n.month }\n place '4共21'\n album_url 'https://goo.gl/photos/o94...
ruby
chosen
[ { "from": "system", "value": "Use double instead of stub to avoid deprecation warnings\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Request do\n let (:subject) { Request.new stub }\n\n it { should be_a(Rack::Request) }\nend\n\ndescribe Response do\n it { should be_a(Ra...
ruby
chosen
[ { "from": "system", "value": "Add a convenient method for get the debox server\n" }, { "from": "human", "value": "class FakeServer\n include DeboxServer::App\nend\n\ndef create_user(email='test@indeos.es')\n user = FakeServer.new.add_user email, 'secret'\n return user\nend\n\ndef login_user(u...
ruby
chosen
[ { "from": "system", "value": "Fix Feed controller unit test. Also added a new example to that unit test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe FeedsController do\n before :each do\n @user = FactoryGirl.create :user\n\n @feed1 = FactoryGirl.create :feed\n ...
ruby
chosen
[ { "from": "system", "value": "Add Business model validations for geocoder\n" }, { "from": "human", "value": "class Business < ActiveRecord::Base\n enum theme: { wine: 0, beer: 1, whiskey: 2, coffee: 3 }\n\n has_many :flights\n belongs_to :flight\n\n validates :name, :location, :rating, prese...
ruby
chosen
[ { "from": "system", "value": "Resolve line order merge conflict.\n" }, { "from": "human", "value": "class Question < ActiveRecord::Base\n belongs_to :user\n has_many :answers\n validates :title, presence: true\n validates :body, presence: true\n has_many :votes, as: :article\n has_man...
ruby
chosen
[ { "from": "system", "value": "Fix for Question Info Method so it doesn't return nil for hashtags\n" }, { "from": "human", "value": "class Question < ActiveRecord::Base\n\tbelongs_to :user\n\thas_many :comments, as: :commentable\n\thas_many :votes, as: :votable\n\thas_many :hashtag_questions\n\th...
ruby
chosen
[ { "from": "system", "value": "Add vote_on_this? method to models, to move voting logic to models\n" }, { "from": "human", "value": "class Response < ActiveRecord::Base\n belongs_to :responder, class_name: :User\n belongs_to :respondable, polymorphic: true\n has_many :votes, as: :votable\n\n ...
ruby
chosen
[ { "from": "system", "value": "Make the client work for API v1" }, { "from": "human", "value": "module Auth0\n module Mixins\n # Help class where Auth0::Client initialization described\n module Initializer\n # Default initialization mechanism, moved here to keep Auth0::Client clear\n ...
ruby
chosen
[ { "from": "system", "value": "Remove version requirement of CocoaAsyncSocket" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"ALBPeerConnection\"\n s.version = \"3.0.1\"\n s.summary = \"Peer-Peer networking classes written (mostly) in Swift\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Remove log calls and handle optional request argument will a default NullRequestStruct object\n" }, { "from": "human", "value": "require 'devise_auditable/hooks/auditable'\n\nmodule Devise\n module Models\n module Auditable\n def audit_login!(request)\n ...
ruby
chosen
[ { "from": "system", "value": "Use frozen literal string for Redis plugin\n" }, { "from": "human", "value": "module RorVsWild\n module Plugin\n class Redis\n def self.setup\n return if !defined?(::Redis)\n if ::Redis::Client.method_defined?(:process)\n ::Redis::Cli...
ruby
chosen
[ { "from": "system", "value": "Make a 'standard' server come with a sensible default enc.\n" }, { "from": "human", "value": "require 'stacks/namespace'\nrequire 'stacks/machine_def'\n\nclass Stacks::StandardServer < Stacks::MachineDef\n\n def initialize(virtual_service, index)\n @virtual_serv...
ruby
chosen
[ { "from": "system", "value": "Include bower.json in the gem\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"mortgage_calculator/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do...
ruby
chosen
[ { "from": "system", "value": "Use the current directory when no path is supplied.\n" }, { "from": "human", "value": "require \"xcoder\"\n\nmodule Ive\n class Base\n class << self\n def list\n puts \"-- Ive supports the following version bumps:\"\n puts \"- major\"\n ...
ruby
chosen
[ { "from": "system", "value": "Fix quote: \" -> '\n" }, { "from": "human", "value": "require \"lambchop/version\"\n\nmodule Lambchop\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require 'lambchop/version'\n\nmodule Lambchop\n # Your code goes here...\nend\n" } ...
ruby
chosen
[ { "from": "system", "value": "Add more detailed reports to benchmark\n\n[ci skip]\n" }, { "from": "human", "value": "# Borrowed from Traco\n\nrequire \"bundler/setup\"\nrequire \"benchmark/ips\"\nrequire \"active_record\"\nrequire \"mobility\"\n\nActiveRecord::Base.establish_connection adapter: ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Uses thread-local variables instead of a global variable for setting the configuration\"\n\nThis reverts commit 05fe36e8082a07b29c7d322a8bdf6245f0b8a82e.\n" }, { "from": "human", "value": "require 'logging'\nrequire \"netvisor/version\"\nrequire \"netvisor/...
ruby
chosen
[ { "from": "system", "value": "Remove the automatic tie to Rails if Rails exists" }, { "from": "human", "value": "module Saasable\n # Errors\n autoload :Errors, \"saasable/errors\"\n \n # Middleware\n autoload :Middleware, \"saasable/middleware\"\n \n # Mongoid\n autoload :Mongoid, \"saas...
ruby
chosen
[ { "from": "system", "value": "Test homepage doesnt blow up.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass HomeControllerTest < ActionController::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "require 'test_hel...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to point to new repo location, update email address\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'importu/version'\n\nGem::Specification.new do |s|\n s.name = 'importu'\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Use --env=std by default for Linuxbrew\n" }, { "from": "human", "value": "require \"hardware\"\nrequire \"extend/ENV/shared\"\nrequire \"extend/ENV/std\"\nrequire \"extend/ENV/super\"\n\ndef superenv?\n ARGV.env != \"std\" && ARGV.env != \"inherit\" && Superenv.bin...
ruby
chosen
[ { "from": "human", "value": "Add migration to add tax_total to line items, shipments + orders\n" }, { "from": "gpt", "value": "class AddTaxTotalToLineItemsShipmentsAndOrders < ActiveRecord::Migration\n def change\n add_column :spree_line_items, :tax_total, :decimal, precision: 10, scale: 2, ...
ruby
chosen
[ { "from": "system", "value": "Update inspec tests to pass on Windows\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "describe file('/etc/ntp.conf') do\n it { should be_file }\nend\n\ndescribe file('/etc/ntp.leapseconds') do\n it...
ruby
chosen
[ { "from": "system", "value": "Fix Presenter::Tomatoes test class name\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule Api\n module Presenter\n class TomatoTest < ActiveSupport::TestCase\n setup do\n @user = User.create!\n tomato = @user.tomatoes.build\n ...
ruby
chosen
[ { "from": "system", "value": "Update Adapter to version 2.1.0\n" }, { "from": "human", "value": "class Adapter < Cask\n url 'http://downloads.macroplant.com/Adapter-1.4.3.dmg'\n homepage 'http://www.macroplant.com/adapter/'\n version '1.4.3'\n sha256 '1bacc9551d559908ab0973dda29e914925a437f9...
ruby
chosen
[ { "from": "system", "value": "Update Caprine.app to version 1.0.0\n\nUpdated to the latest version\n" }, { "from": "human", "value": "cask 'caprine' do\n version '0.6.0'\n sha256 'c72f1c2881500ee52c8f6a90e313b6db1a2ad8eb08d11cc4a7097e2b6aa96ed2'\n\n url \"https://github.com/sindresorhus/capri...
ruby
chosen
[ { "from": "system", "value": "Fix hash mismatch with Vagrant\n\nA space was added. Sorry!" }, { "from": "human", "value": "class Vagrant < Cask\n url 'https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3.dmg'\n homepage 'http://www.vagrantup.com'\n version '1.6.3'\n sha256 'ed1de41ca11a225...
ruby
chosen
[ { "from": "system", "value": "Fix dependencies bug\n* `thin` is already included in runtime dependency\n* `test-unit` is explicitly required now\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/msgpack/rpc_over_http/version', __FILE__)\n\nGem::Specif...
ruby
chosen
[ { "from": "system", "value": "Fix call to bundle for newly tailored guest images (which have bundle command at /usr/local instead of /usr)\n" }, { "from": "human", "value": "module CloudModel\n class Config \n attr_writer :data_directory, :backup_directory, :bundle_command\n attr_writer :...
ruby
chosen
[ { "from": "system", "value": "Fix bug where Database ignored :impala_mem_limit option\n" }, { "from": "human", "value": "require 'facets/hash/revalue'\n\nmodule ConceptQL\n class Database\n attr :db, :opts\n\n def initialize(db, opts={})\n @db = db\n db_type = :impala\n if ...
ruby
chosen
[ { "from": "system", "value": "Add mongo_push and mongo_pull commands to schnitzelpress CLI tool." }, { "from": "human", "value": "require \"thor\"\n\nmodule Schnitzelpress\n class Cli < Thor\n include Thor::Actions\n\n source_root(File.expand_path('../../templates', __FILE__))\n\n desc...
ruby
chosen
[ { "from": "system", "value": "Disable app initialization during precompile\n" }, { "from": "human", "value": "# This code is free software; you can redistribute it and/or modify it under\n# the terms of the new BSD License.\n#\n# Copyright (c) 2012, Sebastian Staudt\n\nrequire File.expand_path('...
ruby
chosen
[ { "from": "system", "value": "Set default template engine as slim\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler...
ruby
chosen
[ { "from": "system", "value": "Fix dependency error on unsupported super_exception_notifier 3.0.x.\n\n* The app supported 2.0.x, which has a different API than 3.0.x.\n* The environment was recently updated to specify 3.0.x without changing\n the API calls. This didn't fail in development or testing because...
ruby
chosen
[ { "from": "system", "value": "Fix LOGGER not being defined for tests.\n" }, { "from": "human", "value": "require \"rubygems\"\n\n# Setup gem bundler for dependencies.\nENV[\"BUNDLE_GEMFILE\"] = File.expand_path(\"../../Gemfile\", __FILE__)\nrequire \"bundler\"\nBundler.setup\n\n# Define a consta...
ruby
chosen
[ { "from": "system", "value": "Add UK Welcomes campaign to Panopticon\n" }, { "from": "human", "value": "require 'registerable_campaign'\n\nnamespace :panopticon do\n desc \"Register campaign pages with panopticon\"\n task :register => :environment do\n require 'gds_api/panopticon'\n logg...
ruby
chosen
[ { "from": "system", "value": "Bump version number to 0.2 -- rock and roll!\n" }, { "from": "human", "value": "\nrequire 'rake'\n\nPKG_FILES = FileList[\n '[a-zA-Z]*',\n 'generators/**/*',\n 'lib/**/*',\n 'rails/**/*',\n 'tasks/**/*',\n 'test/**/*'\n]\n\nSPEC = Gem::Specification.new do |s|...
ruby
chosen
[ { "from": "system", "value": "Support : les comptes utilisateurs affichés par HelpScout sont maintenant insensibles à la casse de l'email\n\nwebhook: make HelpScout email search case-insensitive" }, { "from": "human", "value": "class WebhookController < ActionController::Base\n before_action :v...
ruby
chosen
[ { "from": "system", "value": "Add search hits in controller\n" }, { "from": "human", "value": "class WelcomeController < ApplicationController\n def index\n if params[:order_by] == 'votes'\n @questions = Question.sort_by_votes\n elsif params[:order_by] == 'trendiness'\n @questio...
ruby
chosen
[ { "from": "system", "value": "Improve JUnit 5 adapter for successful runs\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Junit5Adapter < TestingFrameworkAdapter\n COUNT_REGEXP = /(\\d+) tests found/.freeze\n FAILURES_REGEXP = /(\\d+) tests failed/.freeze\n SUCCESS_R...
ruby
chosen
[ { "from": "system", "value": "Remove XXX that is no longer applicable\n" }, { "from": "human", "value": "class ActiveShepherd::Traversal\n attr_reader :attributes, :associations, :visitor\n\n def initialize(visitor, params = {})\n @associations = params[:associations]\n @attributes = p...
ruby
chosen
[ { "from": "system", "value": "Allow GreenhouseGas lookup using GreenhouseGas[abbreviation]" }, { "from": "human", "value": "class GreenhouseGas < ActiveRecord::Base\n set_primary_key :name\n \n data_miner do\n tap \"Brighter Planet's greenhouse gas data\", Earth.taps_server\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Raise exception on invalid pipeline cache\n" }, { "from": "human", "value": "module Gitlab\n module EtagCaching\n class Store\n EXPIRY_TIME = 20.minutes\n REDIS_NAMESPACE = 'etag:'.freeze\n\n def get(key)\n Gitlab::Redis.with { |redis| redi...
ruby
chosen
[ { "from": "system", "value": "Adjust factory to use Prover model.\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :proof_attempt do\n prover { 'SPASS' }\n prover_output { 'SPASS Output' }\n tactic_script { 'SPASS Tactic Script' }\n time_taken { rand(5) }\n\n as...
ruby
chosen
[ { "from": "system", "value": "Rewrite pest? to check list of possible referrers\n" }, { "from": "human", "value": "module Rack\n class Pesticide\n def initialize(app)\n @app = app\n end\n\n def call(env)\n if pest?(env)\n forbidden\n else\n @app.call(env)\n...
ruby
chosen
[ { "from": "system", "value": "Add diversity to the conversation. It makes evrything betterer.\n" }, { "from": "human", "value": "require \"rails/dairylog/version\"\nrequire 'open3'\n\nmodule Rails\n module Dairylog\n class Engine < ::Rails::Engine\n config.to_prepare do\n Rails.l...
ruby
chosen
[ { "from": "system", "value": "Add a matcher for the settings resource\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook:: maven\n# Library:: default\n#\n# Author:: Seth Chisamore (<schisamo@chef.io>)\n# Author:: Bryan ...
ruby
chosen
[ { "from": "system", "value": "Use find_by instead of where.first\n" }, { "from": "human", "value": "module Interactors\n module Facts\n class Get\n include Pavlov::Interactor\n include Util::CanCan\n\n arguments :id\n\n def execute\n Backend::Facts.get(fact_id: id)...
ruby
chosen
[ { "from": "system", "value": "Add homepage and license to 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 'mangaeden_api/version'\n\nGem::Specification.new do |gem|\...
ruby
chosen
[ { "from": "system", "value": "Add rake to development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gfspark/version'\n\nGem::Specification.new do |gem|\n gem....
ruby
chosen
[ { "from": "system", "value": "Allow instance admin to manage courses\n" }, { "from": "human", "value": "module System::Admin::InstanceAdminAbilityComponent\n include AbilityHost::Component\n\n def define_permissions\n if user\n allow_instance_admin_manage_instance\n allow_instance...
ruby
chosen
[ { "from": "system", "value": "Call process method into shorten and lookup method, not in request method\n" }, { "from": "human", "value": "require 'rest-client'\nrequire 'json'\n\nmodule Polr\n API_VERSION = 'v2'\n\n Error = Class.new StandardError\n\n module Api\n def self.api_url path = ...
ruby
chosen
[ { "from": "system", "value": "Remove attr_accessible for Rails 4\n" }, { "from": "human", "value": "require \"pubdraft/version\"\n\nmodule Pubdraft\n module InstanceMethods\n def self.included(base)\n base.send :before_create, :set_pubdraft_state\n base.attr_accessible :state\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use repoforge to install js and js-devel prerequisites" }, { "from": "human", "value": "package 'zip'\n\nremote_file \"/tmp/js185.tar.gz\" do\n source \"http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz\"\nend\n\nscript \"install_spidermonkey\" do\n int...
ruby
chosen
[ { "from": "human", "value": "Add an Nokogiri::XML based parser that can be used with JRuby.\n" }, { "from": "gpt", "value": "module Metacrunch\n module Mab2\n class Document\n class MabXmlParser\n\n def parse(mab_xml)\n xml = Nokogiri::XML(mab_xml.try(:strip))\n ...
ruby
chosen
[ { "from": "system", "value": "Add integration test for authors names on paper edit page\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature \"Editing paper\", js: true do\n let(:author) { FactoryGirl.create :user }\n let(:paper) { author.papers.create! short_title: 'foo bar', j...
ruby
chosen
[ { "from": "system", "value": "Add test for dgu organisation fetch\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Organisation do\n\n describe \"#set_name\" do\n it \"should set a name slug on create\" do \n o = Organisation.new\n o.title = \"Department of Stuf...
ruby
chosen
[ { "from": "system", "value": "Fix spec to make it work as a cocoapods framework\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"curly\"\n s.version = \"0.5.0\"\n s.summary = \"High level libcurl api.\"\n s.homepage = \"https://github.com/johanlantz/curly\"\n s.license =...
ruby
chosen
[ { "from": "system", "value": "Raise JavaScript errors within system specs\n\nRe-raising console errors helps us to find subtle bugs.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"capybara/cuprite\"\n\nCapybara.register_driver(:cuprite) do |app|\n Capybara::Cuprit...
ruby
chosen
[ { "from": "system", "value": "Remove load order dependent test\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ColumnizerTest < MiniTest::Unit::TestCase\n\n def test_returns_empty_array\n assert_equal [[],[],[]], InColumns::Columnizer.new([]).columns(3)\n end\n\n def test...
ruby
chosen
[ { "from": "system", "value": "Make it clearer we don't use these args\n" }, { "from": "human", "value": "require 'logger'\nrequire 'cucumber/pro/formatter'\nmodule Cucumber\n module Pro\n def self.new(*args)\n logger = Logger.new(ENV['cucumber_pro_log_path'] || STDOUT)\n host = 'lo...
ruby
chosen
[ { "from": "system", "value": "Add an empty line between `before/end` and `after`\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"ENV.assoc\" do\n before :each do\n @foo = ENV[\"foo\"]\n end\n after :each do\n ENV[\"foo\"] = @foo\n end\n\n it \"ret...
ruby
chosen
[ { "from": "system", "value": "Make sure we use the correct release of rdoc\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), \"vendor\"))\nrequire 'puppet'\nrequire 'puppet-parse/version'\nrequire 'puppet-parse/parser'\nrequire 'puppet-parse...
ruby
chosen
[ { "from": "human", "value": "Add spec for MAIB Report model\n" }, { "from": "gpt", "value": "require \"fast_spec_helper\"\nrequire \"maib_report\"\n\nRSpec.describe MaibReport do\n\n it \"is a DocumentMetadataDecorator\" do\n doc = double(:document)\n expect(MaibReport.new(doc)).to be_a(D...
ruby
chosen
[ { "from": "system", "value": "Add gem summary and description and summary\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ebert/version'\n\nGem::Specification.new do |gem|\...
ruby
chosen
[ { "from": "system", "value": "Update homepage to english page\n" }, { "from": "human", "value": "# -*- Ruby -*-\n\nGem::Specification.new do |spec|\n spec.name = \"rubysdl\"\n spec.version = \"2.1.3\"\n spec.summary = \"The simple ruby extension library to use SDL\"\n spec.description = <<-E...
ruby
chosen
[ { "from": "human", "value": "Add Rexml Parser for an environment without Nokogiri\n\nEnhanced featureがNokogiri必須ではなくなりました。(でもたぶんNokogiriのほうが速い)\n" }, { "from": "gpt", "value": "require 'rexml/document'\n\nmodule GoogleSpreadsheets\n module Enhanced\n module NamespacePreservable\n module...
ruby
chosen
[ { "from": "system", "value": "Load the new dummy app\n" }, { "from": "human", "value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../../test/dummy/config/environment.rb\", __FILE__)\nrequire 'rspec/rails'\n\nENGINE_RAILS_ROOT=File.join(File.dirn...
ruby
chosen
[ { "from": "system", "value": "Clean up our spec helper\n\n- Use the same block variable name both times `define_derived_metadata`\n is called.\n- Use `each` instead of `map` when not using the returned array anyway.\n- RSpec will add `/spec` to the load path, so we don't need to.\n" }, { "from": "h...
ruby
chosen
[ { "from": "system", "value": "Fix test order dependent failures with seeds 50350 + 48550\n" }, { "from": "human", "value": "$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')\n$LOAD_PATH << File.join(File.dirname(__FILE__))\n\nrequire 'rubygems'\nrequire 'rspec'\nrequire 'rspec/its'\n\...
ruby
chosen
[ { "from": "system", "value": "Use fixtures when any API variables are missing\n" }, { "from": "human", "value": "require 'codeclimate-test-reporter'\nrequire 'simplecov'\nrequire 'vcr'\nrequire_relative './matchers'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::For...
ruby
chosen
[ { "from": "system", "value": "Define global with path to examples/warehouse\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FILE__)\nrequire \"palletjack\"\n" }, { "from": "gpt", "value": "$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FI...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove internal note from appointment ticket\"\n\nThis reverts commit 510a2945d4d97b9b24bca179a27634fe6a1c2ad8.\n" }, { "from": "human", "value": "class AppointmentTicket\n ZENDESK_API_URL = 'https://pensionwise.zendesk.com/api/v2'\n ZENDESK_ONLINE_BOOKIN...
ruby
chosen
[ { "from": "system", "value": "Load all of ActiveSupport in specs\n\nThis is still minimal relative to Rails, but allows the use of Concern\netc.\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'simplecov-rcov'\nSimpleCov.formatter = SimpleCov::Formatter::RcovFormatter\nSimpleCov....
ruby
chosen
[ { "from": "system", "value": "Add filtering for self-spec suite.\n" }, { "from": "human", "value": "def add_to_load_path(path, prepend=false)\n path = File.expand_path(\"../#{path}\", __FILE__)\n if prepend\n $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)\n else\n $LOAD_PATH ...
ruby
chosen
[ { "from": "system", "value": "Set Confinicky to a module as opposed to class (typo).\n" }, { "from": "human", "value": "class Confinicky\n module Version\n MAJOR = 0\n MINOR = 1\n PATCH = 5\n BUILD = ''\n\n STRING = [MAJOR, MINOR, PATCH].compact.join('.')\n end\nend" }, { ...
ruby
chosen
[ { "from": "system", "value": "Patch the AdminGeneralController so the summary stats can be shown on the stats page\n" }, { "from": "human", "value": "# Add a callback - to be executed before each request in development,\n# and at startup in production - to patch existing app classes.\n# Doing so...
ruby
chosen
[ { "from": "system", "value": "Add rake as an explicit development dependency.\n\nSo rake is included in the bundled gems, so the version of rake used to\nrun the tests is recorded in the Gemfile.lock, so running the tests is\nmore repeatable.\n" }, { "from": "human", "value": "# -*- encoding: ut...
ruby
chosen
[ { "from": "system", "value": "Update podspec to point to 6.1.0.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'UIFontComplete'\n s.version = '6.0.0'\n s.summary = 'UIFont on iOS and tvOS faster and less error-prone'\n \n s.description =...
ruby
chosen
[ { "from": "system", "value": "Kill a mutation in Mapper.finalize_attributes\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DataMapper::Mapper, '.finalize_attributes' do\n it \"finalizes its attribute set\" do\n described_class.attributes.should_receive(:finalize).with({...
ruby
chosen
[ { "from": "system", "value": "Update DIBELS demo data generator to remove nil, duplicate CORE and Benchmark, which isn't used" }, { "from": "human", "value": "class FakeDibelsResultGenerator\n\n def initialize(student)\n @dates = (2010..2015).to_a.shuffle\n @student = student\n end\n\n ...
ruby
chosen