conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add FCE CO2 attributes to Carrier\n" }, { "from": "human", "value": "module Atlas\n class Carrier\n include ActiveDocument\n\n DIRECTORY = 'carriers'\n\n attribute :sustainable, Float\n attribute :infinite, Boolean\n ...
ruby
chosen
[ { "from": "system", "value": "Fix reference to whence file, which is now the file name instead of 'eval'\n" }, { "from": "human", "value": "#!/usr/bin/ruby -w\n# -*- ruby -*-\n\nmodule Logue\n VERSION = '1.0.17'\nend\n" }, { "from": "gpt", "value": "#!/usr/bin/ruby -w\n# -*- ruby -*...
ruby
chosen
[ { "from": "system", "value": "Use https for author twitter link\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'EnvoyAmbassador'\n spec.version = '4.0.0'\n spec.summary = 'Lightweight web framework in Swift based on SWSGI'\n spec.homepage = 'ht...
ruby
chosen
[ { "from": "system", "value": "Fix namespace in reference to ResqueFuture::FutureJob\n" }, { "from": "human", "value": "unless defined?(Resque)\n puts \"ResqueFuture requires Resque, please require \\\"resque\\\"\"\n exit(1)\nend\n\nrequire \"resque_future/future_job\"\nrequire \"resque/future\...
ruby
chosen
[ { "from": "system", "value": "Make sure sidekiq is required\n" }, { "from": "human", "value": "require \"sidekiq/testing\"\n\nrequire \"rspec/sidekiq/batch\"\nrequire \"rspec/sidekiq/configuration\"\nrequire \"rspec/sidekiq/helpers\"\nrequire \"rspec/sidekiq/matchers\"\nrequire \"rspec/sidekiq/s...
ruby
chosen
[ { "from": "system", "value": "Change type assembly_district field in schools DB\n" }, { "from": "human", "value": "class CreateSchools < ActiveRecord::Migration\n def change\n create_table :schools do |t|\n \tt.string :dbn\n t.string :school\n t.integer :total_enrollment\n ...
ruby
chosen
[ { "from": "system", "value": "Add some helper methods to admin to renew/release ip addresses." }, { "from": "human", "value": "ActiveAdmin.register Devices::Device, as: 'Device' do\nend\n" }, { "from": "gpt", "value": "ActiveAdmin.register Devices::Device, as: 'Device' do\n\n member...
ruby
chosen
[ { "from": "system", "value": "Change excerpt name and correct instagram url\n" }, { "from": "human", "value": "module ItemsHelper\n\n def itemable_items_path(itemable)\n if itemable.class.name =~ /Channel$/\n channel_items_path(channel_id: itemable.id)\n else\n items_path(entity...
ruby
chosen
[ { "from": "system", "value": "Change Bundler dependency to runtime one\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'safedep/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "human", "value": "Add Solaris class in preparation for newer versions of Chef\n\nUser creation is splitting out into a new class for\nsolaris/smartos on chef master." }, { "from": "gpt", "value": "\nclass Chef\n class Provider\n class User\n class Solaris < Chef::Provider::Us...
ruby
chosen
[ { "from": "system", "value": "Clarify class name based on _klass context\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Catscan\n module Scannable\n\n class << self\n def included _klass\n _klass.class_eval do\n _klass.send(:extend, ClassMethods)\n ...
ruby
chosen
[ { "from": "system", "value": "Use temp dir when cannot mkdir at Coinmux.root" }, { "from": "human", "value": "require 'fileutils'\n\nmodule Coinmux::FileUtil\n class << self\n def root_mkdir_p(*path)\n begin\n FileUtils.mkdir_p(path = File.join(Coinmux.root, *path))\n rescue...
ruby
chosen
[ { "from": "system", "value": "Remove filler text from gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"gilt/version\"\n\nGem::Specification.new do |s|\n s.name = \"gilt-rb\"\n s.version = Gilt::VERSION\n ...
ruby
chosen
[ { "from": "human", "value": "Add a benchmark for capture vs. assign in Liquid. [ci skip]\n" }, { "from": "gpt", "value": "require \"liquid\"\nrequire \"benchmark/ips\"\n\nputs \"Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}\"\nputs \"Liquid #{Liquid::VERSION}\"\n\ntemplate1 = '{% capture foobar %}foo...
ruby
chosen
[ { "from": "system", "value": "[Gemspec] Upgrade xcodeproj dependency to match new cocoapods verison's.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'slather/version'\n\nGem::Specif...
ruby
chosen
[ { "from": "system", "value": "Add yard docks for Ducktrap::External\n" }, { "from": "human", "value": "class Ducktrap\n class External < self\n register :extern\n\n def inverse\n self.class.new(inverse_block, forward_block)\n end\n\n def run(input)\n Result::Static.new(sel...
ruby
chosen
[ { "from": "system", "value": "Fix \"helper\" mode, typo corrected.\n\n\ngit-svn-id: 40196796c19c0e7557af02d93710b150381d7241@72 f5dbc166-08e2-44d3-850c-36126807790f\n" }, { "from": "human", "value": "require 'dtracer'\nrequire 'dtracer_client'\n\nmodule DtraceReport\n\n def self.included(base)\...
ruby
chosen
[ { "from": "system", "value": "Allow alternate layout or node name to be passed into Woodhouse::Process.\n" }, { "from": "human", "value": "# TODO: take arguments. Also consider using thor.\nclass Woodhouse::Process\n \n def execute\n @server = Woodhouse::Server.new\n @server.layout = Woo...
ruby
chosen
[ { "from": "system", "value": "Set min test-coverage (of tests) on server to 100%\n" }, { "from": "human", "value": "\nMIN = {\n test_count:1,\n app_coverage:100,\n test_coverage:98,\n line_ratio:2.1,\n hits_ratio:0.7\n}\n\nMAX = {\n failures:0,\n errors:0,\n warnings:6,\n skips:0,\n du...
ruby
chosen
[ { "from": "system", "value": "Fix require for old Ruby\n" }, { "from": "human", "value": "require_relative 'lib/fotoramajs/version'\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'fotoramajs'\n s.version = Fotoramajs::VERSION\n s.summary = 'F...
ruby
chosen
[ { "from": "system", "value": "Fix missing shared sockets folder [ci skip]\n" }, { "from": "human", "value": "require \"bundler/capistrano\"\n\nset :deploy_via, :remote_cache\nset :application, \"devcon\"\nset :repository, \"git://github.com/devcon-ph/devcon.git\"\nset :deploy_to, \"/home/deploy/...
ruby
chosen
[ { "from": "system", "value": "Configure to route to controllers in API module\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n resources :expanded_test_ads\n resources :ad_groups\n resources :campaigns\n # For details on the DSL available within this file, see http://gui...
ruby
chosen
[ { "from": "system", "value": "Add route for recruiter show\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n authenticated :developer do\n root 'developers#profile', as: :developer_root\n end\n\n authenticated :recruiter do\n root 'search#index', as: :recruiter_root\...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for active support to < 8 also\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\nrequire File.expand_path('../lib/flipper/metadata', __FILE__)\n\nflipper_active_support_cache_st...
ruby
chosen
[ { "from": "system", "value": "Update NICAB script to handle most recent CSV\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'csv'\nrequire 'geocoder'\nrequire 'json'\n\nlocations = []\n\n# \"Antrim CAB\",\"Farranshane House\",\"1 Ballygore Road\",\"Antrim\",\"BT41 2RN\"\nCSV.fo...
ruby
chosen
[ { "from": "system", "value": "Check for the right SassC string type\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'sass'\n\nmodule Sass::Script::Functions\n module AppAssetUrl\n def app_asset_url(name)\n assert_type name, :String\n result = %{url(\"#{a...
ruby
chosen
[ { "from": "system", "value": "Support rspec 3.0 syntax on JRuby, too.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# -*- encoding: utf-8 -*-\n#\n# fallback_pure_spec.rb - \"Fall back feature into pure ruby mode.\"\n# \n# Copyright (c) 2013 Kiyoka Nishiyama <kiyoka@sumibi.org>\n#...
ruby
chosen
[ { "from": "system", "value": "Move pg gem to a dev dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'xylem/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Make SSL work on heroku.\n" }, { "from": "human", "value": "module PapertrailSilverlineWebhook\n module Helpers\n def faraday(options = {})\n @faraday ||= begin\n options[:timeout] ||= 6\n Faraday.new(options) do |b|\n b.request :url_...
ruby
chosen
[ { "from": "system", "value": "Revert \"Dependency for active model\"\n\nThis reverts commit 72c7d09db27233f740e79908ece54e71e120d5e9.\n\nConflicts:\n\n\tjson_model.gemspec\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/json_model/version\", __FILE__)\n\nGem::Specification.n...
ruby
chosen
[ { "from": "system", "value": "Allow for loading all associated keywords efficiently\n" }, { "from": "human", "value": "class Item < ActiveRecord::Base\n include Taggable\n\n belongs_to :channel\n has_one :entity, through: :channel\n has_many :assets\n\n validates :guid, presence: :true\n v...
ruby
chosen
[ { "from": "system", "value": "Add relationship: Site -> User\n" }, { "from": "human", "value": "class Site < ActiveRecord::Base\n has_many :categories, dependent: :destroy\n has_many :posts, dependent: :destroy\n has_many :fixed_pages, dependent: :destroy\n has_many :links, dependent: :destr...
ruby
chosen
[ { "from": "system", "value": "Add eye and dotenv gems\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = \"distribot\"\n spec.version = '0.1.0'\n spec.authors = [\"John Drago\"]\n spec.email = \"jdrago.999@gmail.com\"\n spec.homepage = ...
ruby
chosen
[ { "from": "system", "value": "Refactor load_sprite_sheet and remove bottom-left/top-right sprites.\n" }, { "from": "human", "value": "class GameLayer < Joybox::Core::Layer\n scene\n\n def on_enter\n Joybox::Core::SpriteFrameCache.frames.add file_name: \"sprites.plist\"\n @sprite_batch = ...
ruby
chosen
[ { "from": "system", "value": "Hide users that don't want to be shown\n" }, { "from": "human", "value": "class Arp\n def self.all\n `ip neigh show nud reachable`.split(/\\n/).map do |entry|\n addresses = *entry.scan(/\\A([0-9a-f:.]*?) dev ([a-z0-9.]*?) lladdr ([0-9a-f:].*?) .*\\z/i).firs...
ruby
chosen
[ { "from": "system", "value": "Modify Urls model to add movie pictures.\n" }, { "from": "human", "value": "class Url\n include Mongoid::Document\n field :site_name, type: String\n field :origin_url, type: String\n field :title, type: String\n field :time, type: String\n field :tags, type: S...
ruby
chosen
[ { "from": "system", "value": "Use sets to initialize collection keys in Repository::Memory\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Blabber\n module Repository\n class Memory\n def initialize\n @memory = {}\n end\n\n def store(id, data)\n me...
ruby
chosen
[ { "from": "system", "value": "Add a tempate for the \"don't edit\" warning\n" }, { "from": "human", "value": "# invocation interval in seconds\ndefault[:sys][:chef][:interval] = 1800\n# invocation will be postponed by a random value up to this number of seconds:\ndefault[:sys][:chef][:spla...
ruby
chosen
[ { "from": "system", "value": "Make sure the error page debug view gets mounted\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'rails'\nrequire 'minitest/autorun'\nrequire 'minitest/pride...
ruby
chosen
[ { "from": "system", "value": "Support sending headers to requests\n" }, { "from": "human", "value": "module Fetch\n module Async\n def self.included(base)\n base.define_callback :url,\n :user_agent,\n :before_first_process,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove colons from section names\n\nCollapsible sections use colons as a separator, so we replace them in\nthe name with hyphens.\n" }, { "from": "human", "value": "module Gitlab\n class Util\n class << self\n def get_env(key)\n ENV[key]&.strip\n ...
ruby
chosen
[ { "from": "system", "value": "Improve yard documentation of Why()\n" }, { "from": "human", "value": "require 'results/why/base'\nrequire 'results/why/one'\nrequire 'results/why/many'\nrequire 'results/why/named'\n\nmodule Results\n module_function\n\n # Wraps `arg` in a `Why` by calling the ap...
ruby
chosen
[ { "from": "system", "value": "Include all js and css assets in precompilation\n" }, { "from": "human", "value": "require 'paperclip'\nrequire 'rack/raw_upload'\nrequire \"rich/authorize\"\n \nmodule Rich\n class Engine < Rails::Engine\n isolate_namespace Rich\n\n initializer \"rich.add...
ruby
chosen
[ { "from": "system", "value": "Comment out stub_authorize_user call - awaiting user auth helpers\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Comment features' do\n\tcontext \"on new comment page\" do\n\t\tlet(:query) { FactoryGirl.create(:query) }\n\t\tit \"can see a fo...
ruby
chosen
[ { "from": "system", "value": "Tweak feature spec to create overdue visits\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire_relative '../metrics/shared_examples_for_metrics'\n\nRSpec.feature 'Metrics', js: true do\n include ActiveJobHelper\n include_examples 'create visits wit...
ruby
chosen
[ { "from": "system", "value": "Add gregors as a gem author\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/twitter4j4r/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Tobias Crawley\", \"Marek Jelen\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Remove old reference code, as migrations are written.\n" }, { "from": "human", "value": "require \"logger\"\nrequire \"sequel\"\n\n$db = Sequel.connect(\"sqlite://database/database.db\", :logger => Logger.new(\"log/db.log\"))\n\n# $db.create_table :teams do\n# \tInt...
ruby
chosen
[ { "from": "system", "value": "Use HTTPS, since Heroku now supports it OOB.\n" }, { "from": "human", "value": "require 'readonce/version'\n\nrequire 'httparty'\n\nclass ReadOnce\n BASE_URI = 'http://readonce-production.herokuapp.com'\n\n def self.from_key(key)\n r = ReadOnce.new\n r.insta...
ruby
chosen
[ { "from": "system", "value": "Use \"minor\" update type for tag publishing\n\nSetting the update type to minor means we won't send email alerts for\nchanges to a topic title or description. This will become relevant if\ntopics will be tagged to other topics (we have no plans to do this, but\nwe need to be c...
ruby
chosen
[ { "from": "system", "value": "Use semantic versioning in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'NTMonthYearPicker'\n s.version = '1.0'\n\n s.summary = 'A simple month / year picker component for iOS.'\n s.description = 'NTMonthYearPicker is a simple...
ruby
chosen
[ { "from": "system", "value": "Add initial solution back in and use max in refactored solution\n" }, { "from": "human", "value": "# Largest Integer\n\n# I worked on this challenge [by myself].\n\n# largest_integer is a method that takes an array of integers as its input\n# and returns the largest...
ruby
chosen
[ { "from": "system", "value": "Fix up gemspec; add puma\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef_zero/version'\n\nGem::Specification.new do |s|\n s.name = \"chef-zero\"\n s.version = ChefZero::VERSION\n s.platform = Gem::Platform::RUBY\n s....
ruby
chosen
[ { "from": "system", "value": "Make iOS 8.4 as minimum requirement.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"APJSONMapping\"\n s.version = \"1.0\"\n s.summary = \"Objective-C class category which allows you to easily map your objects to dictionarie...
ruby
chosen
[ { "from": "human", "value": "Add missing indexes for Spree::Taxon lft and rgt columns\n\n* These are used by `awesome_nested_set` to perform ordering and\n therefore indexes should be added to them\n" }, { "from": "gpt", "value": "class AddLftAndRgtIndexesToTaxons < ActiveRecord::Migration[5.0]...
ruby
chosen
[ { "from": "human", "value": "Add playground for asciidoctor ruby api\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nrequire 'asciidoctor'\n\ntopics = Hash.new\n\nbase_dir = ARGV[0]\n\nDir.glob base_dir + '/docs/**/*.adoc' do |doc|\n Asciidoctor.convert_file doc, base_dir: base_dir, m...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.2.2 to 0.0.3.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-entity_projection'\n s.version = '0.0.2.2'\n s.summary = 'Projects an event stream into an ent...
ruby
chosen
[ { "from": "system", "value": "Make reference to 'WebKit' strong\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n\n s.name = \"KINWebBrowser\"\n\n s.version = \"1.1.0\"\n s.summary = \"A web browser module for your apps.\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Add license abbreviation to gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'httpauth'\n spec.version = '0.2.0'\n\n spec.author = \"Manfred Stienstra\"\n spec.email = \"manfred@fngtpspec.com\"\n spec.homepag...
ruby
chosen
[ { "from": "system", "value": "Improve test for content body\n" }, { "from": "human", "value": "require \"cc/engine/content\"\n\nRSpec.describe CC::Engine::Content do\n let(:linter) { \"AltText\" }\n\n subject(:content) { described_class.new(linter) }\n\n describe \"#body\" do\n subject { c...
ruby
chosen
[ { "from": "system", "value": "Change error type in api tests\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Magnum::Client::Connection do\n let(:connection) { Magnum::Client::Connection.new(\"token\") }\n\n describe \"invalid endpoint\" do\n before do\n stub_api...
ruby
chosen
[ { "from": "system", "value": "Use shared examples for array-like behavior\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Verso::ProgramAreaList do\n use_vcr_cassette :record => :new_episodes\n\n before do\n @list = Verso::ProgramAreaList.new\n end\n\n describe '#[]' ...
ruby
chosen
[ { "from": "system", "value": "Use a better description in the ChefSpec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'aws::ec2_hints' do\n let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }\n\n it 'adds the hint file' do\n expect(chef_run).to create_oh...
ruby
chosen
[ { "from": "system", "value": "Support foreigner versions ~> 0.9.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"foreigner-matcher/version\"\n\nGem::Specification.new do |s|\n s.name = \"foreigner-matcher\"\n s.ver...
ruby
chosen
[ { "from": "system", "value": "Add mysql, postgres & redis.\n\nFixes #4.\n" }, { "from": "human", "value": "package \"popularity-contest\" do\n # Cron failures, not required.\n action :remove\nend\n\n# Basic Packages\n%w{\n build-essential\n vim\n curl\n git-core\n sysstat\n atop\n htop\...
ruby
chosen
[ { "from": "system", "value": "Fix join/leave events not sent in some cases\n" }, { "from": "human", "value": "class RoomsController < ApplicationController\n\n after_action :push_room_user_action, only: [ :join, :leave ]\n\n def show\n @room = Room.find(params[:id])\n current_user.join(@...
ruby
chosen
[ { "from": "system", "value": "[MODIFIED] Set PodSpec to release 1.0.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"JDSlider\"\n s.version = \"0.0.1\"\n s.summary = \"An iOS Slider written in swift.\"\n s.description = \"A full custom...
ruby
chosen
[ { "from": "human", "value": "Add feature spec for new Administrators management in Admin area\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nfeature 'Admin administrators' do\n background do\n @admin = create(:administrator)\n @user = create(:user, username: 'Jose Luis Balbin...
ruby
chosen
[ { "from": "system", "value": "Fix spec: test with actual json-body\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe 'Receive notification', type: :request do\n it 'adds notifications to the database' do\n body = {\n \"Type\" => \"Notification\",\n \"Messa...
ruby
chosen
[ { "from": "system", "value": "Fix PathFinder cask version and add link\n" }, { "from": "human", "value": "class PathFinder < Cask\n url 'http://get.cocoatech.com/PF6_LION.zip'\n homepage 'http://www.cocoatech.com/pathfinder/'\n version '6.1.5'\n sha1 '5c05b1f4b9c9f9e0cd31d58f1e3c3417cf1ef3c8...
ruby
chosen
[ { "from": "system", "value": "Redefine clone billing address to set is_shipping = true on ship address\n" }, { "from": "human", "value": "module Spree\n class Order < ActiveRecord::Base\n attr_accessible :use_corrected_address\n attr_accessor :use_corrected_address\n \n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Use https url in gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'month'\n s.version = '1.4.0'\n s.license = 'MIT'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Tim Craft']\n s.email = ['mail@timcraft.com']\n s.homepag...
ruby
chosen
[ { "from": "system", "value": "Bring the 1.0.0 version live\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DPFoundation'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'A minimal set of additions and tools to any iOS app.'\n s.homepage = 'https://github.c...
ruby
chosen
[ { "from": "system", "value": "Add link_to_self to entry presenter\n" }, { "from": "human", "value": "module Adminable\n class EntryPresenter < BasePresenter\n def initialize(entry)\n @entry = entry\n end\n\n def to_name\n %i(name title email login id).each do |method_name|\n ...
ruby
chosen
[ { "from": "system", "value": "Add ssl timer : 11h minus 1 min\n" }, { "from": "human", "value": "require 'net/imap'\nrequire 'trollop'\n\nopts = Trollop::options do\n opt :login, \"Login\", :type => :string\n opt :pass, \"Pass\", :type => :string\n opt :mailbox, \"The mailbox to watch\", :def...
ruby
chosen
[ { "from": "system", "value": "Disable cacheing in development env\n\nRummager request responses were being cached and caused surprising behaviour\nin that newly added specialist documents would not show up in search results\nafter cacheing on the dev vm. Also disable cacheing for content store to be\nconsis...
ruby
chosen
[ { "from": "system", "value": "Add validation for role for new users. Note: there is still a bug when a\nuser doesn't have a role assigned, which results in an infinite loop\nwhen they log in. This is because the root_url is /validations, which is\nlimited to project_participants and above, and CanCan redire...
ruby
chosen
[ { "from": "system", "value": "Fix updating of the description.\n" }, { "from": "human", "value": "class Quote < ActiveRecord::Base\n has_many :lines, dependent: :destroy, autosave: true\n has_many :people, through: :lines, uniq: true\n \n def self.from_raw_quote(raw_quote, description)\n ...
ruby
chosen
[ { "from": "system", "value": "Add alpha taxonomy to allowable path prefixes\n" }, { "from": "human", "value": "class Theme\n EDUCATION_THEME_BASE_PATH = '/education-training-and-skills'.freeze\n\n def self.taxon_path_prefixes\n [EDUCATION_THEME_BASE_PATH]\n end\nend\n" }, { "from":...
ruby
chosen
[ { "from": "system", "value": "Fix permission_denied method so it actually denies permission.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n before_filter :set_auth_user\n filter_access_to :all\n\n protected\n\n def set_auth_u...
ruby
chosen
[ { "from": "system", "value": "Fix an issue that yank to clipboard in neovim\n\nSee https://github.com/neovim/neovim/issues/2642\n" }, { "from": "human", "value": "package 'acpid'\npackage 'alsa-utils'\npackage 'aws-cli'\npackage 'bind-tools'\npackage 'bluez'\npackage 'colordiff'\npackage 'ctags'...
ruby
chosen
[ { "from": "human", "value": "Add missing missing status helpers." }, { "from": "gpt", "value": "#\n# Copyright:: Copyright (c) 2008-2012 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exc...
ruby
chosen
[ { "from": "system", "value": "Use more normal file inclusion description." }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"qjson/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Remove talk of risky order from shipment spec\n\nThe determine_state override no longer takes order riskyness into\naccount so let's eliminate that discussion from the specs and instead\nspecify the current behaviour.\n" }, { "from": "human", "value": "require 'spec...
ruby
chosen
[ { "from": "system", "value": "Update Numeric types to be value comparable\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Axiom\n module Types\n\n # Represents a numeric type\n class Numeric < Object\n primitive ::Numeric\n coercion_method :to_numeric\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix typos and push to correct branch\n" }, { "from": "human", "value": "class DailyJob\n def self.perform_now\n # fetch new changes\n system(\"git pull origin gh-pages\")\n\n # run setup\n system(\"bin/setup\")\n\n # new branch\n system(\"git chec...
ruby
chosen
[ { "from": "system", "value": "Add season and playoffs champions flags\n" }, { "from": "human", "value": "module LeagueManager\n class Team < LeagueManager::Base\n attr_reader :color, :division_name, :league_name, :season_name, :active, :division\n attr_reader :players, :standing\n end\ne...
ruby
chosen
[ { "from": "system", "value": "Create the makefile with the right path.\n" }, { "from": "human", "value": "require 'mkmf'\n\n$CFLAGS = ENV[\"CFLAGS\"].to_s + \" \" + `pkg-config opencv --cflags`.chomp\n$LOCAL_LIBS = ENV[\"LIBS\"].to_s + \" \" + `pkg-config opencv --libs`.chomp\n\ncreate_m...
ruby
chosen
[ { "from": "system", "value": "Add activemodel as a dev dependency. The specs load Devise, which in turn loads active_support/dependencies but this isn't itself an explicit dependency for devise\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_...
ruby
chosen
[ { "from": "system", "value": "Add homepage reference 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 'rack/uri_sanitizer/version'\n\nGem::Specification.new do |spec|\n spe...
ruby
chosen
[ { "from": "system", "value": "Set template root to github repo\n" }, { "from": "human", "value": "# Base Rails template for setting up a new project.\nTEMPLATE_ROOT = \"./rails-templates\"\n\n['test-frameworks.rb', 'formtastic.rb', 'authlogic.rb', 'standard.rb', 'git.rb'].each do |template|\n l...
ruby
chosen
[ { "from": "system", "value": "Fix bug in YARD gem plugin installation\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'shellwords'\n\nif File.exist?('.yardopts')\n args = Shellwords.split(File.read('.yardopts').gsub(/^[ \\t]*#.+/m, ''))\n args.each_with_index do |arg, i|\n ...
ruby
chosen
[ { "from": "human", "value": "Add example of creating an ACH subscription with the Ruby gem\n" }, { "from": "gpt", "value": "require 'chargify_api_ares'\n\nChargify.configure do |c|\n c.subdomain = ENV['CHARGIFY_SUBDOMAIN']\n c.api_key = ENV['CHARGIFY_API_KEY']\nend\n\nsubscription = Chargify...
ruby
chosen
[ { "from": "system", "value": "Add specs for Machine model.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Machine do\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Machine do\n describe 'create' do\n before do\n Machine.create(\...
ruby
chosen
[ { "from": "system", "value": "Add request specs for short URL redirects\n\n- For a valid short URL, ensure that we respond with a 302 redirect\n- For an invalid short URL, ensure that we respond with a 404\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe \"Links\", :ty...
ruby
chosen
[ { "from": "system", "value": "Update gem version to 1.4.9\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"dta_rapid\"\n spec.version = \"1.4.8\"\n spec.authors = [\"Gareth Rogers\", \"Andrew Carr\", \"Matt Chamberlain...
ruby
chosen
[ { "from": "system", "value": "Fix NameError caused by not providing namesspace (due to Autolaoded).\n" }, { "from": "human", "value": "require 'thor/shell'\n\nmodule Acclimate\n module Output\n\n def self.included( base )\n base.send( :include, Thor::Shell )\n end\n\n def write( m...
ruby
chosen
[ { "from": "system", "value": "Add logging of exceptions which cause call actors to die and be force-hung-up\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Adhearsion\n ##\n # This manages the list of calls the Adhearsion service receives\n class Calls < Hash\n include Cellu...
ruby
chosen
[ { "from": "system", "value": "Add default empty string for eol_extensions if no match\n\nCo-authored-by: David Freilich <0106e5ee349bb58d7c51800b6acf5b57cf80aef6@pivotal.io>\n" }, { "from": "human", "value": "require 'date'\n\nmodule CompileExtensions\n class EolDeprecations\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Use core uri lib. desu.\n" }, { "from": "human", "value": "require 'json'\nrequire 'faraday'\n\nmodule Fappu\n class Connection\n\n attr_accessor :base_url, :title, :url, :documentation, :response, :body\n\n def initialize(settings={})\n @base_url = sett...
ruby
chosen
[ { "from": "system", "value": "Add a chomp, remove an echo\n" }, { "from": "human", "value": "module Redirector\n class Tests\n def self.create_default(args)\n tests_filename = Redirector.path(\"data/tests/#{args.host}.csv\")\n tests_csv = <<-CSV\nOld Url,New Url,Status\nhttp://#...
ruby
chosen