conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix an ad-hoc comment out\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Rubocop\n module Cop\n module VariableInspector\n # This class represents each reference of a variable.\n class Reference\n include Locatable\n\n att...
ruby
chosen
[ { "from": "system", "value": "Remove methods before re-defining them\n\nThis prevents ruby from dumping a ton of \"method redefined\" warnings to the console." }, { "from": "human", "value": "module FakeFS\n # Kernel Module\n module Kernel\n @captives = { original: {}, hijacked: {} }\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add newline for increased readability\n" }, { "from": "human", "value": "module FilmBuff\n class IMDb\n attr_accessor :locale\n\n include HTTParty\n include HTTParty::Icebox\n cache :store => 'memory', :timeout => 120\n\n base_uri 'https://app.imdb.c...
ruby
chosen
[ { "from": "system", "value": "Check for definition of Rails.env rather than Rails\n\nSee #842\n" }, { "from": "human", "value": "require 'haml/template/options'\nrequire 'haml/engine'\nif defined?(ActiveSupport)\n ActiveSupport.on_load(:action_view) do\n require 'haml/helpers/action_view_mod...
ruby
chosen
[ { "from": "system", "value": "Fix fatal issue that Hamlit depends on Haml\n\nFix #125\n" }, { "from": "human", "value": "# frozen_string_literal: true\n# Hamlit::Parser uses original Haml::Parser to generate Haml AST.\n# hamlit/parser/haml_* are modules originally in haml gem.\n\nrequire 'hamlit...
ruby
chosen
[ { "from": "system", "value": "Return not working message if endpoint returns invalid JSON\n" }, { "from": "human", "value": "require 'bundler'\nrequire 'yaml'\nrequire 'active_support/hash_with_indifferent_access'\n\nBundler.require\nDotenv.load\n\nget '/' do\n erb :index\nend\n\nget '/example'...
ruby
chosen
[ { "from": "human", "value": "Complete initial solution passing all tests\n" }, { "from": "gpt", "value": "# Shortest String\n\n# I worked on this challenge [by myself].\n\n# shortest_string is a method that takes an array of strings as its input\n# and returns the shortest string\n#\n# +list_of_...
ruby
chosen
[ { "from": "human", "value": "Add a tool that generates data to use many segments\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n#\n# Copyright(C) 2019 Kouhei Sutou <kou@clear-code.com>\n#\n# This library is free software; you can redistribute it and/or\n# modify it under the terms of the ...
ruby
chosen
[ { "from": "system", "value": "Change nonblocking send test to use timedsend\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass MqueueTest < MiniTest::Unit::TestCase\n def setup\n @queue_name = \"/test-queue\"\n @queue = POSIX::Mqueue.new(@queue_name)\n end\n\n def teardow...
ruby
chosen
[ { "from": "system", "value": "Reset the .monk config after each test.\n" }, { "from": "human", "value": "require \"rubygems\"\nrequire \"contest\"\nrequire \"hpricot\"\n\nROOT = File.expand_path(File.join(File.dirname(__FILE__), \"..\"))\n\n$:.unshift ROOT\n\nrequire \"test/commands\"\n\nclass T...
ruby
chosen
[ { "from": "system", "value": "Write test log output to file\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(\"../lib\", __dir__)\nrequire \"streamy\"\nrequire \"minitest/autorun\"\nrequire \"minitest/focus\"\nrequire \"mocha/minitest\"\nrequire \"streamy/helpers/minitest_h...
ruby
chosen
[ { "from": "system", "value": "Package version is incremented from 0.2.0 to 0.2.1\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'http-commands'\n s.version = '0.2.0'\n s.summary = 'Convenience abstractions for common HTTP operations, such as post and get'\n s.des...
ruby
chosen
[ { "from": "system", "value": "Revert rolling restarts to 3 hours\n" }, { "from": "human", "value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['RAILS_MAX_THREADS'] || 2)\nthreads threads_count, threads_count\n\npreload_app!\n\nrackup DefaultRackup\nport ...
ruby
chosen
[ { "from": "system", "value": "Use `inner_html` instead of `children.to_s`\n\nReturns the intended html\n" }, { "from": "human", "value": "require 'nokogiri'\nrequire 'nokogumbo'\n\nmodule Emcee\n # Document is responsible for parsing HTML and handling interaction with the\n # resulting documen...
ruby
chosen
[ { "from": "system", "value": "Remove date property from gemspec. This is set automatically.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'tzinfo-data'\n s.version = '1.2012.9'\n s.date = '2012-10-01'\n s.summary = 'Data for the TZInfo library'\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Delete OutgoingMessage changes as we don't use these\n" }, { "from": "human", "value": "# Add a callback - to be executed before each request in development,\n# and at startup in production - to patch existing app classes.\n# Doing so in init/environment.rb wouldn't...
ruby
chosen
[ { "from": "system", "value": "Remove use of java.util.concurrent.LinkedBlockingQueue because it doesn't buy us anything but complexity\n" }, { "from": "human", "value": "require 'thread'\n\n\n# Extend the normal queue class with some useful methods derived from\n# its java counterpart\n\n\nif de...
ruby
chosen
[ { "from": "system", "value": "Call init first Tumugi::Logger instance access\n" }, { "from": "human", "value": "require 'logger'\nrequire 'forwardable'\nrequire 'singleton'\n\nmodule Tumugi\n class Logger\n include Singleton\n extend Forwardable\n def_delegators :@logger, :debug, :erro...
ruby
chosen
[ { "from": "system", "value": "Add 'read the README' to the 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 'league_of_legends/version'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate subject from appointment ticket" }, { "from": "human", "value": "class AppointmentTicket\n ZENDESK_API_URL = 'https://pensionwise.zendesk.com/api/v2'\n ZENDESK_ONLINE_BOOKING_GROUP = 24_532_022\n\n def initialize(appointment)\n @appointment = ...
ruby
chosen
[ { "from": "system", "value": "Add spec for filtering schedules\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe BenchmarkSchedule do\n let(:schedule_file) { Rails.application.config.benchmark_schedule }\n context 'when schedule is inactive'...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "module EY\n VERSION = '2.0.11'\n ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.5'\nend\n" }, { "from": "gpt", "value": "module EY\n VERSION = '2.0.12.pre'\n E...
ruby
chosen
[ { "from": "system", "value": "Add TODO for stopping teams\n" }, { "from": "human", "value": "require \"eventmachine\"\n\nmodule GotchaBot\n class AlreadyStartedError < StandardError; end\n\n class Factory\n class << self\n def startup!(configuration={})\n raise AlreadyStartedErr...
ruby
chosen
[ { "from": "system", "value": "Add destroy: option to QtObjectBase.new\n" }, { "from": "human", "value": "require 'qml/c_lib'\nmodule QML\n class QtObjectBase\n\n def initialize(ptr)\n self.pointer = ptr\n @_gc_protected = []\n end\n\n def pointer\n @_pointer\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Use Rails.configuration.to_prepare to load patches\n" }, { "from": "human", "value": "# Set up autoload of patches\ndef apply_patch(&block)\n ActionDispatch::Callbacks.to_prepare(&block)\nend\n\napply_patch do\n require_dependency 'redmine_diff_email/patches/chang...
ruby
chosen
[ { "from": "system", "value": "Support yaml format for retriever settings\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nrequire 'mail_processor'\n\nmodule Typedown2Blog\n class Spec\n def self.setup &block\n instance_eval &block if block_given?\n self\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add `to_s`. because if action is symbol instance, raises error\n" }, { "from": "human", "value": "module ValueCaster\n class Event\n def initialize(event_name, action:, method: nil)\n @name = event_name\n @action = action\n @method = method || :...
ruby
chosen
[ { "from": "system", "value": "Make examples specs all pass\n" }, { "from": "human", "value": "describe Rambo::RSpec::Examples do\n let(:raml_file) { File.expand_path(\"../../../support/foobar.raml\", __FILE__) }\n let(:raml) { Raml::Parser.parse(File.read(raml_file)) }\n\n subject { Rambo::RS...
ruby
chosen
[ { "from": "system", "value": "Add undeclared dependencies for thrift\n\nthrift requires rack and thin in its Thrift::ThinHTTPServer but does\nnot declare them in the gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nVERSION = File.read(\"CHANGELOG\")[/^\\s*v([\\d\\w\\.]+)(...
ruby
chosen
[ { "from": "human", "value": "Add the base for the tests and the TODO list\n" }, { "from": "gpt", "value": "# TODO: For a given number, return the sequence from 1 to that number but with the following sustitutions:\n#\n# * If the number is **not divisible** by **2** or **3**, then the number will...
ruby
chosen
[ { "from": "system", "value": "Add @wakkowarner as author and rename @splattael's name\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubyfox/server/version'\n\nGem::Specif...
ruby
chosen
[ { "from": "system", "value": "Update description of emission calculation scope\n" }, { "from": "human", "value": "require 'emitter'\n\nmodule BrighterPlanet\n module Automobile\n extend BrighterPlanet::Emitter\n scope 'The automobile emission estimate is the total anthropogenic emissions ...
ruby
chosen
[ { "from": "system", "value": "Enable printing of a proper stack trace by Rake when we err out\n" }, { "from": "human", "value": "require 'rake'\nrequire 'sshkit'\n\nrequire 'capistrano/version'\nrequire 'capistrano/i18n'\nrequire 'capistrano/dsl'\nrequire 'capistrano/application'\nrequire 'capis...
ruby
chosen
[ { "from": "system", "value": "Add new and create Routes for Topics\n\nUpdate the routing file to include new and create actions for Topics.\n" }, { "from": "human", "value": "Ifsimply::Application.routes.draw do\n devise_for :users, :controllers => { :registrations => 'registrations' }\n\n roo...
ruby
chosen
[ { "from": "system", "value": "Add Routes for Blog update and Image Update\n\nAdd routing to accommodate updating a Blog, to include changing its\ncorresponding image.\n" }, { "from": "human", "value": "Ifsimply::Application.routes.draw do\n devise_for :users, :controllers => { :registrations =>...
ruby
chosen
[ { "from": "system", "value": "Refactor ratings find route to emit json\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root 'static_pages#index'\n mount Buttercms::Engine => '/blog'\n\n resources :genres\n resources :casts, defaults: {:format => 'json'}\n \n resources...
ruby
chosen
[ { "from": "system", "value": "Change the path prefix of workspace actions\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root 'home#index'\n\n resources 'workspaces', path: 's', format: false do\n resources 'sequences', param: :name,\n format...
ruby
chosen
[ { "from": "system", "value": "Allow environment to configure root redirect" }, { "from": "human", "value": "Rails.application.routes.draw do\n root to: redirect('/register')\n get '/register', as: 'new_user_profile', to: 'user_profiles#new'\n post '/register', as: 'user_profile', to: 'user_pr...
ruby
chosen
[ { "from": "system", "value": "Add nested drops to get json for maps\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root 'maps#index'\n\n resources :maps, only: [:index]\n get \"/drops/followees\" => 'drops#followees'\n resources :users, only: [:show] do\n resources ...
ruby
chosen
[ { "from": "system", "value": "Use patch as per rails 4\n" }, { "from": "human", "value": "Shreds::Application.routes.draw do\n\n require 'sidekiq/web'\n mount Sidekiq::Web => '/sidekiq'\n\n resources :feeds, only: [:index, :create, :show, :destroy], path: '/', format: false do\n resources ...
ruby
chosen
[ { "from": "system", "value": "Add convenience link to redirect to Community Discord server\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n get '/.well-known/acme-challenge/:id' => 'pages#letsencrypt'\n get \"/*action\", controller: :pages, as: :page\n root to: \"pages#ho...
ruby
chosen
[ { "from": "system", "value": "Add documentation to the `Eigenclass` module and method\n" }, { "from": "human", "value": "require 'forwardable'\nrequire 'eigenclass/version'\n\nmodule Eigenclass\n extend Forwardable\n\n def_delegator :eigenclass, :attr_accessor, :eattr_accessor\n def_delegator...
ruby
chosen
[ { "from": "system", "value": "Fix partial exclusion for Ruby 1.8\n\nstr[Fixnum] in 1.9 returns the `chr` equivalent of the index position,\nbut 1.8 returned the character code. Using the `[offset, length]` form\nshould work portably here.\n" }, { "from": "human", "value": "require 'guard'\nrequi...
ruby
chosen
[ { "from": "system", "value": "Make Hamburglar default to MaxMind until FraudGuardian is added" }, { "from": "human", "value": "require 'hamburglar/errors'\n\nmodule Hamburglar\n autoload :Version, 'hamburglar/version'\n autoload :Report, 'hamburglar/report'\n autoload :Gateways, 'hamburgla...
ruby
chosen
[ { "from": "system", "value": "Change Collection namespace to Sliced\n" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'mongo'\nrequire 'mongo_ha'\nrequire 'mongo_mapper'\nrequire 'semantic_logger'\nrequire 'rocket_job/version'\n\nmodule RocketJob\n autoload :CLI, '...
ruby
chosen
[ { "from": "system", "value": "Tweak permalink transformation again so existing tests don't break\n\ngit-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1014 820eb932-12ee-0310-9ca8-eeb645f39767\n" }, { "from": "human", "value": "class String\n # Returns a-string-with-dashes when passed 'a stri...
ruby
chosen
[ { "from": "system", "value": "Use AS.on_load in the initializer\n\nwithout these hooks, `require 'turbolinks'` immediately triggers ActionController, ActionDispatch, and ActionView initializers\n" }, { "from": "human", "value": "require 'turbolinks/version'\nrequire 'turbolinks/xhr_headers'\nreq...
ruby
chosen
[ { "from": "system", "value": "Check for installed devkit after upgrade\n\nCloses #151" }, { "from": "human", "value": "# :DK-BEG: missing DevKit/build tool convenience notice\nGem.pre_install do |gem_installer|\n unless gem_installer.spec.extensions.empty?\n have_tools = %w{gcc make sh}.all?...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.17.0.0 to 0.17.1.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.17.0.0'\n s.summary = 'Common primitives for platform-specific messaging im...
ruby
chosen
[ { "from": "system", "value": "Order users by id instead of login\n" }, { "from": "human", "value": "class Admin::UsersController < Admin::BaseController\n cache_sweeper :blog_sweeper\n\n def index\n @users = User.order('login asc').page(params[:page]).per(this_blog.admin_display_elements)\n...
ruby
chosen
[ { "from": "system", "value": "Add missing kubernetes icon to alert screens\n" }, { "from": "human", "value": "class AlertsListController < ApplicationController\n extend ActiveSupport::Concern\n\n before_action :check_privileges\n before_action :session_data\n after_action :cleanup_action\n ...
ruby
chosen
[ { "from": "system", "value": "Fix API Query For Motion To Use Amendment Text\n" }, { "from": "human", "value": "class Api::MotionsController < ApiController\n def index\n \t@motions = if @@query.empty?\n \t\tpaginate Motion.all.order(change_query_order), per_page: change_per_page\n \telse\n\...
ruby
chosen
[ { "from": "system", "value": "Set global default to make root node false\n" }, { "from": "human", "value": "class ApplicationController < ActionController::API\n include ActionController::Serialization\nend\n" }, { "from": "gpt", "value": "class ApplicationController < ActionControl...
ruby
chosen
[ { "from": "system", "value": "Add rescue from record not found clause\n\nThis will make the app return 404 when user tries\nto act on non-existing id\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # Fo...
ruby
chosen
[ { "from": "system", "value": "Change current_user to use find_by\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n\t# Prevent CSRF attacks by raising an exception.\n\t# For APIs, you may want to use :null_session instead.\n\tprotect_from_forgery with: :exc...
ruby
chosen
[ { "from": "system", "value": "Add support for a post update script\n" }, { "from": "human", "value": "module V1\n class WebhooksController < BaseController\n # No authorization necessary for webhook\n skip_before_action :doorkeeper_authorize!\n\n # POST /v1/webhooks/github\n def git...
ruby
chosen
[ { "from": "human", "value": "Add tests for exception saving in parallel Rye::Set results\n" }, { "from": "gpt", "value": "require \"rye\"\n\n## save any raised exceptions\nset = Rye::Set.new(\"set test\", :parallel => true)\nset.add_boxes(\"localhost\", \"_\")\nset.hostname.last.first.class\n#=>...
ruby
chosen
[ { "from": "system", "value": "Fix to include license file to gem\n\nThis is a fix for 3064d756.\n" }, { "from": "human", "value": "$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'execjs/version'\n\nGem::Specification.new do |s|\n s.name = \"execjs\"\n s.version = ExecJS::VERSION\n...
ruby
chosen
[ { "from": "system", "value": "Update haml version, so it doesn’t include Sass anymore.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"control_center/version\"\n\nGem::Specification.new do |s| \n s.name = \"control_center\...
ruby
chosen
[ { "from": "system", "value": "Use Zeitwerk for loading models in Rails 6\n\nIn Rails 6, model loading is no longer working. This is because Zeitwerk has\nreplaced the original code loading. We now use Zeitwerk if it's available.\n" }, { "from": "human", "value": "module AlgoliaSearch\n module U...
ruby
chosen
[ { "from": "system", "value": "Make ping time in minutes configurable\n" }, { "from": "human", "value": "module Lita\n module Handlers\n class Keepalive < Handler\n config :url, required: true, type: String\n\n http.get \"/ping\" do |request, response|\n response.body << \"po...
ruby
chosen
[ { "from": "system", "value": "Use YAML's load_file instead of doing File read and YAML load\n" }, { "from": "human", "value": "require \"yaml\"\n\nmodule RockConfig\n class YamlLoader\n def find_at(directory, file_name)\n path = full_path(directory, file_name)\n\n if readable?(path...
ruby
chosen
[ { "from": "system", "value": "Correct calculation of number of bytes to generate for a particular length of random string\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire 'base58'\n\nmodule Spontaneous\n module Permissions\n\n autoload :UserLevel, \"spontaneous/permissions/use...
ruby
chosen
[ { "from": "human", "value": "Reset groups task take 1\n" }, { "from": "gpt", "value": "desc \"Reset Group Table, and sets all members' group_id to null\"\ntask :reset_groups_pg do\n Member.update_all(group_id: nil)\n ActiveRecord::Base.connection.execute(\"TRUNCATE TABLE groups RESTART IDENTIT...
ruby
chosen
[ { "from": "system", "value": "Fix pluralization of CompanyProject model" }, { "from": "human", "value": "class CompanyProjects < ActiveRecord::Base\n has_paper_trail\n\n belongs_to :project\n belongs_to :company\nend\n\n# == Schema Information\n#\n# Table name: company_projects\n#\n# company...
ruby
chosen
[ { "from": "system", "value": "Add app/vnd.ms-excel as a valid curve MIME type\n\nRef #405\n" }, { "from": "human", "value": "module CurveComponent\n VALID_CSV_TYPES = [\"data:text/csv\", \"text/csv\", \"text/plain\",\n \"application/octet-stream\"]\n\n def as_json(*)\n s...
ruby
chosen
[ { "from": "system", "value": "Support gene names in the direct linking\n" }, { "from": "human", "value": "class FrontendRouter\n attr_reader :id_type, :id\n def initialize(id_type, id)\n @id_type = id_type || ''\n @id = id\n end\n\n def url\n (entity, query_field) = query_info\n ...
ruby
chosen
[ { "from": "system", "value": "Handle to_param case where name is blank\n" }, { "from": "human", "value": "module Nightlight\n class Page < ActiveRecord::Base\n belongs_to :assignee, class_name: \"User\"\n has_many :activities, dependent: :destroy\n\n validates :path, presence: true, un...
ruby
chosen
[ { "from": "system", "value": "Add further options for Pension Awareness Week\n" }, { "from": "human", "value": "class WhereYouHeard\n OPTIONS = {\n '1' => 'An employer',\n '2' => 'A Pension Provider',\n '3' => 'Internet search',\n '4' => 'Online advertising',\n '5' => 'Socia...
ruby
chosen
[ { "from": "system", "value": "Cover alternative invoice template with specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe InvoiceRenderer do\n let(:service) { described_class.new }\n\n it \"creates a PDF invoice\" do\n order = create(:completed_order_with_fees)\n o...
ruby
chosen
[ { "from": "system", "value": "Add the cucumber gem dependency\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name = \"figaro\"\n gem.version = \"0.1.0\"\n\n gem.authors = [\"Steve Richert\"]\n gem.email = [\"steve.richert@gmail.com\...
ruby
chosen
[ { "from": "system", "value": "Fix summary/desc wording in 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 'fintop/version'\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary Spree::Config fallback value\n" }, { "from": "human", "value": "class SearchOrders\n attr_reader :orders\n\n def initialize(params, current_user)\n @params = params\n @current_user = current_user\n\n @orders = fetch_orders\n end\n\n d...
ruby
chosen
[ { "from": "system", "value": "Add link_type to the link_change factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :link_change, class: Hash do\n sequence :id, 1, &:to_s\n\n sequence :source, 1 do |n|\n { title: \"source title #{n}\",\n base_path: \"sour...
ruby
chosen
[ { "from": "system", "value": "Remove spec coverage of district option that doesn't make sense anymore\n\n+ We removed district as a configurable option a couple of commits ago (we're trusting ENV as our only source of truth on this), so the specs that were testing required district configuration don't make ...
ruby
chosen
[ { "from": "human", "value": "Add an integration test for sprockets.\n" }, { "from": "gpt", "value": "# Frozen-string-literal: true\n# Copyright: 2012-2015 - MIT License\n# Encoding: utf-8\n\nrequire \"rspec/helper\"\ndescribe \"Sprockets integration\" do\n let( :env) { Jekyll::Assets::Env.new(s...
ruby
chosen
[ { "from": "human", "value": "Add stub FakeTwilioClient for testing Twilio\n" }, { "from": "gpt", "value": "class FakeTwilioClient\n Message = Struct.new(:from, :to, :body)\n\n cattr_accessor :messages\n self.messages = []\n\n def initialize\n end\n\n def messages\n self\n end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add pending invited friendships to user api endpoint\"\n\nThis reverts commit 0d73bf621919e17be9f1b5f14083681cf6672268.\n" }, { "from": "human", "value": "user = @user\njson.user do\n json.id user.id\n json.user_name user.user_name\n json.introduction us...
ruby
chosen
[ { "from": "system", "value": "Change the reference for ruby executable" }, { "from": "human", "value": "#!/home/jhonnymoreira/.rbenv/shims/ruby\nrequire 'fileutils'\n\nEXTENSIONS = {\n crystal: '.cr',\n javascript: '.js',\n python: '.py',\n ruby: '.rb'\n}\n\nproject_name, *project_langs = AR...
ruby
chosen
[ { "from": "system", "value": "Fix issues with finding bus stops\n" }, { "from": "human", "value": "class BusStopsController < ApplicationController\n\n version 1\n caches :show, :index\n\n def index\n scope = BusStop.limit(5)\n scope = scope.stop_near(params[:near]) if params[:near]\n ...
ruby
chosen
[ { "from": "system", "value": "Fix feedback form after adding React\n" }, { "from": "human", "value": "class FeedbacksController < ApplicationController\n def new\n @feedback = Feedback.new\n @chat_room = ChatRoom.find_by(id: params[:chat_room_id])\n @chat = @chat_room.chats.find_by(nat...
ruby
chosen
[ { "from": "system", "value": "Allow puppet-lint 2.0 as a dependency and bump check version\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'puppet-lint-world_writable_files-check'\n spec.version = '0.0.1'\n spec.homepage = 'https://github.com/de...
ruby
chosen
[ { "from": "human", "value": "Complete and upload 8.6 Ruby Review\n" }, { "from": "gpt", "value": "# U2.W6: Testing Assert Statements\n\n# I worked on this challenge by myself.\n\n\n# 1. Review the simple assert statement\n\ndef assert\n raise \"Assertion failed!\" unless yield\nend\n\nname = \"...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Make sure Ruby's PortProber.above checks all network interfaces.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@16769 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n class PortProb...
ruby
chosen
[ { "from": "system", "value": "Update podspec to version 0.4\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'AssistantKit'\n s.version = '0.3'\n s.summary = 'Easy way to detect and work with  device environments written in Swift'\n\n s.descri...
ruby
chosen
[ { "from": "system", "value": "Use input arguments for the conversion rather than hardcoded file names\n" }, { "from": "human", "value": "require 'json'\nrequire 'hashie'\n\nmercator = IO.read(\"waze/1396867493_mercator.txt\")\nhash = JSON.parse mercator\nmsg = Hashie::Mash.new hash\nFile.open(\"...
ruby
chosen
[ { "from": "system", "value": "Update Sequel Pro to 1.0 RC\n" }, { "from": "human", "value": "dmg_package \"Sequel Pro\" do\n volumes_dir \"Sequel Pro 0.9.9.1\"\n source \"http://sequel-pro.googlecode.com/files/Sequel_Pro_0.9.9.1.dmg\"\n action :install\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Update Diskmaker X to v5.0.3\n\nTurns Diskmaker X back into a versioned cask. The author of Diskmaker reached out to us and has re-uploaded the versioned downloads for us to use. Thanks @diskmakerx!\nFor more information about this commit please check the discussion related to ...
ruby
chosen
[ { "from": "human", "value": "Add Drop to GIF.app version 1.25\n\nZero-click movie to GIF conversion. Select a folder to watch and every movie saved or moved into that folder will be converted to an animated GIF. https://github.com/mortenjust/droptogif\n" }, { "from": "gpt", "value": "cask :v1 =>...
ruby
chosen
[ { "from": "system", "value": "Add phantomjs and casperjs as node modules\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nputs \"Running Node version: #{`node --version`}\"\nnpms = {\n # module name => module command\n # leave command blank if they are the same\n \"coffee-script\" =>...
ruby
chosen
[ { "from": "human", "value": "Add iOS Console (0.9.8) to Cask\n\nI've added this as a :latest version as I can't find a versioned link.\nI've also selected the :gratis license as it's free to use, but closed\nsource.\n" }, { "from": "gpt", "value": "cask :v1 => 'ios-console' do\n version :latest...
ruby
chosen
[ { "from": "system", "value": "Build one option for the questions form when creating a new question\n" }, { "from": "human", "value": "class Admin::Legislation::QuestionsController < Admin::Legislation::BaseController\n load_and_authorize_resource :process, class: \"Legislation::Process\"\n loa...
ruby
chosen
[ { "from": "system", "value": "Add user_keys api index order by name\n" }, { "from": "human", "value": "module Atmosphere\n module Api\n module V1\n class UserKeysController < Atmosphere::Api::ApplicationController\n load_and_authorize_resource :user_key,\n class: 'Atmosp...
ruby
chosen
[ { "from": "system", "value": "Fix loading error due to modifying $: after the load.\n" }, { "from": "human", "value": "require \"terrachef/version\"\n\n# TODO: figure out how to do this right.\n$: << File.dirname(__FILE__)\nrequire 'terraform'\n" }, { "from": "gpt", "value": "# TODO:...
ruby
chosen
[ { "from": "human", "value": "Add script for getting data about training due dates and completion\n" }, { "from": "gpt", "value": "require 'csv'\n\ncohort = Cohort.find_by(slug: 'spring_2016')\n\n# CSV of all assigned training modules for courses in the cohort:\n# course slug, training module, du...
ruby
chosen
[ { "from": "system", "value": "Add pending for checking license in builder from develop\n\nSince #205\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'DocumentBuilder licensing' do\n it 'running docbuilder create temp license' do\n skip if ENV['BUILDER_PLATFORM'] == 'WEB'...
ruby
chosen
[ { "from": "system", "value": "Set up spec tests for pd_regimes controller.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe PdRegimesController, :type => :controller do\n\nend\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe PdRegim...
ruby
chosen
[ { "from": "system", "value": "Add step for creating a repository\n" }, { "from": "human", "value": "When(/^I enter the (.*) URL of a public repository$/) do |transport|\n url =\n case transport\n when 'Git'\n 'git://github.com/git/git.git'\n when 'HTTPS'\n 'https://github.com...
ruby
chosen
[ { "from": "system", "value": "Update Sound Control to 2.2.0\n" }, { "from": "human", "value": "cask 'sound-control' do\n version '2.1.6,4297'\n sha256 '33feccad185a1cc53ac5e8e89202484254ca2f737ebf3ea86a988296f93c44a9'\n\n url \"https://staticz.com/download/#{version.after_comma}/\"\n name 'S...
ruby
chosen
[ { "from": "system", "value": "Fix typo in serializer option on page serializer\n" }, { "from": "human", "value": "require 'active_model_serializers'\n\nclass PageSerializer < ActiveModel::Serializer\n attributes :label, :slug, :full_path,\n :meta_description, :meta_title, :category_...
ruby
chosen