conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix Validations in User Model for Authentication\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_secure_password\n\n has_many :comments\n has_many :votes\n has_many :responses\n has_many :questions\n\n validates :name, presence: true\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove captcha writer from User.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n attr_accessor :captcha\n\n before_save { email.downcase! }\n before_save { self.admin = false if admin.nil? }\n before_save { self.locked = true if locked.nil? ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove N+1 query on booking request slots\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass User < ActiveRecord::Base\n PENSION_WISE_API_PERMISSION = 'pension_wise_api_user'\n BOOKING_MANAGER_PERMISSION = 'booking_manager'\n ADMINISTRATOR_P... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations for phone number and time zone.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and\n devise :omniauthable, :omniauth_providers ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove validation rule for BlogCategory slug\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# == Schema Information\n#\n# Table name: blog_categories\n#\n# id :integer not null, primary key\n# name :string(255) de... | ruby | chosen |
[
{
"from": "system",
"value": "Add auth_modes to gateway class, refactor indentation\n"
},
{
"from": "human",
"value": "module Spreedly\n\n class GatewayClass\n\n include Fields\n field :gateway_type, :name, :supported_countries, :homepage\n attr_reader :supported_countries, :payment_me... | ruby | chosen |
[
{
"from": "system",
"value": "Use generic ruby executable call.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2011, Jon Maken\n# License: 3-clause BSD (see project LICENSE file)\n\nmodule RCI\n module Tracers\n class ProcessMonitor\n\n def initialize\n # FIXME ensure :name m... | ruby | chosen |
[
{
"from": "system",
"value": "Set address on edit not update.\n"
},
{
"from": "human",
"value": "class Spree::Admin::SuppliersController < Spree::Admin::ResourceController\n\n update.before :build_address\n\n def new\n @supplier = Spree::Supplier.new(address_attributes: {country_id: Spree::... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning for ActiveRecord 3"
},
{
"from": "human",
"value": "require \"active_record\"\n\nmodule PgSearch\n def self.included(base)\n base.send(:extend, ClassMethods)\n end\n\n module ClassMethods\n def pg_search_scope(name)\n named_s... | ruby | chosen |
[
{
"from": "system",
"value": "Add a counter for the number of checks made.\n\nCount the number of checks made in the loop. Added an ensure section\nprint some stats of the watch session to the user.\n"
},
{
"from": "human",
"value": "require \"scorebutt/version\"\nrequire \"scorebutt/watcher\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the needs Rake task authenticating with the Publishing API\n\n- We were instantitating a new one without a token and it was working\n fine in dev, but it failed on Integration, so use the already set up\n `Services.publishing_api` for it, adjusting the timeout option as b... | ruby | chosen |
[
{
"from": "system",
"value": "Load Auth details from ENV\n"
},
{
"from": "human",
"value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = 'abcdefgh12345678pan'\n config.oauth_secret = 'secret'\n config.oauth_root_url = Plek.current.find(\"signon\")\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Check validation before request API\n"
},
{
"from": "human",
"value": "module Einvoice\n module Client\n class Neweb < API\n def initialize\n connection.use Faraday::Request::UrlEncoded\n connection.use Faraday::Request::DigestNeweb :neweb, cl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix configuration insertion with Thinking Sphinx v4.2.\n\nThe new config preparation callback in Thinking Sphinx's Railtie was overwriting the saved settings from Flying Sphinx, and thus the non-localhost connection and specific port were being forgotten. So, now we've got the ... | ruby | chosen |
[
{
"from": "human",
"value": "Add redis key mapper helper\n"
},
{
"from": "gpt",
"value": "module ApiRequestLogger\n module Helpers\n module RedisKeyMapper\n class << self\n def everydays_request_set\n [redis_namespace, \"requests\", Data.today.strftime('%Y%m%d')].compact... | ruby | chosen |
[
{
"from": "system",
"value": "Add prev_event, find_prev_event helper methods\n\nThought I’d need it to implement cross-bar dotting, but actually got it\nto work using process attributes\n"
},
{
"from": "human",
"value": "module Lydown::Rendering\n class Base\n def initialize(event, context, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix enum generator ('attributes' must always be passed)"
},
{
"from": "human",
"value": "module EnumerateIt\n module Generators\n class EnumGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n argument :... | ruby | chosen |
[
{
"from": "system",
"value": "Address Andrey's review comment for using underscore instead of camelcase for postReq variable\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule XClarityClient\n class DiscoverRequestManagement < XClarityBase\n\n include XClarityClient::ManagementMixin... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for JavaInput duplicating data\n"
},
{
"from": "human",
"value": "module RackJetty\n class JavaInput\n def initialize(input)\n @input = input\n end\n \n # reads count bytes into into_buffer, returns nil at EOF, otherwise\n # returns into_buf... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compatibility with Rails < 3.2\n"
},
{
"from": "human",
"value": "module RequestStore\n class Railtie < ::Rails::Railtie\n initializer \"request_store.insert_middleware\" do |app|\n app.config.middleware.insert_after ActionDispatch::RequestId, RequestSt... | ruby | chosen |
[
{
"from": "system",
"value": "Increase default request timeout to 30 s\n"
},
{
"from": "human",
"value": "module Userbin\n class << self\n def configure(config_hash=nil)\n if config_hash\n config_hash.each do |k,v|\n config.send(\"#{k}=\", v)\n end\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a TemplateProfileRegistry for mapping profile type names to urls and vice versa based on a URL template\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nmodule Yaks\n # RFC6906 The \"profile\" link relation http://tools.ietf.org/search/rfc6906\n cla... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing unit tests for the MainBlock\n\n(ActionItem2914)\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass MainBlockTest < ActiveSupport::TestCase\n\n should 'describe itself' do\n assert_kind_of String, MainBlock... | ruby | chosen |
[
{
"from": "system",
"value": "[api] Allow especially overriden attribute setters for line items\n\nFixes #2916\n"
},
{
"from": "human",
"value": "module Spree\n module Api\n class LineItemsController < Spree::Api::BaseController\n respond_to :json\n\n def create\n authorize!... | ruby | chosen |
[
{
"from": "system",
"value": "Put card setup stuff into its own before_filter instead of overriding\n"
},
{
"from": "human",
"value": "require 'card_reuse'\n\nmodule Spree\n CheckoutController.class_eval do\n include CardReuse\n\n private\n\n def before_payment\n current_order.pay... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to avoid breaking changes in cocoalumberjack 2.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CrashlyticsLumberjack\"\n s.version = \"1.0.1\"\n s.summary = \"A Crashlytics Logging->CocoaLumberjack Bridge.\"... | ruby | chosen |
[
{
"from": "system",
"value": "Test out unconfigured mail sending\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SGMailerTest < Minitest::Test\n def test_configuration_setups_a_client_with_api_key\n api_key = 'xxx'\n\n SGMailer.configure(api_key: api_key)\n\n assert_e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicated unique index name.\n"
},
{
"from": "human",
"value": "require 'active_record/scoping/default'\nrequire 'active_record/scoping/named'\nrequire 'active_record/base'\n\nmodule ActiveRecord\n class SchemaMigration < ActiveRecord::Base\n attr_access... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rescue problem on ApplicationController\n"
},
{
"from": "human",
"value": "class Ckeditor::ApplicationController < ActionController::Base\n respond_to :html, :json\n layout 'ckeditor/application'\n\n before_filter :find_asset, :only => [:destroy]\n before_fi... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct path to the CSS/JS.\n"
},
{
"from": "human",
"value": "module SpreeGiftCard\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n def add_javascripts\n append_file \"vendor/assets/javascripts/spree/frontend/all.js\", ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for key presence on redis more efficiently\n"
},
{
"from": "human",
"value": "require_relative 'adapter'\n\nmodule Moltrio\n module Config\n class SingleRedisAdapter < Adapter\n attr_reader :prefix\n def initialize(config, prefix)\n @redis... | ruby | chosen |
[
{
"from": "system",
"value": "Add a guard around checking if response is Hashie\n\nWe should only be returning the hash error if the response given is a Hashie::Rash. Otherwise it's probably a non-JSON response and will just be a string"
},
{
"from": "human",
"value": "module Tugboat\n class Au... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests for latest esperanto\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/power_assert'\n\nrequire 'esperanto'\n\nclass TestEsperanto < MiniTest::Test\n def test_to_amd\n source = <<-JS\nexport default 'hi';\n JS\n\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Make activate console expiry link use local_time\n"
},
{
"from": "human",
"value": "module Brightbox\n desc 'Activate the console service for one or more servers'\n arg_name 'server-id...'\n command [:activate_console] do |c|\n\n c.action do |global_options,op... | ruby | chosen |
[
{
"from": "human",
"value": "Add regional statistics view calculating stats from countries\n"
},
{
"from": "gpt",
"value": "class AddRegionalStatisticsView < ActiveRecord::Migration[5.0]\n def up\n execute \"DROP VIEW IF EXISTS regional_statistics_view\"\n execute \"CREATE VIEW regional_s... | ruby | chosen |
[
{
"from": "system",
"value": "Use BigDecimal for rate_adjustment calculation\n\nFloat has insufficient precision. Already 1024**-3 causes problems.\n"
},
{
"from": "human",
"value": "class ChargebackRateDetailMeasure < ApplicationRecord\n serialize :units, Array\n serialize :units_display, Arr... | ruby | chosen |
[
{
"from": "system",
"value": "Add lifecycle actions, provisional_values, and errors to AssertionDetailPresenter\n"
},
{
"from": "human",
"value": "class AssertionDetailPresenter < AssertionIndexPresenter\n def as_json(opts = {})\n super.merge(\n {\n gene: {name: assertion.gene.na... | ruby | chosen |
[
{
"from": "system",
"value": "Add current_user argument to page data service method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule PageData\n class ForumPostsShowService\n def self.exec(page_params)\n new.exec(page_params)\n end\n\n def exec(page_params... | ruby | chosen |
[
{
"from": "system",
"value": "Add an arbitrary URL matcher for Cucumber path_to\n"
},
{
"from": "human",
"value": "module NavigationHelpers\n def path_to(page_name)\n case page_name\n\n when 'the homepage'\n root_path\n\n when /^the ([\\w ]+) page$/\n send(\"#{$1.gsub(/\\W+/,... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for alphanumeric collectd version numbers\n\nSome PPA packages currently report their version as\n5.x.x.git\n"
},
{
"from": "human",
"value": "# Fact: collectd_version\n#\n# Purpose: Retrieve collectd version if installed\n#\n# Resolution:\n#\n# Caveats: not ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace @issue/@pull variables with methods\n"
},
{
"from": "human",
"value": "module Issuehub\n class IssueSelector\n\n def initialize(client, repository)\n @client = client\n @repository = repository\n end\n\n attr_reader :targets\n\n def re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix strong params issue on email templates\n"
},
{
"from": "human",
"value": "class Admin::EmailTemplatesController < ApplicationController\n before_filter :check_valid_user\n layout 'qe.admin'\n \n def index \n @email_templates = EmailTemplate.order('name')\... | ruby | chosen |
[
{
"from": "system",
"value": "Move user timestamp to end\n"
},
{
"from": "human",
"value": "module Octonaut\n module Printers\n module Users\n\n USER_FIELDS = {\n \"id\" => \"ID\",\n \"created_at\" => \"JOINED\",\n \"login\" => \"LOGIN\",\n \"nam... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit date from gemspec\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path('../VERSION', __FILE__)).strip\n\nGem::Specification.new do |gem|\n gem.name = 'timerizer'\n gem.version = version\n gem.date = '2012-09-22... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests about unit price inside a shopfront\n\n - Test that the unit price wrapper is here\n - Click on the question mark icon and display the tooltip\n - Click outside the question mark icon and hide the toolip\n"
},
{
"from": "gpt",
"value": "require 'spec_helper... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to fix bungled earlier custom rate limit migration.\n\nValidations weren't being applied, so the rate limits transferred over\ndidn't have accuracy settings.\n"
},
{
"from": "gpt",
"value": "class FixCustomRateLimits < Mongoid::Migration\n def self.up\... | ruby | chosen |
[
{
"from": "system",
"value": "Add refresh method in GetGpa\n"
},
{
"from": "human",
"value": "module CodeclimateCi\n class GetGpa\n RETRY_COUNT = ENV['RETRY_COUNT'] || 3\n SLEEP_TIME = ENV['SLEEP_TIME'] || 5\n\n def initialize(codeclimate_api, branch)\n @codeclimate_api, @branch =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix progress bar ETA calculation\n\nDon’t calculate ETA until we’re ready to start real work\n"
},
{
"from": "human",
"value": "require 'ruby-progressbar'\n\nmodule SyncChecker\n class SyncCheck\n attr_reader :document_checks, :hydra, :failures, :mutex\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Allow integize to output negative integers\n"
},
{
"from": "human",
"value": "require \"httparty\"\n\nmodule MetricsHelper\n\n def store_metric(name, datetime, data)\n\n url = \"#{ENV['METRICS_API_BASE_URL']}metrics/#{name}\"\n\n json = {\n name: name,\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure ActiveRecord::Base is defined before attempting to extend.\n"
},
{
"from": "human",
"value": "require 'event_calendar'\nrequire 'event_calendar/calendar_helper'\nrequire 'rails'\n\nmodule EventCalendar\n class Railtie < Rails::Engine\n initializer :aft... | ruby | chosen |
[
{
"from": "system",
"value": "Use Mashify instead of Rashify\n\nSince Rashify changes key values, which breaks certain email"
},
{
"from": "human",
"value": "require 'faraday_middleware'\nrequire 'faraday/request/gateway'\nrequire 'faraday/response/fullcontact_errors'\n\n\nmodule FullContact\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a silly mistake for truffleruby\n"
},
{
"from": "human",
"value": "require 'ripper'\nrequire 'hamlit/ruby_expression'\n\nmodule Hamlit\n module StringSplitter\n # `code` param must be valid string literal\n def self.compile(code)\n unless Ripper.resp... | ruby | chosen |
[
{
"from": "system",
"value": "Bring back straight markdown code blocks\n\nPartially reverts ed2455e.\n\nGitHub code blocks will only be used if the language\nis specified (may be '').\n"
},
{
"from": "human",
"value": "module MdInc\n module Commands\n public :instance_eval\n\n class << se... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with Too many open files in system\n\nIn our system we had an error 'too many open files in system', and it wasn't pushed to the honeybadger server because it was raisen in exceptional tracker. It's possible to catch Errno::ENFILE and prevent from raising an error whi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using Github-like web hooks payload with services\nother than Github (like Beanstalk). If payload has \"uri\"\nattribute with repository URI, Integrity will use it instead of\nhardcoded github URI.\n\nSigned-off-by: Simon Rozet <088e16a1019277b15d58faf0541e11910eb756f6@ro... | ruby | chosen |
[
{
"from": "system",
"value": "Remove declaration about OS X compatibility from podspec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n \n s.name = 'POSHockeyAppExtension'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'Plugin to HockeyApp SDK for t... | ruby | chosen |
[
{
"from": "system",
"value": "Rename parse to build_source, new parse method invokes Parse class\n"
},
{
"from": "human",
"value": "class Manifestation\n class Generate\n attr_accessor :source\n\n def initialize file\n @file = file\n @source = parse @file\n end\n\n def c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where the internal connections has was always being reset"
},
{
"from": "human",
"value": "module PivotalTracker\n class Client\n \n class NoToken < StandardError; end\n\n class << self\n attr_writer :use_ssl, :token\n\n def use_ssl\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add temporary alias for router:register\n\nthis will make it easier to merge/deploy these changes as we won't need\nto coordinate these with changes to alphagov-deployment\n"
},
{
"from": "human",
"value": "require 'logger'\nrequire 'gds_api/publishing_api'\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper code renderer as per new Kato version\n"
},
{
"from": "human",
"value": "require 'kato/cli/version'\nrequire 'kato'\n\nmodule Kato\n module Cli\n def Cli.post(user, message, room, options)\n if options[:renderer] == :code\n options[:render... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to avoid deprecation message\n"
},
{
"from": "human",
"value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # The test environment is used exclusively to run your application's\n # ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for extended status for manual actions\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Status::Build::Action do\n let(:status) { double('core status') }\n let(:user) { double('user') }\n\n subject do\n described_class.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Change migration to \"short-hand\" method\n"
},
{
"from": "human",
"value": "class CreateProducts < ActiveRecord::Migration\n def change\n \tcreate_table :products do |t|\n\t\tt.string :title\n\t\tt.text :description\n\t\tt.decimal :price\n\t\tt.decimal :size\n\t\... | ruby | chosen |
[
{
"from": "human",
"value": "Drop crono jobs migration file\n"
},
{
"from": "gpt",
"value": "class DropCronoJobs < ActiveRecord::Migration\n def change\n drop_table :crono_jobs do |t|\n t.string :job_id, null: false\n t.text :log\n t.datetime :last_performed_at\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the Chef 11 compatibility check in chef_gem\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: xml\n# Recipe:: ruby\n#\n# Author:: Joseph Holsten (<joseph@josephholsten.com>)\... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify component test stubbing controller path\n\nThis is possible due to the changes in commit 6df7f7d05.\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\ndescribe Shared::AdvancedSearchComponent, type: :component do\n let(:component) { Shared::Adv... | ruby | chosen |
[
{
"from": "system",
"value": "Update output assertion for environment set specs\n\nThis test was originally written against a KnifeSupport that wasn't\nactually pulling in the instance variables (i.e. :attribute) when\nparsing the data. When running this command manually with Knife\nv12.15.19, I get the out... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to use `filled` macro\n"
},
{
"from": "human",
"value": "RSpec.describe Dry::Validation::Schema, 'defining an option with default value' do\n subject(:schema) do\n Dry::Validation.Schema do\n configure do\n option :db, -> { DB }\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust expected mutation to unparser change\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mutant::Mutator::Node::Literal, 'float' do\n let(:source) { '10.0' }\n\n let(:mutations) do\n mutations = []\n mutations << 'nil'\n mutations ... | ruby | chosen |
[
{
"from": "system",
"value": "Check that timezone is set to the current value of the tz attribute\n"
},
{
"from": "human",
"value": "require 'minitest/spec'\n\nclass TimezoneIiSpec < MiniTest::Chef::Spec\n\n describe_recipe 'timezone-ii::default' do\n localtime_path = '/etc/localtime'\... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the admin feature page object.\n"
},
{
"from": "human",
"value": "require_relative 'page'\n\nclass Features::Pages::AdminPage < Features::Pages::Page\n def submit_with(first_name, last_name, email, password = nil)\n fill_in 'admin[first_name]', with: fi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix encoding issue on Windows\n"
},
{
"from": "human",
"value": "# Copyright (c) 1997-2016 The CSE Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license\n# that can be found in the LICENSE file.\nrequire('open3')\n\nmodule Comma... | ruby | chosen |
[
{
"from": "system",
"value": "Use the ActiveModel::Naming module the way it's intended\n\nTechnically, for rails compatibility alone, it should\nbe sufficient to simply provide a .model_name method\nfor DataMapper::Resource objects. I think that's the\nreason why our previous code worked and actually still\... | ruby | chosen |
[
{
"from": "system",
"value": "Use deprecated matcher as long as we use old libraries\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe package('php5-fpm') do\n it { should be_installed }\nend\n\ndescribe command('monit summary | grep php5-fpm') do\n it { should return_exit_s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake tasks from being invoked twice\n\n[#1792 state:resolved]\n"
},
{
"from": "human",
"value": "module SpreeSite\n class Engine < Rails::Engine\n def self.activate\n # Add your custom site logic here\n end\n config.to_prepare &method(:activate).t... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant references to REXML"
},
{
"from": "human",
"value": "require 'rexml/document'\nrequire 'nokogiri'\ninclude REXML\n\n# <message>\n# <to>$TO</to>\n# <body>$BODY</body>\n# </message>\n\nmodule Esendex\n class Message\n attr_accessor :to, :b... | ruby | chosen |
[
{
"from": "system",
"value": "Modify search funtions in Engine::Linux\n\nInsensitiveSearch::Engine::Linux\n----\n\n- #search\n - Move the process to split path_source into #search_start.\n - Pass its argument to #search_start.\n- #search_start\n - Change the argument.\n - Add the process to split path_s... | ruby | chosen |
[
{
"from": "system",
"value": "Add a document method on WebContentItems\n"
},
{
"from": "human",
"value": "fields = %i{\n id\n analytics_identifier\n content_id\n description\n details\n document_type\n first_published_at\n last_edited_at\n need_ids\n phase\n public_updated_at\n publi... | ruby | chosen |
[
{
"from": "system",
"value": "Add webmock and vcr development dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/expedia/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Zack Hovatter\"]\n gem.email ... | ruby | chosen |
[
{
"from": "human",
"value": "Introduce BaseUploader with common store_dir for all uploaders\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nclass BaseUploader < CarrierWave::Uploader::Base\n\n # Include RMagick or MiniMagick support:\n # include CarrierWave::RMagick\n # include CarrierW... | ruby | chosen |
[
{
"from": "system",
"value": "Load MRI extension from installed path.\n"
},
{
"from": "human",
"value": "require 'rbconfig'\n\nmodule Looksee\n module Adapter\n autoload :Base, 'looksee/adapter/base'\n autoload :MRI, File.dirname(__FILE__) + \"/../../ext/mri/mri.#{Config::CONFIG['DLEXT']}... | ruby | chosen |
[
{
"from": "system",
"value": "Add new attributes influenced by lastfm\n"
},
{
"from": "human",
"value": "module Metamuse\n class Artist\n include InstanceInitialize\n extend Association\n has_many :albums, Album\n\n attr_accessor :name, :echonest_id, :freebase_guid, :mbid\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up stray puts statement\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Mongoid #:nodoc\n module Indexes #:nodoc\n extend ActiveSupport::Concern\n included do\n cattr_accessor :index_options\n self.index_options = {}\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Create error/success handlers for QuarkChannel\n"
},
{
"from": "human",
"value": "class QuarkChannel < ApplicationCable::Channel\n def subscribed\n stream_from 'quark:global'\n stream_from \"quark:#{self}\"\n end\n\n def create(data)\n return unless curr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix required_ruby_version 1.9.3 => 2.2.0 in gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"webpacker/version\"\n\nGem::Specification.new do |s|\n s.name = \"webpacker\"\n s.version = Webpacker::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Apply the same fix in SHA: 61457e1c1b to safe_meta_def\"\n\nThis reverts commit c054728227675803017555488b4a2e7009359d09.\n"
},
{
"from": "human",
"value": "class Object\n def safe_meta_def method_name, &block\n metaclass.remember_original_method(method... | ruby | chosen |
[
{
"from": "human",
"value": "Add PDF Form Filler base class\n\nAdd PDF Form Filler base model that delegates the task of filling out specific fields to subclass models corresponding to PDF templates.\n"
},
{
"from": "gpt",
"value": "class FillablePdfForm\n attr_writer :template_path\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 1.6.2\n"
},
{
"from": "human",
"value": "Pod::Spec.new do | s |\n s.name = 'ActionSheetPicker-3.0'\n s.version = '1.6.1'\n s.summary = 'Better version of ActionSheetPicker with support iOS7 and other improvements.'\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Add an example test for kitchen\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n#\nrequire 'spec_helper'\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n#\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "ENHANCE: Check whether Activity type can be destroyed\n"
},
{
"from": "human",
"value": "class ActivityType < ActiveRecord::Base\n # Relationships\n has_many :unit_activity_sets\n\n validates :name, presence: true\n validates :abbreviation, presence: tru... | ruby | chosen |
[
{
"from": "system",
"value": "Check to make sure the loan is in a requested state before sending out\nthe notification\n"
},
{
"from": "human",
"value": "class LoanObserver < ActiveRecord::Observer\n\tdef after_create(loan)\n\t\tLoanNotifier.deliver_request_notification(loan)\n\tend\n\n\tdef aft... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for reflected repo content\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'CXAlertView'\n s.version = '1.0.1'\n s.summary = 'Custom alertView which allow you to add view as main content.'\n s.homepage = 'h... | ruby | chosen |
[
{
"from": "human",
"value": "Add day 01: Count Parens\n"
},
{
"from": "gpt",
"value": "puts ARGF.each_char.with_index.with_object([0]) { |(char, idx), answer|\n next if char == \"\\n\"\n answer[0] += char == ?( ? 1 : -1\n answer[1] ||= idx + 1 if answer[0] == -1\n}\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec to development dependency list\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nasdaq_scraper/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow guests to look up order with their email\n"
},
{
"from": "human",
"value": "Spree::OrdersController.class_eval do\n\n def check_authorization\n session[:access_token] = params[:token] if params[:token]\n order = Spree::Order.find_by_number(params[:id]) ... | ruby | chosen |
[
{
"from": "system",
"value": "Update a dev dependency: reek\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'json2/version'\n\nGem::Specification.new do |spec|\n spec.name =... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to use Cuba 2.0, Hashie 1.0.\n"
},
{
"from": "human",
"value": "# gem build *.gemspec\n# gem push *.gem\n#\nrequire \"./lib/hyde/version\"\nGem::Specification.new do |s|\n s.name = \"hydeweb\"\n s.version = Hyde.version\n s.summary = \"Website prep... | ruby | chosen |
[
{
"from": "system",
"value": "Update the version of Sass to be 3.4.x\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jekyll-sass-converter/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add cookie javascript to asset precompile\n\nepimorphics/hmlr-linked-data#20\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expir... | ruby | chosen |
[
{
"from": "system",
"value": "Change logger.debug to logger.info for see in the production.log the response of fb\n"
},
{
"from": "human",
"value": "module Facebook\n class OpenGraph\n\n FB_URL = 'https://graph.facebook.com/me/oigameapp:sign'\n ACTIONS = {\n :fax => :send,\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.