conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add logging to figure out strange error\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass DeadlineJob < ApplicationJob\n queue_as :deadline\n\n def perform(deadline_id)\n deadline = Deadline.find_by(id: deadline_id)\n return unless de... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the Slack Team is set\n"
},
{
"from": "human",
"value": "class SlackUser < ActiveRecord::Base\n validates :slack_id, presence: true, uniqueness: true\n validates :name, presence: true\n validates :profile, presence: true\n\n serialize :profile, Hash\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Create structure of main game loop\n"
},
{
"from": "human",
"value": "#\n# Ruby For Kids Project 6: Guessing Game\n# Tutorial By: Chris Haupt\n# Programmed By: Kyrene Jackson\n# A guessing game in which the hints might not be true!\n#\n#=============================... | ruby | chosen |
[
{
"from": "system",
"value": "Support newer versions of mime-types\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'ethon/version'\n\nGem::Specification.new do |s|\n s.name = \"ethon\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to avoid Puma output format change\n\nWe are seeing some test failures for this test in #37291. It looks like\nwhat's going on is that Puma has changed the output for this command\nbetween 4.1 and 4.2\n\nPreviously:\n\n```\n...\n* Environment: development\n* Listeni... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.1.0 to 0.1.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'data_aggregation-accumulator'\n s.version = '0.1.1.0'\n s.summary = 'Data aggregation accumulator library'... | ruby | chosen |
[
{
"from": "system",
"value": "Add contributing docs to gemspec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/abstract_type/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'abstract_type'\n gem.version = AbstractType::VER... | ruby | chosen |
[
{
"from": "system",
"value": "Add irc server capabilities querying\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# This file is part of the K5 bot project.\n# See files README.md and COPYING for copyright and licensing information.\n\n# IRCLoginListener is the listener that handles login... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the gemspec to allow the gem to be used with Rails 3.1.\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/action_logger/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"action_logger\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove SoundCloud wrapper from .gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nehm/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add project to temp issues\n"
},
{
"from": "human",
"value": "class CreateTempIssues < ActiveRecord::Migration\n def change\n create_table :temp_issues do |t|\n t.integer :pid\n t.string :name\n t.text :description\n t.float :duration\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Kill N+1 query of a pickup son on the home\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'open-uri'\n\nclass StaticPagesController < ApplicationController\n def home\n today = Time.zone.today\n @song = Rails.cache.fetch(\"pickup/... | ruby | chosen |
[
{
"from": "system",
"value": "Handle ConnectionNotEstablished when adding length validation\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"active_model/errors\"\nrequire \"active_record/errors\"\n\nclass Gutentag::TagValidations\n DEFAULTS = {\n :presence => ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to use ERB syntax in YAML config\n"
},
{
"from": "human",
"value": "module HiveTests\n class Configuration\n attr_accessor :host,\n :port,\n :host_shared_directory_path,\n :docker_shared_directory_path,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable SSL (Cert is fixed)\n"
},
{
"from": "human",
"value": "require 'colorize'\nrequire 'net/http'\nrequire 'json'\nrequire 'openssl'\n\nmodule Icapps\n module Translations\n class Http\n class << self\n def authenticated_response(path, is_json = f... | ruby | chosen |
[
{
"from": "system",
"value": "Add Trip case statement (p88)\n"
},
{
"from": "human",
"value": "class Trip\n\n attr_reader :bicycles, :customers, :vehicle\n\n def prepare(mechanic)\n mechanic.prepare_bicycles(bicycles)\n end\nend\n"
},
{
"from": "gpt",
"value": "class Trip\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage url on gemspec\n\nThanks Sam Thursfield"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'httpi/version'\n\nGem::Specification.new do |s|\n s.name = 'httpi'\n s.vers... | ruby | chosen |
[
{
"from": "system",
"value": "Add Reloader extension for easier development\n"
},
{
"from": "human",
"value": "require \"sinatra/base\"\nrequire \"sinatra/namespace\"\nrequire \"multi_json\"\nrequire \"sass\"\nrequire \"compass\"\n\nrequire \"lib/sinatra/response_helper\"\n\nmodule Api\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow pushing to any gem hosts\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'facebook/messenger/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use customer.id instead of customer_id to associate braintree payment methods\n"
},
{
"from": "human",
"value": "namespace :champaign do\n desc \"Create braintree payment method tokens out of existing token columns\"\n task braintree_tokens: :environment do\n P... | ruby | chosen |
[
{
"from": "system",
"value": "Include environment for pings task\n"
},
{
"from": "human",
"value": "desc \"pings oursolution.is every 10 minutes\"\ntask :pings do\n require 'net/http'\n uri = URI(\"http://oursolution.is\")\n Net::HTTP.get_response(uri)\nend"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Change order of inline address attributes\n"
},
{
"from": "human",
"value": "module WavesUtilities\n class Customer\n attr_accessor(\n :id,\n :name,\n :address_1,\n :address_2,\n :address_3,\n :town,\n :county,\n :postcode... | ruby | chosen |
[
{
"from": "system",
"value": "Use expect instead of allow\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nmodule Dough\n describe Helpers do\n class Foo\n include Dough::Helpers\n\n attr_reader :text, :renderer\n\n def initialize(options = {})\n @text = op... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for Maintainer .to_param\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Maintainer do\n it { should have_one :leader }\n it { should have_many :acls }\n it { should have_many :teams }\n it { should have_many(:srpms).through(:acls) ... | ruby | chosen |
[
{
"from": "system",
"value": "Test the uniqueness of URLs\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Validation do\n\n it \"should recheck validations after two hours\" do\n mock_file(\"http://example.com/test.csv\", 'csvs/valid.csv')\n validation = Validation.... | ruby | chosen |
[
{
"from": "system",
"value": "Change to RHEL8 compatible EPEL module\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'beaker-puppet'\nrequire 'beaker/puppet_install_helper'\nrequire 'beaker/module_install_helper'\n\nrun_puppet_install_helper unless ENV['BEAKER_provision'] == '... | ruby | chosen |
[
{
"from": "system",
"value": "Check for empty row data.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire 'spec_helper'\n\ndescribe TTY::Table::Row, '#new' do\n let(:object) { described_class }\n\n subject { object.new data }\n\n context 'with no arguments' do\n let(:... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the Bridge resource on Linux\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nset :os, :family => 'linux'\n\ndescribe bridge('br0') do\n it { should exist }\nend\n\ndescribe bridge('br0') do\n let(:stdout) { 'eth0' }\n it { should have_inter... | ruby | chosen |
[
{
"from": "system",
"value": "Remove focus from sessions spec."
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Coursewareable::SessionsController, :focus => true do\n describe 'GET new' do\n before{ get(:new, :use_route => :coursewareable) }\n it { should render_templat... | ruby | chosen |
[
{
"from": "system",
"value": "Add `with_primary` helper on connection proxy\n"
},
{
"from": "human",
"value": "module ActiveReplicas\n class ProxyingConnection\n def initialize(connection:, is_primary:, proxy:)\n @connection = connection\n @is_primary = is_primary\n @proxy ... | ruby | chosen |
[
{
"from": "system",
"value": "Use service_url for ticket generation too\n"
},
{
"from": "human",
"value": "require 'devise/strategies/base'\n\nmodule Devise\n module Strategies\n class CasAuthenticatable < Base\n def valid?\n mapping.to.respond_to?(:authenticate_with_cas_ticket)\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Active Admins permitted params to include unisex and accessibility.\n"
},
{
"from": "human",
"value": "ActiveAdmin.register Restroom do\n\npermit_params :name, :street, :city, :state, :access, :bath_type, :directions, :comment, :latitude, :longitude, :country... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Import nginx version 1.0.2\"\n\nThis reverts commit e60119e116448142a7680a4a3c91c4a051e28c88 [formerly 2b64bffc325ab90e606eff7ae7afe1378199eb8f] [formerly 72829cc41131f1c0d687d6c7c7294e0f0da8101f [formerly 4f3d7d31d0e760e763f8c46d62b28b5ffcfe218d]] [formerly d9572d4498... | ruby | chosen |
[
{
"from": "human",
"value": "Add acceptance test for composer::project\n"
},
{
"from": "gpt",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'composer::project class' do\n describe 'running puppet code' do\n # Using puppet_apply as a helper\n it 'should work with no errors' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure column width is an integer.\n"
},
{
"from": "human",
"value": "module SiteHelper\n def resizable(column)\n session[:column_widths] ||= {}\n template = 'data-resizable-name=\"%s\"'\n replacements = [sanitize(column)]\n if session[:column_widths... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Limit concurrent integration specs on travis to 12\"\n\nThis reverts commit 046f50663389d03d1ea4b0c4854b2fb614b41f66.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'deployment job control' do\n include IntegrationExampleGroup\n\n be... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test to revert back to using proper golang version.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe_recipe 'consul::install_source' do\n before do\n stub_command(\"/opt/go/bin/go version | grep \\\"go1.3 \\\"\").and_return(false)\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Activate URL To Send Token To User\n"
},
{
"from": "human",
"value": "class UserMailer < ApplicationMailer\n\n # Subject can be set in your I18n file at config/locales/en.yml\n # with the following lookup:\n #\n # en.user_mailer.activation_needed_email.sub... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded includes and extends\n"
},
{
"from": "human",
"value": "require 'active_model'\n\nclass EmailSignup\n include ActiveModel::Conversion\n extend ActiveModel::Naming\n include ActiveModel::Validations\n\n validates_presence_of :subtopic\n\n attr_re... | ruby | chosen |
[
{
"from": "system",
"value": "Allow all users to see the root page of a con\n"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n # This class defines access controls.\n # See the wiki for details: https://github.com/ryanb/cancan/wiki/Defining-Abilities\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Remove leading space when inserting tag1<space><whitespace>tag2\n\nSay tags = \"read again, internet, manufacturing\"\nthen simply splitting leads to a leading space\n"
},
{
"from": "human",
"value": "class Article < ActiveRecord::Base\n\tserialize :tags, Array\n\tb... | ruby | chosen |
[
{
"from": "system",
"value": "Add path to log file\n"
},
{
"from": "human",
"value": "class Message < ActiveRecord::Base\n has_many :recipients\n\n validates :postfix_queue_id, presence: true\n\n def decode_log\n parser = Parser::MailLog.new\n parser.parse_log\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Use tr instead of gsub. (rubocop error fix)\n"
},
{
"from": "human",
"value": "module Awspec::Type\n class Ebs < Base\n attr_reader :volume\n\n def initialize(id)\n super\n @volume = find_ebs(id)\n @id = @volume[:volume_id] if @volume\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Include in ActionController::Base instead of ApplicationController to avoid re-loading issues\n"
},
{
"from": "human",
"value": "\nmodule CurrentRequest\n\n def self.included( base )\n base.send( :include, CurrentRequest::InstanceMethods )\n base.before_filte... | ruby | chosen |
[
{
"from": "system",
"value": "Make chapter controller inherit form guide container controller\n"
},
{
"from": "human",
"value": "require 'addressable/uri'\n\nclass ChaptersController < ApplicationController\n include Mumuki::Laboratory::Controllers::Content\n include Mumuki::Laboratory::Contro... | ruby | chosen |
[
{
"from": "system",
"value": "Use monolesson? instead of mono_lesson?\n"
},
{
"from": "human",
"value": "require 'addressable/uri'\n\n# It acts as a guide container in mono_lesson contexts\nclass ChaptersController < GuideContainerController\n include Mumuki::Laboratory::Controllers::ImmersiveN... | ruby | chosen |
[
{
"from": "system",
"value": "Fix login failure to show an alert\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nclass SessionsController < ApplicationController\n def new\n end\n\n def create\n user = User.from_omniauth(env[\"omniauth.auth\"])\n\n #FIXME this needs to go in a ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix grammar in alert after authorising account.\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n rescue_from RaceCondition, :with => :race_condition\n \n def create\n @user = Oauth::Authorization.new.authorize(auth_hash: au... | ruby | chosen |
[
{
"from": "system",
"value": "Make the IRC bot send notices instead of messages\n"
},
{
"from": "human",
"value": "require 'socket'\n\nclass Services::IrcBotSpammer\n IRC_BOT_SOCKET = File.join '', 'tmp', 'ircbot.sock'\n\n def self.send_message(message)\n new.send message\n end\n\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug where a division by zero can occur.\n"
},
{
"from": "human",
"value": "class PlanningStatsService\n\n def initialize(periods_availability, number_of_firemen)\n @periods_availability = periods_availability\n @number_of_firemen = number_of_firemen\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add real total to AllSupporters\n"
},
{
"from": "human",
"value": "class Bill::AllSupporters\n attr_accessor :supporter_count, :cosponsor_count, :needed_cosponsor_count, :short_title, :chamber_size, :congressional_session\n\n\n def initialize\n set_default_attr... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify error handling for Genera::Function.\nDon't swallow/rethrow exceptions unrelated to the\nreturn type.\t"
},
{
"from": "human",
"value": "module Genera\n \n class Function\n attr_reader :prototype\n \n def initialize(*args, &body)\n if args.f... | ruby | chosen |
[
{
"from": "system",
"value": "Use UTF-8 when reading files."
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule KindleClippings\n \n class Parser\n ['clipping', 'clippingresult'].each { |file| require File.expand_path(File.dirname(__FILE__) + '/' + file) }\n \n def parse_file(p... | ruby | chosen |
[
{
"from": "system",
"value": "Prepend space to additional CLFAGS\n\nOn Ruby 2.0.0 and 2.1, `pkg_config('com_err')` may not leave an blank\nspace at the end of CFLAGS, causing the `-std=c99` concatentation to\ngenerate an incorrect command, e.g.\n\n CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC -I/usr/include/... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to start instances on creation\n"
},
{
"from": "human",
"value": "module OpsTasks\n class Scale < OpsTasks::Deployment\n def initialize(args)\n @instance_type = args[:instance_type]\n super\n end\n\n def create_instance\n @client... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor all bindings to use ObjectGenerator\n"
},
{
"from": "human",
"value": "module Pharrell\n class Config\n def initialize\n @map = {}\n end\n\n def bind(klass, arg = nil, &blk)\n if blk\n options = arg.kind_of?(Hash) ? arg : {}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rework SettingsReader to work within bundler without active_support.\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'yaml'\nrequire 'ostruct'\nrequire 'socket'\n\n# = SettingsReader\n#\n# Returns an OpenStruct object representing settings read from an ERB... | ruby | chosen |
[
{
"from": "system",
"value": "Remove crud from the DSL\n"
},
{
"from": "human",
"value": "##\n# DO NOT USE THIS API!\n# This file is temporary, to help make testing Punchblock easier.\n# THIS IS IMPERMANENT AND WILL DISAPPEAR\nmodule Punchblock\n class DSL\n def initialize(connection, protoc... | ruby | chosen |
[
{
"from": "system",
"value": "Check for existing S3 files for all binaries\n\nSigned-off-by: Anthony Emengo <7b3c5a7825e2f856203b8d882230abcb78036abf@pivotal.io>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nsystem('apt-get -y install awscli')\n\nbinary_name = ENV['BINARY_NAME']\nDir... | ruby | chosen |
[
{
"from": "system",
"value": "Allow apps to override the description\n\nThis is useful for deprecated applications.\n"
},
{
"from": "human",
"value": "class AppDocs\n def self.pages\n YAML.load_file('data/applications.yml').map do |app_data|\n App.new(app_data)\n end\n end\n\n clas... | ruby | chosen |
[
{
"from": "system",
"value": "Add a development dependency: pry\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hatokura/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change method names to better reflect their purpose\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(:must_exist).load do |configuration|\n\n _cset :foreman_sudo, \"sudo\"\n _cset :foreman_upstart_path, \"/etc/init/sites\"\n _cset :foreman_op... | ruby | chosen |
[
{
"from": "system",
"value": "Fix key method for Attribute class\n"
},
{
"from": "human",
"value": "module Cms\n module Attribute\n class Base\n attr_accessor :name\n attr_reader :type, :key, :klass, :strong_parameter, :index_partial_path, :form_partial_path\n\n def initialize... | ruby | chosen |
[
{
"from": "system",
"value": "Make points calculation outside string\n"
},
{
"from": "human",
"value": "require 'pivotal-tracker'\n\nmodule DeployAndDeliver\n class Project\n attr_reader :project\n\n def initialize(context)\n PivotalTracker::Client.use_ssl = context[:pivotal_tracker_... | ruby | chosen |
[
{
"from": "system",
"value": "Add --format option to CLI\n"
},
{
"from": "human",
"value": "require 'faml'\nrequire 'thor'\n\nmodule Faml\n class CLI < Thor\n package_name 'faml'\n\n desc 'render FILE', 'Render haml template'\n def render(file)\n code = compile_file(file)\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Make pretty-print work all the time\n"
},
{
"from": "human",
"value": "module LedgerGen\n class Journal\n def self.build\n journal = new\n \n yield journal\n\n return journal\n end\n \n def initialize\n @transactions = []\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add drop method and queue attribute\n"
},
{
"from": "human",
"value": "class MessageQueue\n def initialize(client_socket)\n @socket = client_socket.accept\n puts 'Client connected'\n end\n\n def run\n @socket.write('HELLO')\n @socket.close\n end\nend... | ruby | chosen |
[
{
"from": "human",
"value": "Add Worker class includes Sidekiq::Worker\n"
},
{
"from": "gpt",
"value": "require 'sidekiq'\n\nrequire 'mforwd'\n\nSidekiq.configure_client do |config|\n config.redis = { :namespace => 'x', :size => 1 }\nend\n\nSidekiq.configure_server do |config|\n config.redis =... | ruby | chosen |
[
{
"from": "system",
"value": "Use the Messenger transport by default\n"
},
{
"from": "human",
"value": "class RouterBridge\n attr_accessor :router, :logger, :marples\n\n def initialize options = {}\n logger = options[:logger] || NullLogger.instance\n self.router = options[:router] || Rou... | ruby | chosen |
[
{
"from": "system",
"value": "Include a puts to inspect data elements\n"
},
{
"from": "human",
"value": "module Lita\n # Returns cards that are in the Confirmed column\n class NewCard\n\n def initialize(trello_client, list_id, id_labels, build_url)\n @trello_client = trello_client\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create pin factory for testing\n"
},
{
"from": "gpt",
"value": "FactoryGirl.define do\n factory :pin do\n user\n appeal \"ItisreallyprettyIlikeit.\"\n photo_url \"www.image.url\"\n website \"www.reallypretty.like\"\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update tests to work for ruby 1.9\n"
},
{
"from": "human",
"value": "RSpec.describe(Jekyll::Compose::FileInfo) do\n describe '#content' do\n context 'with a title of only words' do\n let(:expected_result) {<<-CONTENT.gsub(/^\\s+/, '')\n ---\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update example use in layer spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ninclude Support::ResourceExamples\n\ndescribe Fulcrum::Layer do\n include_context 'with client'\n include_context 'with resource'\n\n let(:resource) { client.layers }\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the certs we use in the specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe R509::Cert::Validator do\n\n describe 'with a cert without CRL or OCSP data' do\n let(:no_validator_cert){ R509::Cert.new cert: load_cert('no_validator.crt') }... | ruby | chosen |
[
{
"from": "system",
"value": "Improve Rake task for Icons compiling\n\nWe were only doing the one task to compile icons, but there are a\nfew that are required and I thought it would be handier to add those\nto the rake task so we don't have to do them manually.\n\nTest Plan:\n- When you make a change to th... | ruby | chosen |
[
{
"from": "system",
"value": "Change usage of DataMapper::Resource::ClassMethods to use Model\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'rubygems'\n\ngem 'dm-core', '~>0.9.10'\nrequire 'dm-core'\n\nrequire Pathname(__FILE__).dirname.expand_path / 'dm-is-remixable' / 'is' / '... | ruby | chosen |
[
{
"from": "system",
"value": "Update Redis documentation (up to 3.2.5)\n"
},
{
"from": "human",
"value": "module Docs\n class Redis < UrlScraper\n self.type = 'redis'\n self.release = 'up to 3.2.4'\n self.base_url = 'http://redis.io/commands'\n self.links = {\n home: 'http://re... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the nginx attribute that breaks nginx on Windows nodes\n\n\nFormer-commit-id: d32d6e8c34b0f31f77f1caa54e3d16c581991ae1 [formerly 834c7c7a1076df6c84a0357d17f5e9bc46241d1f] [formerly e3df03a04ffb0f5c6a3628078c004142146f652e [formerly bedd9d822add439487ffac98000783fc0b02eb0... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug of parsing XML\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nclass Hash\n class << self\n def from_xml(xml)\n result = Nokogiri::XML(xml)\n { result.root.name.to_s.to_sym => xml_elem_to_hash(result.root) }\n end\n\n private\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix references to model in payment method specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass Gateway::Test < Gateway\nend\n\ndescribe PaymentMethod do\n\n context 'validation' do\n it { should have_valid_factory(:payment_method) }\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require statement for Ruby 1.9."
},
{
"from": "human",
"value": "\nrequire 'md5'\n\n# GenericUtils\nmodule Tweaks\n module Digestable\n module ClassMethods\n def md5(file)\n raise \"File doesn't exist.\" unless File.exist?(file)\n digester... | ruby | chosen |
[
{
"from": "system",
"value": "Add end of line to file\n"
},
{
"from": "human",
"value": "class JsonParser::Fetcher\n include OptionsParser\n\n attr_reader :path, :json, :options\n\n delegate :after, :instance, :compact, :case_type, to: :options_object\n delegate :wrap, to: :post_processor\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Use controller_name and action_name over params[:controller] and params[:action].\n"
},
{
"from": "human",
"value": "module Rafters::Context\n extend ActiveSupport::Concern\n\n included do\n helper_method :components_for_action\n helper_method :render_compon... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up HTTP request message\n"
},
{
"from": "human",
"value": "class Riot::ApiClient\n USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36'\n ROOT_ENDPOINT = \"http://api.lolesports.com/api\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix build in Ruby 1.8.7\n"
},
{
"from": "human",
"value": "module Roadie\n class Selector\n def initialize(selector)\n @selector = selector.to_s.strip\n end\n\n def specificity\n @specificity ||= CssParser.calculate_specificity selector\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Set `spec.files` to include everything in lib\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mathematical/version'\n\nGem::Specification.new do |spec|\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in rebase conflict resolution\n"
},
{
"from": "human",
"value": "#\n# Author:: Joe Williams (<joe@joetify.com>)\n# Copyright:: Copyright (c) 2008 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (t... | ruby | chosen |
[
{
"from": "system",
"value": "Make ZMarshal read into a string buffer, to work around Zlib bug.\n"
},
{
"from": "human",
"value": "#\n# Author:: Anders Bengtsson <ndrsbngtssn@yahoo.se>\n# Copyright:: Copyright (c) 2004\n#\n\nrequire 'zlib'\n\nmodule Madeleine\n #\n # Snapshot marshaller for... | ruby | chosen |
[
{
"from": "system",
"value": "Create new quick_nav view helper\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ViewHelpers\n # Returns today's date in Day, Date Month Year format\n #\n # @return [String]\n def today\n Time.now.strftime('%A, %d %B %Y')\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add options to remove some elements from translation E.g translate button\n"
},
{
"from": "human",
"value": "module Translator\n class Main\n attr_reader :request, :controller\n\n def initialize(options = {})\n @controller = options[:controller]\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Rename global variable of Spec::Mocks::Space for Cucumber.\nBecause old-name '' is not used in spec/mocks/proxy.rb, but '' is used.\n\n[#912 state:resolved milestone:'Next Release']\n"
},
{
"from": "human",
"value": "# This plugs RSpec's mocking/stubbing framework i... | ruby | chosen |
[
{
"from": "human",
"value": "Add partially stubbed rake tasks to update/purge feed items in db\n"
},
{
"from": "gpt",
"value": "# See https://devcenter.heroku.com/articles/scheduler\n\nnamespace :feed_items do\n desc 'Update the database with current feed items'\n task :update => :environment ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit add of app/workers to load path for Rails 3 -- it should be automatic.\n"
},
{
"from": "human",
"value": "if defined?(Rails::Railtie)\n module Woodhouse::RailsExtensions\n def layout(&blk)\n unless @delay_finished\n @delayed_layout = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add compatibility with faraday 0.9.0\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'faraday_middleware'\n\nmodule Tumblr\n module Connection\n\n def connection(options={})\n \n default_options = {\n :headers => {\n :acce... | ruby | chosen |
[
{
"from": "system",
"value": "Add rails as development dependency\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails_engine_decorators/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificat... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize solution - yay green specs\n"
},
{
"from": "human",
"value": "class ResistorColorDuo\n\n def self.value(colors)\n number = \"#{ColorValues[colors[0]]}\" + \"#{ColorValues[colors[1]]}\"[0]\n number.to_i\n end\n\n ColorValues = {\n \"black\" => ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Framer Studio.app to version 1.9.39\n"
},
{
"from": "human",
"value": "cask :v1 => 'framer-studio' do\n version '1.9.9'\n sha256 '87ef1a7cf363e772a1c0cbc2dd6ca6dceb41d677b547b0cac28a8c982557650f'\n\n url \"http://studio.update.framerjs.com/static/downloads... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to instance variable in MPDConnection singleton.\n"
},
{
"from": "human",
"value": "class MPDConnection\n def self.mpd\n @@mpd ||= MPD.new\n @@mpd.connect unless @@mpd.connected?\n @@mpd\n end\n\n def self.status\n self.mpd.status\n end\nend\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add districts controller via scaffold_helper\n"
},
{
"from": "gpt",
"value": "class DistrictsController < ApplicationController\n before_action :set_district, only: [:show, :edit, :update, :destroy]\n\n # GET /districts\n # GET /districts.json\n def index\n @d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the preselection of values in the page asset picker\n"
},
{
"from": "human",
"value": "module Islay::Admin::PagesHelper\n def contents_field(slug, type, val)\n name = \"page[contents][#{slug}]\"\n\n case type\n when :image\n vals = @assets.map do ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.