conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Allow steps to be retrieved by name\n"
},
{
"from": "human",
"value": "require 'culinarian/hardware'\nrequire 'culinarian/step'\n\nmodule Culinarian\n module DSL\n def self.included(base)\n base.extend(ClassMethods)\n end\n\n def hardware\n @hard... | ruby | chosen |
[
{
"from": "system",
"value": "Replace the configuration class variable with an instance variable equivalant\n"
},
{
"from": "human",
"value": "require \"email_assessor/email_validator\"\n\nmodule EmailAssessor\n def self.domain_is_disposable?(domain)\n domain_in_file?(domain, configuration.d... | ruby | chosen |
[
{
"from": "human",
"value": "Add the After Dark Classic Set v1.0 from Infinisys.\n"
},
{
"from": "gpt",
"value": "cask 'after-dark-classic' do\n version :latest\n sha256 :no_check\n\n url 'ftp://www.infinisys.co.jp/online/online_afterdarkclassicset_e.dmg.gz'\n name 'After Dark Classic Set'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove specs now tested elsewhere\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe CdmBatch do\n it 'has a version number' do\n expect(CdmBatch::VERSION).not_to be nil\n end\n \n it 'checks that each records associated file is present' do\... | ruby | chosen |
[
{
"from": "system",
"value": "Make code valid in 1.8.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ContextIO::Discovery do\n before(:each) do\n fixtures_path = File.join(File.dirname(__FILE__), 'fixtures')\n json_discovery = File.read(File.join(fixtures_path, 'disc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix image size on webview\n"
},
{
"from": "human",
"value": "class WebViewController < UIViewController\n attr_accessor :item\n\n def viewDidLoad\n super\n self.navigationItem.title = self.item[3]\n @webview = UIWebView.new.tap do |v|\n scrollwindow ... | ruby | chosen |
[
{
"from": "system",
"value": "Update regex for spec.files and remove bindir and executables\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"minimal-mistakes-jekyll\"\n spec.version = \"4.0.2\"\n spec.aut... | ruby | chosen |
[
{
"from": "system",
"value": "Rename gzip_static task to just \"gzip\"\n"
},
{
"from": "human",
"value": "# Extend the default assets:precompile by gzipping all assets once the default\n# Sprockets behavior has completed. This is needed because Sprockets 2.x does\n# not gzip static assets like S... | ruby | chosen |
[
{
"from": "system",
"value": "Remove TinyTds::Error::SEVERITIES. Not used anywhere.\n"
},
{
"from": "human",
"value": "module TinyTds \n class Error < StandardError\n \n SEVERITIES = [\n {:number => 1, :severity => 'EXINFO', :explanation => 'Informational, non-error.'},\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Call the original warn method if $DEBUG is enabled.\n"
},
{
"from": "human",
"value": "require 'warnings/warning'\nrequire 'warnings/warnings'\n\nmodule Warnings\n module Mixin\n #\n # Registers a warning.\n #\n # @param [String] message\n # The wa... | ruby | chosen |
[
{
"from": "system",
"value": "Add COMABLE_VERSION file to gem\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path('../COMABLE_VERSION', __FILE__)).strip\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name = 'comable'\n s.versi... | ruby | chosen |
[
{
"from": "system",
"value": "Update Open-MPI to version 1.4.2\n\nSome Mac-Specific issues noted in the Open-MPI changelog:\n\n http://www.open-mpi.org/community/lists/announce/2010/05/0037.php\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n"
},
{
"from": "h... | ruby | chosen |
[
{
"from": "system",
"value": "Update Serial Number data migration\n"
},
{
"from": "human",
"value": "class AddSerialNumbertoServiceVehicles < ActiveRecord::DataMigration\n def up\n ServiceVehicle.all.each do |sv|\n old_serial_number = sv.serial_numbers.first\n vin = old_serial_numb... | ruby | chosen |
[
{
"from": "system",
"value": "Update user db to include vote_count integer\n"
},
{
"from": "human",
"value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :user_id, null: false\n t.string :first_name, null: false\n t.string :la... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing rspec test for triggers\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Triggers' do\n let(:user) { create(:user) }\n before { login_as(user) }\n\n before do\n @project = FactoryGirl.create :empty_project\n @project.team <<... | ruby | chosen |
[
{
"from": "system",
"value": "Fix uploading flow for Mockr instances without Campfire configured\n\nUsers without a Campfire subdomain set were seeing an error message when\nuploading a mock. The mock went through, but we were encountering an error in\nattempting to parse the URI \".campfire.now\", which do... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation for student/start in Timeslot model\n\nValidation to prevent student from signin up for more than one\ntutoring session at a given start time.\n"
},
{
"from": "human",
"value": "class Timeslot < ActiveRecord::Base\n belongs_to :tutor, class_name: 'Us... | ruby | chosen |
[
{
"from": "system",
"value": "Add fgdc reader module 'spatialOrganization'\n"
},
{
"from": "human",
"value": "# Reader - fgdc to internal data structure\n# unpack fgdc spatial data organization\n\n# History:\n# Stan Smith 2017-08-15 original script\n\nrequire 'nokogiri'\nrequire 'adiwg/mdtransl... | ruby | chosen |
[
{
"from": "system",
"value": "Add a few more specs for /signup\n"
},
{
"from": "human",
"value": "describe Tok::UsersController do\n before do\n class User < ActiveRecord::Base\n include Tok::Authentication\n end\n end\n\n describe \"#create\" do\n context \"with valid parameter... | ruby | chosen |
[
{
"from": "human",
"value": "Create tests for the users controller\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\ndescribe UsersController do\n\n let!(:user) { FactoryGirl.create(:user) }\n\n before(:each) do\n allow_any_instance_of(ApplicationController).to receive(:current_user)... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax in Votes controller spec\n\nSpec is missing an 'end' keyword towards the end.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe VotesController do\n before do\n @user = create(:user)\n @idea = create(:idea)\n\n @user.confirm!\... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade faraday to ~> 0.9.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"elasticsearch/version\"\n\nGem::Specification.new do |s|\n s.name = \"elasticsearch-client\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable pry in production due to issues with heroku\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'mongoid'\nrequire 'pry'\n\nrequire_relative 'models/init'\n\nclass App < Sinatra::Base\n\n\tset :root, File.dirname(__FILE__)\n\tset :haml, :forma... | ruby | chosen |
[
{
"from": "system",
"value": "Move getting message from ENV inside every call.\n\nThis is fast attempt to fix message caching name.\n"
},
{
"from": "human",
"value": "require \"json\"\nrequire \"mobilyws\"\nrequire \"cuba\"\n\nsms = Mobilyws::API.new ENV[\"USERNAME\"], ENV[\"PASSWORD\"], ENV[\"S... | ruby | chosen |
[
{
"from": "human",
"value": "Update dataset_file_audit_id primary key to bigint\n"
},
{
"from": "gpt",
"value": "class ChangeDatasetFileAuditsIdToBigint < ActiveRecord::Migration[5.2]\n def up\n change_column :dataset_file_audits, :id, :bigint\n end\n\n def down\n change_column :dataset... | ruby | chosen |
[
{
"from": "system",
"value": "Use integer foreign keys for compatibility with old tables\n"
},
{
"from": "human",
"value": "class AddSubscriptionReferenceToOrders < ActiveRecord::Migration[5.2]\n def change\n add_reference :spree_orders, :subscription, null: true, foreign_key: { to_table: :s... | ruby | chosen |
[
{
"from": "system",
"value": "Use OmniauthUserSerializer instance to sign users via omniauth\n"
},
{
"from": "human",
"value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n def action_missing(method_name, *args, &block)\n @auth_providers ||= OauthProvider.pluck(:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix user model with new authentication\n"
},
{
"from": "human",
"value": "require 'acts_as_indexed'\n\nbegin\n Refinery::User.class_eval do\n # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed\n acts_as_indexed :fields => [:username, :email]\... | ruby | chosen |
[
{
"from": "system",
"value": "Disable as this has now been incorporated into move_save_checkout_button\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => \"spree/checkout/_payment\",\n :replace => \"code[erb-loud]:contains('submit_tag t(:save_and_co... | ruby | chosen |
[
{
"from": "system",
"value": "Set a specific minimum version of rspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/temando/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jason Stirk\"]\n gem.email = [\"j... | ruby | chosen |
[
{
"from": "system",
"value": "Implement recording a medication step for a peritonitis episode"
},
{
"from": "human",
"value": "When(/^Clyde records a peritonitis episode for Patty$/) do\n record_peritonitis_episode_for(\n patient: @patty,\n user: @clyde,\n diagnosed_on: \"10-10-2016\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify concatenation of url and inline\n"
},
{
"from": "human",
"value": "require \"rest-client\"\n\nmodule ATDIS\n class Applications\n attr_reader :base_url\n\n # base_url - the base url from which the urls for all atdis urls are made\n # It is the con... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up test syntax a bit\n\nPart of me appreciates this, and part of me thinks there's too much\nmagic. (The eternal struggle.)\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nrequire \"ailurus/client\"\n\ndescribe Ailurus::Client do\n it \"initiali... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for giving non-exisiting option\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nBIN = 'bin/gem-search'\nUSAGE = <<-EOS\nUsage: gem-search gem_name [options]\n\n -s, --sort Sort by the item.\n [n]ame :default eg... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic test for ssh::server\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'ssh::server' do\n\tlet (:facts) { {\n\t\t:osfamily\t=> 'Debian'\n\t}}\n\t\t\n\tcontext \"basic tests\" do\n\t\tit { should contain_class('ssh::server') }\n\t\tit { shou... | ruby | chosen |
[
{
"from": "system",
"value": "Set store to empty after persisted, helps reduce the memory usage\n"
},
{
"from": "human",
"value": "# This is a memory store that caches all the writes in memory (in case we want to rollback)\nclass CachedWriteStore\n def initialize\n @store = {}\n end\n\n de... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for multipart devise mails\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule Hdo\n describe Mailer do\n let(:rep) { Representative.make! :with_email }\n\n it \"sends confirmation emails as multipart plaintext and html\" do\n mail =... | ruby | chosen |
[
{
"from": "system",
"value": "Add test proving it works w/ files that don't supply spans attribute on rowns\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Roo::Excelx do\n describe '.new' do\n subject {\n Roo::Excelx.new('test/files/numbers1.xlsx')\n }\n\n it... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests verifying that we lookup users on creation of comments\n\n* spec/models/comment_spec.rb: Add tests for ensuring that comments\n can notify the appropriate other users about new comments.\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\n\nRSpec.de... | ruby | chosen |
[
{
"from": "system",
"value": "Allow errors to be propagated."
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'erb'\n\nclass ExampleApp < Sinatra::Base\n set :views, File.dirname(__FILE__) + '/views'\n\n helpers MozNav::RenderHelpers\n\n get '/' do\n erb :index\n end\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Add begin/rescue/end to setcode block\n\nThis silences these warnings:\n\nCould not retrieve pip_version: undefined method `[]' for nil:NilClass\nCould not retrieve pip_version: can't convert Symbol into String\n"
},
{
"from": "human",
"value": "# Make pip version a... | ruby | chosen |
[
{
"from": "system",
"value": "Use subject instead of let, not sure if clearer\n"
},
{
"from": "human",
"value": "require 'gaddag'\n\ndescribe GADDAG::Word, '#to_delimited_paths' do\n context 'when the word is empty' do\n let(:word) { GADDAG::Word.new([]) }\n\n it 'returns an empty list' d... | ruby | chosen |
[
{
"from": "system",
"value": "Make gem a Rails engine\n"
},
{
"from": "human",
"value": "require \"image-picker-rails/version\"\n\nmodule ImagePickerRails\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require \"image-picker-rails/version\"\n\nmodule ImagePicke... | ruby | chosen |
[
{
"from": "system",
"value": "Add setup code to evaluate app's initializer\n"
},
{
"from": "human",
"value": "module LegalPages\n class Engine < ::Rails::Engine\n isolate_namespace LegalPages\n\n config.to_prepare do\n ApplicationController.helper(LegalPages::ApplicationHelper)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change default settings for unicorn_env\n\nFollow recommendations from official unicorn documentation.\nsee: http://unicorn.bogomips.org/unicorn_1.html#rack-environment\n"
},
{
"from": "human",
"value": "require 'mina/bundler'\nrequire 'mina/rails'\nrequire 'mina/un... | ruby | chosen |
[
{
"from": "system",
"value": "Use feature and scenario DSL\n\nThe feature and scenario DSL correspond to describe and it, respectively.\nThese methods are simply aliases that allow feature specs to read more\nas customer and acceptance tests\n"
},
{
"from": "human",
"value": "require 'java_helpe... | ruby | chosen |
[
{
"from": "system",
"value": "Stop the unescaped env madness!\n"
},
{
"from": "human",
"value": "require \"#{File.dirname(__FILE__)}/abstract_note\"\n\nmodule Footnotes\n module Notes\n class EnvNote < AbstractNote\n def initialize(controller)\n @env = controller.request.env.dup\... | ruby | chosen |
[
{
"from": "system",
"value": "Make DeclaredName lints more specific\n\nChange the descriptions of lints reported by `DeclaredName` to be\nrelevant to the particular context (e.g. whether the incorrectly named\nthing was a function, mixin, or variable).\n\nChange-Id: I2191c1a3bb4f512b7d28e377eaedce4c0ec0a849... | ruby | chosen |
[
{
"from": "system",
"value": "Stop to use a helper method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ReviewDecorator < ApplicationDecorator\n def detail_link(options = {})\n title = options.delete(:title).presence || self.title\n path = h.review_path(user.us... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused code from auto-generated app policy\n\nHuge test coverage increase...\n"
},
{
"from": "human",
"value": "class ApplicationPolicy\n attr_reader :user, :record\n\n def initialize(user, record)\n @user = user\n @record = record\n end\n\n def ind... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dead reference to serializer\n"
},
{
"from": "human",
"value": "class GameSerializer < ActiveModel::Serializer\n attributes :id, :created_at\n has_one :tournament, serializer: TournamentListSerializer\n has_one :owner\n has_many :game_ranks\n has_many :c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad reference to Navigation.\n"
},
{
"from": "human",
"value": "class Backend::NavigationsController < BackendController\n before_action -> { breadcrumb.add t('b.navigation'), backend_navigations_path }\n\n def index\n @navigations = Navigation.all\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Use \"wb\" mode string when saving screenshots (needed on Windows).\n\nr9686\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n\n #\n # @private\n #\n\n module DriverExtensions\n module TakesScreenshot\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods to update first_photo_taken_at\n"
},
{
"from": "human",
"value": "class Album < ApplicationRecord\n has_many :photos, -> { order \"taken_at\" }, inverse_of: :album\n belongs_to :cover_photo, class_name: 'Photo'\n\n before_create :generate_slug\n\n sc... | ruby | chosen |
[
{
"from": "system",
"value": "Format code in files helper\n"
},
{
"from": "human",
"value": "module FilesHelper\n\n private\n\n # The url to a icon representing the file based in its extension.\n def url_of_file_icon(file)\n icon_type = file.file.original_filename.split('.').last.presence ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"removed admin mail for checkout\"\n\nThis reverts commit ce0eb77cabdfc3063ac1eb8aa52416f7264b9b0a.\n"
},
{
"from": "human",
"value": "class AdminMailer < ActionMailer::Base\n default from: \"no-reply@reservations.app\"\n\n def notes_reservation_notificati... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirecting if not logged in\n"
},
{
"from": "human",
"value": "class VideosController < ApplicationController\n before_action :set_video, only: [:show, :edit, :update, :destroy]\n def index\n @videos = Video.all\n end\n\n def new\n @video = Video.new\... | ruby | chosen |
[
{
"from": "system",
"value": "Replace outdated Spree::Config[:mails_from] with Spree::Store.current.mail_from_address\n\nhttps://github.com/spree/spree/pull/6097\n"
},
{
"from": "human",
"value": "module Spree\n class SupplierMailer < Spree::BaseMailer\n\n default from: Spree::Config[:mails_... | ruby | chosen |
[
{
"from": "system",
"value": "Call gateway_options on payment using send, given that it's a private method\n"
},
{
"from": "human",
"value": "module Spree\n class Gateway::UsaEpay < Gateway\n preference :source_key, :string\n preference :pin, :string\n\n attr_accessible :preferred_sour... | ruby | chosen |
[
{
"from": "system",
"value": "Add explicit require \"fileuilts\" in spec file\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative \"spec_helper\"\n\ndescribe 'Clipboard::File' do\n before :all do\n Clipboard.implementation = Clipboard::File\n cache = Clipb... | ruby | chosen |
[
{
"from": "system",
"value": "Change root path for dummy app\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n mount Adminable::Engine => '/admin'\n\n devise_for :users\n\n root 'application#welcome'\nend\n"
},
{
"from": "gpt",
"value": "Rails.application.route... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for init and config commands.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe GithubCLI::CLI do\n\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe GithubCLI::CLI do\n let(:object) { described_class }\... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Removed order rabl template\"\n\nThis reverts commit de382875f495868256bdc7406fd6289c5ff6d9f0.\n"
},
{
"from": "gpt",
"value": "object @order\nextends \"spree/api/orders/order\"\n\nnode(:use_billing) { @order.bill_address == @order.ship_address }\n\nif looku... | ruby | chosen |
[
{
"from": "system",
"value": "Change to load files directly\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/tree/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in ScheduleItem's attr_accessible\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: schedule_items\n#\n# id :integer not null, primary key\n# title :string(255)\n# excerpt :text\n# description :text... | ruby | chosen |
[
{
"from": "system",
"value": "Use Model.table_name to take into account the table_name_prefix\n"
},
{
"from": "human",
"value": "module Regressor\n module Model\n module Database\n module Index\n def indices\n ::ActiveRecord::Base.connection.indexes(@model.tableize.gsub(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migrations on mysql database\n"
},
{
"from": "human",
"value": "class AddMissingUniqueIndexesForUniqueAttributes < ActiveRecord::Migration[5.0]\n def change\n tables = {\n country: [:name, :iso_name],\n option_type: [:name],\n option_value: [:... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for rejecting illegal file attributes\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nclass Controller < AnonymousController\n include FileParameters\nend\n\ndescribe FileParameters do\n let(:controller) { Contr... | ruby | chosen |
[
{
"from": "system",
"value": "Verify octokit gem in changelog fetcher\n"
},
{
"from": "human",
"value": "require 'octokit'\n\nmodule Fastlane\n module Helper\n class ChangelogGeneratorFetcher\n def self.fetch_labels(project, base_branch, access_token)\n Octokit.auto_paginate = tr... | ruby | chosen |
[
{
"from": "human",
"value": "Add first test case for ProductSet\n\nThis covers creation and update of a product.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Spree::ProductSet do\n describe '#save' do\n context 'when passing :collection_attributes' do\n let(:produc... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete reference to config for MailGun"
},
{
"from": "human",
"value": "require Rails.root.join(\"config/smtp\")\n\nRails.application.configure do\n config.cache_classes = false\n config.eager_load = false\n config.consider_all_requests_local = tru... | ruby | chosen |
[
{
"from": "system",
"value": "Set cookies to only be served over https and to be http only\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nContactOTron::Application.config.session_store :cookie_store, key: '_contact-o-tron_session'\n\n# Use the d... | ruby | chosen |
[
{
"from": "system",
"value": "Use actual last page, not current page\n"
},
{
"from": "human",
"value": "module WillPaginate\n class Collection\n def klass\n first.class\n end\n end\n\n module ActionView\n protected\n class LinkRenderer < ViewHelpers::LinkRenderer\n def c... | ruby | chosen |
[
{
"from": "human",
"value": "Remove competition-specific FKs and use CompetitionEventMemberships instead\n"
},
{
"from": "gpt",
"value": "class UseCompetitionEventMemberships < ActiveRecord::Migration\n def self.up\n Event.find(:all, :conditions => \"cat4_womens_race_series_id is not null\")... | ruby | chosen |
[
{
"from": "system",
"value": "Check if session_expire_delay column exists before adding the column.\n"
},
{
"from": "human",
"value": "class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration\n def change\n add_column :application_settings, :session_expire_delay, :integer,... | ruby | chosen |
[
{
"from": "system",
"value": "Remove wrong directories from comments\n"
},
{
"from": "human",
"value": "# Make sure that Vagarant user is on the box for dokken\ninclude_recipe 'test::dokken'\n\n# System Install\nrbenv_system_install 'system'\n# Install several rubies to /opt/rubies\nrbenv_ruby '... | ruby | chosen |
[
{
"from": "system",
"value": "Add a timestamp to several uris of images\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'open-uri'\nmodule Filter\n class SasuoniBot\n SASUONI_DATA_URI = \"http://sasuoni.herokuapp.com/yaml/sasuoni_images.yaml\"\n\n def update(p)\n t = p['te... | ruby | chosen |
[
{
"from": "system",
"value": "Correct `repo_id` => `repository_id` in migration\n"
},
{
"from": "human",
"value": "class StarredRepositoriesAddIndexUserIdAndRepoId < ActiveRecord::Migration\n self.disable_ddl_transaction!\n\n def up\n execute \"CREATE UNIQUE INDEX index_starred_repositories... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra space in form generated gemspec.\n"
},
{
"from": "human",
"value": "# Encoding: UTF-8\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'refinerycms-<%= plural_name %>'\n s.version = '1.0'\... | ruby | chosen |
[
{
"from": "human",
"value": "Add some basic controller logging tests\n"
},
{
"from": "gpt",
"value": "require 'abstract_unit'\n\nclass LoggingController < ActionController::Base\n def show\n render :nothing => true\n end\nend\n\nclass LoggingTest < ActionController::TestCase\n tests Loggin... | ruby | chosen |
[
{
"from": "system",
"value": "Use the failure response for bad API keys\n"
},
{
"from": "human",
"value": "module Api\n class Version1Controller < ActionController::Base\n before_filter :set_site\n \n def get_proxy\n key = ApiKey.find_by_uuid(params[:api_key])\n\n unless key.... | ruby | chosen |
[
{
"from": "system",
"value": "Use before_action for the award info pages\n"
},
{
"from": "human",
"value": "class ContentOnlyController < ApplicationController\n before_action :authenticate_user!, :check_account_completion, except: [:home, :awards_for_organisations, :enterprise_promotion_awards... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration not being versioned\n"
},
{
"from": "human",
"value": "class AddAfterSurveyContentToSurvey < ActiveRecord::Migration\n def change\n add_column :rapidfire_surveys, :after_survey_content, :text\n end\nend\n"
},
{
"from": "gpt",
"value": ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the relationships with other models\n\n\ngit-svn-id: 907a5e332d9df9b9d6ff346e9993373f8c03b4a0@66 59d7d9da-0ff4-4beb-9ab8-e480f87378b2\n"
},
{
"from": "human",
"value": "class Client < ActiveRecord::Base\n\n has_many :facts, :dependent => :destroy\n has_many... | ruby | chosen |
[
{
"from": "system",
"value": "Use relative path intead of absolute to key into StaticHtml table.\n"
},
{
"from": "human",
"value": "class StaticHtml < Sequel::Model\n\n\tdef self.get_static_html_for_path url\n\t\tif Sinatra::Application.environment() != :test\n\t\t\t`phantomjs --load-images=fals... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to a smaller gem to install in kitchen runs\n\naws-sdk is 132 gems now. It takes *forever* to install on some platforms\nlike CentOS 6. Use a simple gem.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix request correlation id not being logged out\n"
},
{
"from": "human",
"value": "require_relative 'base_message_handler'\n\nmodule Messaging\n module MessageHandlers\n class RequestHandler < BaseMessageHandler\n attr_reader :response\n\n def handle_m... | ruby | chosen |
[
{
"from": "system",
"value": "Handle error when listing tables\n"
},
{
"from": "human",
"value": "require_relative '../command'\n\nmodule AmazonAthena\n module Commands\n class ShowTables < AmazonAthena::Command\n\n def initialize(database_name)\n @database_name = database_name\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add an ugly hack to get javadoc to work witht eh GWT libraries\n"
},
{
"from": "gpt",
"value": "# Ugly hack required as the gwt jars cause the javadoc tool heart ache\nmodule Buildr\n module DocFix #:nodoc:\n include Extension\n after_define(:doc) do |project|... | ruby | chosen |
[
{
"from": "system",
"value": "Fix James email addy in the gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"chrome_debugger\"\n s.version = \"0.0.3\"\n s.summary = \"Remotely control Google Chrome and extract stats\"\n s.de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a message problem of `RuleExecutionError`.\n"
},
{
"from": "human",
"value": "module Pione\n module RuleEngine\n # Exception class for rule execution failure.\n class RuleExecutionError < StandardError\n def initialize(handler)\n @handler = ha... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.0.2.3 to 0.0.2.4\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'raygun_client'\n s.version = '0.0.2.3'\n s.summary = 'Client for the Raygun API using the Obsidian HTTP cl... | ruby | chosen |
[
{
"from": "system",
"value": "[rubocop] Arrange dependencies in alpbhetical order\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'razorpay/constants'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Nagios server installs via package using a closed out pull request\n\n\nFormer-commit-id: 9d7bb90849b633cb2606f0bd5d4212319a059c6c [formerly bc361734ad782814e369a6a5c317cfc0b08efd0a] [formerly f3bd6eef3d2758750a4016907ef6c5d4c61dc50b [formerly 7bb92f416cd2722bc15879565c0789... | ruby | chosen |
[
{
"from": "system",
"value": "Set VCR to ignore codeclimate.com\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'shared/core_context'\nrequire 'shared/default_spec_context'\nrequire 'shared/state_spec_context'\nrequire 'shared/view_spec_context'\nrequire 'shared/year_spec_context'\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Use symbols instead of string for schema in specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe JsonValidator do\n before do\n run_migration do\n create_table(:users, force: true) do |t|\n t.string :name\n t.json :profil... | ruby | chosen |
[
{
"from": "system",
"value": "Make configuration manager specs clearer\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'nerve/configuration_manager'\n\ndescribe Nerve::ConfigurationManager do\n describe 'normal run' do\n let(:config_manager) { Nerve::ConfigurationManager.ne... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for MongoDB wrapper\n"
},
{
"from": "gpt",
"value": "$:.unshift('lib').uniq!\nrequire 'perpetuity/mongodb'\n\nmodule Perpetuity\n describe MongoDB do\n let(:mongo) { MongoDB.new db: 'perpetuity_gem_test' }\n let(:klass) { String }\n subject { mongo... | ruby | chosen |
[
{
"from": "system",
"value": "Add shared example enforcing usage in a composed matcher expression."
},
{
"from": "human",
"value": "shared_examples \"an RSpec matcher\" do |options|\n let(:valid_value) { options.fetch(:valid_value) }\n let(:invalid_value) { options.fetch(:invalid_value) }\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove OS X declaration for now, bump to 1.1.0\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"ArrayDiff\"\n s.version = \"1.0.4\"\n s.summary = \"ArrayDiff quickly computes the difference between two arrays, works great with... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.