conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add ExploreMenuABTestable AB Test code\n\nFor the controllers choose a different template from Static that includes the new header if users are in the B variant.\n"
},
{
"from": "gpt",
"value": "module AbTests::ExploreMenuAbTestable\n CUSTOM_DIMENSION = 47\n\n ALLO... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade development dependency rake to 12.3.3\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hotch/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Improve data integrity of database table\n\n* Add `:null => false` constraint to `priority`, `attempts`, and\n `handler`.\n* Re-align comments in a column.\n"
},
{
"from": "human",
"value": "class CreateDelayedJobs < ActiveRecord::Migration\n def self.up\n crea... | ruby | chosen |
[
{
"from": "system",
"value": "Move nested attribute logic into zone_params\n"
},
{
"from": "human",
"value": "module Spree\n module Api\n class ZonesController < Spree::Api::BaseController\n\n def create\n authorize! :create, Zone\n @zone = Zone.new(map_nested_attributes_k... | ruby | chosen |
[
{
"from": "system",
"value": "[Sass] Convert Sass::Tree::IfNode docs to YARD.\n"
},
{
"from": "human",
"value": "require 'sass/tree/node'\n\nmodule Sass::Tree\n class IfNode < Node\n attr_accessor :else\n\n def initialize(expr, options)\n @expr = expr\n @last_else = self\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplication of version and tag in podspec.\n\nTag is now assumed equal to the version.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'Typhoon'\n spec.version = '1.2.7'\n spec.license = 'Apache2.0'\n spe... | ruby | chosen |
[
{
"from": "human",
"value": "Improve the new run JSON document.\n\nNow gives fields to be filled in for inputs as well.\n"
},
{
"from": "gpt",
"value": "workflow_title = TavernaPlayer.workflow_proxy.title(@workflow) || \"None\"\nworkflow_inputs = TavernaPlayer.workflow_proxy.inputs(@workflow)\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Change automation examples to use before(:suite) instead of before(:all)\n\nThe usage of :all was a bug as :suite was the intention all along.\nThis drops the test:automation suite from 32 seconds to 14 seconds.\n"
},
{
"from": "human",
"value": "module AutomationEx... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'route' from route number\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n factory :route do\n sequence(:number){ |n| \"Route #{n}\" }\n description 'route description'\n end\nend\n"
},
{
"from": "gpt",
"value": "FactoryBot.define... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for user class method\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n it { should have_one(:advancement) }\n it { should validate_presence_of(:first_name) }\n it { should validate_presence_of(:last_name... | ruby | chosen |
[
{
"from": "system",
"value": "Fix name of scoring class\n"
},
{
"from": "human",
"value": "class ArtisticScoringClass_2017 < BaseScoringClass # rubocop:disable Naming/ClassAndModuleCamelCase\n def scoring_description\n \"Using the Freestyle scoring rules, multiple Performance, Technical, and... | ruby | chosen |
[
{
"from": "human",
"value": "Add the initial prototype code\n\nThis has been split out from the code for my personal dashboard. It's\nstill a little rough around the edges.\n"
},
{
"from": "gpt",
"value": "require 'mechanize'\ncurrent_rep = 0.0\n# :first_in sets how long it takes before the job ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix notification url not generated properly\n"
},
{
"from": "human",
"value": "json.partial! 'api/v1/shared/page_meta', collection: @notifications\n\n\njson._links do\n json.self url_for(notification_params.merge(only_path: true))\n json.next url_for(notification_... | ruby | chosen |
[
{
"from": "system",
"value": "Add test coverage of monkey patches"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Array do\n pending \"write it\"\nend\n\ndescribe Float do\n pending \"write it\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix previous submission content logic\n"
},
{
"from": "human",
"value": "class ExerciseSubmissionsController < ApplicationController\n before_action :set_submission, only: [:show]\n before_action :set_exercise, only: [:create, :new, :show, :index]\n before_action... | ruby | chosen |
[
{
"from": "system",
"value": "Fix small typo causing compass to fail\n"
},
{
"from": "human",
"value": "add_import_path \"bower_components/foundation/scss\"g\n# Require any additional compass plugins here.\n\n# Set this to the root of your project when deployed:\nhttp_path = \"/\"\ncss_dir = \"c... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec version and author\n\n1.7.0.alpha (for now) and \"REST Client Team\"\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'rest-client'\n s.version = '1.6.7'\n s.authors = ['Adam Wiggins', 'Julien... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic test for errors\n\nJust adds a super simplistic test for the errors module. The win here is\nto (hopefully) lower the friction a little bit the next time a feature\nis introduced into errors because there's now suite where a new test can\nbe written.\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a development dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"minitest/context/version\"\n\nGem::Specification.new do |s|\n s.name = \"minitest-context\"\n s.ver... | ruby | chosen |
[
{
"from": "system",
"value": "Add QuartzCore framework to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'RECurtainViewController'\n s.version = '1.0'\n s.authors = {'Roman Efimov' => 'romefimov@gmail.com'}\n s.homepage = 'https://github.com/romaonthego/RECurtainV... | ruby | chosen |
[
{
"from": "system",
"value": "Use same location for attachment cache on all environments.\n\nThe folder /mnt/apps/whitehall-admin/attachment-cache isn't writable\non staging or production, so the location needed to change. Instead\nof configuring this within the app, we are instead symlinking a set\nlocati... | ruby | chosen |
[
{
"from": "system",
"value": "Remove double-http in github login redirect\n"
},
{
"from": "human",
"value": "module Sinatra\n module SessionHelper\n def please_login(notice = nil)\n if current_user.guest?\n flash[:notice] = notice if notice\n redirect \"/please-login?retur... | ruby | chosen |
[
{
"from": "system",
"value": "Configure react when creating new application\n"
},
{
"from": "human",
"value": "def install_devise\n generate(\"devise:install\")\n\n devise_sender = ask(\"Please provide a sender e-mail address to use when sending info to users \" +\n \"... | ruby | chosen |
[
{
"from": "system",
"value": "Make the generated url contain a valid resize attribute when invalid style\n"
},
{
"from": "human",
"value": "module Spree\n class Asset < Spree::Base\n module Support\n module ActiveStorage\n extend ActiveSupport::Concern\n\n included do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Enable double/context click specs for IE.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@13526 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../spec_helper\", __FILE__)\n\nmodule Selenium\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Use sf_diff instead of normal diff in conflict detection routine\n"
},
{
"from": "human",
"value": "module Draisine\n class ConflictDetector\n attr_reader :model, :remote_model, :attributes_list\n def initialize(model, remote_model, attributes_list)\n @m... | ruby | chosen |
[
{
"from": "system",
"value": "Remove validations from the spec"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Hero do\n describe \"Validations\" do\n subject { Factory(:hero) }\n\n it { should validate_uniqueness_of :email }\n it { should validate_uniqueness_of :l... | ruby | chosen |
[
{
"from": "human",
"value": "Add failing spec to display issues with the spec helper methods\n"
},
{
"from": "gpt",
"value": "describe AwesomeSpawn::SpecHelper do\n describe \".stub_good_run\" do\n it \"works\" do\n described_class.stub_good_run\n end\n end\n\n describe \".stub_bad... | ruby | chosen |
[
{
"from": "system",
"value": "Add host config for LiveReload\n"
},
{
"from": "human",
"value": "Rails.application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your application's code is reloaded on\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Add conditional logic for up and down votes\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n\n def create\n if request.xhr?\n vote = Vote.create(votable_type: params[:votableType], user_id: current_user.id, value: 1, votabl... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependencies to gemspec\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'encrypted_strings/version'\n\nGem::Specification.new do |s|\n s.name = \"encrypted_strings\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure RelaxDB to use the Merb logger\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'relaxdb'\n\nmodule Merb\n module RelaxDB\n \n class << self\n \n def connect\n set_database\n begin\n ::RelaxDB.db.get\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change stub usage to allow in specs\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Memoizable::ModuleMethods, '#included' do\n subject { descendant.instance_exec(object) { |mod| include mod } }\n\n let(:object) { Modu... | ruby | chosen |
[
{
"from": "system",
"value": "Allow different target databases for db:import task"
},
{
"from": "human",
"value": "namespace :db do\n desc \"Import data from staging environment\"\n task :import => [:environment, :drop, :create] do\n Bundler.with_clean_env do\n Tempfile.create('tahi-s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flash message generation on restful redirect controller errors\n"
},
{
"from": "human",
"value": "class RestfulRedirectController < ApplicationController\n def index\n case params[:model]\n when 'MiqRequest'\n redirect_to :controller => 'miq_request'... | ruby | chosen |
[
{
"from": "system",
"value": "Remove version pin on chefstyle\n\nWe've moved away from pinning chefstyle in chef projects and instead\nrealized that we should cleanup things as we break them.\n\nUpdate URLs while I'm in here.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix comment in CapitalizedSubject hook\n\nThis was leftover from the hook I copied when creating it.\n\nChange-Id: I3be089503b7eaf90f256d2ce03a10bf8fec7b1f4\nReviewed-on: http://gerrit.causes.com/47740\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@brigade.com>\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove IE support for now\n"
},
{
"from": "human",
"value": "if ENV['CUCUMBER_PROFILE'] == 'sauce'\n require 'sauce'\n require 'sauce/cucumber'\n require 'sauce/capybara'\n\n Capybara.default_driver = :sauce \n\n Sauce.config do |c|\n c[:start_tunnel] = true... | ruby | chosen |
[
{
"from": "system",
"value": "Correct reference to wrong block variable name\n"
},
{
"from": "human",
"value": "require 'capybara'\nrequire 'capybara/dsl'\nrequire 'rspec/core'\nrequire 'capybara/rspec/matchers'\nrequire 'capybara/rspec/features'\n\nRSpec.configure do |config|\n config.include ... | ruby | chosen |
[
{
"from": "system",
"value": "Add TopicalEvents to DocumentCollection sync check\n"
},
{
"from": "human",
"value": "module SyncChecker\n module Formats\n class DocumentCollectionCheck < EditionBase\n def root_path\n \"/government/collections/\"\n end\n\n def rendering_a... | ruby | chosen |
[
{
"from": "system",
"value": "Modify the name of migration type to TrueClass for Boolean.\n"
},
{
"from": "human",
"value": "require 'sinatra/sequel'\n\n# Define the database tables that are initially needed for the application to properly\n# function. In this particular case it is the `users` a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in Evaluator. ( used regular variable names rather then instance variables )\n"
},
{
"from": "human",
"value": "module Dest\n\n class Evaluator\n\n def initialize(parsed_attributes)\n @parsed_attributes = parsed_attributes\n end\n\n def eva... | ruby | chosen |
[
{
"from": "system",
"value": "Use regexp to detect the Content-Type\n"
},
{
"from": "human",
"value": "module Dnsimple\n\n class Error < StandardError\n end\n\n # RequestError is raised when an API request fails for an client, a server error or invalid request information.\n class RequestErr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up join tables again, add HABTM relationships\n"
},
{
"from": "human",
"value": "class CreateJoinTables < ActiveRecord::Migration\n def change\n create_table :lists do |t|\n t.string :name\n t.text :description\n\n t.timestamps\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Ruby warning where distinct was being redefined."
},
{
"from": "human",
"value": "require 'forwardable'\n\nmodule ActiveMocker\nmodule Mock\n\n class Collection\n\n include Enumerable\n\n def initialize(collection=[])\n @collection = [*collection]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Do not delete :with_deleted from options\"\n\nThis reverts commit 5b2d844e352df9d62ca6b4f117749463dc73d060.\n"
},
{
"from": "human",
"value": "module ActsAsParanoid\n module Associations\n def self.included(base)\n base.extend ClassMethods\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the use of a app name\n\nthis is for managing multiple apps in one folder. You can now pass the\napplication name to the task. This in turn will be picked up by the\nheroku commands.\n"
},
{
"from": "human",
"value": "require \"mkmf\"\n# Make the MakeMakefile ... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade version of nokogiri that we need.\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 = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite a step to create an executable file\n"
},
{
"from": "human",
"value": "Given /^a file called '(.*)'$/ do |virtual_path, content|\n create_file expand(virtual_path), expand(content)\nend\n\nGiven /^an executable called '(.*)'$/ do |virtual_path, content|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update test case R version\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire \"minitest/reporters\"\nMinitest::Reporters.use! [Minitest::Reporters::JUnitReporter.new(reports_dir=\"/tmp/result/junit\")]\n\ndescribe 'check R version' do\n\n it ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix project title for messages\n"
},
{
"from": "human",
"value": "module Intouch\n module ProjectPatch\n def self.included(base) # :nodoc:\n base.class_eval do\n unloadable\n\n # noinspection RubyArgCount\n store :intouch_settings, acc... | ruby | chosen |
[
{
"from": "system",
"value": "Increment the LinkSet version on update.\n\nNew LinkSets start at version 0 and are incremented\nto version 1 as they're saved. This matches the\nbehaviour of live and draft content items."
},
{
"from": "human",
"value": "module Commands\n module V2\n class Put... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up a couple code-green issues.\n"
},
{
"from": "human",
"value": "module Arel\n module Visitors\n class NuoDB < Arel::Visitors::ToSql\n def visit_Arel_Nodes_SelectStatement o\n [\n (visit(o.with) if o.with),\n o.cores.map ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Default stamp duty welsh fix to a blank lambda\"\n\nThis reverts commit bb87792bd001d41e814081d0172cae2c4ca5e153.\n"
},
{
"from": "human",
"value": "require \"mortgage_calculator/engine\"\nrequire 'mortgage_calculator/currency_input'\n\nmodule MortgageCalcu... | ruby | chosen |
[
{
"from": "system",
"value": "Replace unnecessary require_relative with require\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\nrequire 'service/stack_overflow'\n\ninclude Service\n\ndescribe StackOverflow, '.fetch' do\n BASE_URL = \"http://api.stackexchange.com/2.1\"\n PARA... | ruby | chosen |
[
{
"from": "system",
"value": "Return bare js if no source map is created.\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'uglifier'\n\nmodule Sprockets\n # Public: Uglifier/Uglify compressor.\n #\n # To accept the default options\n #\n # environment.register_bundle_processor... | ruby | chosen |
[
{
"from": "system",
"value": "Remove color from constructor and refactor stretch methods to use width from data.\n"
},
{
"from": "human",
"value": "require 'color'\n\n# The bitmap object.\n# A 2D array with rgb values as entries.\nclass Bitmap\n attr_reader :data\n\n def initialize(width, heig... | ruby | chosen |
[
{
"from": "system",
"value": "Allow decorators in the parent app.\n"
},
{
"from": "human",
"value": "module RubyWedding\n class Engine < ::Rails::Engine\n isolate_namespace RubyWedding\n\n config.generators do |g|\n g.test_framework :rspec, fixture: false\n g.fixture_replacement... | ruby | chosen |
[
{
"from": "system",
"value": "Remove rescuing JSON parsing error in JSON formatter\n"
},
{
"from": "human",
"value": "module Dox\n module Formatters\n class Json < Dox::Formatters::Base\n def format\n JSON.pretty_generate(JSON.parse(body || ''))\n rescue JSON::ParserError\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set render settings with the same command.\n"
},
{
"from": "human",
"value": "require 'cuba'\nrequire 'cuba/render'\n\nrequire 'yajl'\nrequire 'yajl/json_gem'\nrequire 'tilt/yajl'\n\nrequire 'garufa/api/channel_filter'\nrequire 'garufa/api/settings_setter'\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Add back get all servers into routes\n"
},
{
"from": "human",
"value": "class App\n get '/' do\n erb :index\n end\n\n get '/servers' do\n @servers = Server.all;\n content_type :json\n @servers.to_json\n end\n\n get '/logs/service/all' do\n @servi... | ruby | chosen |
[
{
"from": "system",
"value": "Disable SimpleCov when run on JRuby (it doesn't work there)\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'corefines'\n\nRSpec.configure do |config|\n\n # rspec-expectations config\n config.expect_with :rspec do |expects|\n\n # This option dis... | ruby | chosen |
[
{
"from": "system",
"value": "Disable coverage reporting with ruby 2.4.0/2.4.1\n"
},
{
"from": "human",
"value": "$: << File.expand_path(\"../../lib\", __FILE__)\n\nENV[\"EDITOR\"] = nil\n\nrequire 'coveralls'\nCoveralls.wear! do\n add_filter 'spec/'\nend\n\nrequire 'bundler/setup'\nBundler.req... | ruby | chosen |
[
{
"from": "system",
"value": "Normalize CSS indentation in specs\n\nDue to the use of Heredocs in specs, all CSS has leading indentation.\n\nIn order to correctly write tests for an upcoming lint that detects\ninvalid indentation, automatically normalize all CSS before it is passed\nto the engine to be pars... | ruby | chosen |
[
{
"from": "system",
"value": "Undo commented out stdout override.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'support'))\n\n# $stdout = Str... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incompatability with latest puppet\n"
},
{
"from": "human",
"value": "require 'puppet'\nrequire 'set'\nPuppet::Type.type(:rabbitmq_erlang_cookie).provide(:ruby) do\n\n defaultfor :feature => :posix\n has_command(:puppet, 'puppet') do\n environment :PATH => ... | ruby | chosen |
[
{
"from": "system",
"value": "Create 'tmp' folder before suite\n"
},
{
"from": "human",
"value": "require 'octoshark'\n\n\n# Load support files\nROOT = File.expand_path('../', File.dirname(__FILE__))\nDir[\"#{ROOT}/spec/support/**/*.rb\"].each { |f| require f }\n\n\nRSpec.configure do |config|\n... | ruby | chosen |
[
{
"from": "system",
"value": "[Hax] Support simulating jruby on MRI 2.3\n"
},
{
"from": "human",
"value": "require \"rubygems\"\n\nclass Gem::Platform\n @local = new(ENV[\"BUNDLER_SPEC_PLATFORM\"]) if ENV[\"BUNDLER_SPEC_PLATFORM\"]\nend\n\nif ENV[\"BUNDLER_SPEC_VERSION\"]\n module Bundler\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error reporting in outbound queue processing\n"
},
{
"from": "human",
"value": "module Lita\n module External\n class Robot < ::Lita::Robot\n def receive(message)\n Lita.logger.debug(\"Put inbound message from #{message.user.mention_name} into th... | ruby | chosen |
[
{
"from": "system",
"value": "Allow a user to pass in their own Tracer object so they are not forced\ninto using the HumanReadable one.\n"
},
{
"from": "human",
"value": "module Solve\n require_relative 'solve/artifact'\n require_relative 'solve/constraint'\n require_relative 'solve/demand'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add graphite dependency in usi dashboard\n\nChange-Id: I65b2e8a1422544a191784d9b46ba074a062e1d62\n"
},
{
"from": "human",
"value": "module DashboardHelper\n\n if defined?(Diamond)\n include Diamond::ThesesHelper\n\n def theses_header_title\n t(\"label_th... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo. Add minor config options.\n"
},
{
"from": "human",
"value": "\nrequire 'curtis/version'\nrequire 'ncurses'\nrequire 'curtis/base_view'\nrequire 'curtis/view'\n\nmodule Curtis\n class << self\n def config\n @config ||= Configuration.new\n yi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for including branches with '/' in the name\n"
},
{
"from": "human",
"value": "require 'redmine/scm/adapters/git_adapter'\n\nmodule Redmine\n module Scm\n module Adapters\n class GitAdapter\n def branch_contains(hash)\n cleaned_hash = ha... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken test after changing method parameters\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe HelloSign::Api::Account do\n describe '#get_oauth_token' do\n context 'when successful request' do\n before do\n stub_post_oauth('/o... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor some code.\n- format_return_value becomes it's own method instead of a one line ternary operator.\n- fetch_default is a method instead of a variable defined inside the method_missing block."
},
{
"from": "human",
"value": "class Duffel\n VERSION = \"0.0.1\... | ruby | chosen |
[
{
"from": "system",
"value": "Include Attachable concern to Background\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: backgrounds\n#\n# id :integer not null, primary key\n# attachable_id :integer\n# attachable_type :string(255)\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Include queue_latency in the list of healthchecks to test\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe \"/healthcheck\", type: :request do\n def data(body = response.body)\n JSON.parse(body).deep_symbolize_keys\n end\n\n it \"s... | ruby | chosen |
[
{
"from": "human",
"value": "Add CSRF protection request spec\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'api should not require csrf protection', type: :request do\n before(:each) do\n ActionController::Base.allow_forgery_protection = true\n end\n \n it 'should re... | ruby | chosen |
[
{
"from": "system",
"value": "Send delegated event to specification\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\nrequire 'active_model/callbacks'\n\nmodule Progressive\n module Subject\n extend ActiveSupport::Concern\n include ActiveModel::Callbacks\n\n included... | ruby | chosen |
[
{
"from": "system",
"value": "Trim down the initial Sidekiq setup log output.\n"
},
{
"from": "human",
"value": "require 'sidekiq'\nrequire 'sidekiq/redis_connection'\n\nmodule Travis\n module Logs\n module Sidekiq\n class << self\n def setup\n Travis.logger.info('Settin... | ruby | chosen |
[
{
"from": "system",
"value": "Add description and summary to gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"corsair/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |g... | ruby | chosen |
[
{
"from": "system",
"value": "Change template for Rails3 to use LoggerReporter by default\n"
},
{
"from": "human",
"value": "# This creates a Radar application for your Rails app. Use the block\n# to configure it. For detailed documentation, please see the user guide\n# online at: http://radarge... | ruby | chosen |
[
{
"from": "human",
"value": "Add FFI yajl function bindings.\n"
},
{
"from": "gpt",
"value": "require 'ffi'\n\nmodule Yajl\n module FFI\n extend ::FFI::Library\n\n ffi_lib 'yajl'\n\n enum :status, [\n :ok,\n :client_canceled,\n :error\n ]\n\n enum :options, [\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic login form tests\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User::SessionsController do\n before do\n @request.env[\"devise.mapping\"] = Devise.mappings[:user]\n end\n\n describe \"#two_factor_entry\" do\n subject { get ... | ruby | chosen |
[
{
"from": "system",
"value": "Use select2 capybara helper to test language tree\n\nFormer we were using the hidden select.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Language tree feature', type: :feature, js: true do\n let(:klingon) { create(:alchemy_language, :kling... | ruby | chosen |
[
{
"from": "system",
"value": "Fix assignation in ruby 1.9.2\n"
},
{
"from": "human",
"value": "module SocialStream\n module Ostatus\n module Models\n module Object\n module ClassMethods\n # Creates an new instance from ActivityStreams entry\n #\n def fr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove usage of the responder as this is a json only controller\n"
},
{
"from": "human",
"value": "module Admin\n class ProxyOrdersController < ResourceController\n respond_to :json\n\n def edit\n @proxy_order.initialise_order! unless @proxy_order.order\... | ruby | chosen |
[
{
"from": "system",
"value": "Use unless instead of equality test\n"
},
{
"from": "human",
"value": "require_dependency \"storytime/application_controller\"\n\nmodule Storytime\n class SubscriptionsController < ApplicationController\n before_action :set_subscription, only: [:destroy]\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix toplevel namespace type. Remove cloudformation prefixing.\n"
},
{
"from": "human",
"value": "require 'sfn'\n\nclass Sfn\n class Command < Bogo::Cli::Command\n\n autoload :CloudformationCreate, 'sfn/command/cloudformation_create'\n autoload :Cloudformation... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to clear catalog credentials\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# Copyright (C) 2010-2016 dtk contributors\n#\n# This file is part of the dtk project.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix :role to :roles in task condition.\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance.load do\n desc \"Watch the log on the application server.\"\n task :watch_logs, :role => :app do\n log_file = \"#{shared_path}/log/#{rails_env}.log\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make all Givens run before Thens\n"
},
{
"from": "human",
"value": "module DSL\n def describe(&block)\n ContextDSL.new.instance_eval &block\n end\nend\n\nclass ContextDSL\n def initialize\n @givens = []\n end\n\n def Given(&block)\n @givens << Given.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Change mssql registry keys path\n"
},
{
"from": "human",
"value": "data_path = \"#{node[:mssql][:root_path]}\\\\Data\"\nlog_path = \"#{node[:mssql][:root_path]}\\\\Logs\"\nbackup_path = \"#{node[:mssql][:root_path]}\\\\Backups\"\n\n[\"#{data_path}\", \"#{log_path}\"... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"add more codes to reproduce segfault more.\"\n\nThis reverts commit a56586e48bf3a88dd9d19068d53fdb67f3e2faac.\n"
},
{
"from": "human",
"value": "module Crispy\n module CrispyInternal\n class ClassSpy < ::Module\n include SpyMixin\n include Wit... | ruby | chosen |
[
{
"from": "system",
"value": "Rename columns in grid state\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass GridStateGrid < WulinMaster::Grid\n model WulinMaster::GridState\n\n path '/wulin_master/grid_states'\n\n cell_editable false\n\n column :email, label: 'User'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add shortcut method to get new instance of provider class\n"
},
{
"from": "human",
"value": "require \"rabatt/version\"\n\nrequire 'rabatt/providers/base'\nrequire 'rabatt/providers/adtraction'\nrequire 'rabatt/providers/adrecord'\n\nmodule Rabatt\n # Your code goe... | ruby | chosen |
[
{
"from": "system",
"value": "Update to rails-4:\n- Fix css assets urls\n"
},
{
"from": "human",
"value": "module Jquery\n module Colorpicker\n module Rails\n VERSION = \"1.0.4.1\"\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module Jquery\n module Colorpicker\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the namespaced controller name for the top describe\n"
},
{
"from": "human",
"value": "require 'swagger_helper'\n\nRSpec.describe '<%= file_name %>', type: :request do\n<% @routes.each do | template, path_item | %>\n path '<%= template %>' do\n<% unless path_it... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the box list regex for vagrant 1.6+\n\nIn vagrant 1.5, `vagrant box list` looked like:\n\n```\nlenny64 (vmware_fusion)\nprecise64 (vmware_fusion)\n```\n\nVagrant 1.6 added the version to the list:\n\n```\nlenny64 (vmware_fusion, 0)\nprecise64 (vmware_fusion, 0)\n```\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix with option for collections\n"
},
{
"from": "human",
"value": "module RailsPresenter\n module PresenterHelper\n def present(template = self, object, with: nil, &block)\n if object.is_a?(Array) || object.is_a?(ActiveRecord::Relation)\n return obje... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.