conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix an error where Sierra builds can't use git\n\nDue to the CVE earlier this year regarding \"Roaming\" mode in SSH, Apple\nhas decided it's a good idea to just completely take out SSH roaming\nentirely, starting in macOS 10.12. Defining an invalid directive in the\nSSH config...
ruby
chosen
[ { "from": "human", "value": "Update migration to add attachment photo to drop\n" }, { "from": "gpt", "value": "class AddAttachmentPhotoToDrops < ActiveRecord::Migration\n def self.up\n change_table :drops do |t|\n t.attachment :photo\n end\n end\n\n def self.down\n remove_attach...
ruby
chosen
[ { "from": "system", "value": "Add XML comparators to the Package model" }, { "from": "human", "value": "# ===GLSAMaker v2\n# Copyright (C) 2009-2011 Alex Legler <a3li@gentoo.org>\n# Copyright (C) 2009 Pierre-Yves Rofes <py@gentoo.org>\n#\n# This program is free software: you can redistribute i...
ruby
chosen
[ { "from": "system", "value": "Address 2 failues since numeric_changes_from_zero_to_string? method implemented at Rails.\n" }, { "from": "human", "value": "module ActiveRecord #:nodoc:\n module ConnectionAdapters #:nodoc:\n module OracleEnhancedDirty #:nodoc:\n\n module InstanceMethods #...
ruby
chosen
[ { "from": "system", "value": "Correct default view settings for renamed models\n" }, { "from": "human", "value": "class KubernetesEventMonitor\n def initialize(ems)\n @ems = ems\n end\n\n def inventory\n # :service is required to handle also the case where @ems is Openshift\n @invent...
ruby
chosen
[ { "from": "system", "value": "Update homebrew cask for v2.1.0\n" }, { "from": "human", "value": "cask 'awsaml' do\n version '2.0.0'\n sha256 'cea42994cb52a71b8f811c38b25281604360b8216889e0f3217d4583cd7ead1a'\n\n url \"https://github.com/rapid7/awsaml/releases/download/v#{version}/awsaml-v#{ve...
ruby
chosen
[ { "from": "system", "value": "Add file separator to front of imagepath so that we can use it directly in html tags\n" }, { "from": "human", "value": "class Glimage < ActiveRecord::Base\n belongs_to :project\n\n attr_accessible :file, :filetype\n\n validates :file, :presence => true\n\n def i...
ruby
chosen
[ { "from": "system", "value": "Update fast_jsonapi gem to 1.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire_relative '../core/lib/spree/core/version.rb'\n\nGem::Specification.new do |s|\n s.authors = [\"Ryan Bigg\"]\n s.email = [\"ryan@spreecommerce.com\"]\...
ruby
chosen
[ { "from": "system", "value": "Add image to Active Admin contact form\n" }, { "from": "human", "value": "if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)\n ActiveAdmin.register Contact::Feedback do\n menu :label => \"Feedback\", :parent => \"Contact\"\n\n index...
ruby
chosen
[ { "from": "system", "value": "Revert \"add incision_time to procedure imports\". Use cat1 procedure performed importer instead.\n\nThis reverts commit 4ff3382e1567b931670e39bada4f9f3a25759664.\n" }, { "from": "human", "value": "module HealthDataStandards\n module Import\n module CDA\n c...
ruby
chosen
[ { "from": "human", "value": "Add ohai plugin for local passwords\n" }, { "from": "gpt", "value": "provides 'etc', 'current_user'\n\nrequire 'etc'\n\nunless etc\n etc Mash.new\n\n etc[:passwd] = Mash.new\n etc[:group] = Mash.new\n\n File.readlines(\"/etc/passwd\").each do |line|\n splitlin...
ruby
chosen
[ { "from": "system", "value": "Fix uninitialized constant error when running model specs\n" }, { "from": "human", "value": "describe AdjustmentMetadata do\n it \"is valid when build from factory\" do\n adjustment = create(:adjustment)\n expect(adjustment).to be_valid\n end\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add unit test for response templating\n" }, { "from": "human", "value": "require 'test/unit'\n\nrequire 'second_mate'\n\nclass TestResponse < Test::Unit::TestCase\n\n def setup\n @response = SecondMate::Response.new(\n \"---\\nstatus: 201\\nheader:\\n Foo:...
ruby
chosen
[ { "from": "system", "value": "Update test for picture destroy route. Pass tests\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass PicturesControllerTest < ActionController::TestCase\n setup do\n @picture = pictures(:one)\n @user = users(:one)\n end\n\n #\n # test \"shou...
ruby
chosen
[ { "from": "system", "value": "Add PUT stub OPTIONS and PATCH\n" }, { "from": "human", "value": "# TODO: JSON all responses\nrequire 'sinatra/base'\nrequire 'sinatra/reloader'\nrequire 'elasticsearch/persistence'\nrequire 'multi_json'\nrequire 'oj'\n\n# Noodle parts\nrequire_relative 'lib/node'\n...
ruby
chosen
[ { "from": "system", "value": "Allow Helios to run on Java8." }, { "from": "human", "value": "require \"formula\"\n\nclass Helios < Formula\n homepage \"https://github.com/spotify/helios\"\n url \"https://oss.sonatype.org/service/local/repositories/releases/content/com/spotify/helios-tools/0.8....
ruby
chosen
[ { "from": "system", "value": "Stop heartbeat sender upon IOError\n\nIt will be re-initialized by connection recovery if it's needed,\notherwise it just protects us from having a busy loop.\n" }, { "from": "human", "value": "require \"thread\"\nrequire \"amq/protocol/client\"\nrequire \"amq/proto...
ruby
chosen
[ { "from": "system", "value": "Set utf8 encoding for MySQL in encoding tests.\n" }, { "from": "human", "value": "require_relative 'helper'\n\ndescribe 'Adapter' do\n supported_by Swift::DB::Postgres, Swift::DB::Mysql do\n describe 'character encoding' do\n before do\n Swift.db do ...
ruby
chosen
[ { "from": "system", "value": "Add logic to Sample to handle component UUIDs in JSON message\n" }, { "from": "human", "value": "class Sample < ApplicationRecord\n include ResourceTools\n include SingularResourceTools\n\n # Set up directional many-to-many associations from this Sample to compou...
ruby
chosen
[ { "from": "human", "value": "Set up directory to work with Compass.\n" }, { "from": "gpt", "value": "# Require any additional compass plugins here.\n\n# Set this to the root of your project when deployed:\nhttp_path = \"/\"\ncss_dir = \"css\"\nsass_dir = \"sass\"\nimages_dir = \"img\"\njavascrip...
ruby
chosen
[ { "from": "system", "value": "Use the right option to specify the address to bind to\n\nSee http://www.sinatrarb.com/configuration.html" }, { "from": "human", "value": "# Serve HTTP traffic on this port\nset :port, 4567\nset :host, \"0.0.0.0\"\n" }, { "from": "gpt", "value": "# Ser...
ruby
chosen
[ { "from": "system", "value": "Put ExceptionMailer middleware outside of Cacher\n\nThis way if Cacher raises an exception, it will get reported.\n" }, { "from": "human", "value": "require './boot'\nrequire 'rack/static'\n\nuse Bouncer::Cacher\nrequire 'exception_mailer'\n\nif ENV['RACK_ENV'] == '...
ruby
chosen
[ { "from": "system", "value": "Remove https port from wicket sample recipe as its not used.\n" }, { "from": "human", "value": "# Cookbook Name:: wlp-samples\n# Attributes:: default\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compl...
ruby
chosen
[ { "from": "system", "value": "Update traefik to 1.1.1 and remove checksum\n\nYou should add your own checksum\n" }, { "from": "human", "value": "default['traefik']['install']['version'] = '1.0.3'\ndefault['traefik']['install']['install_method'] = 'binary'\n\ndefault['traefik']['install']['binary...
ruby
chosen
[ { "from": "system", "value": "Use PGBOUNCER_PREPARED_STATEMENTS env var to control prepared statements" }, { "from": "human", "value": "require 'travis/config/heroku/url'\n\nmodule Travis\n class Config\n class Heroku\n class Database < Struct.new(:options)\n include Helpers\n\n ...
ruby
chosen
[ { "from": "system", "value": "CHange gemspec to accept newer fog versions.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"testbot_cloud/version\"\n\nGem::Specification.new do |s|\n s.name = \"testbot_cloud\"\n s.ve...
ruby
chosen
[ { "from": "system", "value": "Fix for weird string contains null byte message\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'coder_wally/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Fix type nscd / ncsd\n" }, { "from": "human", "value": "default['cespi_application']['server_names']=[]\ndefault['ncsd']['server_user']= 'nobody'\n" }, { "from": "gpt", "value": "default['cespi_application']['server_names']=[]\n\ndefault['nscd']['server_...
ruby
chosen
[ { "from": "system", "value": "Update aws-sdk version to latest" }, { "from": "human", "value": "#\n# Cookbook Name:: aws-rds\n# Attributes:: default\n#\n# Copyright (c) 2013 Greg Osuri <gosuri@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of thi...
ruby
chosen
[ { "from": "system", "value": "Set Jenkins to the latest LTS version\n" }, { "from": "human", "value": "default['jenkins']['master']['version'] = '1.619-1.1'\ndefault['jenkins']['master']['jvm_options'] = '-Xms256m -Xmx256m'\ndefault['jenkins']['master']['listen_address'] = '127.0.0.1'\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add custom label possibility, remove swear words\n" }, { "from": "human", "value": "module LetMeGoogleThatForYouHelper\n module ViewHelpers\n\n def lmgtfy_button phrase\n link_to 'Let me google that for you... idiot...',\n link(phrase),\n clas...
ruby
chosen
[ { "from": "system", "value": "Refactor :only column filtering to private method\n\nI prefer not to do any unnecessary calculations in #initialize, so that\nobjects are easier to instantiate for unit testing." }, { "from": "human", "value": "require \"active_support/core_ext/module/delegation\"\n...
ruby
chosen
[ { "from": "system", "value": "Truncate short descriptions to 50 characters.\n" }, { "from": "human", "value": "require \"rdoc2mdoc/comment\"\n\nmodule Rdoc2mdoc\n class RenderableClass\n def initialize(rdoc_class)\n @rdoc_class = rdoc_class\n end\n\n def name\n rdoc_class.ful...
ruby
chosen
[ { "from": "system", "value": "Update ARM gcc to `6-2017-q2-update`" }, { "from": "human", "value": "require 'formula'\n\nclass ArmNoneEabiGcc < Formula\n\n homepage 'https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads'\n version '6-2017-q1-update'\n\n url 'https://developer.a...
ruby
chosen
[ { "from": "system", "value": "Replace moving to git repo root as its required\n" }, { "from": "human", "value": "require \"test_launcher/shell/color\"\nrequire \"test_launcher/utils/path\"\n\nmodule TestLauncher\n module Shell\n class Runner\n include Color\n\n CommandFailureError ...
ruby
chosen
[ { "from": "human", "value": "Add file for exporting stats\n" }, { "from": "gpt", "value": "module Carto\n module Export\n class MapStatistics\n FILE_MODE = :file\n STDOUT_MODE = :stdout\n VALID_MODES = [FILE_MODE, STDOUT_MODE].freeze\n\n def initialize(mode: :file, path: ...
ruby
chosen
[ { "from": "human", "value": "Add datatype for strings with embedded language\n" }, { "from": "gpt", "value": "class Chalmersit::StringWithLang\n\n attr_accessor :lang, :value\n\n def initialize(string)\n @lang, @value = string.split(';', 2)\n end\n\n def self.create(la, string)\n self....
ruby
chosen
[ { "from": "system", "value": "Correct a typo in an unknown codec message.\n" }, { "from": "human", "value": "module Poseidon\n # @api private\n class ProducerCompressionConfig\n COMPRESSION_CODEC_MAP = {\n :gzip => Compression::GzipCodec,\n :snappy => Compression::SnappyCodec\n ...
ruby
chosen
[ { "from": "system", "value": "Create the :data_dir as well\n" }, { "from": "human", "value": "#\n# Cookbook Name:: graphite\n# Description:: Base configuration for graphite\n# Recipe:: default\n# Author:: Heavy Water Software Inc.\n#\n# Copyright 2011, Hea...
ruby
chosen
[ { "from": "system", "value": "Create the correct version directory\n" }, { "from": "human", "value": "#\n# Cookbook Name:: sabnzbd\n# Recipe:: default\n#\n\npackage \"python-cheetah\"\npackage \"python-yenc\"\npackage \"python-openssl\"\npackage \"par2\"\npackage \"unrar\"\npackage \"coreutils\"...
ruby
chosen
[ { "from": "system", "value": "Rename to hadoop_conf_dir since we will have other configuration directories\n" }, { "from": "human", "value": "#\n# Cookbook Name:: hadoop\n# Recipe:: default\n#\n# Copyright (C) 2013 Continuuity, Inc.\n# \n# Licensed under the Apache License, Version 2.0 (the \"Li...
ruby
chosen
[ { "from": "system", "value": "Remove chef 11 compatibility in chef_gem\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook Name:: chef-vault\n# Recipe:: default\n#\n# Author: Joshua Timberman <joshua@chef.io>\n#\n# Copyr...
ruby
chosen
[ { "from": "system", "value": "Increase frequency of update cron job\n\nNow that updates are much faster, the wait between cron intervals is a significant portion of the time between updates. This way, it won't wait more than a few minutes between updates.\n" }, { "from": "human", "value": "# Use...
ruby
chosen
[ { "from": "system", "value": "Validate object[id] presence checking the id as a symbol and string\n" }, { "from": "human", "value": "module EndpointBase::Concerns\n module ResponseDSL\n extend ActiveSupport::Concern\n\n included do\n if EndpointBase.rails?\n include Helpers\n ...
ruby
chosen
[ { "from": "system", "value": "Disable idle_timeout when set to 0\n" }, { "from": "human", "value": "module FaradayPersistentExcon\n class Connection\n attr_accessor :excon\n attr_accessor :last_use\n attr_accessor :idle_timeout\n\n def initialize(excon:, idle_timeout:)\n @excon...
ruby
chosen
[ { "from": "system", "value": "Add dependecy packages to enable mruby\n" }, { "from": "human", "value": "# cf) https://h2o.examp1e.net/install.html\ncase node[:platform]\nwhen 'debian', 'ubuntu', 'mint'\n package 'wget'\n package 'cmake'\nelse\n package 'wget'\n package 'cmake'\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Prepend is private on Ruby 2.0.0" }, { "from": "human", "value": "require 'redis'\nrequire 'redis/rails/instrumentation/logging'\nrequire 'redis/rails/instrumentation/version'\nrequire 'active_support'\nrequire 'sweet_notifications'\n\nclass Redis\n module Rails\n ...
ruby
chosen
[ { "from": "system", "value": "Update .gemspec with desc, summary, and homepage.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'instagram_api/version'\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Use Nokogiri as XML parser." }, { "from": "human", "value": "require \"savon\"\n\nrequire \"et/base\"\nrequire \"et/delivery\"\nrequire \"et/field\"\nrequire \"et/filter\"\nrequire \"et/list\"\nrequire \"et/message\"\nrequire \"et/subscriber\"\nrequire \"et/version\...
ruby
chosen
[ { "from": "system", "value": "Add Rack::ShowExceptions middleware to help debug errors rendering the index page\n" }, { "from": "human", "value": "require \"faye/websocket\"\nrequire \"useragent\"\n\nmodule Blade::Server\n extend self\n include Blade::Component\n\n WEBSOCKET_PATH = \"/blade/w...
ruby
chosen
[ { "from": "system", "value": "Allow comparing a Machine to a String\r\n\r\nThis lets us redefine model methods as FSMs, and still be able to compare:\r\n\r\n class SomeModel < ActiveRecord::Base\r\n def activate!\r\n state.trigger(:activate)\r\n save!\r\n end\r\n\r\n def stat...
ruby
chosen
[ { "from": "system", "value": "Use central redirect uri if available\n" }, { "from": "human", "value": "require_dependency 'oauth/client'\n\nmodule Oauth\n class Config\n attr_reader :client\n\n def self.api_class\n self.parent.const_get(:Api)\n end\n\n def self.instance(csrf, b...
ruby
chosen
[ { "from": "system", "value": "Change VHost class to allow full template\n\n" }, { "from": "human", "value": "module OpsKit\n class VHost\n PROVIDERS = [:apache, :nginx]\n\n attr_reader :provider, :conf\n\n def initialize( provider = nil, conf = {} )\n @provider = provider\n @...
ruby
chosen
[ { "from": "system", "value": "Make successful PURGEs log at debug level to reduce unecessary noise at default level (info)\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'net-purge'\n\ndef quietly_try_to_open(url)\n begin \n result = open(url).read.strip\n rescue Ope...
ruby
chosen
[ { "from": "system", "value": "Add redis conn.exists? method compatible.\n" }, { "from": "human", "value": "require \"sidekiq/cron/job\"\nrequire \"sidekiq/cron/poller\"\nrequire \"sidekiq/cron/launcher\"\n\nmodule Sidekiq\n module Cron\n end\nend\n" }, { "from": "gpt", "value": "re...
ruby
chosen
[ { "from": "system", "value": "Exclude jrails files from coverage tests.\n" }, { "from": "human", "value": "#\n#\tThis is from Advanced Rails Recipes, page 277\n#\nnamespace :test do\n\t\n\tdesc 'Tracks test coverage with rcov'\n\ttask :coverage do\n\t\trm_f \"coverage\"\n\t\trm_f \"coverage.data...
ruby
chosen
[ { "from": "system", "value": "Change the root URL of the app\n\nSigned-off-by: Siddharth Kannan <7a804f1d08bac02a84ba1822c22c8bf38be68ecc@tutanota.com>\n" }, { "from": "human", "value": "# Load the Rails application.\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the Rails...
ruby
chosen
[ { "from": "system", "value": "Fix test; i18n string changed." }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Circle::Member::Comments::StatusChange do\n let(:user) { create(:user, first_name: 'Generic', last_name: 'User') }\n let(:circle) { create(:circle) }\n let(:member)...
ruby
chosen
[ { "from": "system", "value": "Put return in one line comparison" }, { "from": "human", "value": "module APIMatchers\n module Core\n class FindInJSON\n attr_reader :json\n\n def initialize(json)\n @json = json\n end\n\n def find(options={})\n expected_key = o...
ruby
chosen
[ { "from": "system", "value": "Change the initial question example to include a tiny bit of markdown\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or ...
ruby
chosen
[ { "from": "system", "value": "Update bunny requirement from < 2.12, >= 2.9 to >= 2.9, < 2.13\n\nUpdates the requirements on [bunny](https://github.com/ruby-amqp/bunny) to permit the latest version.\n- [Release notes](https://github.com/ruby-amqp/bunny/releases)\n- [Changelog](https://github.com/ruby-amqp/bu...
ruby
chosen
[ { "from": "system", "value": "3491: Reduce accessibility of model attributes\n\nOnly need to be readable, not writable.\n\nAuthors: 7656f885fae0d57a843f5d48e2e0751c4511da7e@richardtowers\n" }, { "from": "human", "value": "class SelectPhoneForm\n include ActiveModel::Model\n include Evidence\n\...
ruby
chosen
[ { "from": "human", "value": "Update to use the new Catstreamer app set up on Heroku\n" }, { "from": "gpt", "value": "class Cats < Linkbot::Plugin\n Linkbot::Plugin.register('cats', self,\n {\n :message => {:regex=> /^!cats$/i, :handler=> :on_message}\n }\n )\n\n def self.on_message...
ruby
chosen
[ { "from": "system", "value": "Fix case sensitive uniqueness deprecation warning\n" }, { "from": "human", "value": "module Rpush\n module Client\n module ActiveRecord\n class App < ::ActiveRecord::Base\n self.table_name = 'rpush_apps'\n\n has_many :notifications, class_name...
ruby
chosen
[ { "from": "human", "value": "Implement RTA API Integration service.\n" }, { "from": "gpt", "value": "class RtaApiService\n\n def get_wo_trans(query)\n uri = URI(\"https://api.rtafleet.com/graphql\")\n\n unless check_api_key\n return {success: false, response: \"API key not found.\"}\...
ruby
chosen
[ { "from": "system", "value": "Improve the way to create a Tweet\n" }, { "from": "human", "value": "class TwitterService\n\n @@instance = nil\n\n def self.instance\n @@instance ||= TwitterService.new\n @@instance\n end\n\n attr_accessor :client\n\n # Downloads all the new mentions sinc...
ruby
chosen
[ { "from": "system", "value": "Use :belongs_to instead of :references in :order_cycles_shipping_methods\n\nAlso fix migration class name.\n" }, { "from": "human", "value": "class CreateOrderCycleShippingMethods < ActiveRecord::Migration[6.1]\n def up\n create_table :order_cycles_shipping_meth...
ruby
chosen
[ { "from": "system", "value": "Add hashie as development dependency\n\nThis should fix Travis. Not sure how that happened." }, { "from": "human", "value": "$LOAD_PATH.unshift 'lib'\n\nGem::Specification.new do |s|\n s.name = 'git-review'\n s.version = '1.1.7'\n s.date = Time.now.strft...
ruby
chosen
[ { "from": "human", "value": "Add spec for create wordlist service\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe CreateWordList, type: :service do\n subject(:service) { CreateWordList.new(name, words) }\n\n context \"with a valid name and set of words\" do\n let(:...
ruby
chosen
[ { "from": "system", "value": "Make current URI available inside block\n" }, { "from": "human", "value": "module Harvestman\n module Crawler\n class Parser\n def initialize(url)\n @document = Nokogiri::HTML(open(url))\n end\n\n def css(path, &block)\n parse(:css, ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Switch to readonly mode\"\n\nThis reverts commit 5dad101ba52615ef4e79413b292e1c042a715286.\n" }, { "from": "human", "value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n ...
ruby
chosen
[ { "from": "system", "value": "Switch site to readonly mode on ramoth\n" }, { "from": "human", "value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :rails => {\n :status => :role,\n :members => [...
ruby
chosen
[ { "from": "system", "value": "Remove version number from edge deployment\n" }, { "from": "human", "value": "module Trisano\n VERSION = %w(3 5 7).freeze\nend\n\nrequire 'trisano/application'\nrequire 'trisano/deployment'\n" }, { "from": "gpt", "value": "module Trisano\n VERSION = %w...
ruby
chosen
[ { "from": "system", "value": "Include assets path in main require\n\nJust to get the existing tests to pass. Will break it up in future\nchanges once new content graph stuff is merged in.\n" }, { "from": "human", "value": "require 'hashie'\nrequire 'yaml'\n\nrequire 'yarrow/version'\nrequire 'ya...
ruby
chosen
[ { "from": "system", "value": "FIX define_i18n_url_helper with Rails 4.2\n" }, { "from": "human", "value": "module TranslatableRoutes\n module ActionDispatch\n module NamedRouteCollection\n extend ActiveSupport::Concern\n \n def define_i18n_url_helper(name)\n %w(path url).eac...
ruby
chosen
[ { "from": "system", "value": "Fix yesterday's bone-headed commit. again\n" }, { "from": "human", "value": "class Middleman::Extensions::ExternalPipeline < ::Middleman::Extension\n self.supports_multiple_instances = true\n\n option :name, nil, 'The name of the pipeline', required: true\n optio...
ruby
chosen
[ { "from": "system", "value": "Include webmock into rspec helper\n" }, { "from": "human", "value": "require 'puppetlabs_spec_helper/module_spec_helper'\nrequire 'rspec-puppet-facts'\n\ninclude RspecPuppetFacts\n\nrequire 'simplecov'\nrequire 'simplecov-console'\n\nSimpleCov.start do\n add_filter...
ruby
chosen
[ { "from": "system", "value": "Resolve incorrect coverage results from Travis\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'coveralls'\nrequire 'codeclimate-test-reporter'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n ...
ruby
chosen
[ { "from": "system", "value": "Set fixture paths for unit tests\n\nThis change defines manifest_dir and module_path expicitly in unit\ntests so that modules installed under fixtures directory is properly\nloaded.\n\nCloses-Bug: #1930403\nChange-Id: I93c83dfe9b92ef772e1ae3c15f70aeac39ccf449\n" }, { "f...
ruby
chosen
[ { "from": "system", "value": "Remove obsolete RSpec config option\n" }, { "from": "human", "value": "# coding: utf-8\n\nRSpec.configure do |config|\n config.expect_with :rspec do |c|\n c.syntax = :expect\n end\n\n config.mock_with :rspec do |c|\n c.syntax = :expect\n end\n\n config.co...
ruby
chosen
[ { "from": "system", "value": "Add missing require for Pathname\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start do\n add_filter '/spec/'\n add_filter '/config/'\n add_filter '/vendor/'\nend if ENV[\"COVERAGE\"]\n\nrequire 'rspec'\nrequire 'net/ntlm'\n\n# add project lib...
ruby
chosen
[ { "from": "system", "value": "Whitelist codeclimate after test suite is complete\n" }, { "from": "human", "value": "require 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'contactually'\nrequire 'webmock/rspec...
ruby
chosen
[ { "from": "system", "value": "Use constant rather than symbol for logger level (Ruby <2.3)\n" }, { "from": "human", "value": "require 'bundler/setup'\n\nrequire 'fluffle'\n\nFluffle.logger.level = :fatal\n" }, { "from": "gpt", "value": "require 'bundler/setup'\n\nrequire 'fluffle'\n\...
ruby
chosen
[ { "from": "system", "value": "Update build and version files to use bundler.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/ncsa-parser/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"ncsa-parser\"\n s.version = NCSAParser::VE...
ruby
chosen
[ { "from": "human", "value": "Add a basic Paddle class.\n" }, { "from": "gpt", "value": "class Paddle\n\tattr_accessor :x, :y, :rotation, :score\n\n\tdef initialize(x, y, rotation)\n\t\t@x = x\n\t\t@y = y\n\t\t@rotation = rotation\n\tend\n\n\tdef increaseScore\n\t\t@score += 1\n\tend\n\n\tdef set...
ruby
chosen
[ { "from": "human", "value": "Add podspec file for iOS framework sourced from S3\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n\n s.name = 'Tangram-es'\n s.version = '0.7.1'\n\n s.summary = 'Open source C++ library for rendering 2D and 3D maps from vector data using OpenG...
ruby
chosen
[ { "from": "system", "value": "Use figs only on staging/production\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\nrequire 'figs'\n# Don't run this initializer on travis.\nFigs.load(stage: Rails.env) unless ENV['TRAVIS']\n\n# Require the ...
ruby
chosen
[ { "from": "system", "value": "Update spec to pass on latest rom\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'YAML adapter' do\n subject(:rom) { setup.finalize }\n\n let(:root) { Pathname(__FILE__).dirname.join('..') }\n\n let(:setup) { ROM.setup(\"yaml://#{root}/fixtu...
ruby
chosen
[ { "from": "system", "value": "Fix namespace Sass module due to conflict with bootstra-sass-rails\n\nNo one should really use the two together, but in case they do, or in case any other library defines a Bootstrap::Sass module, we should be clear that we mean the global core Sass module here. Fixes thomas-mc...
ruby
chosen
[ { "from": "system", "value": "Improve setting default runner attrs when using API\n" }, { "from": "human", "value": "module Ci\n module API\n # Runners API\n class Runners < Grape::API\n resource :runners do\n # Delete runner\n # Parameters:\n # token (required...
ruby
chosen
[ { "from": "system", "value": "Add request and count methods\n" }, { "from": "human", "value": "require \"counting_stars/version\"\n\nmodule CountingStars\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require 'uri'\nrequire 'open-uri'\nrequire 'nokogiri'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Fix the default-setting feature.\nThis is required for upload_metadata/load_from_filesystem to correctly load default values from the default folder.\n" }, { "from": "human", "value": "require 'fastlane_core/languages'\n\nmodule Deliver\n module Loader\n # The d...
ruby
chosen
[ { "from": "system", "value": "Add ability to overwrite calculated values and remove float conversion\n" }, { "from": "human", "value": "class Fiscalizer\n\tclass Tax\n\n\t\t\tattr_accessor :base, :rate, :name\n\n\t\t\tdef initialize base: 0.0, rate: 0.0, name: \"\"\n\t\t\t\t@base = base\n\t\t\t\...
ruby
chosen
[ { "from": "system", "value": "Add sleep(1) to spec to ensure compilations are done w/ different timestamps\n" }, { "from": "human", "value": "require 'rspec'\nrequire 'lib/stem'\n\ndescribe Stem::Userdata do\n describe '#compile' do\n it \"should produce identical output with identical input...
ruby
chosen
[ { "from": "system", "value": "Switch from using an around filter to a formatter\n\nApparently formatters are the preferred way of doing this since status is not available yet in a filter. See https://github.com/rspec/rspec-core/issues/2011 for details." }, { "from": "human", "value": "require \"...
ruby
chosen
[ { "from": "system", "value": "Add player_input prompt: '> ' to handle default inputs\n" }, { "from": "human", "value": "require_relative \"world_command.rb\"\n\n# Runs the main game loop.\n#\n# @param [Player] player the player of the game.\ndef run_driver(player)\n\n input = player_input\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add initial brew bottle implementation.\n" }, { "from": "gpt", "value": "# Builds binary brew package\nbrew_install\n\ndestination = HOMEBREW_PREFIX + \"Bottles\"\nif not File.directory?(destination)\n\tDir.mkdir destination\nend\n\nARGV.each do|formula|\n\t# Get the...
ruby
chosen
[ { "from": "system", "value": ":bug: Fix emojify contents load issue\n\nemojify contents can be loaded after git clone(runtime)\n\nUse lazy block\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ngit File.join(Chef::Config['file_cache_path'], 'emojify') do\n repository node['em...
ruby
chosen
[ { "from": "system", "value": "Fix 'exceeded available parameter key space' with large POST requests\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file\n\n# Uncomment below to force Rails into production mode when\n# you don't control web/app server and ...
ruby
chosen
[ { "from": "system", "value": "Update Razer Synapse to 1.44\n\n- update to version 1.44.1\n- add zap stanza\n- add pkgutil, quit, and launchctl to uninstall stanza\n" }, { "from": "human", "value": "cask :v1 => 'razer-synapse' do\n version '1.41'\n sha256 'f8fce465114da56f6d5f0771429b1f118ac547...
ruby
chosen