conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add tests for VariantAlias creation\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'VariantAlias' do\n it 'get_or_create_by_name' do\n expect(VariantAlias.count).to eq 0\n variant_alias = VariantAlias.get_or_create_by_name(\"Test Variant A... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude vendored and generated blobs"
},
{
"from": "human",
"value": "module Linguist\n class Repository\n IgnorePaths = %w(\n yui\n tiny_mce\n ckeditor\n redbox\n active_scaffold\n rico_corner\n code_highlighter\n vendor\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove LyricsMode from Lyricfy test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\ndescribe Lyricfy::Fetcher do\n before do\n @fetcher = Lyricfy::Fetcher.new\n end\n\n describe \"with no params\" do\n it \"should use default providers\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect to instrument project path for versions controller\n"
},
{
"from": "human",
"value": "class VersionsController < ApplicationController\n def index\n @project = Project.find(params[:project_id])\n @instrument = Instrument.find(params[:instrument_i... | ruby | chosen |
[
{
"from": "system",
"value": "Include some gems needed for web-app-theme to do HAML correctly"
},
{
"from": "human",
"value": "gem \"web-app-theme\", :git => \"https://github.com/stevehodgkiss/web-app-theme.git\", :group => :development\n\n@stategies << lambda do\n options = []\n options << \"... | ruby | chosen |
[
{
"from": "system",
"value": "Implement user, survey, and respondent request methods\n"
},
{
"from": "human",
"value": "require \"surveymonkey/client/version\"\n\nmodule Surveymonkey\n module Client\n # Your code goes here...\n end\nend\n"
},
{
"from": "gpt",
"value": "require \... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we can load the application and permission\n\nDoing this before creating the user reduces the risk that we'll end up with zombie users\n"
},
{
"from": "human",
"value": "namespace :api_clients do\n desc \"Create an API client for a registered application\... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task to print out the db schema from model names\n"
},
{
"from": "human",
"value": "namespace :marty do\n desc 'Load Engine Seed data.'\n task seed: :environment do\n begin\n Marty::Engine.load_seed\n puts \"Database has been seeded with Mart... | ruby | chosen |
[
{
"from": "system",
"value": "Verify VM power status is not Nil when displaying Cloud Topology\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1447795\n"
},
{
"from": "human",
"value": "class CloudTopologyService < TopologyService\n @provider_class = ManageIQ::Providers::CloudManager\n\n @inclu... | ruby | chosen |
[
{
"from": "human",
"value": "Add original nested data solution file\n"
},
{
"from": "gpt",
"value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:\n# ============================... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test that uses a block\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nEndeavour.hook!\n\nclass EndeavourTest < Minitest::Test\n def test_call\n colors = { red: :rojo }\n assert_equal :rojo, colors.try(:[], :red)\n end\n\n def test_delegat... | ruby | chosen |
[
{
"from": "system",
"value": "Move example out of test class\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'structure'\n\nclass StructureTest < MiniTest::Test\n class Location\n include Structure\n\n attr :res\n\n def initialize(res)\n @res = res\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SUGAR_SECRET_KEY_BASE check, Dotenv is not available in production\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nDotenv.require_keys(\"SUGAR_SECRET_KEY_BASE\")\n\nSugar::Application.config.secret_key_base = ENV[\"SUGAR_SECRET_KEY_BASE\"]\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Handle unavailability of Redis in sidekiq-cron initializer\n\nThis is necessary to avoid breaking the build of Docker images when the Ruby builder attempts to run asset pipeline.\n"
},
{
"from": "human",
"value": "schedule_file = \"config/schedule.yml\"\nSidekiq::Cr... | ruby | chosen |
[
{
"from": "system",
"value": "Add a simple hook to allow theme tests to load the theme code in the context of Alaveteli.\n"
},
{
"from": "human",
"value": "# This is a global array of route extensions. Alaveteli modules may add to it.\n# It is used by our config/routes.rb to decide which route e... | ruby | chosen |
[
{
"from": "system",
"value": "Add the connection settings to the uncached case as well.\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'ownet'\n\nmodule SAAL\n class Sensors\n include Enumerable\n \n def initialize(opts)\n @defs = YAML::load(File.new(opts[:conf]))\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Kill Puma worker every 12 hours\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndef development?\n ENV.fetch(\"RAILS_ENV\") == \"development\"\nend\n\nworkers(ENV.fetch(\"WEB_CONCURRENCY\") { 2 }.to_i) unless development?\n\nthreads_count = ENV.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reference to non-existing readme.rdoc file\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"product_food/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specifi... | ruby | chosen |
[
{
"from": "system",
"value": "[ActiveJob] Add deserialize_arguments method to job\n"
},
{
"from": "human",
"value": "require 'active_support/rescuable'\nrequire 'active_job/arguments'\n\nmodule ActiveJob\n module Execution\n extend ActiveSupport::Concern\n\n included do\n include Act... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to original predicate. Still not understood.\n"
},
{
"from": "human",
"value": "require_relative '../spec_init'\n\nmodule AssertCamelKeys\n def self.call(hash)\n camel_keys? hash\n end\n\n def self.camel_keys?(val)\n case val\n when ::Array\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the restriction from the bundler version\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bash/session/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "system",
"value": "Update pry dependency to pry-byebug\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rmb_chinese_yuan/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "human",
"value": "Add example for NT2AA translation in 6 frames using EMBOSS\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/ruby\n#\n# Translate nucleotide sequences into aminoacids sequences in all \n# reading frames.\n#\n#\n# (: pjotrp 2009 rblicense :)\n\nUSAGE =<<EOM\n ruby #{__FIL... | ruby | chosen |
[
{
"from": "human",
"value": "Add ruby remote probe example\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\n\nrequire 'storage'\nrequire 'open3'\n\n$host = \"localhost\"\n\ndef run_command(name)\n cmd = \"ssh -l root #{$host} #{name}\"\n stdin, stdout, stderr, wait_thr = Open3.popen3(cmd)\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add Ieronim's name to last challenge\n"
},
{
"from": "human",
"value": "# Calculate a Grade\n\n# I worked on this challenge by myself.\n\n\n# Your Solution Below\n\ndef get_grade(average)\n\tif average > 89\n\t\treturn \"A\"\n\telsif average > 79\n\t\treturn \"B\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"The refined Module should be `using`ed where the method is executed\"\n\nThis reverts commit 6c0e4f30ceb760ca01abe0e9870359a20b811506.\n\nNope. This wouldn't work\n"
},
{
"from": "human",
"value": "using ActionArgs::ParamsHandler\n\nmodule ActionArgs\n mod... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for kupong integration\n"
},
{
"from": "gpt",
"value": "require 'kupong_integration/service'\nrequire 'rest-client'\n\ndescribe KupongIntegration::Service do \n let(:settings) { { authorization: 'abcd', coupon_id: '1'} }\n let(:phone) { '81531415926' }... | ruby | chosen |
[
{
"from": "system",
"value": "Write simple description and summary:\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gimlet/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6592svn\n\nHandBrakeCLI Nightly Build 6592svn released 2014-12-10.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6590svn'\n sha256 '6e5e2fabcaf457ed268e443d18bd46971f5e4bfdafdfc4967348a2a8bb105e... | ruby | chosen |
[
{
"from": "system",
"value": "Modify field name of topIssue API\n"
},
{
"from": "human",
"value": "require 'fabricio/models/abstract_model'\n\nmodule Fabricio\n module Model\n # This model represents an application build\n class Issue < AbstractModel\n attr_reader :id,\n :displa... | ruby | chosen |
[
{
"from": "system",
"value": "Add a fields and fieldset method to the form builder.\n"
},
{
"from": "human",
"value": "module FormSan\n class FormBuilder\n attr_accessor :output\n alias output to_s\n \n def initialize(record, options={})\n @output = ''\n @record = record\n... | ruby | chosen |
[
{
"from": "human",
"value": "Test to prove that phone numbers work.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass ContactTest < ActiveSupport::TestCase\n test \"should store multiple phone numbers\" do\n phone_numbers = [\"0113 496 0123\", \"028 9018 1337\"]\n contact = ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove presenter inspect method with available methods.\n\nThis caused raising weird error `(Object doesn't support #inspect)`\non methods that raised regular Ruby errors, masking them.\nIn the long run, this inspect caused more headaches than brining benefits.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as dev dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"crunch/version\"\n\nGem::Specification.new do |s|\n s.name = \"crunch\"\n s.version = Crunch::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Fix message queue rake task\n\nThe keyword argument here was renamed.\n"
},
{
"from": "human",
"value": "namespace :message_queue do\n desc \"Run worker to consume messages from RabbitMQ\"\n task consumer: :environment do\n GovukMessageQueueConsumer::Consumer.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing explicit action* requires\n"
},
{
"from": "human",
"value": "require 'action_view'\nrequire 'webmachine/actionview/version'\nrequire 'webmachine/actionview/configuration'\nrequire 'webmachine/actionview/resource'"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "human",
"value": "Add pagination configuration file, change default to 10\n"
},
{
"from": "gpt",
"value": "Kaminari.configure do |config|\n config.default_per_page = 10\n # config.max_per_page = nil\n # config.window = 4\n # config.outer_window = 0\n # config.left = 0\n # config... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a development dependency\n\nThis will allow bundler to find it and run `bundle exec rake [task]`\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"paperclip-s3/version\"\n\nGem::Specif... | ruby | chosen |
[
{
"from": "system",
"value": "Delete current Avatar bug fixed\n"
},
{
"from": "human",
"value": "class AvatarsController < InheritedResources::Base\n\n before_filter :authenticate_user!\n def update\n\n if !current_subject.avatars.blank?\n\n new_logo = Avatar.find(params[:id])\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "feat(logout): Add a logout route to.... logout\n"
},
{
"from": "human",
"value": "class PrivateController < Yodatra::Base\n\n before do\n content_type 'application/json'\n end\n\n get '/private' do\n ['You are authenticated and seeing a private area']\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for ShippingMethod model\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ShippingMethodTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_he... | ruby | chosen |
[
{
"from": "system",
"value": "Add Admin user(suspended: true) in seed\n"
},
{
"from": "human",
"value": "Administrator.create!(\n email: 'hanako@example.com',\n password: 'foobar',\n)\n"
},
{
"from": "gpt",
"value": "Administrator.create!(\n email: 'hanako@example.com',\n passwor... | ruby | chosen |
[
{
"from": "system",
"value": "Update generator to be Rails 4 compliant\n\nThe default argument workaround was originally found here: https://github.com/norman/friendly_id/pull/392"
},
{
"from": "human",
"value": "require \"rails/generators/active_record\"\n\nmodule PgAuditLog\n module Generator... | ruby | chosen |
[
{
"from": "system",
"value": "Update the User factory to support the new attributes\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user do\n name \"Winston Smith-Churchill\"\n sequence(:github_id)\n end\nend\n"
},
{
"from": "gpt",
"value": "FactoryGirl.de... | ruby | chosen |
[
{
"from": "system",
"value": "Include alt attribute in Flickr embed\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'net/http'\nrequire 'rexml/document'\n\nAutoHtml.add_filter(:flickr).with(:maxwidth => nil, :maxheight => nil, :link_options => {}) do |text, options|\n regex = %r{http:... | ruby | chosen |
[
{
"from": "system",
"value": "Add copy_column func to AlterTable to copy between columns\n"
},
{
"from": "human",
"value": "module ETL\n module Redshift\n # AlterTable will allow changes in columns of redshift.\n class AlterTable\n def initialize(schema_name, table_name)\n @sc... | ruby | chosen |
[
{
"from": "system",
"value": "Switch generator config to include stylesheets\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require(*R... | ruby | chosen |
[
{
"from": "system",
"value": "Enable autoloading from app directory\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundl... | ruby | chosen |
[
{
"from": "system",
"value": "Use each_value instead of values\n\nThis should be slightly better on memory usage since it won't construct\na throw-away intermediate Array.\n"
},
{
"from": "human",
"value": "module MGraph\n class VertexEdgeTable\n def initialize\n @vertex_edges = {}\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add DataSource singleton to manage the CSVs\n"
},
{
"from": "gpt",
"value": "module BaseballStats\n class DataSource\n class << self\n attr_accessor :raw_data, :name_key\n\n def set_raw_data(filepath)\n raw_data = read_clean_data(filepath)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Use gem defaults override to allow upgrading RubyGems\n"
},
{
"from": "gpt",
"value": "module Gem\n def self.default_exec_format\n exec_format = ConfigMap[:ruby_install_name].sub('ir', '%s') rescue '%s'\n\n unless exec_format =~ /%s/ then\n raise Gem::Exc... | ruby | chosen |
[
{
"from": "system",
"value": "Update React Native documentation (0.37)\n"
},
{
"from": "human",
"value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.36'\n self.base_url = 'https://fac... | ruby | chosen |
[
{
"from": "system",
"value": "Support Spring out of the box\n\nCloses #120\n"
},
{
"from": "human",
"value": "require 'factory_girl'\nrequire 'factory_girl_rails/generator'\nrequire 'rails'\n\nmodule FactoryGirl\n class Railtie < Rails::Railtie\n\n initializer \"factory_girl.set_fixture_repl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove .to_sym in Authorization scheme\n\nHello, `.to_sym` should never be applied on user input. Thus I recommend you to change `scheme` method:\r\n```\r\n def scheme\r\n @scheme ||= parts.first.downcase.to_sym\r\n end\r\n```\r\nWhile we can't send enourmous emount of `Au... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we flush the buffers\n\nPrevents sending incomplete file to cfn-lint\n"
},
{
"from": "human",
"value": "require 'tempfile'\n\nmodule StackMaster\n module Commands\n class Lint\n include Command\n include Commander::UI\n\n def initialize(... | ruby | chosen |
[
{
"from": "system",
"value": "Add description for export taxonomy rake task\n"
},
{
"from": "human",
"value": "task taxonomy_event_log: [:environment] do\n events = TaxonomyEventLog.new.export\n\n file = CSV.generate(headers: true) do |csv|\n csv << events.first.keys\n\n events.each do |... | ruby | chosen |
[
{
"from": "human",
"value": "Move the slugs for No10 and DPMO\n\nSeparate Puppet pull request to come with redirection. This needs to be\nreleased first.\n\nhttps://www.pivotaltracker.com/story/show/47364021\n"
},
{
"from": "gpt",
"value": "Organisation.find_by_slug('the-prime-ministers-office-n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove warning from protocol spec\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Moped::Protocol do\n Protocol = Moped::Protocol\n\n let(:connection) do\n TCPSocket.new(\"localhost\", 27017)\n end\n\n after do\n connection.close unl... | ruby | chosen |
[
{
"from": "system",
"value": "Change variable type for user auth params.\n"
},
{
"from": "human",
"value": "require \"JwtAuth/version\"\nmodule JwtAuth \n class TokenValidator\n def initialize(token)\n @token = token\n end\n\n def valid_jwt_token?\n user_identifier == token_... | ruby | chosen |
[
{
"from": "system",
"value": "Set default timeout to 4 seconds because 1 is not really enough\n"
},
{
"from": "human",
"value": "module CurrencyRate\n class Adapter\n include Singleton\n\n FETCH_URL = nil\n API_KEY_PARAM = nil\n\n def name\n self.class.name.gsub /^.*::/, \"\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Return current status before decrement.\n"
},
{
"from": "human",
"value": "module Rgot\n class PB\n attr_accessor :bn\n\n # Ruby-2.0.0 wants default value of keyword_argument\n def initialize(bn: nil)\n raise ArgumentError, \"missing keyword: bn\" unl... | ruby | chosen |
[
{
"from": "system",
"value": "Add my email to the gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/barber/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"tchak\", \"twinturbo\"]\n gem.email = [\"paul@... | ruby | chosen |
[
{
"from": "system",
"value": "Fix terrible wording on contact form errors.\n"
},
{
"from": "human",
"value": "# == Schema Information\n# Schema version: 56\n#\n# Table name: contact_validators\n#\n# name :string \n# email :string \n# subject :text \n# messag... | ruby | chosen |
[
{
"from": "system",
"value": "Change JSON to json so that it works reliably."
},
{
"from": "human",
"value": "require \"httmultiparty\"\nrequire \"JSON\"\n\n[\"base\", \"crateobject\", \"crate\", \"crates\", \"item\", \"items\"].each do |inc|\n require File.join(File.dirname(__FILE__), \"crate_... | ruby | chosen |
[
{
"from": "system",
"value": "Use different attributes for different sites\n"
},
{
"from": "human",
"value": "require 'digest/sha1'\nrequire 'erb'\nrequire 'ostruct'\nrequire 'rack/request'\n\nrequire 'host'\n\nclass Bouncer\n def call(env)\n request = Rack::Request.new(env)\n host = Host... | ruby | chosen |
[
{
"from": "system",
"value": "Use Kernel.warn to avoid ugly defined? check\n"
},
{
"from": "human",
"value": "if defined?(ActiveSupport::Deprecation)\n deprecation_message = \"amqp-subscribe-many: require 'messaging' is deprecated. Please use require 'amqp_subscribe_many'\"\n ActiveSupport::De... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Leaked file descriptor in test/did_you_mean\n\nhttps://github.com/ruby/ruby/commit/de74d2c3b0005048a2c4433bde68b9be10c86f01/checks?check_suite_id=336910877#step:19:131\n```\nLeaked file descriptor: NameErrorExtensionTest#test_correctable_error_objects_are_dumpable: 7 : #<Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove schema from Env's class doc\n"
},
{
"from": "human",
"value": "module ROM\n # Exposes defined repositories, schema, relations and mappers\n #\n # @api public\n class Env\n include Adamantium::Flat\n include Equalizer.new(:repositories, :relations, :... | ruby | chosen |
[
{
"from": "system",
"value": "Allow provisioner to use providers\n\n* Re-ordered the providers require\n"
},
{
"from": "human",
"value": "$:.unshift File.dirname(__FILE__)\nrequire 'yajl'\nrequire 'eventmachine'\n\n# An orchestrator for setting up isolated chef-managed systems.\nmodule Souffle\n... | ruby | chosen |
[
{
"from": "human",
"value": "Test helper to assert unordered collection match\n\nEquivalent to rspec's contain_exactly.\nFrom https://stackoverflow.com/a/41293357\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# From https://stackoverflow.com/a/41293357\nmodule MiniTest::Asser... | ruby | chosen |
[
{
"from": "system",
"value": "Add more test for MenuHelper\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n#\n# == MenuHelper Test\n#\nclass MenuHelperTest < ActionView::TestCase\n include MenuHelper\n\n setup :initialize_test\n\n test 'should return active class for home' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional comments to Publisher\n\nThis is mainly to highlight that this class is introducing some tech debt that\nwill eventually be paid down when the publishing stack supports the stuff we\nneed.\n"
},
{
"from": "human",
"value": "# Publisher for publishing ... | ruby | chosen |
[
{
"from": "system",
"value": "jf: Add prompt to test show/edit, time permitting\n\nIt's just a comment in the test. I wrote down this note last time and wanted to\nmake sure we touched on it since I got some questions about testing show/edit.\n"
},
{
"from": "human",
"value": "require 'test_help... | ruby | chosen |
[
{
"from": "system",
"value": "Include all dependencies in gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"flag_shih_tzu/version\"\n\nGem::Specification.new do |s|\n s.name = \"flag_shih_tzu\"\n s.version =... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up some error messages.\n"
},
{
"from": "human",
"value": "class API::V1::UserRegistration\n include ActiveModel::Validations\n include ActiveModel::Validations::Callbacks\n include Virtus.model\n \n attr_reader :user\n\n attribute :first_name, ... | ruby | chosen |
[
{
"from": "system",
"value": "Break up the TreeNode::EmsFolder set_attributes into two parts\n"
},
{
"from": "human",
"value": "module TreeNode\n class EmsFolder < Node\n set_attributes(:icon, :tooltip) do\n # TODO: move this logic into TreeBuilder#override for the specific trees\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we bring in necessary activesupport\n"
},
{
"from": "human",
"value": "require 'grape'\nrequire 'grape/cancan/version'\n\nmodule Grape\n module CanCan\n module API\n # Convienience method to authorize every route\n def authorize_routes!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to support 'sass-rails' 4.0.0.beta\n\nIt has no constant `Sass::Rails::SassTemplate`.\n"
},
{
"from": "human",
"value": "if defined?(ActiveSupport)\n require 'haml/template/options'\n ActiveSupport.on_load(:before_initialize) do\n ActiveSupport.on_load(:act... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak guard clause in Loga::Sidekiq.configure_logging\n"
},
{
"from": "human",
"value": "require 'loga/sidekiq/job_logger'\n\nmodule Loga\n module Sidekiq\n def self.configure_logging\n return unless defined?(::Sidekiq)\n return if Gem::Version.new('5.... | ruby | chosen |
[
{
"from": "system",
"value": "Add httpauth as dependency for Basic Auth header parsing\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/oauth2/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_dependency 'faraday', '~> 0.7'\n gem.add_depende... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Fix wrong ivar usage in SocketLock.\n\nThis passed the tests since nil is a valid argument for TCPServer.new,\ndefaulting to 0.0.0.0.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@9900 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Disable transaction when adding index for Ci::Pipeline\n"
},
{
"from": "human",
"value": "class AddIndexForPipelineUserId < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n def change\n add_concurrent_index :ci_commits, :user_id\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make Trusty our preferred distribution\n\nWhen running tests, default to Ubuntu Trusty, which the majority of our\nmachines are now using.\n"
},
{
"from": "human",
"value": "require 'csv'\nrequire 'rspec-puppet'\nrequire 'puppet'\nrequire 'puppetlabs_spec_helper/mod... | ruby | chosen |
[
{
"from": "system",
"value": "Make dependency versions more flexible.\n"
},
{
"from": "human",
"value": "require_relative \"lib/posten/version\"\n\nGem::Specification.new do |s|\n s.name = \"posten\"\n s.version = Posten::VERSION\n s.summary = \"Mail delivery\"\n s.description... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - the most amicable of numbers\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56b5ebaa26fd54188b000018\n# --- iteration 1 ---\ndef amicable_numbers(n1,n2)\n sum_of_factors(n1) == n2 || sum_of_factors(n2) == n1\nend\n\ndef sum_of_fa... | ruby | chosen |
[
{
"from": "system",
"value": "New: Update to rake 12.3.3 due to a security issue.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'perobs/version'\n\nGEM_SPEC = Gem::Specification.new... | ruby | chosen |
[
{
"from": "human",
"value": "Add districts controller, move methods from schools controller that work with districts\n"
},
{
"from": "gpt",
"value": "class DistrictsController < ApplicationController\n\tdef index\n\tend\n\n\tdef school_districts\n\t\tlocation_id = Location.find_by(loc_code: \"ny... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug -- multiple scribbles was created per user unless user refreshes page after first scribble\n"
},
{
"from": "human",
"value": "class ScribblesController < ApplicationController\n\n def create\n if scribble_params['id'] == \"\"\n @scribble = Scribble.... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to dev deps\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'spoved/version'\n\nGem::Specification.new do |gem|\n gem.name =... | ruby | chosen |
[
{
"from": "system",
"value": "Change parameter to accept a single keyword\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'slim'\nrequire 'dinosaurus'\nrequire File.join(File.dirname(__FILE__),'models', 'suggestion_request')\n\nconfigure do\n set :views, File.dirname(__FILE__) + \... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler and rake development dependencies\n\nThis project requires bundler and rake in order to build and release to\nrubygems (`rake release`). It is a good practice to list these kinds of\nbuild requirements as \"development dependencies\" in the gemspec.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce array allocation when `where` with passed hash\n\nIn most case `where` is called with passed hash. In the case\ninitializing `binds` is unnecessary.\n"
},
{
"from": "human",
"value": "module ActiveRecord\n class Relation\n class WhereClauseFactory # :nodo... | ruby | chosen |
[
{
"from": "system",
"value": "Use simple strings for declaring Ruby versions\n"
},
{
"from": "human",
"value": "require_relative 'lib/svgeez/version'\n\nGem::Specification.new do |spec|\n spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')\n\n spec.name = 'svgeez'\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add Debian sub versions to choose from\n\nAdded debian 7.1, 7.2, 7.3 and 7.4"
},
{
"from": "human",
"value": "include_recipe 'apt'\n\ncase node['platform_version'].to_f\n when 7\n release = 'wheezy'\n\n when 12.04\n release = 'precise'\n\n when 13.1\n re... | ruby | chosen |
[
{
"from": "system",
"value": "Make uniqueness constraint migration reversible\n\n* Add down method to AddUniquenessConstraintToRepos to make migration\n reversible\n* https://trello.com/c/jgd1zB9q\n"
},
{
"from": "human",
"value": "class AddUniquenessConstraintToRepos < ActiveRecord::Migration\... | ruby | chosen |
[
{
"from": "human",
"value": "Extend length of social account tokens\n"
},
{
"from": "gpt",
"value": "class ChangeSocialAccountTokenLength < ActiveRecord::Migration\n def change\n change_column :social_accounts, :access_token, :text\n change_column :social_accounts, :access_token_secret, :... | ruby | chosen |
[
{
"from": "human",
"value": "Add podspec file from Cocoapods master repo\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do|s|\n\ts.name='DDExpandableButton'\n\ts.version='0.0.1'\n\ts.license = {:type => 'MIT', :file => 'LICENSE'}\n\ts.author = 'Damien Debin'\n\ts.homepage = 'https://github.com/d... | ruby | chosen |
[
{
"from": "system",
"value": "Make summary and description not identical.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'ruby-example'\n s.version = '0.1'\n s.licenses = ['MIT']\n s.summary = 'Just an example project for the purpose of learning Ruby.'\n s.descr... | ruby | chosen |
[
{
"from": "system",
"value": "Update Omnifocus Beta to 2.2.1\n\nThis commit updates the version and sha256 stanzas. It also changes\nthe download and homepage URLs as they have been tweaked for the\n2.2.x series of betas.\n"
},
{
"from": "human",
"value": "cask :v1 => 'omnifocus-beta' do\n vers... | ruby | chosen |
[
{
"from": "human",
"value": "Add Royal TSX 2 beta\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'royal-tsx-beta' do\n version '2.0.0.17'\n sha256 '45da4fb0b273fc038cdc91354d19a7f908d20ad67b84edfe79ef7c1843f475e2'\n\n url \"http://v2.royaltsx.com/updates/royaltsx_#{version}.dmg\"\n appcast 'ht... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.