conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change after_validation method to only geocode when the object doesn't have coordinates\n"
},
{
"from": "human",
"value": "class Place < ActiveRecord::Base\n has_many :drops\n validates_associated :drops\n\n validates :name, presence: true, uniqueness: true\n va... | ruby | chosen |
[
{
"from": "system",
"value": "Revise custom View Helper documentation\n"
},
{
"from": "human",
"value": "# helpers for show Article views\nmodule ArticleHelper\n # Headline: (News Article 5)\n # displays Headline in bold\n def show_article_title(article)\n capture do\n concat(article.... | ruby | chosen |
[
{
"from": "system",
"value": "Use env variable for secret token in production\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will ... | ruby | chosen |
[
{
"from": "system",
"value": "Add disabled_access field to the Office factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :office do\n address_line_one { Faker::Address.street_address }\n address_line_two { Faker::Address.secondary_address }\n address_town { Fake... | ruby | chosen |
[
{
"from": "system",
"value": "Update Shape specs to use real objects\n"
},
{
"from": "human",
"value": "require 'shoes/spec_helper'\n\ndescribe Shoes::Shape do\n\n let(:app_gui) { double(\"app gui\") }\n let(:app) { double(\"app\", :gui => app_gui) }\n subject { Shoes::Shape.new(app) {} }\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add ActiveRecord to store blog posts, but only integraion tests now works. Problem with NullDB and Rails 4\n"
},
{
"from": "human",
"value": "# spec/spec_helper_lite.rb\nrequire 'rr'\nrequire 'date'\nrequire 'ostruct'\nrequire 'active_support'\nrequire 'active_suppo... | ruby | chosen |
[
{
"from": "system",
"value": "Add one more test to ensure(?) context isn't everywhere.\n"
},
{
"from": "human",
"value": "# encoding: ASCII-8BIT\nrequire 'pwnlib/util/packing'\n\nraise 'call from module fail' unless Pwnlib::Util::Packing.p8(0x61) == 'a'\n\ninclude Pwnlib::Util::Packing::ClassMet... | ruby | chosen |
[
{
"from": "system",
"value": "Add access restrictions to BankAccount.\n"
},
{
"from": "human",
"value": "class BankAccount < Account\n belongs_to :bank\nend\n"
},
{
"from": "gpt",
"value": "class BankAccount < Account\n # Access restrictions\n attr_accessible :pc_id, :esr_id, :ban... | ruby | chosen |
[
{
"from": "system",
"value": "Use includes instead of joins to avoid duplicates\n"
},
{
"from": "human",
"value": "module Georgia\n class User < ActiveRecord::Base\n devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable\n\n attr_accessible ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure articles present in RSS are alloweded\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n#\n# == Post model test\n#\nclass PostTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "human",
"value": "Add version 1 of CAQE\n"
},
{
"from": "gpt",
"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/tools/caqe... | ruby | chosen |
[
{
"from": "system",
"value": "Expire user attributes after 1 hour in the QA environment.\n"
},
{
"from": "human",
"value": "require 'exlibris-aleph'\nclass UserSession < Authlogic::Session::Base\n pds_url Settings.pds.login_url\n redirect_logout_url Settings.pds.logout_url\n aleph_url Exlibri... | ruby | chosen |
[
{
"from": "system",
"value": "Break up the File.join call to make Rubocop happy.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'helper'\n\ndescribe 'Renderer' do\n before do\n test_site.scan_templates\n end\n\n subject do\n pa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove header instead of setting to invalid value\n"
},
{
"from": "human",
"value": "# This mixin provides support for implementing the\n# embedded mode - as opposed to the standalone mode -in which\n# the mumuki pages\n#\n# * are displayed used a simplified layout... | ruby | chosen |
[
{
"from": "system",
"value": "Make the calculation less insane\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule SmartAnswer::Calculators\n class NightWorkHours < OpenStruct\n\n def total_hours\n if work_cycle == 7\n weeks_worked * 7 / work_cycle * nights_in_cycle * ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test coverage for PermittedAttributes::User\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nmodule PermittedAttributes\n describe User do\n describe \"simple usage\" do\n let(:user_permitted_attributes) { Permit... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct route method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ApplicationMailbox < ActionMailbox::Base\n # route /something/i => :somewhere\nend\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SQL Injection in moment search\n"
},
{
"from": "human",
"value": "class MomentRepository < Hanami::Repository\n relations :people\n\n associations do\n belongs_to :person\n has_many :locations\n end\n\n def all_with_influencers\n aggregate(:person)\... | ruby | chosen |
[
{
"from": "human",
"value": "Add a scraper for the hamilton's website\n"
},
{
"from": "gpt",
"value": "require \"mechanize\"\n\nmechanize = Mechanize.new\n# Say I am a robot\nmechanize.robots = true\n# The url that list all the shows\npagesUrl = [\n \"http://live.thehamiltondc.com/listing/\"\n]... | ruby | chosen |
[
{
"from": "system",
"value": "Support specs running with config.eager_load=true\n\nStarting from Rails 7.0 `ActiveAdmin::Aplication.remove_active_admin_load_paths_from_rails_autoload_and_eager_load` is not working on feature tests.\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n class E... | ruby | chosen |
[
{
"from": "system",
"value": "Replace reference to country with country_code"
},
{
"from": "human",
"value": "module Cellular\n class SMS\n\n attr_accessor :recipient, :sender, :message, :price, :country_code\n\n def initialize(options = {})\n @backend = Cellular.config.backend\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use primary key if supplied\n"
},
{
"from": "human",
"value": "module Masamune::Schema\n class Row\n attr_accessor :dimension\n attr_accessor :values\n attr_accessor :default\n\n def initialize(values: [], default: false, name: nil)\n @values = va... | ruby | chosen |
[
{
"from": "system",
"value": "Remove -J option for rails new to allow for agnostic JavaScript\n"
},
{
"from": "human",
"value": "require 'thor/group'\n\nmodule RailsTemplater\n class Cli < Thor::Group\n argument :application_name, :type => :string, :desc => \"The name of the rails applicatio... | ruby | chosen |
[
{
"from": "system",
"value": "Use it in package_states from BaseRuleType\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuleTypes\n class ZoneActivityRuleType < BaseRuleType\n def initialize(rule)\n @rule = rule\n end\n\n def project\n rule.package... | ruby | chosen |
[
{
"from": "system",
"value": "Add fix for SetInvoiceVesrTag migration on empty dbs\n"
},
{
"from": "human",
"value": "class SetInvoiceVesrTag < ActiveRecord::Migration\n def up\n return unless BankAccount.tagged_with('invoice:vesr')\n\n account = BankAccount.find_by_code('1020')\n acco... | ruby | chosen |
[
{
"from": "system",
"value": "Remove release date from gemspec\n\nSo far rubygems is displaying all gem releases to have the same hard-coded release date of April 02, 2012. This confuses other developers and makes it difficult to figure when a version was actually released\n\nSee rubygems.org/gems/rack-mini... | ruby | chosen |
[
{
"from": "system",
"value": "Update Money dependency to work with older versions"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"google_currency\"\n s.version = \"2.0.0\"\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Shane Emmons\", \"Dona... | ruby | chosen |
[
{
"from": "system",
"value": "Update Homebrew formula for v0.7.2\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ChrubyFish < Formula\n desc \"Thin wrapper around chruby to make it work with the Fish shell\"\n homepage \"https://github.com/JeanMertz/chruby-fish#readme\"\n url \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add experience points record factory\n"
},
{
"from": "gpt",
"value": "FactoryGirl.define do\n factory :course_experience_points_record, class: Course::ExperiencePointsRecord.name do\n creator\n updater\n course_user\n points_awarded 100\n reason 'EXP ... | ruby | chosen |
[
{
"from": "system",
"value": "Make Prison factory generate distinct data\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :prison do\n name 'Reading Gaol'\n nomis_id 'XYZ'\n enabled true\n estate 'Reading'\n address '1 High Street'\n email_address 'reading.ga... | ruby | chosen |
[
{
"from": "system",
"value": "Improve test coverage for Lita::Adapter.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Lita::Adapter do\n let(:robot) { instance_double(\"Lita::Robot\") }\n\n let(:required_methods) { [:join, :part, :run, :send_messages, :set_topic, :shut_... | ruby | chosen |
[
{
"from": "system",
"value": "Use sample rights not found in seeds.rb\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: rights\n#\n# id :integer not null, primary key\n# resource :string(255)\n# operation :string(255)\n# created_at :datetime ... | ruby | chosen |
[
{
"from": "system",
"value": "Define show for campus location\n"
},
{
"from": "human",
"value": "class Api::V1::CampusLocationsController < ApplicationController\n\tdef index\n\t\t@campus = CampusLocation.all\n\t\trender json: { campus_locations: @campus }, status: 200\n\tend\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Allow trusted members to change lights policy\n\nFixes https://github.com/initLab/initLab/issues/145\n"
},
{
"from": "human",
"value": "class LightsPolicyAuthorizer < ApplicationAuthorizer\nend\n"
},
{
"from": "gpt",
"value": "class LightsPolicyAuthorize... | ruby | chosen |
[
{
"from": "system",
"value": "Move some links to hash generation\n"
},
{
"from": "human",
"value": "module Carto\n module Api\n module PagedSearcher\n\n def page_per_page_order_params(default_per_page = 20, default_order = 'updated_at')\n page = (params[:page] || 1).to_i\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow i18n in datetimepicker component\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n module FormTags\n # override: default password_field_tag doesn't switch off autocomplete\n def password_field_tag(name, value = nil, options = {})\n opti... | ruby | chosen |
[
{
"from": "system",
"value": "Add an extra test for UPDATE when obj doesn't exist\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\n# rubocop:disable RSpec/RepeatedExampleGroupBody\ndescribe Gql::Runtime::Functions::Update, :etsource_fixture do\n let(:... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for orchestration stack textual summary helper\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe OrchestrationStackHelper do\n before :each do\n @record = FactoryGirl.create(:orchestration_stack)\n end\n\n context \"::TextualSummary\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debugging from tests :)\n"
},
{
"from": "human",
"value": "require 'helper'\n\nclass TestSetDocumentRevision < ActiveSupport::TestCase\n context \"A SugarCRM.connection\" do\n should \"Update a document revision\" do\n file = File.read(\"test/config_... | ruby | chosen |
[
{
"from": "system",
"value": "Exit out of the test after receiving 500 messages\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.setup\n\nrequire 'vertx'\nrequire 'eventstore'\nrequire 'json'\n\nconfig = Vertx.config\np stream = config['stream']\n\neventstore = Eventstore.new(\"loca... | ruby | chosen |
[
{
"from": "system",
"value": "Update image_optim dependency 0.9.1 -> 0.10.2\n\nChange-Id: Ic37a28ce168ba01984290c1d5ddece6015f23331\nReviewed-on: https://gerrit.causes.com/33807\nTested-by: Joe Lencioni <1dd72cf724deaab5db236f616560fc7067b734e1@causes.com>\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3c... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest to dev deps\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rufus/lua/moon/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add description other than TODO, so bundler doesn't complain\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/sqs/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Piotr Sarnacki\"]\n gem.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the :index route to pass tests performed by devops/build processes.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # Documentation\n apipie\n\n scope '/api/v1', except: [:new, :edit], defaults: { format: :json } do\n resources :dr... | ruby | chosen |
[
{
"from": "human",
"value": "Add deployment for new staging internal server.\n"
},
{
"from": "gpt",
"value": "require \"capistrano_nrel_ext/recipes/branches\"\n\n# Set the servers for this stage.\nrole :app, \"devstage-int.nrel.gov\"\nrole :web, \"devstage-int.nrel.gov\"\n\n# Set the base path f... | ruby | chosen |
[
{
"from": "system",
"value": "Support improved for date fields\n"
},
{
"from": "human",
"value": "module CommaHeaven\n module ActiveRecord\n module ClassMethods\n def self.extended(base)\n base.class_eval do\n base.class_inheritable_accessor :comma_heaven_columns\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change parks_from_csv to fix heroku error\n"
},
{
"from": "human",
"value": "require 'csv'\n\ndef create_users\n 60.times.map do |i|\n User.create(name: \"User_#{i}\", email: \"user#{i}@swag.com\")\n end\nend\n\ndef create_parks_from_csv(path)\n CSV.foreach(pa... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself as an author and add rspec dep\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = 'compose-everything'\n spec.version = '0.0.0'\n spec.authors = ['trajing']\n spec.email = ['trajingplaysgames... | ruby | chosen |
[
{
"from": "system",
"value": "Change to fix old Ruby\n"
},
{
"from": "human",
"value": "desc 'Load gem inside irb console'\ntask :console do\n require 'irb'\n require 'irb/completion'\n require File.join(__FILE__, '../../lib/equatable')\n ARGV.clear\n IRB.start\nend\ntask c: %w[ console ]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update Unicorn config to fix deployment issues.\n"
},
{
"from": "human",
"value": "rails_env = ENV['RAILS_ENV'] || 'development'\n\nlisten \"unix:tmp/sockets/unicorn.socket\", :backlog => 64\nworker_processes Integer(ENV[\"WEB_CONCURRENCY\"] || 3)\ntimeout 30\nprelo... | ruby | chosen |
[
{
"from": "system",
"value": "Use Barts .csv for modality seeding; enhance logging\n\nultimately do via environment variable perhaps\n"
},
{
"from": "human",
"value": "module Renalware\n log '--------------------Adding Modality Codes & Descriptions--------------------'\n\n file_path = File.joi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix permission to administrate groups.\n"
},
{
"from": "human",
"value": "authorization do\n role :root do\n has_omnipotence\n end\n\n role :admin do\n includes :member\n has_permission_on :groups, :group_members, :group_memberships, to: :manage\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update react-rails config to use addons in test mode\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.versi... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure database is not reset on production.\n"
},
{
"from": "human",
"value": "def db_connect!\n ENV['RACK_ENV'] ||= 'development'\n @main_file ||= begin\n require File.basename(File.expand_path('.'))\n end\nend\n\nnamespace :d... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'self' to ApplicationController CSP\n\nThis fixes the welcome page (and presumably other internal rails pages)\ngiving a Content-Security-Policy error whenever rack-mini-profiler tries\nto load – which is enabled by default for new projects\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration to exclude managing postgres services, since chef-server-ctl cannot manage external postgres\n\nSigned-off-by: Prajakta Purohit <e0b6074fb36005ab38b637036277c00627bb386c@chef.io>\n"
},
{
"from": "human",
"value": "define_upgrade do\n if Partybus.co... | ruby | chosen |
[
{
"from": "system",
"value": "Delete headers on mock deletion."
},
{
"from": "human",
"value": "class CreateDuckrailsHeaders < ActiveRecord::Migration\n def change\n create_table :headers do |t|\n t.string :name, null: false\n t.string :value, null: false\n t.references :mock,... | ruby | chosen |
[
{
"from": "system",
"value": "Use more sophisticated method capture pattern\n"
},
{
"from": "human",
"value": "require \"rspec/request_describer/version\"\n\nmodule RSpec\n module RequestDescriber\n RESERVED_HEADER_NAMES = %w(\n Content-Type\n Host\n HTTPS\n )\n\n SUPPOR... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rspec bug: clear formatters on second run\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"spec\"\nrequire \"spec/mocks\"\n\nrequire File.dirname(__FILE__) + \"/../../synthesis\"\n\nmodule Synthesis\n class RSpecAdapter < Adapter\n def run\... | ruby | chosen |
[
{
"from": "system",
"value": "Change `.where[]` to `[]` for clarity\n"
},
{
"from": "human",
"value": "module StoreFederationRegistryData\n def create_or_update_by_fr_id(dataset, fr_id, **attrs)\n update_by_fr_id(dataset, fr_id, attrs) ||\n create_by_fr_id(dataset, fr_id, attrs) { |o| y... | ruby | chosen |
[
{
"from": "system",
"value": "Create tests for helper generator\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/generator_test_init'\n\nclass HelperGeneratorTest < GeneratorTestCase\n def setup\n super\n cp_r File.join(PLUGIN_ROOT, 'generators/helper'), File.join(RA... | ruby | chosen |
[
{
"from": "system",
"value": "Support unique_id for new API\n"
},
{
"from": "human",
"value": "require 'alipass/template/content'\n\nmodule Alipass\n module Template\n\n # REQUIRED_PARAMS = [ :method, :timestamp, :app_id, :version, :sign, :sign_type, :tpl_content]\n\n def self.add(params)... | ruby | chosen |
[
{
"from": "system",
"value": "Use rails spec helper and not standard spec helper\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe FeedbackMailer do\n describe \"send_feedback\" do\n let(:feedback) { Feedback.new(:email => \"foo@example.com\", :comment => \"I love your s... | ruby | chosen |
[
{
"from": "system",
"value": "Test the payload as well\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Agents::PdfInfoAgent do\n let(:agent) do\n _agent = Agents::PdfInfoAgent.new(name: \"PDF Info Agent\")\n _agent.user = users(:bob)\n _agent.sources << agents(:bob... | ruby | chosen |
[
{
"from": "system",
"value": "690: Add browser log printout for system tests\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Miscellaneous things that need to run after each spec.\nRSpec.configure do |config|\n config.after(type: :system) do\n # Clear these again after ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error due to clashing ParseError classes\n"
},
{
"from": "human",
"value": "#\n# Copyright (c) 2013 by Lifted Studios. All Rights Reserved.\n#\n\nrequire 'data/parser_data'\n\ndescribe Parser do\n let(:parser) { Parser.new }\n\n it 'raises on empty input' do\... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to finalize the models before using them\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'pathname'\nrequire 'fakeweb'\nrequire 'dm-validations'\n\n# Support running specs with 'rake spec' and 'spec'\n$LOAD_PATH.unshift('lib') unless $LOAD_P... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ActiveRecord-specific bits from RSpec harness.\n"
},
{
"from": "human",
"value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Coveralls.wear! into spec helper"
},
{
"from": "human",
"value": "require \"simplecov\"\nrequire \"coveralls\"\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSimpleCov.s... | ruby | chosen |
[
{
"from": "system",
"value": "Use RSpec >= 1.1.12 so 1.2 can be used as well\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'rubygems'\n\ngem 'rspec', '~>1.1.12'\nrequire 'spec'\n\ngem 'dm-core', '0.10.0'\nrequire 'dm-core'\nrequire 'dm-core/core_ext/symbol'\n\nrequire Pathname(_... | ruby | chosen |
[
{
"from": "system",
"value": "Rework specs to function under jruby\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'rom'\n\ninclude ROM\n\nDB = Sequel.connect(\"sqlite::memory\")\n\ndef seed(db = DB)\n db.run(\"CREATE TABLE users (id SERIAL, name STRING)\")\n\n db[:users].inser... | ruby | chosen |
[
{
"from": "system",
"value": "Save new helper before rake test\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'websync'\nrequire 'fileutils'\n\ndef fixtures_folder\n File.expand_path(\"../fixtures\", __FILE__)\nend\n\n###\n\ndef git_repo_b... | ruby | chosen |
[
{
"from": "system",
"value": "Remove support for Should matcher."
},
{
"from": "human",
"value": "require 'webmock/rspec'\nrequire 'vcr'\nrequire 'optimus_prime'\n\nWebMock.disable_net_connect! allow_localhost: true\nENV['AWS_ACCESS_KEY_ID'] = SecureRandom.hex\nENV['AWS_SECRET_ACCESS_KEY'] = Sec... | ruby | chosen |
[
{
"from": "system",
"value": "Change to remove ruby limit and udpate coverage api call\n"
},
{
"from": "human",
"value": "if RUBY_VERSION > '1.9' and (ENV['COVERAGE'] || ENV['TRAVIS'])\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\... | ruby | chosen |
[
{
"from": "system",
"value": "Include devise test helpers in controller specs\n\nWe need these to survive spree's authentication check.\n"
},
{
"from": "human",
"value": "# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../dummy/config/environment.rb\", _... | ruby | chosen |
[
{
"from": "system",
"value": "Allow pointing at test Cassandra instance via env\n"
},
{
"from": "human",
"value": "if RUBY_VERSION >= \"1.9\"\n require 'simplecov'\n SimpleCov.start\nend\n\nrequire 'rubygems'\nrequire 'yaml'\nrequire 'rspec'\n\nCASSANDRA_VERSION = ENV['CASSANDRA_VERSION'] || '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typos in gem name\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.unshift File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"kitchen-ssh\"\n s.version = '0.1.0'\n s.authors = [\"Neill Turner\",\"Ca... | ruby | chosen |
[
{
"from": "system",
"value": "Add attr_accessible to LocationBlock's attributes\n"
},
{
"from": "human",
"value": "class LocationBlock < Block\n\n settings_items :zoom, :type => :integer, :default => 4\n settings_items :map_type, :type => :string, :default => 'roadmap'\n\n def self.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct config file in integration tests.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'open3'\n\nJEKYLL_HEADER = <<-EOF\n---\ntitle: rubygems/rubygems report\nlayout: default\n---\nEOF\n\ndescribe 'Command line', :integration do\n cont... | ruby | chosen |
[
{
"from": "system",
"value": "Create a couple specs for Remote::FileBase\n"
},
{
"from": "human",
"value": "require './lib/everything/blog/remote/file_base'\n\ndescribe Everything::Blog::Remote::FileBase do\nend\n"
},
{
"from": "gpt",
"value": "require 'pp' # Helps prevent an error l... | ruby | chosen |
[
{
"from": "system",
"value": "Add a variation to monthly active editors calculation script\n"
},
{
"from": "human",
"value": "# Quick version of https://stats.wikimedia.org/v2/#/en.wikipedia.org/contributing/editors/normal|table|2018-04-01~2019-04-01|activity_level~1..4-edits*5..24-edits*25..99-... | ruby | chosen |
[
{
"from": "system",
"value": "Add server logging for the JWT decode error.\n\nThe data gets scrubbed by Sentry, so to get to the bottom of this, we need to capture it on the server log.\n"
},
{
"from": "human",
"value": "require \"#{Rails.root}/lib/importers/user_importer\"\n\n#= Controller for ... | ruby | chosen |
[
{
"from": "system",
"value": "Add section_user created attribute to serializer\n"
},
{
"from": "human",
"value": "module Drive\n class SectionUserSerializer < ApplicationSerializer\n attributes :id, :username, :uploaded_avatar_id, :avatar_template,\n :user_id, :role\n\n def user_id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage to gem specification\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'active_elastic_job/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Set required Ruby version properly [skip ci]\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"angular_rails_csrf/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specif... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to reflect 3.2.9"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"blank_feature/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Update LinkHelper.reversed_sort_params to allow :asc or :desc default options.\n"
},
{
"from": "human",
"value": "module LinkHelper\n\n def reversed_sort_param(field)\n (params[:sort][field.to_sym] == :desc) ? \"#{field}\" : \"-#{field}\"\n end\n\n def toggled... | ruby | chosen |
[
{
"from": "system",
"value": "Replace options hash with keyword arguments\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Notification < ApplicationRecord\n belongs_to :recipient, class_name: \"User\"\n belongs_to :target, polymorphic: true\n\n class << self\n inc... | ruby | chosen |
[
{
"from": "system",
"value": "Handle lack of :include when referencing association in remote object\n :map is defined in Response, but the method call is happening in ResponseMap\n\ngit-svn-id: f67d969b640da65cb7bc1d229e09fd6d2db44ae1@778 392d7b7b-3f31-0410-9dc3-c95a9635ea79\n"
},
{
"from": "human"... | ruby | chosen |
[
{
"from": "human",
"value": "Add updated_at column to spree_states to assist in API caching\n"
},
{
"from": "gpt",
"value": "class AddUpdatedAtToSpreeStates < ActiveRecord::Migration\n def up\n add_column :spree_states, :updated_at, :datetime\n end\n\n def down\n remove_column :spree_st... | ruby | chosen |
[
{
"from": "system",
"value": "Add authors array to stop gem warning when installing\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_usa_epay'\n s.version = '0.70.1'\n s.summary = 'Add g... | ruby | chosen |
[
{
"from": "system",
"value": "Load RSpec configuration before accessing it\n"
},
{
"from": "human",
"value": "require 'rails/generators/named_base'\nrequire 'rspec/core'\nrequire 'rspec/rails/feature_check'\n\n# @private\n# Weirdly named generators namespace (should be `RSpec`) for compatibility... | ruby | chosen |
[
{
"from": "system",
"value": "Remove new service version test for no valid specs\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire_relative 'support/ui_test_helper'\n\nclass CreateNewServiceVersionTest < Capybara::Rails::TestCase\n include UITestHelper\n include Warden::Test:... | ruby | chosen |
[
{
"from": "system",
"value": "Use ERB in yaml in order to use env vars to control worker count/etc\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule Sneakers\n class Spawner\n\n def self.spawn\n worker_group_config_file = ENV['WORKER_GROUP_CONFIG'] || \"./config/sneaker_worker... | ruby | chosen |
[
{
"from": "system",
"value": "Add failing test case for StringConversionInInterpolation\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Rubocop::Cop::Lint::StringConversionInInterpolation do\n subject(:cop) { described_class.new }\n\n it 'registers an ... | ruby | chosen |
[
{
"from": "system",
"value": "Change upstream task to compare number of days\n\n[#141046145]\n\nSigned-off-by: Dave Goddard <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@goddard.id.au>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\nbuildpacks_ci_dir = File.expand_path(F... | ruby | chosen |
[
{
"from": "system",
"value": "Handle nil result from parser\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire 'active_support/core_ext/object'\nrequire 'crfpp'\nrequire 'free_cite/crfparser'\n\nclass Citation\n\n def self.parse(str)\n return unless str.present?\n hash = self... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"TEMP: Inline redundancy_pay shared logic\"\n\nThis is no longer required now that I've used the coverage data to generate a\nset of responses that allow me to add regression tests.\n"
},
{
"from": "human",
"value": "module SmartAnswer\n class CalculateEmpl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old implementation. Not going to be used\n"
},
{
"from": "human",
"value": "module SermonAudio\n class Finder\n def self.client\n @client ||= SermonAudio::Sermon.new.savon\n end\n\n def self.request(request_name, opts = {})\n client.call r... | ruby | chosen |
[
{
"from": "system",
"value": "Update regex for component marking.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2013, Rackspace Hosting\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\")... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.