conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add refactored solution and reflection\n"
},
{
"from": "human",
"value": "# Die Class 2: Arbitrary Symbols\n\n\n# I worked on this challenge by myself.\n# I spent [#] hours on this challenge.\n\n# Pseudocode\n\n# Input:\n# Output:\n# Steps:\n\n\n# Initial Solution\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests so they pass on Faraday 1.0\n"
},
{
"from": "human",
"value": "module DropboxApi\n describe Client do\n it 'can have custom connection middleware' do\n # Mock middleware\n MiddlewareStart = Class.new\n MiddlewareMiddle = Class.new\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Load less data on the stats page plz"
},
{
"from": "human",
"value": "class Admin::StatsController < Admin::ApplicationController\n newrelic_ignore\n\n def index\n @recent_users = User.order('created_at DESC').limit(19)\n @recent_subscriptions = Subscription... | ruby | chosen |
[
{
"from": "system",
"value": "Add a \"quick\" mode to test suite.\n\nIn quick mode, don't bother running some of the more expensive tests. On my\nmachine, this reduces the test runtime from ~90 seconds to ~60 seconds. Still\nway too slow, but marginally better.\n"
},
{
"from": "human",
"value": ... | ruby | chosen |
[
{
"from": "system",
"value": "Return status 500 when error happens\n"
},
{
"from": "human",
"value": "class Api::V1::BaseController < ApplicationController\n include Roar::Rails::ControllerAdditions\n respond_to :json, :xml\n before_action :authenticate, except: [:test_exception_notifier]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change exhibition is set calculation\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :e... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirection from gitcuss.com to gitcussion.com\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_fo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove fail fast since problems\n\nIt's not very usefull, it's better to get all\nfailed test while executing parallel_rspec\n"
},
{
"from": "human",
"value": "Encoding.default_external = Encoding::UTF_8\nrequire 'bundler/setup'\nrequire 'rspec'\nrequire_relative '.... | ruby | chosen |
[
{
"from": "system",
"value": "Move rspec-puppet-facts to spec helper\n\nThis change updates the module to use the rspec-puppet-facts as defined\nin the puppet-openstack_spec_helper.\n\nChange-Id: I6df0fb713772b68249eb38051f3a275e9d75336f\n"
},
{
"from": "human",
"value": "require 'puppetlabs_spe... | ruby | chosen |
[
{
"from": "system",
"value": "Read media_id from Helix::Base::CREDENTIALS, rather than re-parsing YAML\n"
},
{
"from": "human",
"value": "require 'helix'\n\nFILENAME = './helix.yml'\n\nmedia_by_id = {\n 'album_id' => Helix::Album,\n 'image_id' => Helix::Image,\n 'track_id' => Helix::Track,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that @current_user is also set and cleared\n"
},
{
"from": "human",
"value": "class NotFound < StandardError; end\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery\n rescue_from(ActiveRecord::RecordNotFound) { render 'excepti... | ruby | chosen |
[
{
"from": "system",
"value": "Add Class IpAddressRejected and Forbidden\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery wit... | ruby | chosen |
[
{
"from": "system",
"value": "Enable focussing of tests in rspec\n\n[#126851165]\n\nSigned-off-by: Steffen Uhlig <f82265073a33b8214db2ab356bc472f35869736c@de.ibm.com>\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'rspec/collection_matchers'\nrequire 'rest-client'\n\nrequire 'pry'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set up to use capybara spec support in tests.\n"
},
{
"from": "human",
"value": "require 'capybara-harness'\n\nRSpec.configure do |config|\n config.treat_symbols_as_metadata_keys_with_true_values = true\n config.run_all_when_everything_filtered = true\n config.fi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Progress id bug on New Transfers\n"
},
{
"from": "human",
"value": "class TransferredController < ApplicationController\n before_action :authenticate_user!, PQUserFilter\n\n def new\n @pq = PQ.new\n end\n\n def create\n @pq = PQ.new(pq_params)\n @pq... | ruby | chosen |
[
{
"from": "system",
"value": "Move web mock above VCR config\n"
},
{
"from": "human",
"value": "require 'vcr'\n\nVCR.configure do |config|\n config.cassette_library_dir = \"spec/fixtures/vcr_cassettes\"\n config.hook_into :webmock # or :fakeweb\n\n config.ignore_hosts(\n 'localhost',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include default branch in the application JSON serialisation\n"
},
{
"from": "human",
"value": "class ApplicationSerializer < ActiveModel::Serializer\n attributes :name, :shortname, :archived, :deploy_freeze\n attribute :status_notes, key: :notes\n attribute :rep... | ruby | chosen |
[
{
"from": "system",
"value": "Use TO_TIMESTAMP in Oracle comparison with Time.current\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass AdminReservationExpirer\n\n def expire!\n expired_reservations.destroy_all\n end\n\n private\n\n def expired_reservations\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade rspec to 2.7.0 (specs fail on jruby 1.9)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/virtus/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"virtus\"\n gem.version = Vir... | ruby | chosen |
[
{
"from": "system",
"value": "Add locales option to UniqTranslationValidator\n"
},
{
"from": "human",
"value": "module AbAdmin\n module Concerns\n module Validations\n class UniqTranslationValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve to_prepare deprecation warning in Rails 5.0\n\nuse ActiveSupport::VERSION::MAJOR instead of ActiveSupport.version.release in order to maintain compatibility with Rails 3, which unfortunately doesn't provide ActiveSupport.version but instead ActiveSupport::VERSION\n"
}... | ruby | chosen |
[
{
"from": "system",
"value": "Use new rvm installation procedure.\n\nAlso add a simple command so that a successful installation doesn't fail the Chef run.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: rvm\n# Recipe:: default\n\n# Make sure that the package list is up to date on Ubuntu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nil value loading notification service config\n\nCloses CNVS-27564\n\nAvoids causing a crash when configuration for the notification service\nis absent but feature flags are enabled.\n\nAlso removes the default config options, meaning that\nnotification_service_queue_name i... | ruby | chosen |
[
{
"from": "system",
"value": "Use unicode replacement character for invalid data\n\nhttp://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character\n"
},
{
"from": "human",
"value": "module Slack\n class Notifier\n class LinkFormatter\n\n class << self\n\n def format ... | ruby | chosen |
[
{
"from": "system",
"value": "Add show Action to Blogs Controller\n\nUpdate the Blogs controller to include the show action.\n"
},
{
"from": "human",
"value": "class BlogsController < ApplicationController\n before_filter :authenticate_user!\n before_filter :get_club, :only => [ :create, :show... | ruby | chosen |
[
{
"from": "system",
"value": "Set repo in podspec to https\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DRYNavigationManager\"\n s.version = \"1.0.0\"\n s.summary = \"Navigation manager to separate navigation logic from you core app code, ... | ruby | chosen |
[
{
"from": "system",
"value": "Sort courses secondarily by title\n"
},
{
"from": "human",
"value": "require \"#{Rails.root}/lib/word_count\"\n\n#= Presenter for courses / cohort view\nclass CoursesPresenter\n attr_reader :current_user, :cohort_param\n\n def initialize(current_user, cohort_param... | ruby | chosen |
[
{
"from": "system",
"value": "Remove these as we no longer call image_tag in the presenter\n"
},
{
"from": "human",
"value": "class FeaturePresenter < Struct.new(:feature)\n include ActiveModel::Conversion\n include Rails.application.routes.url_helpers\n include PublicDocumentRoutesHelper\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update homepage, summary, and description\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"nfl_live_update/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "[gemspec] Add that this is available under the MIT license.\n\nCloses #46."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'kicker/version'\nrequire 'date'\n\nGem::Specification.new do |s|\n s.n... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration: Timestamp properties are non-nullable\n"
},
{
"from": "gpt",
"value": "class NonNullableTimestamps < ActiveRecord::Migration[4.2]\n def change\n change_column(:entries, :created_at, :timestamp, null: false, default: -> { 'NOW()' })\n change_colu... | ruby | chosen |
[
{
"from": "system",
"value": "Use t.references to associate raids and members to items\n"
},
{
"from": "human",
"value": "class CreateItems < ActiveRecord::Migration\n def self.up\n create_table :items do |t|\n t.string :name\n t.float :price, :default => 0.00\n t.boolean :sit... | ruby | chosen |
[
{
"from": "system",
"value": "Update oauth2 dependency to ~> 0.9.3\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'omniauth-oauth2/version'\n\nGem::Specification.new do |gem|\n gem.add_dependency 'f... | ruby | chosen |
[
{
"from": "system",
"value": "Update to new v1 API endpoint"
},
{
"from": "human",
"value": "require 'hashie'\nrequire 'httparty'\n\nmodule Domainr\n extend self\n\n include HTTParty\n format :json\n base_uri 'domainr.com'\n\n def self.client_id=(id)\n @client_id = id\n end\n\n def sel... | ruby | chosen |
[
{
"from": "human",
"value": "Create orders table migration added\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\n\nmigration \"Create orders\" do\n database.create_table :orders do\n text :date, :primary_key => true, :uniq => true, :null => false\n text :restaurant, :null => false, :d... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Adobe AIR to v20.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'adobe-air' do\n version '19.0'\n sha256 :no_check # required as upstream package is updated in-place\n\n url \"http://airdownload.adobe.com/air/mac/download/#{version}/AdobeAIR.dmg\"\n na... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that our Blimpfile actually creates a Blimpy::Fleet\n"
},
{
"from": "human",
"value": "\nrequire 'rubygems'\nrequire 'fog'\n\nmodule Blimpy\n class Engine\n attr_reader :fleet\n\n def initialize\n @fleet = nil\n end\n\n def load_file(file... | ruby | chosen |
[
{
"from": "system",
"value": "docs: Modify typo of Garage::Tracer::NullTracer's docs\n"
},
{
"from": "human",
"value": "require 'forwardable'\n\nmodule Garage\n module Tracer\n extend self\n extend Forwardable\n\n def_delegators :tracer, :start, :inject_trace_context, :record_http_requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug when we ask for a single column and nil is one of the returned values\n"
},
{
"from": "human",
"value": "require \"pluck_to_hash/version\"\n\nmodule PluckToHash\n extend ActiveSupport::Concern\n\n module ClassMethods\n def pluck_to_hash(keys)\n plu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix another test ordering issue with admin login changes.\n"
},
{
"from": "human",
"value": "require_relative \"../test_helper\"\n\nclass Test::AdminUi::TestPageTitle < Minitest::Capybara::Test\n include Capybara::Screenshot::MiniTestPlugin\n include ApiUmbrellaTe... | ruby | chosen |
[
{
"from": "system",
"value": "Raise CommandError on command failures instead of aborting\n"
},
{
"from": "human",
"value": "require \"mellon/version\"\nrequire \"mellon/keychain\"\nrequire \"mellon/note\"\n\nmodule Mellon\n KEYCHAIN_REGEXP = /\"(.+)\"/\n\n class << self\n def security(*comm... | ruby | chosen |
[
{
"from": "system",
"value": "Remove attr_accessible call from Paymill gateway\n"
},
{
"from": "human",
"value": "module Spree\n class Gateway::Paymill < Gateway\n\n preference :public_key, :string\n preference :private_key, :string\n preference :currency, :string, :default => 'GBP'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow comments on tabled proposals\n"
},
{
"from": "human",
"value": "class TabledState < BaseState\n def is_open_for_comments?\n false\n end\n\n def status_summary\n \"\" + tabled_date.to_date.to_s(:long)\n end\n\n def status_string\n \"Set-Aside (Rev... | ruby | chosen |
[
{
"from": "system",
"value": "Extend itself to ease test\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule Boom\n # Color collects some methods for colorizing terminal output.\n module Color\n CODES = {\n :reset => \"\\e[0m\",\n :magenta => \"\\e[35m\",\n :red ... | ruby | chosen |
[
{
"from": "system",
"value": "Add active_resource as a dependency\n\nWas missing"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'pivotal-slacker'\n s.version = '1.9.1'\n s.date = '2013-07-29'\n s.summary = \"A command-line client for Pivotal T... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify git command to get branch name"
},
{
"from": "human",
"value": "require \"fit-commit/runner\"\n\nmodule FitCommit\n def self.run\n runner.run || exit(1)\n end\n\n private\n\n def self.runner\n FitCommit::Runner.new(message_path, branch_name)\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix options declaration for plugin usage.\n"
},
{
"from": "human",
"value": "require 'html_press/html_press'\n\nmodule Rack\n module HTMLPress\n module_function\n \n def options(options={})\n require 'html_press/rack'\n options.each_pair do |key, v... | ruby | chosen |
[
{
"from": "system",
"value": "Modify the not perform vertual network connection test in vna or vnmgr\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper.rb'\n\ndescribe 'connect to each instance through a virtual network' do\n property[:networks].each do |servername, ports|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add adaptations import to global import task\n"
},
{
"from": "human",
"value": "namespace :db do\n desc 'Imports all data in correct order, replaces non-dictionary data'\n task import: [\n 'locations:import',\n 'location_members:import',\n 'ndcs:full:impo... | ruby | chosen |
[
{
"from": "system",
"value": "Set the header dir and exclude private headers. Bump version."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'libPusher'\n s.version = '1.4'\n s.license = 'MIT'\n s.summary = 'An Objective-C client for the Pusher.com serv... | ruby | chosen |
[
{
"from": "system",
"value": "Use %q only for strings that contain both single quotes and double quotes\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'stateoscope/version'\n\nGem::S... | ruby | chosen |
[
{
"from": "system",
"value": "Move StashWebhookPinger to high queue\n\nAdd automatic retries as well. It is critical that this job be run\nquickly and reliably otherwise developers are blocked from merging their\nPRs.\n"
},
{
"from": "human",
"value": "# Copyright 2014 Square Inc.\n#\n# Licen... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra id column from trade_plus_static migration\n"
},
{
"from": "human",
"value": "class CreateTradePlusStatic < ActiveRecord::Migration\n def change\n create_table :trade_plus_static do |t|\n t.integer :id\n t.integer :year\n t.string :ap... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic covering spec for extension\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'vimwiki_markdown/options'\n\nmodule VimwikiMarkdown\n describe Options do\n subject { Options.new }\n\n context \"no options passed\" do\n before do\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Spec related to the previous commit\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\nRSpec.describe ApplicationService do\n\n describe \"#application_name\" do\n it \"returns the application name defined in the ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to Alamofire 2.0.1"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'AlamofireImage'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'AlamofireImage is an image component library for Alamofire'\n s.homepage = 'https://gith... | ruby | chosen |
[
{
"from": "system",
"value": "Fix correct_password? check in sessions controller\n"
},
{
"from": "human",
"value": "class Admin::SessionsController < Admin::BaseController\n skip_before_action :authenticate_admin!\n\n def new\n if current_admin\n redirect_to after_login_path(locale)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use extract_corresponding to build previous\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class ChangesController < ActionController::Base\n # TODO: do this properly\n skip_before_filter :verify_authenticity_token\n \n before_f... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.29.0.11 to 0.29.0.12\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.29.0.11'\n s.summary = 'Common primitives for platform-specific messag... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.16.0.0 to 0.16.0.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.16.0.0'\n s.summary = 'Common primitives for platform-specific messaging... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.7.2.0 to 0.7.2.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.7.2.0'\n s.summary = 'Messaging primitives for Eventide'\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Change stale issue marker to Mondays\n\nThis will activate at midnight (ET) on Sunday night, really.\n"
},
{
"from": "human",
"value": "module Schedulers\n class StaleIssueMarker\n include Sidekiq::Worker\n sidekiq_options :queue => :miq_bot_glacial, :retry =... | ruby | chosen |
[
{
"from": "system",
"value": "Test to verify Typus::I18n.t interpolation.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass I18nTest < ActiveSupport::TestCase\n\n test \"t\" do\n assert_equal \"Hello\", Typus::I18n.t(\"Hello\")\n assert_equal \"Hello\", Typus::I18n.t(\".... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite single SQL statement in SynonymTest to AR\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire(\"test_helper\")\n\nclass SynonymTest < UnitTestCase\n def test_make_sure_all_referenced_synonyms_exist\n # Make sure there is at least ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"It should be possible to use ActiveSupport::DescendantTracker without getting ActiveSupport::Dependencies for free.\"\n\nThis reverts commit 46f6a2e3889bae420589f429b09722a37dbdf18d.\n\nCaused failures on CI. rake test:isolated on activesupport directory show them.\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Update example rake task / API extension\n"
},
{
"from": "human",
"value": "require 'gds_api/json_client'\n\nclass GdsApi::CoreApi < GdsApi::Base\n def register(details)\n post_json(base_url + \".json\", resource: details)\n end\n\n private\n def adapter_name... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec with real data\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint NPLumen.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optional, but encouraged\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add current user logic to pages controller.\n"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class PagesController < ApplicationController\n include IndexHelper\n def index\n your... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to use slug to find posts. Remove unused routes.\n"
},
{
"from": "human",
"value": "class PostsController < ApplicationController\n before_action :set_post, only: [:show, :edit, :update, :destroy]\n\n # GET /posts\n # GET /posts.json\n def index\n @posts ... | ruby | chosen |
[
{
"from": "system",
"value": "Add edit and update actions\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_filter :authenticate_user!\n\n def show\n @user = User.find(params[:id])\n @questions_asked = @user.questions.page(params[:page]).per(3)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use delegated object instead of self when checking vote permissions\n"
},
{
"from": "human",
"value": "class RequestPresenter < SimpleDelegator\n def can_vote?(u)\n self.user.id != u.id && !self.user.voted_on?(self)\n end\n\n def liked_by user\n if can_vote... | ruby | chosen |
[
{
"from": "system",
"value": "Update Homebrew formula to version 4.0.2\n"
},
{
"from": "human",
"value": "class Bartycrouch < Formula\n desc \"Incrementally update/translate your Strings files\"\n homepage \"https://github.com/Flinesoft/BartyCrouch\"\n url \"https://github.com/Flinesoft/Barty... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test SpatialModel class\n\n* With default database config\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/pride'\nrequire 'mocha/mini_test'\nrequire 'rgeo/active_record/adapter_test_helper'\n\nbegin\n require 'byebug'\nrescue ... | ruby | chosen |
[
{
"from": "system",
"value": "Add version information to test output.\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSimpleCo... | ruby | chosen |
[
{
"from": "system",
"value": "Add filters to delivery updates for study stage and update statuses\n"
},
{
"from": "human",
"value": "ActiveAdmin.register DeliveryUpdate do\n permit_params :study_id, :data_analysis_status_id,\n :data_collection_status_id,\n :interpr... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for Feed reader\n\nAdd tests for Feed reader to ensure that the re-factoring doesn't break it."
},
{
"from": "gpt",
"value": "require 'minitest/autorun'\nrequire 'minitest/pride'\nrequire_relative '../reader.rb'\n\ndescribe Feed do\n let(:feed) { Feed.new('... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test files in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/adamantium/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'adamantium'\n gem.version = Adamantium::VERSION.du... | ruby | chosen |
[
{
"from": "system",
"value": "Add MacOS target to cocoapod\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"SwiftyZeroMQ\"\n s.version = \"1.0.19\"\n s.summary = \"ZeroMQ Swift Bindings for iOS.\"\n s.description = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test of common\n"
},
{
"from": "gpt",
"value": "require 'minitest/autorun'\nrequire 'shoulda'\nrequire 'pp'\n\nrequire 'flappi'\n\nclass ::Flappi::ResponseBuilderTest < MiniTest::Test\n\n context 'extract_definition_args' do\n setup do\n @common_test =... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests for the two-file matcher.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Winnow::Matcher do\n describe '#find_matches' do\n fprint1 = [\n Winnow::Fingerprint.new(0, Winnow::Location.new(0, 0)),\n Winnow::Fingerprint.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade IntelliJ IDEA CE EAP to v144.3143.6\n"
},
{
"from": "human",
"value": "cask 'intellij-idea-ce-eap' do\n version '144.2925.2'\n sha256 '2dacc14f5c1854ba830205624c56c32f53ba6dc200b02e0dddf04133fed1af2c'\n\n url \"https://download.jetbrains.com/idea/ideaIC-#... | ruby | chosen |
[
{
"from": "system",
"value": "Update MPlayer OSX Extended to rev15\n"
},
{
"from": "human",
"value": "class MplayerOsxExtended < Cask\n version 'rev15-test3'\n sha256 '1543feec27fcc911e35b20a51a00957145f35b1b970b0cb35004c86727e4a8fe'\n\n url 'https://mplayerosxext.googlecode.com/files/MPlayer... | ruby | chosen |
[
{
"from": "system",
"value": "Add the activerecord 3 development dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'periscope/version'\n\nGem::Specification.new do |s|\n s.name = 'periscope'\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add github homepage link at gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\n# lib = File.expand_path('../lib', __FILE__)\n# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire File.expand_path('../lib/api_sketch/version', __FILE__)\n#require... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate remove_products: no down defined\n"
},
{
"from": "human",
"value": "class RemoveProducts < ActiveRecord::Migration\n def up\n drop_table :ordered_products\n drop_table :product_types\n end\n\n def down\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Make quotes, parentheses, and spacing more consistent\n"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = 'mogli'\n s.version = '0.0.28'\n s.summary = \"Open Graph Library for Ruby\"\n s.description = %{Simple library for accessing... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations to Post model\n"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n\n belongs_to :user\n\n delegate :username, to: :user\nend\n"
},
{
"from": "gpt",
"value": "class Post < ActiveRecord::Base\n\n validates :title, :body, ... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy dependent items upon deletion.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n validates :email, presence: true, uniqueness: true, format: /@/\n\n has_many :actions\n has_many :activities\nend\n"
},
{
"from": "gpt",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"make methods private\"\"\n\nThis reverts commit 0932d09b42e8b04ea9accaf1323b21ba7aa0385a.\n"
},
{
"from": "human",
"value": "module Dough\n module Helpers\n class InsetBlock\n include ActionView::Helpers::RenderingHelper\n\n attr_read... | ruby | chosen |
[
{
"from": "system",
"value": "Set file's content-type to image/jpeg\n\nFiles on s3 are missing a content type. We have to set it on upload.\n"
},
{
"from": "human",
"value": "module ShareMeow\n class StoreImage\n BUCKET_NAME = ENV.fetch('AWS_BUCKET_NAME')\n\n attr_reader :filename, :image... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize Gtk at test start.\n"
},
{
"from": "human",
"value": "require 'shoulda'\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n\n# Need a dummy module for some tests.\nmodule Lib\nend\n\nclass Test::Unit::TestCase\n def cws code\n code.g... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SimpleCov runner for Travis"
},
{
"from": "human",
"value": "# Trying is knowing\nif ENV[\"CODECLIMATE_REPO_TOKEN\"]\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.start\nelse\n require \"simplecov\"\n SimpleCov.start\nend\n\nrequire \"t... | ruby | chosen |
[
{
"from": "system",
"value": ":memo: Remove male pronoun in comment\n\n[ci skip]\n"
},
{
"from": "human",
"value": "module React\n module JSX\n # A {React::JSX}-compliant transformer which uses the deprecated `JSXTransformer.js` to transform JSX.\n class JSXTransformer\n DEFAULT_ASSE... | ruby | chosen |
[
{
"from": "system",
"value": "Add Gimei::Config for fixed RNG\n"
},
{
"from": "human",
"value": "require 'forwardable'\nrequire 'yaml'\nrequire 'gimei/version'\nrequire 'gimei/name'\nrequire 'gimei/address'\n\nclass Gimei\n extend Forwardable\n\n NAMES = YAML.load_file(File.expand_path(File.jo... | ruby | chosen |
[
{
"from": "system",
"value": "Make it a little less ugly\n"
},
{
"from": "human",
"value": "require 'active_record'\nrequire 'pload/version'\n\nmodule Pload\n class AssociationNotLoadedError < StandardError\n def initialize(owner, reflection)\n super \"N+1 query detected:\\n #{owner.cl... | ruby | chosen |
[
{
"from": "system",
"value": "Update the WIDTH size of window\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'gosu'\nrequire 'rmagick'\nrequire 'execjs'\n\nWIDTH, HEIGHT = 600, 600\n\nNULL_PIXEL = Magick::Pixel.from_color('none')\n\nrequire_relative 'worms/version'\nrequire_relat... | ruby | chosen |
[
{
"from": "system",
"value": "Set back secret from env\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become invalid!... | ruby | chosen |
[
{
"from": "system",
"value": "Add specific versions for minitest and simplecov\n\n * Should fix false failures on CI\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new(\"statsd-ruby\", \"0.4.0\") do |s|\n s.authors = [\"Rein Henrichs\"]\n s.email = \"rein@ph... | ruby | chosen |
[
{
"from": "system",
"value": "Use person from parent resource if available in new activity action.\n"
},
{
"from": "human",
"value": "class ActivitiesController < AuthorizedController\n belongs_to :project, :optional => true\n belongs_to :person, :optional => true\n\n has_scope :by_date\n ha... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken url in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tinyembedly/version\"\n\nGem::Specification.new do |s|\n s.name = \"tinyembedly\"\n s.version = Tinyembedly... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.