conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add clearer requirement on concurrent-ruby\n"
},
{
"from": "human",
"value": "require_relative \"lib/sentry/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"sentry-ruby\"\n spec.version = Sentry::VERSION\n spec.authors = [\"Sentry Team... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for statistics controller routes\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe StatisticsController do\n let(:user) { FactoryBot.create(:admin) }\n before(:each) { allow(controller).to receive(:current_user).and_return(user) }\n\n [... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning during migrate about timestamps\n\nThis warning occurs when you tried to rake:db migrate in a rails 4.2\napplication. It's a deprecation warning for upcoming rails 5, a null\noption need to be given :\n\nDEPRECATION WARNING: `#timestamp` was called wi... | ruby | chosen |
[
{
"from": "system",
"value": "Bump Ruby version to 1.0.3.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"date\"\n\nGem::Specification.new do |s|\n s.name = \"open-locatio... | ruby | chosen |
[
{
"from": "system",
"value": "Use supported Rails methods for finding all events\n"
},
{
"from": "human",
"value": "module RailsEventStore\n module Repositories\n class EventRepository\n\n def initialize\n @adapter = ::RailsEventStore::Models::Event\n end\n attr_reader ... | ruby | chosen |
[
{
"from": "system",
"value": "Include 'rails_helper' in home page spec\n"
},
{
"from": "human",
"value": "RSpec.feature 'Home page' do\n scenario 'visit the home page' do\n visit root_path\n expect(page).to have_content 'Hello, world!'\n end\nend\n"
},
{
"from": "gpt",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.3.1.2 to 2.3.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.3.1.2'\n s.descri... | ruby | chosen |
[
{
"from": "system",
"value": "Add markers/ and spec/ files to gemspec"
},
{
"from": "human",
"value": "require './lib/smappy'\n\nGem::Specification.new do |s|\n s.name = \"smappy\"\n s.version = Smappy::VERSION\n \n s.summary = \"Generate static maps.\"\n s.description = \"Ge... | ruby | chosen |
[
{
"from": "system",
"value": "Remove N+1 validation for encrypted attributes\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActiveRecord\n module Encryption\n module ExtendedDeterministicUniquenessValidator\n def self.install_support\n ActiveRecord::Va... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up spec for Mapper.from\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mapper, '.from' do\n subject { described_class.from(other, name) }\n\n let(:model) {\n mock_model(:TestModel)\n }\n\n let(:other) {\n model_class = model\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename path variable to prefix.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'socket'\n\nhostname = `hostname -s`.chomp!\n\nhost = config[:host] || 'localhost'\nport = config[:port] || '2003'\npath = config[:path] || hostname\n\nsocket = TCPSocket.... | ruby | chosen |
[
{
"from": "system",
"value": "Update date name of spec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.module_name = 'UIViewAppearanceSwift'\n s.name = 'UICommon'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'Common UIViewAppearanceSwift @levantAJ team'\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert the individual touches for grouped associations.\n"
},
{
"from": "human",
"value": "module ActiveTouch\n class TouchJob < ActiveJob::Base\n\n def perform(record, association, after_touch)\n if association == 'self'\n associated = record\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference to Webpage class\n"
},
{
"from": "human",
"value": "require 'cortex/snippets/webpage'\nrequire 'addressable/uri'\n\nmodule Cortex\n module Snippets\n class Client\n def initialize(cortex_client)\n @cortex_client = cortex_client\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Interface.define to accept fields\n"
},
{
"from": "human",
"value": "module GraphQL\n # An Interface contains a collection of types which implement some of the same fields.\n #\n # Interfaces can have fields, defined with `field`, just like an object type.\... | ruby | chosen |
[
{
"from": "system",
"value": "Change minitest require into minitest/spec\n"
},
{
"from": "human",
"value": "require 'minitest'\n\nmodule Rohbau\n module ItBehavesLike\n\n def get_shared_example(spec)\n shared_specs_namespace::SharedSpec.get(spec)\n end\n\n def it_behaves_like(spec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the bug with the Saasable::SaasDocument reloading with a different address."
},
{
"from": "human",
"value": "module Saasable::SaasDocument\n @saas_document = nil\n \n def self.included klass\n if @saas_document and @saas_document != klass\n raise Saas... | ruby | chosen |
[
{
"from": "human",
"value": "Use rake task to fetch images instead of db seed script\n"
},
{
"from": "gpt",
"value": "$image_types = ['ccam_images', 'fcam_images', 'rcam_images', 'ncam_images', 'mastcam_left_images', 'mastcam_right_images', 'mahli_images', 'mardi_images']\n\n\ndef get_images_for... | ruby | chosen |
[
{
"from": "system",
"value": "Add post install message to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"guard/annotate/version\"\n\nGem::Specification.new do |s|\n s.name = \"guard-annotate\"\n s.version ... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple get integration spec\n"
},
{
"from": "gpt",
"value": "describe \"snmpjr\" do\n\n describe 'GET' do\n it \"can perform a simple synchronous get request on an snmp agent\" do\n snmp = Snmpjr.new(:host => 'demo.snmplabs.com', :port => 161, :community... | ruby | chosen |
[
{
"from": "system",
"value": "Add create action for answers\n"
},
{
"from": "human",
"value": "class AnswersController < ApplicationController\n\n def create\n\n end\n\n def show\n\n end\n\n def edit\n\n end\n\n def update\n\n end\n\n def destroy\n\n end\n\nend"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Move default order to BookingTemplate.\n"
},
{
"from": "human",
"value": "class SalaryBookingTemplate < BookingTemplate\n default_scope order(:code)\n\n # Obligation flags\n def self.saldo_inclusion_flags\n ['gross_income', 'ahv', 'uvg', 'uvgz', 'ktg', 'deduct... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation and enum specs for event objects\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Event, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require '... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for user logic\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Mumukit::Auth::User do\n describe 'build_metadata' do\n let(:user) { { bibliotheca: 'foo/bar', classroom: 'foo/baz' }.stringify_keys }\n let(:auth0) { double('auth0') }... | ruby | chosen |
[
{
"from": "system",
"value": "Print generated bytecode, useful for compaing what we produce and what actually generates rbx\n"
},
{
"from": "human",
"value": "module Rubinius\n\n class Compiler\n\n def self.compile_fancy_file(file, output = nil, line = 1, transforms = :fancy)\n compiler... | ruby | chosen |
[
{
"from": "system",
"value": "Add our names and email adresses to the gemspec-file.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"fassets-presentations/version\"\n\n# Describe your gem and declare its dependencies:\... | ruby | chosen |
[
{
"from": "system",
"value": "Verify block is given when adding hook\n"
},
{
"from": "human",
"value": "require 'optparse'\nmodule CLI\n \n module WithOptions\n def cli_options( &block )\n const_set :CLI_OPTS_HOOKS, Array.new unless const_defined? :CLI_OPTS_HOOKS, false\n const_ge... | ruby | chosen |
[
{
"from": "system",
"value": "Replace !! with explicit check for nil\n"
},
{
"from": "human",
"value": "require 'cgi'\nrequire 'reverse_markdown'\nrequire 'sanitize'\n\nclass Numeric\n def megabytes\n self * 1024 * 1024\n end\nend\n\nclass NilClass\n def blank?\n true\n end\nend\n\ncla... | ruby | chosen |
[
{
"from": "system",
"value": "Include RevList error messages in exceptions\n"
},
{
"from": "human",
"value": "# Gitaly note: JV: will probably be migrated indirectly by migrating the call sites.\n\nmodule Gitlab\n module Git\n class RevList\n include Gitlab::Git::Popen\n\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Change success message. Add 'elapsed time' stdout\n"
},
{
"from": "human",
"value": "require 'time'\n\nmodule SrtShifter\n\tclass Subtitle\n\t\t\n\t\tdef initialize(options)\n\t\t\t@opts = options\n\t\tend\n\n\t\tdef shift\n\n\t\t\toutput_file = File.open(@opts[:out... | ruby | chosen |
[
{
"from": "system",
"value": "Make Users use friendly url params\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n\n\n\tbefore_save { self.email = email.downcase }\n\tbefore_create :create_remember_token\n\tattr_accessor :twitter_id, :facebook, :linkedin, :location\n\n\tvalida... | ruby | chosen |
[
{
"from": "system",
"value": "Add the minitest support files to the gemspec\n\nThe gem does not include the two files added for 1.7.0 with minitest_spec\nsupport. This change remedies that.\n\n% diff -u \\\n <(gem contents fixture_dependencies -v 1.7.0 --no-prefix) \\\n <(gem contents fixture_dependencie... | ruby | chosen |
[
{
"from": "system",
"value": "Change redirect port to avoid Vault's cluster default.\n"
},
{
"from": "human",
"value": "require 'webrick'\nrequire 'uri'\n\nmodule RSpec\n class RedirectServer < WEBrick::HTTPServlet::AbstractServlet\n def service(req, res)\n res['Location'] = URI.join(Va... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec, adding license and semantic dependencies\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"money-historical-bank\"\n s.version = \"0.0.4\"\n s.date = Time.now.utc.strftime(\"%Y-%m-%d\")\n s.homepage = \"http://github.com/... | ruby | chosen |
[
{
"from": "system",
"value": "Add convenience method for :imported?\n"
},
{
"from": "human",
"value": "class Domain < ActiveRecord::Base\n has_many :domain_admin_roles\n has_many :admins, :through => :domain_admin_roles, :source => :user\n has_many :org_units\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Add video as attr_accessible for Lesson\n\nUpdate the Lesson model to make the video attribute as attr_accessible.\n"
},
{
"from": "human",
"value": "class Lesson < ActiveRecord::Base\n attr_accessible :background, :free, :title\n\n validates :title, :presenc... | ruby | chosen |
[
{
"from": "system",
"value": "Order divisions by name for lottery results export\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nif lottery.entrants.exists?\n ::CSV.generate do |csv|\n csv << [\"Results for #{lottery.name}\"]\n\n lottery.divisions.each do |division|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Test our files can be sorted with Jekyll's static files\n"
},
{
"from": "gpt",
"value": "require 'support/test_case'\nrequire 'support/fixture_config'\nrequire 'jekyll/minibundle/development_file_collection'\nrequire 'jekyll/minibundle/bundle_file'\nrequire 'jekyll/m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for broken JSON.dump call.\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule Aws\n # @api private\n module Json\n\n autoload :Builder, 'aws-sdk-core/json/builder'\n autoload :ErrorHandler, 'aws-sdk-core/json/error_handler'\n autoload :Handle... | ruby | chosen |
[
{
"from": "human",
"value": "Add trivial benchmarks to gauge cost of logging\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'benchmark'\nrequire 'analytics'\nrequire 'thwait'\n\nraise \"No Analytics Key Provided\" unless ENV['GA_TRACK... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for HostContextMethods module\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Nymphia::DSL::Context::HostContextMethods do\n class Anonymous\n include Nymphia::DSL::Context::HostContextMethods\n\n def initialize\n @result = {... | ruby | chosen |
[
{
"from": "system",
"value": "Update and loosen resque version requirements.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'resque/plugins/job_logger/version'\n\nGem::Spec... | ruby | chosen |
[
{
"from": "system",
"value": "Update cask to latest version.\n\nSee https://twitter.com/pornelski/status/336639773382950913\n"
},
{
"from": "human",
"value": "class Imageoptim < Cask\n url 'http://imageoptim.com/ImageOptim.tbz2'\n homepage 'http://imageoptim.com/'\n version '1.4.0'\n sha1 '2... | ruby | chosen |
[
{
"from": "system",
"value": "Vagrant127: Add name, update license and homepage"
},
{
"from": "human",
"value": "cask :v1 => 'vagrant127' do\n version '1.2.7'\n sha256 '75c720eda0cbe6b2a2b19e38757ba4c34fbc57095ab4cc1459609bd242418129'\n\n url \"http://files.vagrantup.com/packages/7ec0ee1d00a9... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug - undefined variable 'website'\n"
},
{
"from": "human",
"value": "module Recurring\n class MyTask\n require 'nokogiri'\n require 'open-uri'\n include Delayed::RecurringJob\n run_every 1.day\n run_at '12:00pm'\n timezone 'UTC'\n def perf... | ruby | chosen |
[
{
"from": "system",
"value": "Split a class variable declaration\n\nIt was too long\n"
},
{
"from": "human",
"value": "require \"remindice/version\"\nrequire \"thor\"\n\nmodule Remindice\n TASK_FILENAME = File.expand_path(\"~/.reamindice_tasks\")\n\n class << self\n def tasks\n @@tasks... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up display name when sending emails\n"
},
{
"from": "human",
"value": "class ContactMailer < ActionMailer::Base\n default from: \"contact@mail.cgbc-nc.com\"\n\n def default_emails\n ['emb1234@gmail.com']\n end\n\n def contact_email(name, email, comment)... | ruby | chosen |
[
{
"from": "system",
"value": "Check for presence of teacher before sending email\n"
},
{
"from": "human",
"value": "class TeacherMailer < ActionMailer::Base\n default from: \"leap@southdevon.ac.uk\"\n\n def email_teacher(teacher, learner, register_event, slot)\n @teacher = teacher\n @lea... | ruby | chosen |
[
{
"from": "system",
"value": "Add some varied postcode tests\n\nBroken postcode test commented out because #134\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n# Compare results of rendering pages via rails and via the old php app\n\ndescribe HomeController do\n include HTMLCompareHel... | ruby | chosen |
[
{
"from": "human",
"value": "Tests: Add tests for the 'Title' component\n\n--------------------------------------------------------------------------------\nBranch: refactor/massive-update\nSigned-off-by: Jeff Felchner <8a84c204e2d4c387d61d20f7892a2bbbf0bc8ae8@thekompanee.com>\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Correct use of CONCAT() in very old migration\n\nIn MySQL, CONCAT() will return NULL if any of the passed in arguments\nare NULL. There are scenarios in which a user might have a first or last\nname but not both. In this case, this migration could be losing data.\n\nInstead, we... | ruby | chosen |
[
{
"from": "system",
"value": "Test class changed due to warning\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n# Tests\nclass HashieMashTest < MiniTest::Unit::TestCase\n def setup\n @mash = Hashie::Mash.new\n end\n\n def test_check_if_not_exist\n assert !@mash.name?\n end\... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic unix test to make sure unix sockets work.\n"
},
{
"from": "gpt",
"value": "require File.expand_path(\"../lib/redic\", File.dirname(__FILE__))\n\nsetup do\n Redic.new(url: \"unix:///tmp/redis.sock\")\nend\n\ntest \"normal commands\" do |c|\n c.call(\"SET\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for dirty cow CVE-2016-5195\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n# Test to ensure image is not vulnerable to CVE-2016-5195\n# Via: https://access.redhat.com/security/vulnerabilities/2706661\n\ndescribe command(\"curl --silent --location ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for the new hash arg to Henson::Settings.new\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Henson::Settings do\n context \"initialize\" do\n it \"defaults quiet to false\" do\n expect(Henson::Settings.new[:quiet]).to be_fa... | ruby | chosen |
[
{
"from": "system",
"value": "Use strings instead of symbols to match the given interface and updated EUR -> USD rate.\n"
},
{
"from": "human",
"value": "describe MoneyConverter do\n\n describe \".config\" do\n\n subject { MoneyConverter.config }\n\n before :each do\n MoneyConverter.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix uninitialized constant error in test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass GemfileParserTest < ActiveSupport::TestCase\n GEMFILE = File.read File.expand_path(\"../fixtures/gemfile\", __dir__)\n\n test \"returns gems status for a g... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature test for the spotcheck page letter\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.feature 'Spotcheck page displays letter to be sent', type: :feature do\n\n include Warden::Test::Helpers\n Warden.test_mode!\n\n let(:user) { create :us... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing test for rendering internal resources.\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'uri'\nrequire 'action_controller'\nrequire 'ventilation/deep_stack'\n\nmodule Ventilation\n module EsiHelper\n\n # Render resource on the edge\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change order of relationships index so pending relationships are at the top\n"
},
{
"from": "human",
"value": "class Admin::RelationshipsController < Admin::BaseController\n def index\n @relationships = Relationship.all\n end\n\n def new\n end\n\n def create... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing controllers to ignore\n"
},
{
"from": "human",
"value": "require \"rails/railtie\"\nrequire \"lograge\"\nrequire \"json_log_format\"\n\nmodule BetterLogging\n class Railtie < Rails::Railtie\n config.better_logging = ActiveSupport::OrderedOptions.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Move the include of splunklogging into the appconfig check\n"
},
{
"from": "human",
"value": "if AppConfig[:enable_splunk_logging]\n require File.expand_path('../../../lib/log_overrider', __FILE__)\nend\n\nRails.logger.class.send(:include, SplunkLogging)\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix imported electricity cost_per_mj with zero production\n"
},
{
"from": "human",
"value": "module Qernel::Plugins\n module Merit\n # Implements behaviour specific to the import interconnector.\n class ImportAdapter < ProducerAdapter\n def inject!\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Return Requests to admin tab\n"
},
{
"from": "gpt",
"value": "Deface::Override.new(\n virtual_path: 'spree/layouts/admin',\n name: 'add_return_requests_to_admin_tab',\n insert_top: '[data-hook=\"admin_tabs\"]',\n text: '\n <li class=\"tab-with-icon <%= param... | ruby | chosen |
[
{
"from": "system",
"value": "Use local file for level test, too\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'wasserstand'\n\nclass WasserstandTestCase < MiniTest::Unit::TestCase\n include Wasserstand\n\n def setup\n url = File.join(File.dirname(__FILE__), 'fixtur... | ruby | chosen |
[
{
"from": "system",
"value": "Replace 'mocha/setup' require with 'mocha/minitest'.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nbegin\n Bundler.setup(:default, :development)\nrescue Bundler::BundlerError => e\n $stderr.puts e.message\n $stderr.puts 'Run `bundle in... | ruby | chosen |
[
{
"from": "system",
"value": "Update read_api_file to assume the index.json part of the path.\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'usesthis'\nrequire 'json'\n\ndef test_site\n @site ||= UsesThis::Site.new(Dimples::Config... | ruby | chosen |
[
{
"from": "system",
"value": "Fix invalid double byte character error\n"
},
{
"from": "human",
"value": "module DutyCalculator\n\n class Dootie < StandardError\n def initialize(data=nil)\n @data = data\n @default_message = \"[DutyCalculator][Error]: ¯\\\\_(ツ)_/¯\"\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Allow auto pagination through params filter.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Github\n module Validations\n extend AutoloadHelper\n\n autoload_all 'github_api/validations',\n :Presence => 'presence',\n :Token => 'tok... | ruby | chosen |
[
{
"from": "system",
"value": "Use send to call define_method\n"
},
{
"from": "human",
"value": "require 'active_support/core_ext/hash/slice'\n\nmodule Figurine\n class Collaborator < ActiveSupport::BasicObject\n extend ActiveModel::Naming\n include ActiveModel::Conversion\n\n def initi... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor autocomplete to use ElasticSearch and without limit\n"
},
{
"from": "human",
"value": "module Autocompletion\n AUTOCOMPLETION_KEY = \"autocompletion\"\n\n def self.lookup term\n limit = {limit: [0, 5]}\n\n $redis.zrangebylex(AUTOCOMPLETION_KEY, \"(#... | ruby | chosen |
[
{
"from": "system",
"value": "Use perspectives_enabled_action? instead of type check\n"
},
{
"from": "human",
"value": "module Perspectives\n class Responder < ActionController::Responder\n def to_html\n return super unless resource.is_a?(Perspectives::Base)\n\n render text: resour... | ruby | chosen |
[
{
"from": "system",
"value": "Add new `linked_at` field to CurrentAccount\n"
},
{
"from": "human",
"value": "module Nylas\n # Ruby representation of the Nylas /account API\n # @see https://docs.nylas.com/reference#account\n class CurrentAccount\n include Model\n self.showable = true\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change to check if tty is available.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'io/console'\n\nmodule TTY\n class Prompt\n class Reader\n class Mode\n # Initialize a Terminal\n #\n # @api public\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Support dates in deep_clone (to fix query issue)"
},
{
"from": "human",
"value": "class Object\n # Setup a default pretty_inspect\n # alias_method :pretty_inspect, :inspect\n\n def instance_values\n Hash[instance_variables.map { |name| [name[1..-1], instance_v... | ruby | chosen |
[
{
"from": "system",
"value": "Use same offset for both *nix an Win32.\n"
},
{
"from": "human",
"value": "#! /usr/local/bin/ruby -w\n\nrequire \"RMagick\"\n\nimg = Magick::Image.read(\"images/Flower_Hat.jpg\").first\n\n# Make a watermark from the word \"RMagick\"\nmark = Magick::Image.new(140, 40... | ruby | chosen |
[
{
"from": "system",
"value": ":pencil2: Fix description for a handler\n"
},
{
"from": "human",
"value": "require \"ruboty\"\n\nmodule Ruboty\n module Handlers\n class Snack < Base\n OYATSU = %w(\n green_apple apple pear tangerine banana\n watermelon grapes strawberry melon... | ruby | chosen |
[
{
"from": "human",
"value": "Implement RAM sampler for darwin\n"
},
{
"from": "gpt",
"value": "module Custodian\n module Samplers\n\n class RAM < Custodian::Samplers::Sampler\n describe \"RAM usage\"\n\n def sample\n vmstat = `vm_stat`\n\n pages_free = vmstat[/Pa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with validity check and `many` elements"
},
{
"from": "human",
"value": "module Formalist\n class Form\n class ValidityCheck\n def call(form_ast)\n form_ast.map { |node| visit(node) }.all?\n end\n alias_method :[], :call\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add gif extension to precompile\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Less\n module Rails\n module SemanticUI\n class Engine < ::Rails::Engine\n\n initializer 'less-rails-semantic_ui.assets.precompile' do |app|\n %w(st... | ruby | chosen |
[
{
"from": "system",
"value": "Fix double instantiation of @page and @revision\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Georgia\n module Concerns\n module Revisioning\n extend ActiveSupport::Concern\n include Helpers\n\n included do\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for explicitly setting required option to false in apply_schema\n\nNot sure if this is the best way to test it, but seems to work.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass DataMapperSchemaTest < ActiveSupport::TestCase\n test 'require... | ruby | chosen |
[
{
"from": "system",
"value": "Make minor fixes in WelcomeEmailJob\n"
},
{
"from": "human",
"value": "class WelcomeEmailJob < ActiveJob::Base\n queue_as :mailer\n\n def perform(user_id)\n user = User.find(user_id)\n UserMailer.welcome_email(user).deliver_now\n end\nend\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `Services::Tumblr` not being able to post\n"
},
{
"from": "human",
"value": "class Services::Tumblr < Service\n include SocialHelper::TumblrMethods\n\n def provider\n \"tumblr\"\n end\n\n def post(answer)\n Rails.logger.debug \"posting to Tumblr {'answ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken model, Question slug is not a thing.\n"
},
{
"from": "human",
"value": "module Wisdom\n class Question < ActiveRecord::Base\n attr_accessible :row_order, :text, :title\n\n belongs_to :topic, inverse_of: :questions\n include RankedModel\n rank... | ruby | chosen |
[
{
"from": "system",
"value": "Set cache headers in production\n"
},
{
"from": "human",
"value": "Pakyow::App.routes :'console-file' do\n include Pakyow::Console::SharedRoutes\n\n namespace :console, '/console' do\n restful :file, '/files' do\n create before: [:auth] do\n name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Address a rubocop gripe for unless\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule Travis\n module NightlyBuilder\n class Runner\n attr_reader :api_endpoint, :token\n\n def initialize(api_endpoint: ENV['TRAVIS_API_ENDPOINT'],\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a note about exceptions that can be raised when decoding\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Warden\n module JWTAuth\n # Decodes a JWT into a hash payload into a JWT token\n class TokenDecoder\n include JWTAuth:... | ruby | chosen |
[
{
"from": "system",
"value": "Add patch for mutli-word routes\n"
},
{
"from": "human",
"value": "require_relative \"errors/skynet_method_error\"\n\nmodule Skynet\n module Splitter\n def self.clean(path_info)\n path_info_string = path_info.to_s\n\n raise SkynetMethodError unless pat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unproxify only the result of context var attributes access\n"
},
{
"from": "human",
"value": "class Solid::Arguments\n\n def initialize(string)\n @string = string\n end\n\n def transform(arg, context)\n arg.strip!\n # Named arguments\n if arg =~ /... | ruby | chosen |
[
{
"from": "system",
"value": "Use sh, not system, in rake task so it dies if it fails\n"
},
{
"from": "human",
"value": "namespace :webpack do\n desc \"Compile webpack bundles in to public/webpack\"\n task compile: :environment do\n ENV[\"TARGET\"] = 'production'\n destdir = Rails.root.j... | ruby | chosen |
[
{
"from": "system",
"value": "Define bonk semantics completely via tests.\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire \"./lib/bonk\"\n\nclass BonkTest < MiniTest::Unit::TestCase\n def setup\n @object = Object.new\n end\n\n def test_object_responds_to_bonk\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test coverage for lazy Subscription delete\n"
},
{
"from": "gpt",
"value": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens... | ruby | chosen |
[
{
"from": "system",
"value": "Change test as per Rails 5.1.3 change\n\nWe are going to assume that Rails is providing the correct behaviour\nfor this use case, so we change the test accordingly to make it pass.\n\nRef: ccfa785535d912c3529b0562d9f2e7a2dc4b7ed7@ff7f4a7 rails/rails#29662\nClose: #172"
},
{... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade PhpStorm EAP to 141.1717\n\nUpgrade PhpStorm EAP to 141.1717 - feedback from @sebroeder & @vitorgalvao\n"
},
{
"from": "human",
"value": "cask :v1 => 'phpstorm-eap' do\n version '141.1717'\n sha256 'af6087323b15205d10ede18e4aea176c6dab569adc47d0eb00d4de07a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logger spam by silencing the Hashie logger\n\nWe cannot `disable_warnings` in a subclass because\nHashie::Mash is used directly in the Ridley dependency:\nhttps://github.com/berkshelf/ridley/search?q=Hashie&unscoped_q=Hashie\n\nHashie's recommendation to disable warnings re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for error page if parse failes\n"
},
{
"from": "human",
"value": "\nmodule Yarn\n module ErrorPage\n\n def serve_404_page\n @response.status = 404\n @response.body = [\"<html><head><title>404</title></head><body><h1>File: #{@request[:uri][:path]} d... | ruby | chosen |
[
{
"from": "system",
"value": "Add bosh_cli gem to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"bosh_deployment_resource\"\n spec.version = \"0.0.1\"\n spec.summary = \"a gem for things\"\n spec.authors ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop factory girl loading twice\n"
},
{
"from": "human",
"value": "require \"database_cleaner\"\nrequire 'factory_girl'\nFactoryGirl.find_definitions #It looks like requiring factory_girl _should_ do this automatically, but it doesn't seem to work\n\nFactoryGirl.cla... | ruby | chosen |
[
{
"from": "system",
"value": "Test required attributes on Image\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Image, :type => :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n\n# == Schema Information\n#\n# Table name: images\n#\n# id ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.