conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use skippgpcheck instead of importing key (to the wrong keyring, besides). The default build user 'nobody' has no home directory, so cannot locally sign keys.\n" }, { "from": "human", "value": "include_recipe 'pacman'\npackage('perl') { action :install }\npackage('e...
ruby
chosen
[ { "from": "system", "value": "Add authentication method to User model.\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n\n\thas_many :tweets\n\thas_many :users\n\thas_many :friends_as_followers, class_name: \"Friend\", foreign_key: :follower_id\n\thas_many :friends_as_followee...
ruby
chosen
[ { "from": "system", "value": "Fix signin for reals this time\n" }, { "from": "human", "value": "require \"gds-sso/user\"\n\nclass User\n include Mongoid::Document\n include Mongoid::Timestamps\n include GDS::SSO::User\n\n field \"name\", type: String\n field \"uid\", type: String\n ...
ruby
chosen
[ { "from": "system", "value": "Resolve merge conflict by keeping validations that prevent users from voting on more than one response per question.\n" }, { "from": "human", "value": "class Vote < ActiveRecord::Base\n\n belongs_to :user\n belongs_to :response\n\nend\n" }, { "from": "gpt"...
ruby
chosen
[ { "from": "system", "value": "Add RSpec as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'apache-log/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Bump version to 0.1.1 and resolve rubocop\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'singel'\n s.version = '0.1.0'\n s.date = Date.today.to_s\n s.platform = Gem::Platform::RUBY\n s.extra_rdoc_files = ['README....
ruby
chosen
[ { "from": "system", "value": "Fix Item Not Deleting Do To Foreign Key Violation\n\nBecause a motion association for has_many is not been set up which is\ncoursing the error.\n" }, { "from": "human", "value": "class Item < ActiveRecord::Base\n\tserialize :sections, Hash\n\t\n\tbelongs_to :item_ty...
ruby
chosen
[ { "from": "system", "value": "Add default text for text field\n" }, { "from": "human", "value": "class Link\n include MongoMapper::Document\n include Colorable\n\n key :url, String\n key :title, String\n key :comment, String\n key :user_id, ObjectId\n timestamps!\n\n # Relationships.\n ...
ruby
chosen
[ { "from": "system", "value": "Remove rolify declarations from User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n# roles for user:\n rolify :role_cname => 'Admin'\n rolify :role_cname => 'Subject'\n rolify :role_cname => 'Experimenter'\n\n # Include default devise...
ruby
chosen
[ { "from": "system", "value": "Add validations to User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n has_many :user_plans\n has_many :plans, through: :user_plans\n has_many :comments\n\n has_secure_password\nend\n" }, { "from": "gpt", "value": "class U...
ruby
chosen
[ { "from": "system", "value": "Fix selecting PBs from postgres\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n include TwitchUser\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authe...
ruby
chosen
[ { "from": "system", "value": "Remove Authlogic code from the User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n serialize :user_attributes\n\n acts_as_authentic do |c|\n c.validations_scope = :username\n c.validate_password_field = false\n c.require_passwo...
ruby
chosen
[ { "from": "system", "value": "Update User Model for Validations\n\nUpdate the User model to include presence/uniqueness validations for\nboth name and email attributes.\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n devise :database_authenticatable, :registerable,\n ...
ruby
chosen
[ { "from": "system", "value": "Add rspec 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 'archivable/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Test loops through all healthchecks, confirming each is true.\n\n\nFormer-commit-id: ebbfcd8223572296cc0226b45a68dccd324481a0 [formerly 5049e9a44beafce59c3ad6e0d20105359bc65802] [formerly 1066ac4056f721944974b7a04ade196b72d035e8 [formerly 643da89e4ceb13f31fa7f21ec08cd486be4e78c...
ruby
chosen
[ { "from": "human", "value": "Add a \"new only\" benchmark from JRUBY-2184.\n\n\ngit-svn-id: 0d15740d2b2329e9094a4e8932733054e5d3e04c@1115 8ba958d5-0c1a-0410-94a6-a65dfc1b28a6\n" }, { "from": "gpt", "value": "=begin\n+----------+------+-----+---------+-----------------+----------------+\n| Field ...
ruby
chosen
[ { "from": "system", "value": "Update the dummy user & pass\n" }, { "from": "human", "value": "require 'factory_girl'\n\n# NOTE: this file does not automatically reload in Rails server. Use load() or restart the server.\n\nFactory.define :project do |p|\n p.vcs_url \"https://github.com/circleci/...
ruby
chosen
[ { "from": "system", "value": "Update appointment factory to use sequence instead of Faker\n" }, { "from": "human", "value": "require 'bcrypt'\n\nFactoryGirl.define do\n factory :appointment do\n title { Faker::Lorem.word }\n description { Faker::Lorem.sentence }\n date { D...
ruby
chosen
[ { "from": "human", "value": "Add root page posts content test\n" }, { "from": "gpt", "value": "describe 'Root page' do\n let(:root_page) { CGTest::RootPage.new(@br) }\n\n before(:each) do\n root_page.goto\n end\n\n it 'should have posts that contain text' do\n posts = root_page.posts\n...
ruby
chosen
[ { "from": "system", "value": "Change tests to use command line OpenSSL as baseline comparison.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe PreciousCargo::Data do\n\n before do\n @keypair = OpenSSL::PKey::RSA.new(2048)\n @data = Faker::Lorem.paragraphs.join(\" \"...
ruby
chosen
[ { "from": "system", "value": "Add minitest for Travis CI\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'boost_info/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation (stub -> double)" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Coinmux::Http do\n before do\n Coinmux::Http.instance.send(:clear_cache)\n end\n\n describe \"#get\" do\n let(:http) { Coinmux::Http.instance }\n let(:hos...
ruby
chosen
[ { "from": "system", "value": "Update bundler requirement from ~> 1.0 to ~> 2.0\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/bundler/bundler/blob/mas...
ruby
chosen
[ { "from": "system", "value": "Use single quotes instead of magic double quotes\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'github/auth/version'\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "human", "value": "Add sample use of octokit.\n" }, { "from": "gpt", "value": "require 'octokit'\n\ndef most_used(languages)\n languages\n .methods(false)\n .reject { |m| m.to_s.include?('=') || m.to_s.include?('?') }\n .max_by { |m| languages.send(m) }\n .to_s\nend\n\n# S...
ruby
chosen
[ { "from": "system", "value": "Correct development dependency in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"hotspots/version\"\n\nGem::Specification.new do |s|\n s.name = \"hotspots\"\n ...
ruby
chosen
[ { "from": "system", "value": "CPE: Add convenience CPE splitting methods\n" }, { "from": "human", "value": "# ===GLSAMaker v2\n# Copyright (C) 2010 Alex Legler <a3li@gentoo.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero Ge...
ruby
chosen
[ { "from": "system", "value": "Update google-api-client requirement from >= 0.23.9, < 0.38.0 to >= 0.23.9, < 0.39.0\n\nUpdates the requirements on [google-api-client](https://github.com/google/google-api-ruby-client) to permit the latest version.\n- [Release notes](https://github.com/google/google-api-ruby-c...
ruby
chosen
[ { "from": "system", "value": "Add passing specs for react_to method\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Disclosure do\n it \"should be a module\" do\n subject.should be_a Module\n end\n\n it \"should have an engine\" do\n Disclosure::Engine.superclass.sh...
ruby
chosen
[ { "from": "system", "value": "Add same specs for USI::Client\n\n* It is better than none specs.\n" }, { "from": "human", "value": "describe USI::Client do\n describe '#engine' do\n let(:client) { USI::Client.new(\"spec/bin/dummy_engine\") }\n\n it do\n expect(client.engine).to be_ins...
ruby
chosen
[ { "from": "system", "value": "Update rspec requirement to ~> 3.7.0\n\nUpdates the requirements on [rspec](https://github.com/rspec/rspec) to permit the latest version." }, { "from": "human", "value": "require File.expand_path('../lib/callcredit/version', __FILE__)\n\nGem::Specification.new do |g...
ruby
chosen
[ { "from": "human", "value": "Add specs for defining methods on main object\n" }, { "from": "gpt", "value": "def def_test_bar\n 42\nend\n\ndef self.def_test_foo\n \"bar\"\nend\n\n$top_level_object = self\n\ndescribe \"Defining top level methods\" do\n it \"should work with def self.x\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Use 1.8-compatible way of loading helper\n" }, { "from": "human", "value": "require_relative 'helper'\n\nclass TestRakeCpuCounter < Rake::TestCase\n\n def setup\n super\n\n @cpu_counter = Rake::CpuCounter.new\n end\n\n def test_count_via_win32\n if Rake:...
ruby
chosen
[ { "from": "system", "value": "Update group fabricator to generate a limited length title." }, { "from": "human", "value": "Fabricator(:group) do\n title Faker::Education.school\n description Faker::Lorem.sentence\n user\nend\n" }, { "from": "gpt", "value": "Fabricator(:group...
ruby
chosen
[ { "from": "system", "value": "Add unit test to test for spaces in realm name\n" }, { "from": "human", "value": "require 'battlenet/api'\n\ndescribe Battlenet::Client do\n it \"should allow you to configure it for a valid region\" do\n Battlenet.configure do |config|\n config.api_key = '...
ruby
chosen
[ { "from": "human", "value": "Add migration for active storage fk constraint\n" }, { "from": "gpt", "value": "# This migration comes from active_storage (originally 20180723000244)\nclass AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]\n def up\n retu...
ruby
chosen
[ { "from": "system", "value": "Revert \"[core] Adds fog User-Agent header\"\n\nThis reverts commit a07f3203a6d501d8091495ddd475213ce9d84912.\n\nThe change made a dependency on Fog::VERSION which is defined in\n`lib/fog` forcing more of the system to be loaded in some cases.\n\nGithub issue #1310\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Normalize CRLF appending in header creation\n\nSigned-off-by: Sam Phippen <e5a09176608998a68778e11d5021c871e8fae93c@googlemail.com>\n" }, { "from": "human", "value": "module Http\n class RequestStream\n def initialize(socket, body, headers, headerstart)\n @...
ruby
chosen
[ { "from": "system", "value": "Set default bucket_write_options & specify require" }, { "from": "human", "value": "require 'capistrano/s3/publisher'\n\nunless Capistrano::Configuration.respond_to?(:instance)\n abort \"capistrano-s3 requires Capistrano >= 2.\"\nend\n\nCapistrano::Configuration.in...
ruby
chosen
[ { "from": "system", "value": "Use to_integer for range lookup arguments\n" }, { "from": "human", "value": "module Liquid\n class RangeLookup\n def self.parse(start_markup, end_markup)\n start_obj = Expression.parse(start_markup)\n end_obj = Expression.parse(end_markup)\n if st...
ruby
chosen
[ { "from": "system", "value": "Fix missing user id in builds\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'lysergide/database'\n\ninclude Lysergide::Database\n\nclass Lysergide::Fisherman < Sinatra::Base\n\tpost '/hook' do\n\t\t# The header is actually X-Lysergide-Token\n\t\...
ruby
chosen
[ { "from": "system", "value": "Add feed forward method to propagate activations.\n" }, { "from": "human", "value": "module NeuralNets\n class Network\n def initialize(sizes)\n @num_layers = sizes.length\n @sizes = sizes\n initialize_biases\n initialize_weights\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Make it work on 1.8\n\nUse OpenSSL::Random instead of Random#bytes\n" }, { "from": "human", "value": "require 'benchmark'\nrequire 'radix_tree' # gem install radix_tree\nrequire 'avl_tree'\n\nrandom = Random.new(0)\n\nTIMES = 100000\nkey_size = 10\n\ndef aset(h, key...
ruby
chosen
[ { "from": "system", "value": "Make initializing connection more explicit\n\nUse a hardcoded hostname to the api server, and the default HTTPS port\nfrom the URI module to instantiate the connection.\n\nThe `URI.parse` format was unclear.\n" }, { "from": "human", "value": "require \"net/http\"\nr...
ruby
chosen
[ { "from": "system", "value": "Support rake arguments e.g. delay:crawl:id[11:12:13]\n" }, { "from": "human", "value": "module DelayedTask\n class << self\n include Rake::DSL if defined?(Rake::DSL)\n def add_delayed_tasks\n Rake::Task.tasks.each do |task|\n task \"delay:#{task.n...
ruby
chosen
[ { "from": "system", "value": "Revert \"NullObject inherits from BasicObject\"\n\nThis reverts commit 88bdab8a7737e2fe2af1dc862dd73785537f7220.\n" }, { "from": "human", "value": "require 'singleton'\n\nmodule Twitter\n class NullObject < BasicObject\n include ::Singleton\n\n def nil?\n ...
ruby
chosen
[ { "from": "system", "value": "Determine project and task ids from project config file\n" }, { "from": "human", "value": "module Mytime\n\n module Client\n extend self\n\n # Get project data from client API\n #\n # Option:\n # project_id: Optional project_id to restrict data ret...
ruby
chosen
[ { "from": "system", "value": "Add private call to Controls\n" }, { "from": "human", "value": "class Controls\n\n PARAMS_REQUIRED = [:window]\n\n BUTTONS = { up: Gosu::KbUp,\n down: Gosu::KbDown,\n left: Gosu::KbLeft,\n right: Gosu::KbRight,\n ...
ruby
chosen
[ { "from": "system", "value": "Add 'all' wrapper for '/users' api\n" }, { "from": "human", "value": "# See GitHubV3API documentation in lib/github_v3_api.rb\nclass GitHubV3API\n # Provides access to the GitHub Users API (http://developer.github.com/v3/users/)\n #\n # example:\n #\n # api =...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for new ownership.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'circle/cli/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add a test for /registers.opml\n" }, { "from": "human", "value": "require \"rack/test\"\n\nclass AppTest < Test::Unit::TestCase\n include Rack::Test::Methods\n\n def app\n @app ||= Rack::Builder.parse_file(\"config.ru\").first\n end\n\n def test_index\n ge...
ruby
chosen
[ { "from": "system", "value": "Adjust DSL tests a bit\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire_relative '../lib/rdl.rb'\n\nclass TestDsl < Minitest::Test\n\n class Pair\n def initialize(&blk)\n instance_eval(&blk)\n end\n\n def left(x)\n @left = x...
ruby
chosen
[ { "from": "system", "value": "Change reliable delivery to use module import system.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bud'\nrequire 'delivery/delivery'\n\nmodule ReliableDelivery\n include BestEffortDelivery\n\n state do\n table :buf, pipe_in.schema\n channe...
ruby
chosen
[ { "from": "human", "value": "Add rake task to create User accounts for event organizers\n\nClose #270\n" }, { "from": "gpt", "value": "namespace :users do\n desc \"Event organizers get user accounts\"\n task give_accounts_to_accountless_organizers: :environment do\n organizerless_events = E...
ruby
chosen
[ { "from": "system", "value": "Use method_missing to remove useless code.\n" }, { "from": "human", "value": "module Udongo\n class Config\n attr_reader :i18n\n\n attr_accessor :default_locale, :locales, :prefix_routes_with_locale, :host,\n :time_zone, :allow_new_tags, :fle...
ruby
chosen
[ { "from": "system", "value": "Fix wrong hash key deletion\n" }, { "from": "human", "value": "module Mustermann\n # A simple wrapper around ObjectSpace::WeakMap that allows matching keys by equality rather than identity.\n # Used for caching.\n #\n # @see #fetch\n # @!visibility private\n c...
ruby
chosen
[ { "from": "system", "value": "Fix merger of coverage when a file is not available in all of the resultsets\n" }, { "from": "human", "value": "module SimpleCov\n module ArrayMergeHelper\n # Merges an array of coverage results with self\n def merge_resultset(array)\n new_array = dup\n ...
ruby
chosen
[ { "from": "human", "value": "Add some temp data for console\n" }, { "from": "gpt", "value": "def people refresh: false\n @people = nil if refresh\n @people ||= [\n { name: \"Neil\", fav_color: \"blue\", likes: [ \"cat\", \"scotch\", \"computer\" ] },\n { name: \"Mica\", fav_color: \"gree...
ruby
chosen
[ { "from": "system", "value": "Move `Forwardable` reference above `Comparable`\n\nSince `Forwardable` is adding class methods and `Comparable is adding\ninstance methods.\n" }, { "from": "human", "value": "module Biz\n module WeekTime\n class Abstract\n\n include Comparable\n\n exte...
ruby
chosen
[ { "from": "system", "value": "Replace duplicate method with included module\n" }, { "from": "human", "value": "module GirFFI\n module InterfaceBase\n def gir_ffi_builder\n self.const_get :GIR_FFI_BUILDER\n end\n\n def setup_instance_method name\n gir_ffi_builder.setup_instanc...
ruby
chosen
[ { "from": "human", "value": "Add simple specs for lexing line numbers\n" }, { "from": "gpt", "value": "require File.expand_path('../spec_helper', __FILE__)\nrequire 'opal/parser'\n\ndescribe Opal::Lexer do\n it \"sets correct line information for each token\" do\n expect_lines(\"42\").to eq(...
ruby
chosen
[ { "from": "system", "value": "Improve autoloading video sites by convention\n\nOnly require .rb files. Also, no need to check for . and ..\n\nclose #72 (PR)\n" }, { "from": "human", "value": "Dir.entries(File.join(File.dirname(__FILE__), \"video_sites\")).each do |file|\n require \"film_snob/vi...
ruby
chosen
[ { "from": "system", "value": "Convert value to type and then assign to hash\n" }, { "from": "human", "value": "module Intrinsic\n module Intrinsicism\n\n attr_reader :properties, :defaults\n\n def property(name, type = String, options = {})\n @properties ||= []\n @defaults ||= {...
ruby
chosen
[ { "from": "system", "value": "Stop requiring active_record and mongoid.\n" }, { "from": "human", "value": "require 'consort/version'\n\nrequire 'active_record'\nrequire 'mongoid'\n\nrequire 'consort/active_record/mongoid'\nrequire 'consort/mongoid/active_record'" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Upgrade Atom to version 1.0.6.\n" }, { "from": "human", "value": "cask :v1 => 'atom' do\n version '1.0.5'\n sha256 'ed4c55e059195111d9d12ec379849d8d3509062496fcf61102fc98d1ff8ba12e'\n\n # github.com is the official download host per the vendor homepage\n url \"h...
ruby
chosen
[ { "from": "system", "value": "Make image hal shows configurable\n\nDefault to the Wikimedia 256px image.\n" }, { "from": "human", "value": "module Lita\n module Handlers\n class Hal9000 < Handler\n on(:unhandled_message) do |payload|\n handle_unhandled(payload: payload)\n en...
ruby
chosen
[ { "from": "system", "value": "Add thumb size to be sent via json through index route\n" }, { "from": "human", "value": "class ItemsController < ApplicationController\n\n\n def index\n @section = Section.find(params[:section_id])\n @items = @section.items\n\n image_urls = [];\n @item...
ruby
chosen
[ { "from": "system", "value": "Bring the very first SGMailer::Base tests\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule SGMailer\n class BaseTest < Minitest::Test\n class SendGridMailer < SGMailer::Base\n template_id 'e0d26988-d1d7-41ad-b1eb-4c4b37125893'\n def w...
ruby
chosen
[ { "from": "system", "value": "[search-improvements] Add reminder that the periodicity of score calculation is too small\n" }, { "from": "human", "value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\...
ruby
chosen
[ { "from": "system", "value": "Raise an exception if no ORM detected.\n" }, { "from": "human", "value": "module ExtJS\n class MVC\n @@success_property = :success\n @@message_property = :message\n @@root = :data\n cattr_accessor :success_property\n cattr_accessor :messa...
ruby
chosen
[ { "from": "system", "value": "Use subl:// prefix instead of txtm://\n" }, { "from": "human", "value": "require \"rspec_clickable_output/version\"\nrequire \"rspec/core\"\n\nmodule RSpec\n module Core\n class Metadata\n\n def self.relative_path(line)\n prefix = \"txmt://open?url=f...
ruby
chosen
[ { "from": "system", "value": "Use clear global variable name\n\nRecommended by standard\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = \"interactor\"\n spec.version = \"3.1.1\"\n\n spec.author = \"Collective Idea\"\n spec.email = \"info@collec...
ruby
chosen
[ { "from": "system", "value": "Rollback to bindfs.org to download source tarballs\n" }, { "from": "human", "value": "module VagrantPlugins\n module Bindfs\n \n VERSION = \"0.4.7\"\n \n SOURCE_VERSION = \"1.13.1\"\n SOURCE_URL = \"https://github.com/mpartel/bindfs/arc...
ruby
chosen
[ { "from": "system", "value": "Add options argument to Source::new\n" }, { "from": "human", "value": "require \"mutex_m\"\n\nmodule WellReadFaker\n class Source\n include Mutex_m\n\n attr_reader :path_to_book\n\n def initialize path_to_book\n super()\n @path_to_book = path_to_...
ruby
chosen
[ { "from": "system", "value": "Add test for creation of units\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'vcr'\n\nRSpec.describe Roadmapster::Wizeline::Roadmap do\n\n before :each do\n @api_token = ENV['WIZELINE_API_TOKEN']\n @organization = Roadmapster::Wizeline::Or...
ruby
chosen
[ { "from": "system", "value": "Check gem load state before loading instrumentation\n" }, { "from": "human", "value": "# Copyright (c) 2013 AppNeta, Inc.\n# All rights reserved.\n\nmodule Oboe\n ##\n # This module provides a method to manually initialize the\n # Ruby instrumentation. Normally ...
ruby
chosen
[ { "from": "system", "value": "Use public_send instead of just send for conventions, yay!\n" }, { "from": "human", "value": "require \"slugworth/version\"\n\nmodule Slugworth\n extend ActiveSupport::Concern\n\n included do\n cattr_accessor :slug_attribute\n before_validation(:add_slug)\n ...
ruby
chosen
[ { "from": "system", "value": "Clean up the link tests.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'helper'\n\ndescribe 'Link' do\n subject do\n filename = 'the.other.setup.yml'\n path = File.join(test_site.source_paths[:links...
ruby
chosen
[ { "from": "human", "value": "Copy files to shared (config/database.yml for example) for symlinking\n" }, { "from": "gpt", "value": "# -*- coding: utf-8 -*-\nrequire 'vlad'\n\nnamespace :vlad do\n\n set :copy, {}\n\n desc \"Copy fiels\"\n task :copy do\n print \"Copying files to server: \"\...
ruby
chosen
[ { "from": "system", "value": "Update rubocop version in gemspec to ~> 0.58.0\n" }, { "from": "human", "value": "# encoding: utf-8\n\n# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'linter/version'\n\nGem::Specificatio...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.12 to 0.1.13\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP li...
ruby
chosen
[ { "from": "system", "value": "Set Sass format to :sass.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n<% if include_all_railties? -%>\nrequire 'rails/all'\n<% else -%>\n<%= comment_if :skip_active_record %>require 'active_record/railtie'\nrequire 'action_con...
ruby
chosen
[ { "from": "system", "value": "Update gemspec author name to include 'jr'\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n\ts.name\t\t= 'timevalue'\n\ts.version\t= '0.0.1'\n\ts.date\t\t= '2013-12-21'\n\ts.summary\t= \"Time value of money calculations\"\n\ts.description = \"Perfo...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary halt from Static module\n" }, { "from": "human", "value": "module Flame\n\tclass Dispatcher\n\t\t## Module for working with static files\n\t\tmodule Static\n\t\t\tprivate\n\n\t\t\t## Find static files and try return it\n\t\t\tdef try_static(dir = ...
ruby
chosen
[ { "from": "system", "value": "Add positive test for FeaturedLink\n\nAlso update the negative tests so the models would otherwise be valid if\nit wasn't for the attribute we are testing.\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass FeaturedLinkTest < ActiveSupport::TestCase...
ruby
chosen
[ { "from": "system", "value": "Set env variable for test/unit style output\n" }, { "from": "human", "value": "if defined? Motion::Project::App\n Motion::Project::App.setup do |config|\n # Inject helpers that provide a (Mini)?Test::Unit adaptor\n __dir__ = File.dirname(File.realpath(__FILE_...
ruby
chosen
[ { "from": "system", "value": "Add dictionary support to iso19115-1 writer\n" }, { "from": "human", "value": "# ISO <<abstract class>> MD_FeatureCatalogue\n# 19115-1 writer output in XML\n\n# History:\n# \tStan Smith 2019-08-20 original script. \n\nrequire_relative '../../iso19110/classes/class_f...
ruby
chosen
[ { "from": "system", "value": "Update info about gem in .gemspec file\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'machete-dsl/version'\n\nGem::Specification.new do |gem|...
ruby
chosen
[ { "from": "system", "value": "Add request and params support to the Draper spec harness\n" }, { "from": "human", "value": "module Draper\n module DecoratorExampleGroup\n extend ActiveSupport::Concern\n included { metadata[:type] = :decorator }\n end\n\n RSpec.configure do |config|\n ...
ruby
chosen
[ { "from": "system", "value": "Add support for validation of all svg elements.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass HtmlCheck < ::HTML::Proofer::CheckRunner\n\n # new html5 tags (source: http://www.w3schools.com/html/html5_new_elements.asp)\n HTML5_TAGS = %w(article asi...
ruby
chosen
[ { "from": "system", "value": "Fix to replace space sequence with one space\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Juknife\n module Scraping\n # A context object keeps a state of scraping.\n class Context\n attr_reader :node, :result\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Upgrade faraday dependency, to get rid of deprecation warning when using Ruby 2.7.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift 'lib'\nrequire 'cmis/version'\n\nGem::Specification.new do |s|\n s.name = 'cmis-ruby'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Print stardate and log title\n" }, { "from": "human", "value": "require 'date'\n\nmodule Captainslog\n extend self\n\n def history\n @history ||= 6\n end\n\n def tomorrow\n @tomorrow ||= Date.today + 1\n end\n\n def run(*args)\n @history = (args.shift...
ruby
chosen
[ { "from": "system", "value": "Define instance variables in initialize and only execute block if not nil\n" }, { "from": "human", "value": "class ClassLoaderContext\n def initialize(classloader)\n @classloader = classloader\n end\n\n def name(name = nil)\n @name = name unless name.nil?\n...
ruby
chosen
[ { "from": "system", "value": "Add Mapper.base_relation and inheritance of macros\n" }, { "from": "human", "value": "module ROM\n module ClassMacros\n Undefined = Object.new.freeze\n\n def defines(*args)\n mod = Module.new\n\n args.each do |name|\n mod.module_eval <<-RUBY,...
ruby
chosen
[ { "from": "human", "value": "Add some more db indexes to assist with query performance\n\nFixes #4338\n" }, { "from": "gpt", "value": "class AddMoreIndexes < ActiveRecord::Migration\n def change\n add_index :spree_payment_methods, [:id, :type]\n add_index :spree_calculators, [:id, :type]\...
ruby
chosen
[ { "from": "system", "value": "Add ViewContext::Filter include to ActionMailer::Base\n\nWhen 'ActionMailer::Base' is delivered by Model or Worker(like ActiveJob),\n'ActiveDecorator::ViewContext.current' is 'nil' and cannot use view helper methods in decorator.\nthe reason is that 'ActionMailer::Base' inherit...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Luyten.\n" }, { "from": "human", "value": "cask 'luyten' do\n version '0.4.7'\n sha256 '612bd58de0d3ef23fbb9803d302f0af7d3f03e5fcf06cadd69521f0e57637045'\n\n url \"https://github.com/deathmarine/Luyten/releases/download/v#{version}/lu...
ruby
chosen
[ { "from": "system", "value": "Update Puppet to 3.7.4, set license\n\nLicense assigned based on\nhttps://github.com/puppetlabs/puppet/blob/master/LICENSE\n" }, { "from": "human", "value": "cask :v1 => 'puppet' do\n version '3.7.3'\n sha256 'f673b9c45dbefa410efa6d7f74ea820a1b01b4f659f142c92310f8...
ruby
chosen
[ { "from": "system", "value": "Fix require statement for MiniTest::Adapter.\n" }, { "from": "human", "value": "require 'mocha/api'\nrequire 'mocha/integration/assertion_counter'\nrequire 'mocha/expectation_error'\n\nmodule Mocha\n module Integration\n module MiniTest\n\n # Integrates Moc...
ruby
chosen