conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Implement BigDecimal as C extension\n"
},
{
"from": "human",
"value": "require_relative '../../spec_helper'\n\nrequire 'bigdecimal'\n\ndescribe :rational_coerce, shared: true do\n it \"returns the passed argument, self as Float, when given a Float\" do\n result ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove trailing ? from Github avatar URL in the hopes that this fixes the seg\nfaults on Heroku.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n mount_uploader :photo, PhotoUploader\n devise :rememberable, :trackable, :omniauthable, :omniauth_... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"testing heroku without email send\"\n\nThis reverts commit 30d7878a5e752f4d56ab3d60340380b3ae6694f6.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authenti... | ruby | chosen |
[
{
"from": "system",
"value": "Add self.authenticate back to User model\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :goals, foreign_key: :setter_id\n has_many :pillars, through: :goals\n has_many :strands, through: :goals\n has_many :friendships, foreign_key:... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce redundant calls to _stats method\n\nOnly call the _stats method to get the current snapshot of active/queued\nrequests once and re-use those values rather than calling it multiple\ntimes. Move active/queued to instance variables so they can be included\nin the to_s metho... | ruby | chosen |
[
{
"from": "system",
"value": "Remove project_total from included associations in action\n\nProjectTotal is not an ActiveRecord model anymore.\n"
},
{
"from": "human",
"value": "class Users::ContributionsController < ApplicationController\n after_filter :verify_authorized, except: :index\n afte... | ruby | chosen |
[
{
"from": "system",
"value": "Include appearance age group in /performances response\n"
},
{
"from": "human",
"value": "json.array! @performances do |performance|\n json.id performance.id.to_s\n json.stage_time performance.stage_time\n json.category_name performance.category.name\n json.age_... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for html escaping in report_a_problem template.\n"
},
{
"from": "gpt",
"value": "require_relative \"../test_helper\"\n\nclass ReportAProblemTemplateTest < ActionDispatch::IntegrationTest\n include ERB::Util\n\n def get_template\n get \"/templates/report... | ruby | chosen |
[
{
"from": "system",
"value": "Add space around optional label_text param value\n"
},
{
"from": "human",
"value": "require 'active_admin/component'\n\nmodule ActiveAdmin\n module BatchActions\n\n # Creates the toggle checkbox used to toggle the collection selection on/off\n class ResourceS... | ruby | chosen |
[
{
"from": "system",
"value": "Add tasks to remove public and Rails logo"
},
{
"from": "human",
"value": "require 'rails/generators'\n\nmodule DynamoKickstarter\n class AppGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n def readme\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec-json_expectations requirement from ~> 1.4 to ~> 2.2\n\nUpdates the requirements on [rspec-json_expectations](https://github.com/waterlink/rspec-json_expectations) to permit the latest version.\n- [Release notes](https://github.com/waterlink/rspec-json_expectations/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove references to watcher and test w/ loader instead\n"
},
{
"from": "human",
"value": "require_relative 'helper'\n\nif ActiveRecord::VERSION::STRING >= \"4.1.0\"\n describe \"PredictiveLoad::Watcher\" do\n it \"does not work\" do\n skip \"does not work\... | ruby | chosen |
[
{
"from": "human",
"value": "Add purpose to item - share or gift\n"
},
{
"from": "gpt",
"value": "class AddPurposeToItems < ActiveRecord::Migration\ndef self.up\n add_column :items, :purpose, :integer\n \n Item.update_all :purpose => Item::PURPOSE_SHARE\n end\n\n def self.down\n re... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration file for omniauth facebook\n"
},
{
"from": "gpt",
"value": "class AddColumnsToUsers < ActiveRecord::Migration\n def change\n add_column :users, :provider, :string\n add_column :users, :uid, :string\n add_column :users, :oauth_token, :string\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new migration for change wants table with correct class name\n"
},
{
"from": "human",
"value": "class ChangeWants < ActiveRecord::Migration\n def change\n add_column :wants, :notified, :boolean\n change_column_default :wants, :notified, false\n change_... | ruby | chosen |
[
{
"from": "human",
"value": "Move lib specs into specs/lib/\n\nThis will avoid clutter as we adding more and more specs to the specs/\ndirectory.\n\nChange-Id: I4fc07283a31bafc07a968b46f1528512c5e81f61\nReviewed-on: https://gerrit.causes.com/25288\nReviewed-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove testing of active record associations\n\n - 5 association tests in the 100s of possible associations\n - reproduces what rails has already tested\n - the source of truth is the model's rb file\n - it it's in the model's rb then it's working\n"
},
{
"from": "hum... | ruby | chosen |
[
{
"from": "system",
"value": "Test only showing recent uploads from featured profiles\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Image do\n let(:valid_attributes) do\n extend ActionDispatch::TestProcess\n { :user_id => 1, :file => fixture_file_upload('chicken_ric... | ruby | chosen |
[
{
"from": "system",
"value": "Use self instead of looking up account ID\n\nThis avoids the need for permissions and will hopefully support\nfederated support accounts\n"
},
{
"from": "human",
"value": "module StackMaster\n module ParameterResolvers\n class AmiFinder\n def initialize(reg... | ruby | chosen |
[
{
"from": "system",
"value": "Include each test case at most once in the LocationsFilter.\n"
},
{
"from": "human",
"value": "require 'cucumber/core/filter'\n\nmodule Cucumber\n module Core\n module Test\n\n # Sorts and filters scenarios based on a list of locations\n class Location... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration for source hierarchy\n"
},
{
"from": "gpt",
"value": "desc 'For each rank, reorder the sources'\ntask reorder_sources_migration: :environment do\n source_ranks = Source.column_names.keep_if {|name| name.end_with?('_rank') }\n\n source_ranks.each do |r... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused 'eventmachine' in gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.name = \"mysql2-cs-bind\"\n gem.version = \"0.1.0\"\n gem.authors = [\"TAGOMORI Satoshi\"]\n gem.emai... | ruby | chosen |
[
{
"from": "system",
"value": "Remove hard-coded image format and reference box instead\n"
},
{
"from": "human",
"value": "module VagrantMutate\n module Converter\n class Libvirt < Converter\n\n def generate_metadata\n metadata = {\n 'provider' => @output_box.provider_nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the case where ThreadedConsumerStrategy with a SingleWorkerStrategy with a large batch does not properly shut down when the Chore::Manager shuts down\n"
},
{
"from": "human",
"value": "module Chore\n module Strategy\n class SingleWorkerStrategy\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Create setup method in Command class.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule TrySailBlogNotification::Command\n class BaseCommand\n\n include TrySailBlogNotification::Util\n\n # Command options.\n #\n # @return [Hash]... | ruby | chosen |
[
{
"from": "system",
"value": "Update AFNetworking version in the podspec-file\n\nUpdate podspec for compatibility with new (future) minor versions of the AFNetworking"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'GROAuth2SessionManager'\n s.version = '0.2.1'\n s.licen... | ruby | chosen |
[
{
"from": "system",
"value": "Update correct URLs in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'NSAttributedString+CCLFormat'\n spec.version = '1.0.0'\n spec.license = 'BSD'\n spec.summary = 'Attributed string extension for creating attributed strings f... | ruby | chosen |
[
{
"from": "human",
"value": "Add example of template for creating column_diffs table\n"
},
{
"from": "gpt",
"value": "class CreateColumnDiffs < ActiveRecord::Migration\n def change\n create_table :column_diffs do |t|\n t.datetime :changed_at\n t.string :model_name\n t.intege... | ruby | chosen |
[
{
"from": "human",
"value": "Add example of method complexity measurement\n"
},
{
"from": "gpt",
"value": "$: << File.expand_path('../../lib', __FILE__)\nrequire 'fast'\n\ndef node_size(node)\n return 1 unless node.respond_to?(:children)\n children = node.children\n return 1 if children.empty... | ruby | chosen |
[
{
"from": "system",
"value": "Test that the retrieved event is properly assigned\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe StripeEvent::WebhookController do\n before do\n StripeEvent.clear_subscribers!\n @base_params = { :use_route => :stripe_event }\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename the last “Gestionnaire” occurence in the UI to “Instructeur”"
},
{
"from": "human",
"value": "module Manager\n class GestionnairesController < Manager::ApplicationController\n def reinvite\n gestionnaire = Gestionnaire.find(params[:id])\n gestio... | ruby | chosen |
[
{
"from": "system",
"value": "Use :fullname attribute if available\n"
},
{
"from": "human",
"value": "module Refinery\n module Elasticsearch\n module SearchHelper\n def result_type(result)\n result.klass.name\n end\n\n def result_icon(result)\n icon = case result... | ruby | chosen |
[
{
"from": "system",
"value": "Move spec subject to null integration\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mutant::Integration do\n\n let(:class_under_test) do\n Class.new(described_class)\n end\n\n let(:object) { class_under_test.new }\n\n describe '#all_tes... | ruby | chosen |
[
{
"from": "system",
"value": "Set swagger host via dotenv\n"
},
{
"from": "human",
"value": "module Api\n class DocsController < ActionController::Base\n include Swagger::Blocks\n\n # :nocov:\n swagger_root do\n key :swagger, '2.0'\n info do\n key :version, '0.1.0'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use template methods for expenses in controller\n"
},
{
"from": "human",
"value": "class ExpensesController < ApplicationController\n\n before_filter :find_event_and_expense\n helper_method :expenses_title, :expenses_path, :expenses, :expense_path, :edit_expense_p... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning for Rails 3.2\n\nRails 3.2's ActiveSupport::Deprecation is a module and not\na class. So it cannot be passed as a deprecator object.\nJust removing the attempt to display this deprecation for\nRails 3.2 for now.\n"
},
{
"from": "human",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Add group name to initializer example\n"
},
{
"from": "human",
"value": "ActiveRecord::Rollout.configure do |config|\n # config.define_user_group do |user|\n # user.admin?\n # end\nend\n"
},
{
"from": "gpt",
"value": "ActiveRecord::Rollout.configure... | ruby | chosen |
[
{
"from": "system",
"value": "Change variable name for clarity\n\nRather than have a \"schema_name\" and \"format\" as concepts, let's just use\n\"format\".\n"
},
{
"from": "human",
"value": "module GovukContentSchemaTestHelpers\n class Examples\n def initialize\n Util.check_govuk_conte... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a NameError on Taskable under some circumstances"
},
{
"from": "human",
"value": "module Tasks\n class Taskables::Question < ActiveRecord::Base\n extend Taskable\n\n has_one :task, as: :taskable\n has_many :options\n has_many :answers, through: :opt... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to remove birthday field from medicaid_applications."
},
{
"from": "gpt",
"value": "class RemoveBirthdayFromMedicaidApplications < ActiveRecord::Migration[5.1]\n def change\n safety_assured do\n remove_column :medicaid_applications, :birthday, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop in unlink fork service specs"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Projects::UnlinkForkService, services: true do\n subject { Projects::UnlinkForkService.new(fork_project, user) }\n\n let(:fork_link) { create(:forked_projec... | ruby | chosen |
[
{
"from": "system",
"value": "Complete destroy action for comments controller.\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n\n def new\n @resource = Resource.find_by(id: params[:resource_id])\n @comment = @resource.comments.build\n end\n\n def cre... | ruby | chosen |
[
{
"from": "system",
"value": "Remove verbose response on resetting fieldworker\n"
},
{
"from": "human",
"value": "class DatabaseController < ApplicationController\n\n before_filter :restrict_to_nonproduction\n\n def delete_data\n data_type = params[:data_type]\n model_class = data_type... | ruby | chosen |
[
{
"from": "system",
"value": "Fix updated by for draft notes\n"
},
{
"from": "human",
"value": "class DraftNoteDecorator < ApplicationDecorator\n def last_updated_by\n name = object.authorable.decorate.full_name if object.authorable.present?\n time = object.content_updated_at.try(:strftim... | ruby | chosen |
[
{
"from": "human",
"value": "Add failing integer atttribute specs\n"
},
{
"from": "gpt",
"value": "require_relative 'spec_helper'\n\ndescribe ActiveModel::Form do\n # Integr params generated by the Rails form helpers look like this\n let(:params) do\n { \"form\"=>\n {\"zero\"=>\"0\",\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use double quotes in message spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Magnum::Payload::MessageParser do\n let(:klass) { class Klass ; include Magnum::Payload::MessageParser ; end }\n let(:subject) { klass.new }\n\n describe '#skip... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to version 2.1.16\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.15\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur... | ruby | chosen |
[
{
"from": "human",
"value": "Add CocoaPods podspec for a future version.\n\nThe next version does not neccsarilly have to be 0.9.1, but its the\nsmallest increment, so it will always be a sane version number.\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = 'MTLocation'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage to spec file\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'simple_gsx/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec with new git url\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"iOSCombobox\"\n s.version = \"0.0.1\"\n s.summary = \"Replicates the <select> tag in Safari for native apps\"\n s.ho... | ruby | chosen |
[
{
"from": "system",
"value": "Build system: REMOVE OSX::Plist path guessing\n\nOSX::Bundle will get the path if needed.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'CFPropertyList'\n\nmodule OSX\n module PList\n def self.open(path)\n file = get_plist(path)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Spree::Product last updated_at to the cache key\n\nSigned-off-by: Rahul Rajeev <0b6a614878d5f7381869179a092ee8da72982471@pivotal.io>\n"
},
{
"from": "human",
"value": "Spree::ProductsHelper.module_eval do\n def cache_key_for_products\n count = @products.coun... | ruby | chosen |
[
{
"from": "system",
"value": "Fix caching of photo pagination\n"
},
{
"from": "human",
"value": "class PhotosController < ApplicationController\n caches_action :index, :show, :tagged, expires_in: 1.hour, unless: :current_user\n\n before_action :set_title\n before_action :set_photo, only: [:sh... | ruby | chosen |
[
{
"from": "system",
"value": "Add the method for admin to suggest or unsuggest the topics.\n"
},
{
"from": "human",
"value": "class TopicsController < ApplicationController\n\n\tdef index\n\tend\n\n\tdef feed\n\tend\n\n\tdef new\n @topic = Topic.new\n\tend\n\n\tdef create\n @topic = Topic.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove include of Acceptance module\n"
},
{
"from": "human",
"value": "require \"integration_helper\"\n\nfeature \"adding evidence to a fact\", type: :request do\n include Acceptance\n include Acceptance::FactHelper\n\n background do\n @user = sign_in_user Fac... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify tests for older test/unit\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nSyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter\n\nclass HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase\n def test_highlight_default\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove failing tests until PrintableIvrCallDetails issues are resolved\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Queri::Stats::DetailsOfAnsweredCalls::PrintableIvrCallDetails do\n let(:report_class) { Queri::Stats::DetailsOfAnsweredCalls:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dummy config for Aleph URL since we no longer have an Aleph URL\n"
},
{
"from": "human",
"value": "class UserSession < Authlogic::Session::Base\n pds_url \"https://login.library.edu\"\n aleph_url \"http://aleph.library.edu\"\n calling_system \"authpds-nyu\... | ruby | chosen |
[
{
"from": "system",
"value": "Add the command bot to the main file\n"
},
{
"from": "human",
"value": "require \"discordrb/version\"\nrequire \"discordrb/bot\"\n\nmodule Discordrb\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require \"discordrb/version\"\nrequire ... | ruby | chosen |
[
{
"from": "human",
"value": "Create common script for generating acknowledgements plist\n"
},
{
"from": "gpt",
"value": "require 'fileutils'\n\nclass Licences\n\n\tdef self.generateCleanAcknowledgementsPlist(target, path)\n\t\tputs \"Generating acknowledgements with dependencies from \" + target... | ruby | chosen |
[
{
"from": "system",
"value": "Add rack-test as a development dependency (for later)\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'flickr/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake task to use quoted URL values\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n#\n\ndesc \"Fix the images path in the jquery-mobile css files and rename css to erb\"\ntask :\"jquery_mobile_rails_css_fix\" do\n STYLESHEETS_PATH = \"vendor/assets/st... | ruby | chosen |
[
{
"from": "human",
"value": "Update base_path with locale suffix...\n\nA few content items have been saved to the content store which have a\nnon-english locale and no locale specific base_path.\neg. /government/organisations/land-registry/about/equality-and-diversity\nshould have the base_path\n/government... | ruby | chosen |
[
{
"from": "system",
"value": "Update LibreOffice to version 3.5.4\n"
},
{
"from": "human",
"value": "node.default[\"libreoffice\"][\"source\"] = \"http://download.documentfoundation.org/libreoffice/stable/3.5.3/mac/x86/LibO_3.5.3_MacOS_x86_install_en-US.dmg\"\nnode.default[\"libreoffice\"][\"che... | ruby | chosen |
[
{
"from": "system",
"value": "SessionsHelper: Correct and simplify admin? method.\n"
},
{
"from": "human",
"value": "module SessionsHelper\n\n def log_in(user)\n session[:user_id] = user.id\n end\n\n def current_user\n @current_user ||= User.find_by(id: session[:user_id])\n end\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use an optimized build in then homebrew formula\n"
},
{
"from": "human",
"value": "require \"formula\"\n\nclass Kakoune < Formula\n homepage \"https://github.com/mawww/kakoune\"\n head \"https://github.com/mawww/kakoune.git\"\n\n depends_on 'boost'\n depends_on ... | ruby | chosen |
[
{
"from": "system",
"value": "Add end date to periodic payment display\n"
},
{
"from": "human",
"value": "class PeriodicPayment < ActiveRecord::Base\n belongs_to :identity\n validates :periodic_payment_name, presence: true\n \n def display\n result = periodic_payment_name\n if !payment... | ruby | chosen |
[
{
"from": "system",
"value": "Sort checkin times on admin screen.\n"
},
{
"from": "human",
"value": "class Administration::Checkin::TimesController < ApplicationController\n\n before_filter :only_admins\n\n def index\n @recurring_times = CheckinTime.recurring\n @single_times = CheckinTim... | ruby | chosen |
[
{
"from": "system",
"value": "Make frequency lists from non-word attrs as well\n"
},
{
"from": "human",
"value": "require 'rserve'\n\nmodule Rglossa\n module R\n module SearchEngines\n class CwbController < ApplicationController\n\n def query_freq\n query = params[:query... | ruby | chosen |
[
{
"from": "system",
"value": "Remove call to deprecated method 'respond_to?'\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter w... | ruby | chosen |
[
{
"from": "system",
"value": "Add route for user edit\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root \"dashboard#index\"\n get \"/auth/auth0/callback\" => \"auth0#callback\"\n get \"/auth/failure\" => \"auth0#failure\"\n get '/login', to: 'sessions#new', as: :lo... | ruby | chosen |
[
{
"from": "system",
"value": "Use `:format => false` for the other catchall route\n\nThis fixes a Rails 4 compatibility issue. I filed an\nupstream bug for investigation:\n\nhttps://github.com/rails/rails/issues/9654"
},
{
"from": "human",
"value": "Konacha::Engine.routes.draw do\n get '/iframe... | ruby | chosen |
[
{
"from": "system",
"value": "Add \"no business need\" error\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nbegin; require 'rubygems'; rescue LoadError; end\nrequire 'httparty'\n\nmodule Mousetrap\n autoload(:Customer, 'mousetrap/customer')\n autoload(:Plan, '... | ruby | chosen |
[
{
"from": "system",
"value": "Update faraday_middleware dependency to version ~> 0.9.0\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_dependency 'faraday', '~> 0.8.7'\n gem.add_dep... | ruby | chosen |
[
{
"from": "system",
"value": "Add video tag to filter\n"
},
{
"from": "human",
"value": "require 'devise'\nrequire \"rhinobook/engine\"\nrequire \"rhinobook/utils\"\n\nmodule Rhinobook\n\tclass Engine < ::Rails::Engine\n\t\tconfig.to_prepare do\n\t\t\tDevise::SessionsController.layout \"applicat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning about timestamp on specs\n\nThe `#timestamp` was called without specifying an\noption for `null`. In Rails 5, this behavior will change to `null:\nfalse`. Change the schema to use the default on Rails 5.\n"
},
{
"from": "human",
"value": "Act... | ruby | chosen |
[
{
"from": "system",
"value": "Call sort on favorite languages. The expected array is already sorted\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UpdateFavoriteLanguagesTest < ActionController::IntegrationTest\n setup do\n @user = User.first\n @user.favorite_languages ... | ruby | chosen |
[
{
"from": "human",
"value": "guests/atomic: Add tests for docker capability\n\nThis commit adds missing test coverage for the Docker capability on\natomic guests.\n"
},
{
"from": "gpt",
"value": "require_relative \"../../../../base\"\n\ndescribe \"VagrantPlugins::GuestAtomic::Cap::ChangeHostName... | ruby | chosen |
[
{
"from": "system",
"value": "Change null object syntax to spy\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'resume/cli/resume_data_fetcher'\n\nmodule Resume\n module CLI\n RSpec.describe ResumeDataFetcher do\n describe '.fetch' do\n let(:resume_data_filename... | ruby | chosen |
[
{
"from": "human",
"value": "Enable Hashed Storage by default in development mode via seed_fu\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# Enable hashed storage, in development mode, for all projects by default.\nGitlab::Seeder.quiet do\n ApplicationSetting.create_from_de... | ruby | chosen |
[
{
"from": "system",
"value": "Switch back over to the standard def for plywood\n"
},
{
"from": "human",
"value": "class WikiHouse::Config\n def self.machine\n WikiHouse::Laser\n #WikiHouse::Cnc\n end\n def self.sheet\n # WikiHouse::ImperialPlywood1521Sheet\n # WikiHouse::ImperialPl... | ruby | chosen |
[
{
"from": "system",
"value": "Return platform names alongside tags\n"
},
{
"from": "human",
"value": "class Api::V1::TagsController < ApplicationController\n def index\n @tags = Tag.where(\"name ILIKE :search\", search: \"#{params['q']}%\").limit(5).all\n render json: @tags.map(&:name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Put exit message to stderr\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'pathname'\nrequire 'yaml'\n\nagent_catalog_run = Pathname.new('/var/lib/puppet/state/agent_catalog_run.lock')\npuppet_last_run_summary = Pathname.new('/var/lib/puppet/state/l... | ruby | chosen |
[
{
"from": "system",
"value": "Put completed_order_with_promotion factory under test\n\nAll of the other factories are under test. This one should be, too.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'spree/testing_support/factories/order_factory'\n\nRSpec.describe 'order fa... | ruby | chosen |
[
{
"from": "system",
"value": "Reset the column cache after adding default_miq_group_id to tenants\n\nBefore this change, rails was not aware of the column if it was\nadded in the same process that it was queried in.\n\nSpecifically, the column cache is not reset after the `add_column` call;\nso for 20151021... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that shared libraries are loaded even when the path is different\nbetween build and run time (e.g. Heroku).\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'date'\nrequire 'bigdecimal'\nrequire 'rational' unless RUBY_VERSION >= '1.9.2'\n\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Check the collation of each column too\n\nWhen migrating to fix collation, it's possible to accidentally do so\nwithout fixing the columns. Guard against this.\n"
},
{
"from": "human",
"value": "RSpec.shared_examples 'Database Schema' do\n context 'AAF shared imple... | ruby | chosen |
[
{
"from": "system",
"value": "Allow features to be cached throughout run call\n"
},
{
"from": "human",
"value": "require 'cucumber'\n\nmodule Flatware\n module Cucumber\n class Runtime < ::Cucumber::Runtime\n\n attr_accessor :configuration, :loader\n attr_reader :out, :err\n a... | ruby | chosen |
[
{
"from": "human",
"value": "Remove duplicates from sorted array\n"
},
{
"from": "gpt",
"value": "# https://leetcode.com/problems/remove-duplicates-from-sorted-array/\n#\n# Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length... | ruby | chosen |
[
{
"from": "system",
"value": "Remove vestigial rake task inclusion\n"
},
{
"from": "human",
"value": "load 'tasks/babar.rake' if defined? Rake\n\nrequire 'babar/action'\nrequire 'babar/manifest'\n\nmodule Babar\n def self.run\n manifest = Manifest.new changed\n manifest.perform\n manif... | ruby | chosen |
[
{
"from": "system",
"value": "Make default keys look in ENV\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nmodule Bittrex\n class Configuration\n include Singleton\n\n attr_accessor :key, :secret\n\n @@defaults = {\n key: nil,\n secret: nil\n }\n\n def self.d... | ruby | chosen |
[
{
"from": "system",
"value": "Use localhost in a few tests again to ensure coverage.\n"
},
{
"from": "human",
"value": "Shindo.tests('Excon request methods') do\n\n with_rackup('request_methods.ru') do\n\n tests 'one-offs' do\n\n tests('Excon.get').returns('GET') do\n Excon.get('... | ruby | chosen |
[
{
"from": "system",
"value": "Update HHVM to 3.6.0 3.5.1 has been removed from the repo\n"
},
{
"from": "human",
"value": "default[\"hhvm\"][\"package\"][\"name\"] = \"hhvm\"\ndefault[\"hhvm\"][\"package\"][\"version\"] = \"3.5.1~precise\"\n\ndefault[\"hhvm\"][\"package\"][\"url\"] = \"https://... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for layout behaviour when signed out"
},
{
"from": "gpt",
"value": "require 'integration_test_helper'\n\nclass UnauthenticatedRequestsTest < ActionDispatch::IntegrationTest\n\n should \"not display the signed in user details when not present\" d... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for url in options\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nrequire_relative './errors.rb'\n\nmodule SteamWeb\n class Endpoint\n attr_reader :url\n attr_reader :method\n attr_reader :params\n\n def initialize(url, method = :g... | ruby | chosen |
[
{
"from": "system",
"value": "Use default assertion message even with nil arg\n"
},
{
"from": "human",
"value": "module Nanotest\n extend self\n\n @@failures, @@dots = [], []\n\n def assert(msg=\"assertion failed\", file=nil, line=nil, &block)\n unless block.call\n file ||= caller.fir... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code blocks of document\n"
},
{
"from": "human",
"value": "require 'jsonl/version'\nrequire 'json'\n\nmodule JSONL\n module_function\n\n # Generate a string formatted as JSONL from an array.\n #\n # ==== Attributes\n #\n # * +objs+ - an array consists of o... | ruby | chosen |
[
{
"from": "human",
"value": "Add Stats wrapper class from main rad project.\n"
},
{
"from": "gpt",
"value": "module Stats\n def self.increment(*args)\n client.increment(*args) if key\n end\n\n def self.gauge(*args)\n client.gauge(*args) if key\n end\n\n def self.client\n $statsd ||... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test file for BMFF::Box::TimeToSample.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:\n\nrequire_relative '../../minitest_helper'\nrequire 'bmff/box'\nrequire 'stringio'\n\nclass TestBMFFB... | ruby | chosen |
[
{
"from": "system",
"value": "Correct domain check when determining release version\n\nThe url that Heroku posts is not .org/.com as I assumed\"\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'uri'\nrequire 'net/http'\nrequire 'json'\n\nclass Travis::Web::SentryDeployHook < Sinatr... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.