conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Upgrade faraday_middleware and lock down version\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/arrow_payments/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"arrow_payments\"\n s.version = ArrowPayments::VERSION...
ruby
chosen
[ { "from": "human", "value": "Add basic integration tests for bind\n" }, { "from": "gpt", "value": "require_relative 'test_helper'\n\nif !INTEGRATION\n puts \"Skipping integration tests...\"\nelse\n class TestLDAPInstrumentation < Test::Unit::TestCase\n def setup\n @service = MockInstru...
ruby
chosen
[ { "from": "system", "value": "Add name stanza to Acorn3" }, { "from": "human", "value": "cask :v1 => 'acorn3' do\n version '3.5.2'\n sha256 'ffc4cd551b9eb2ebadfe8e59c95e84b1f59538d7915eff63dd6c3efdca7858e6'\n\n url \"https://secure.flyingmeat.com/download/Acorn-#{version}.zip\"\n homepage 'h...
ruby
chosen
[ { "from": "system", "value": "Remove dependency on `from_now` extension.\n\n[ Assain Jaleel & Kasper Timm Hansen ]\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire \"time\"\n\nmodule ActiveSupport\n module Messages #:nodoc:\n class Metadata #:nodoc:\n def initia...
ruby
chosen
[ { "from": "human", "value": "Test to ensure that falsy objects aren't wrapped by deprecation proxies\n" }, { "from": "gpt", "value": "require 'abstract_unit'\nrequire 'active_support/deprecation'\n\nclass ProxyWrappersTest < Test::Unit::TestCase\n Waffles = false\n NewWaffles = :hamburger...
ruby
chosen
[ { "from": "system", "value": "Fix Gemspec warning error on released gem.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bizsh/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Return 200 on successful update and 404 when ID is not found for stomping ground\n" }, { "from": "human", "value": "module Api\n module V2\n class StompingGroundsController < ApiController\n before_action :require_authentication\n\n #Get all the Stompi...
ruby
chosen
[ { "from": "system", "value": "Fix removing avatar for group\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "human", "value": "class Groups::AvatarsController < ApplicationController\n def destroy\n @group.remove_avatar!\n @group....
ruby
chosen
[ { "from": "system", "value": "Add debug logging for deliveries\n" }, { "from": "human", "value": "class APNS::DeliverNotification\n include Interactor\n\n before do\n require_arguments!(:endpoint_arn, :notification)\n end\n\n def call\n SnsService.deliver_notification(\n context[:...
ruby
chosen
[ { "from": "human", "value": "Test suite running with failing tests\n" }, { "from": "gpt", "value": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclass ActiveSupport::TestCase\n # Setup all fixtures in test/fixtures/*...
ruby
chosen
[ { "from": "system", "value": "Fix for shonky front-end link resolution in /admin.\n" }, { "from": "human", "value": "module HasNavigation\n def has_navigation(options={})\n # Include url helpers to generate default path.\n send :include, Rails.application.routes.url_helpers\n # Include...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning on SimpleCov::Formatter::MultiFormatter use.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimp...
ruby
chosen
[ { "from": "system", "value": "Use HTTPS for Reaper appcast\n\nNew appcast URL is reachable via HTTPS as well as HTTP. Use HTTPS instead of HTTP." }, { "from": "human", "value": "cask 'reaper' do\n version '5.93'\n sha256 '0b3946b9b200d93aab89343f4523add7ea49cd3e3a6f4d4ed84d8feaee8a4224'\n\n u...
ruby
chosen
[ { "from": "human", "value": "Add basic home page feature specs\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'Viewing the home page' do\n subject(:home_visit) { visit root_path }\n\n context \"when there are no guide articles\" do\n it \"redirects to the article index\"...
ruby
chosen
[ { "from": "system", "value": "Delete top-level directories created in specs\n" }, { "from": "human", "value": "require 'fileutils'\n\nclass FileFactory\n class << self\n def create_file(path, content)\n ensure_dir_exists File.dirname path\n File.open(path, 'w') { |file| file.write ...
ruby
chosen
[ { "from": "system", "value": "Add parentheses test for Builder\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nRSpec.describe SymbolicMath::AST::Builder do\n context \"simple operations\" do\n it \"correctly builds the AST\" do\n operations = {\n \"1 + 2\" =>...
ruby
chosen
[ { "from": "system", "value": "Add :round to attr_accessible in Donation\n" }, { "from": "human", "value": "class Donation < ActiveRecord::Base\n belongs_to :round\n attr_accessible :amount, :email, :name, :stripe_token\n\n def gravatar_url\n Rails.application.config.gravatar_url % Digest::...
ruby
chosen
[ { "from": "system", "value": "Revert \"I need to path this helper to not fail if the env variables are missing\"\n\nThis reverts commit 6b7fe0dcc7be57a0bd9469f518ea82c4201b6baa.\n" }, { "from": "human", "value": "class MyModel < ActiveRecord::Base\n\n if ENV['ALGOLIASEARCH_APPLICATION_ID']\n ...
ruby
chosen
[ { "from": "system", "value": "Update queryable spec to use @filename\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'spec_helper')\nrequire 'rdf/spec/queryable'\n\ndescribe RDF::Queryable do\n before :each do\n @file = etc_file(\"doap.nt\")\n @statement...
ruby
chosen
[ { "from": "system", "value": "Clean up states spec so that a country + state are created for testing purposes\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"States\" do\n before(:each) do\n visit spree.admin_path\n click_link \"Configuration\"\n end\n\n context \...
ruby
chosen
[ { "from": "system", "value": "Change Podspec author to Yelp.\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint YelpAPI.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn more abo...
ruby
chosen
[ { "from": "system", "value": "Send shipping email whenever shipped flag is set to true\n\nResolves #117\n" }, { "from": "human", "value": "class Shipment < ActiveRecord::Base\n belongs_to :pod\n belongs_to :user\n\n def crops\n pod.instructions.map{|x| x.ship ? x.crop : nil}.compact\n end...
ruby
chosen
[ { "from": "human", "value": "Add spec to file database_analyser\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nclass Dog \nend\n\nRSpec.describe Doctor::DatabaseAnalyser do\n\n subject do\n described_class.new.analyse\n end\n\n describe \"#analyse\" do\n\n before do\n ...
ruby
chosen
[ { "from": "system", "value": "WIP: Fix Before hooks. Force into ruby mode for now. Dip a little into Cukes internals to get things running\n" }, { "from": "human", "value": "module Cucover\n module CliCommands\n class Cucumber\n def initialize(cli_args)\n @cli_args = cli_args\n ...
ruby
chosen
[ { "from": "human", "value": "Add rake task to refresh indexes\n" }, { "from": "gpt", "value": "namespace :elasticsearch do\n desc 'Refresh Elastic Search Index'\n task :refresh => :environment do\n refresh_elasticsearch\n end\nend\n\ndef refresh_elasticsearch\n Response.__elasticsearch__....
ruby
chosen
[ { "from": "system", "value": "Make the container JSON logs more human readable\n\n- Remove the \"service\":null bit since it's null 100% of the time right\n now. This is done using delete_nils.\n- Put the message at the end, since it's the longest variable length.\n- Moving level down better shows the top...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.14'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n" }...
ruby
chosen
[ { "from": "system", "value": "Improve handling of comments in ClassMethodsDefinition autocorrection\n\nPreviously it would take nodes that have inline comment as well,\nas long as a blank line to separate the node from the one that would be extracted is missing.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "human", "value": "Copy DocString from Cucumber 1.x\n" }, { "from": "gpt", "value": "module SteppingStone\n module Model\n # Represents an inline argument in a step. Example:\n #\n # Given the message\n # \"\"\"\n # I like\n # Cucumber sandwich\n # ...
ruby
chosen
[ { "from": "system", "value": "Add info about age group having changed to resave task\n" }, { "from": "human", "value": "namespace :jmd do\n namespace :performances do\n desc \"Resave all performances, leaving their timestamps untouched\"\n task resave: :environment do\n Performance.a...
ruby
chosen
[ { "from": "system", "value": "Use os helpers for inspec\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "describe 'chef-push-jobs package' do\n it 'should be installed' do\n expect(file '/opt/push-jobs-client/bin/pushy-client')...
ruby
chosen
[ { "from": "system", "value": "Update the selector for the button element in the cookie message section.\n" }, { "from": "human", "value": "require_relative '../section'\n\nmodule UI::Sections\n class FooterCookieMessage < UI::Section\n element :close_button, 'button.cookie-message__submit'\n...
ruby
chosen
[ { "from": "system", "value": "Add homepage and description to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n \nrequire 'gds_api/version'\n \nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Add the rspec gem dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/gemnasium/parser/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = \"Steve Richert\"\n gem.email = \"stev...
ruby
chosen
[ { "from": "system", "value": "Fix an issue with an incorrect number of parameters passed to build_uri\n" }, { "from": "human", "value": "require 'json'\nrequire 'chef_zero/rest_base'\n\nmodule ChefZero\n module Endpoints\n # /environment/NAME/nodes\n class EnvironmentNodesEndpoint < RestB...
ruby
chosen
[ { "from": "system", "value": "Split query root code into new method\n" }, { "from": "human", "value": "module NewsHelper\n def news_article_class\n if @section.present?\n return 'content-main'\n end\n\n 'content-listing'\n end\n\n def news_articles(section: nil)\n query_root ...
ruby
chosen
[ { "from": "system", "value": "Add version dependency to rake\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire File.expand_path('../lib/benchmark/bigo/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'benchmark-bigo'\n s.version = Benchmark::BigO::VERSION\n\n s....
ruby
chosen
[ { "from": "system", "value": "Fix SQLite integration tests on CentOS\n" }, { "from": "human", "value": "# encoding: UTF-8\n#\n# Author:: Xabier de Zuazo (<xabier@zuazo.org>)\n# Copyright:: Copyright (c) 2015 Xabier de Zuazo\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache...
ruby
chosen
[ { "from": "system", "value": "Add navigation to application model template (thereby fix Cucumber scenario)\n" }, { "from": "human", "value": "# Here you define the fundamentals of your application.\n#\n# Add a model:\n# model 'customer' do |customer|\n# customer.attr :name\n# customer.attr :...
ruby
chosen
[ { "from": "system", "value": "Use plain indexes, without FK constraints.\n\nFK constraints yield problems if TRUNCATE is used. FK logic should be\nhandled Rails way (by the application).\n" }, { "from": "human", "value": "Sequel.migration do\n up do\n create_table :section_notes do\n pr...
ruby
chosen
[ { "from": "system", "value": "Add ensure_security_headers to app controller\n" }, { "from": "human", "value": "apply \"app/assets/javascripts/application.js.rb\"\ncopy_file \"app/assets/stylesheets/application.css.scss\"\nremove_file \"app/assets/stylesheets/application.css\"\n\ncopy_file \"app/...
ruby
chosen
[ { "from": "system", "value": "Add minitest 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 'alacena/version'\n\nGem::Specification.new do |spec|\n spec.name =...
ruby
chosen
[ { "from": "system", "value": "Update Address::VERSION constant to 0.4.0\n\nChanges since 0.3.0:\n- Updates for DM 0.10 compatibility\n- Add Address::Preferred module\n- Housecleaning updates (nicer requires, etc)\n" }, { "from": "human", "value": "require 'dm-core'\nrequire 'dm-types'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Allow adding activity without password re-entry\n" }, { "from": "human", "value": "class ActivitiesController < MyplaceonlineController\n def model\n Activity\n end\n\n def display_obj(obj)\n obj.name\n end\n\n protected\n def sorts\n [\"lower(act...
ruby
chosen
[ { "from": "system", "value": "Add the partition package to the Hadoop module tree\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Hadoop\n module FileCache\n include_package 'org.apache.hadoop.filecache'\n end\n module Conf\n include_package 'org.apache.hadoop.conf'\n en...
ruby
chosen
[ { "from": "system", "value": "[BMCDOT-825] Add table for structure documents sorted by folder. Current tab functionality is not working, but the table works correctly if you force it to become visible (by adding the \"active in\" classes to the tab-pane).\n" }, { "from": "human", "value": "modul...
ruby
chosen
[ { "from": "system", "value": "Make the rabl capture phone number at enterprise level\n" }, { "from": "human", "value": "attributes :name, :id, :description, :latitude, :longitude, :long_description, :website, :instagram, :linkedin, :twitter, :facebook, :is_primary_producer, :is_distributor\n\nno...
ruby
chosen
[ { "from": "system", "value": "Revert \"Don't need isolating of namespace\"\n\nThis reverts commit 6e29c77b3c303e3e1285ecfc44a12669ab3c514f.\n" }, { "from": "human", "value": "module Pay\n class Engine < ::Rails::Engine\n initializer 'pay.processors' do\n # Include processor backends\n ...
ruby
chosen
[ { "from": "system", "value": "Add ERB into yml reader\n" }, { "from": "human", "value": "require \"yml_reader/version\"\n\nmodule YmlReader\n\n #\n # Set the directory to use when reading yml files\n #\n def yml_directory=(directory)\n @yml_directory = directory\n end\n\n #\n # Returns...
ruby
chosen
[ { "from": "system", "value": "Add google DNS for IC machines\n" }, { "from": "human", "value": "name \"ic\"\ndescription \"Role applied to all servers at Imperial College\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :icladmin => { :status => :user }\n }\n },\n :network...
ruby
chosen
[ { "from": "system", "value": "Make it work out of the box on Ubuntu 10.10\n" }, { "from": "human", "value": "require 'mkmf'\ndir_config(\"QAR\")\n\n$LIBS << \" -lcurl\"\n\nqmake_path = `which qmake`.chomp\n\nif qmake_path.empty?\n warn \"*********************************************************...
ruby
chosen
[ { "from": "system", "value": "Update podspec to version 0.3.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"LVGUtilities\"\n s.version = \"0.3.0\"\n s.summary = \"Basic Swift utility functions.\"\n s.homepage = 'https://github.com/letvargo/LVGUt...
ruby
chosen
[ { "from": "human", "value": "Add credit card spec file\n" }, { "from": "gpt", "value": "require_relative 'my_solution'\n\ndescribe CreditCard do\n describe '#initialize' do\n it 'Expects a single argument for the card' do\n expect(CreditCard.instance_method(:initialize).arity).to eq 1\n...
ruby
chosen
[ { "from": "system", "value": "Remove serialization of violations_archive on Build\n\nFollow up to https://github.com/thoughtbot/hound/pull/493. We have no need to\nserialize this data.\n" }, { "from": "human", "value": "class Build < ActiveRecord::Base\n belongs_to :repo\n has_many :violations...
ruby
chosen
[ { "from": "system", "value": "Update belongs_to validation by giving it an optional: true\n" }, { "from": "human", "value": "class Order < ApplicationRecord\n belongs_to :users\n serialize :user_id\n serialize :item_id\n has_many :items\nend\n" }, { "from": "gpt", "value": "class...
ruby
chosen
[ { "from": "system", "value": "Make sure @retry_attempt is initialized in the before_perform block\n" }, { "from": "human", "value": "require 'active_job/retriable/version'\n\nmodule ActiveJob\n module Retriable\n extend ActiveSupport::Concern\n\n DEFAULT_MAX = 25\n DEFAULT_FACTOR = ...
ruby
chosen
[ { "from": "system", "value": "Add pry for debugging needs\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'babbler/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Add indent for private definition\n" }, { "from": "human", "value": "module Banken\n class PolicyFinder\n SUFFIX = \"Policy\"\n\n attr_reader :object\n\n def initialize(controller)\n @controller = controller\n end\n\n def scope\n policy::Sc...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 2.7.0.0 to 2.7.0.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '2.7.0.0'\n s.summary = 'Common primitives for platform-specific messaging im...
ruby
chosen
[ { "from": "system", "value": "Add Errno::ECONNRESET as a rescued exception as well\n" }, { "from": "human", "value": "module Bright\n module SisApi\n class Base\n\n def filter_students_by_params(students, params)\n total = params[:limit]\n count = 0\n found = []\n\n...
ruby
chosen
[ { "from": "system", "value": "Remove `github-oauth` specific version check in integration tests\n\nWe don’t install a specific version so this check will fail every time\n`github-oauth` releases an updated plugin.\n" }, { "from": "human", "value": "require_relative '../../../kitchen/data/spec_he...
ruby
chosen
[ { "from": "system", "value": "Update Podspec for version increase\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"Swifter\"\n s.version = \"2.3.0\"\n s.summary = \":bird: A Twitter framework for iOS & macOS written in Swift\"\n s.description = <<-DES...
ruby
chosen
[ { "from": "human", "value": "Fix missing SSL hostname validation [MiM Vuln]\n\n fixes ConradIrwin/em-imap#25\n\n Based on:\n https://github.com/lostisland/faraday/commit/63cf47c95b573539f047c729bd9ad67560bc83ff\n https://github.com/igrigorik/em-http-request/issues/339\n\n** missing file\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Disable X-Frame-Options header from being set with Rack::Protection\n" }, { "from": "human", "value": "require_relative \"env\"\n\ndef config_for(kind)\n YAML.load_file(File.expand_path(\"../#{kind}.yml\", __FILE__))\nend\n\nset :router, config_for(:router)\nset :s...
ruby
chosen
[ { "from": "system", "value": "Fix for newer CLAide version\n" }, { "from": "human", "value": "module Pod\n class Command\n class Spec\n class Doc < Spec\n self.summary = \"Opens the web documentation of a Pod.\"\n\n self.description = <<-DESC\n Opens the web docum...
ruby
chosen
[ { "from": "system", "value": "Fix routing_key for admin queue\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Rabbit\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n\n # @!attribute [r] correlation\n # @return [String] Is ...
ruby
chosen
[ { "from": "system", "value": "Add enqueueing for the new benchmarking jobs\n" }, { "from": "human", "value": "require_relative 'job_test'\n\n20.times do |n|\n JobTestFast.new.perform_async('NON BLOCKING', n)\n JobTestSlow.new.perform_async('BLOCKING', n)\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "automata/test: Add end-to-end test of first 1000 words in dictionary.\n" }, { "from": "human", "value": "$:.unshift(File.dirname(File.dirname(File.expand_path(__FILE__))))\n$:.unshift(File.dirname(File.expand_path(__FILE__)))\n\nrequire 'automata_test'\nrequire 'tes...
ruby
chosen
[ { "from": "human", "value": "Add new plugin to check all redshift clusters in an AWS region for maintenance events\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n#\n# ===\n#\n# DESCRIPTION:\n# This plugin checks redshift clusters for maintenance events\n#\n# PLATFORMS:\n# all\n#\n# DE...
ruby
chosen
[ { "from": "system", "value": "Check requests local in render_error\n" }, { "from": "human", "value": "module Outpost\n class ApplicationController < ActionController::Base\n include Outpost::Breadcrumbs\n include Outpost::Controller::Authorization\n include Outpost::Controller::Authent...
ruby
chosen
[ { "from": "system", "value": "Remove inherit_resources from user contributions controller\n" }, { "from": "human", "value": "class Users::ContributionsController < ApplicationController\n after_filter :verify_authorized, except: :index\n after_filter :verify_policy_scoped, only: :index\n inhe...
ruby
chosen
[ { "from": "system", "value": "Fix success determination for response code\n\nI used the (and) operator which has a lower precedence than the\nassignment operator (=), hence I have replaced it with the (&&)\noperator.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>\n" }...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary optimisation; keep code in sync with MD variant.\n" }, { "from": "human", "value": "module PavlovSupport\n # TODO why is this in pavlov support, this should be put in some general\n # support file or spec_helper.\n def stub_classes *classnames\...
ruby
chosen
[ { "from": "system", "value": "TEST: Add POST Test for breaks_api\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass BreaksApiTest < ActiveSupport::TestCase\ninclude Rack::Test::Methods\ninclude TestHelpers::AuthHelper\ninclude TestHelpers::JsonHelper\n\ndef app\n Rails.applicat...
ruby
chosen
[ { "from": "system", "value": "Use the passed in args instead of ARGV.\n" }, { "from": "human", "value": "require 'clouds_and_dragons/version'\nrequire 'clouds_and_dragons/cli/cli'\nrequire 'clouds_and_dragons/resources/base'\nrequire 'clouds_and_dragons/actions/base'\n\nrequire 'trollop'\n\nmodu...
ruby
chosen
[ { "from": "system", "value": "Remove useless before_action in the dummy app\n" }, { "from": "human", "value": "class PostsController < ApplicationController\n before_action :set_post, only: [:show, :edit, :update, :destroy]\n\n # GET /users/1/posts\n def index\n end\n\n # GET /posts/1\n de...
ruby
chosen
[ { "from": "system", "value": "Add missing _ for config file name\n" }, { "from": "human", "value": "module Stevenson\n module Template\n autoload :Git, 'stevenson/templates/git'\n autoload :Local, 'stevenson/templates/local'\n\n autoload :Loader, 'stevenson/template/loader'\n\n def ...
ruby
chosen
[ { "from": "human", "value": "Create rake task to list API routes\n" }, { "from": "gpt", "value": "namespace :api do\n desc \"API Routes\"\n task routes: :environment do\n API::Root.routes.each do |api|\n method = api.route_method.ljust(10)\n path = api.route_path.gsub(\":version\"...
ruby
chosen
[ { "from": "human", "value": "Add new rspec rake task for generating reports in html\n" }, { "from": "gpt", "value": "require 'rspec/core/rake_task'\n\nRSpec::Core::RakeTask.new(:spec) do |t|\n t.rspec_opts = '--format html --out reports/rspec_results.html'\nend\n\nnamespace :rspec_report do\n ...
ruby
chosen
[ { "from": "system", "value": "Fix custom I18n load path\n" }, { "from": "human", "value": "require \"vagrant\"\n\nmodule Vagrant\n module LXC\n class Plugin < Vagrant.plugin(\"2\")\n name \"Linux Containers (LXC) provider\"\n description <<-EOF\n The LXC provider allows Vagran...
ruby
chosen
[ { "from": "system", "value": "Add description and summary to 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 'tcx/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add with_medal trait to rewards factory\n" }, { "from": "human", "value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :gamification_goal, aliases: [:goal], class: 'Gamification::Goal' do\n rewarding ni...
ruby
chosen
[ { "from": "system", "value": "Add Reply-To header for new pending account emails\n\nWhen I deny someone's application, I usually send them an email explaining why.\nThis patch facilitates that.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass AdminMailer < ApplicationMai...
ruby
chosen
[ { "from": "system", "value": "Fix has many through relation" }, { "from": "human", "value": "class Player < ApplicationRecord\n include FriendlyId\n\n mount_uploader :avatar, AvatarUploader unless Rails.env.test?\n\n has_one :address, through: :member\n has_one :contact, through: :member\n ...
ruby
chosen
[ { "from": "system", "value": "Fix command information 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 'basmoura/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Hide shared behavior a little better. Name clashes ftl.\n" }, { "from": "human", "value": "module Context\n class SharedBehavior < Module\n def self.create_from_behavior(beh)\n mod = self.new\n mod.behavior = beh\n mod\n end\n \n def behav...
ruby
chosen
[ { "from": "system", "value": "Fix new dependencies and Migrations\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"catarse_stripe/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d...
ruby
chosen
[ { "from": "system", "value": "Add sync directories as example.\n" }, { "from": "human", "value": "set :application, \"set your application name here\"\nset :repository, \"set your repository location here\"\nset :web_root, \"/srv/cyt.ch/\"\n\nrole :web, \"your web-server here\" ...
ruby
chosen
[ { "from": "system", "value": "Add precision method to Geocoder::Result::Yandex.\n" }, { "from": "human", "value": "require 'geocoder/results/base'\n\nmodule Geocoder::Result\n class Yandex < Base\n\n def coordinates\n @data['GeoObject']['Point']['pos'].split(' ').reverse.map(&:to_f)\n ...
ruby
chosen
[ { "from": "system", "value": "Rewrite widgets style migration to use new helper\n" }, { "from": "human", "value": "Sequel.migration do\n change do\n alter_table :widgets do\n add_column :style, :json, null: false, default: '{}'\n end\n end\nend\n" }, { "from": "gpt", "va...
ruby
chosen
[ { "from": "system", "value": "Add hook to make sure scm gets set before capistrano-gitflow takes over.\n" }, { "from": "human", "value": "require 'capistrano'\n\nmodule Capistrano\n class Cowboy\n def self.load_into(configuration)\n configuration.load do\n namespace :cowboy do\n ...
ruby
chosen
[ { "from": "system", "value": "Update podspec to point to gitlab\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'CHStringAdditions'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'Convenience methods on NSString'\n s.homepage = 'https://github.com/chaione/...
ruby
chosen
[ { "from": "system", "value": "Fix branches for Alchemy Rails template.\n" }, { "from": "human", "value": "# This rails template installs Alchemy and all depending gems.\nrequire File.expand_path('../../../alchemy/version', __FILE__)\n\ngem 'alchemy_cms', \"#{Alchemy::VERSION}\"\ngem 'alchemy-dev...
ruby
chosen
[ { "from": "system", "value": "Use transform_keys! from core lib\n" }, { "from": "human", "value": "module Halogen\n module HashUtil # :nodoc:\n extend self\n\n # Transform hash keys into strings if necessary\n #\n # @param hash [Hash]\n #\n # @return [Hash]\n #\n def str...
ruby
chosen
[ { "from": "system", "value": "Remove author field to pass RSS validation\n" }, { "from": "human", "value": "xml.instruct! :xml, version: \"1.0\"\nxml.rss version: \"2.0\" do\n xml.channel do\n xml.title \"Robofont Mechanic\"\n xml.description \"A feed of Robofont extensions managed by Mec...
ruby
chosen
[ { "from": "system", "value": "Add description of LICENSE and Modify" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'puppet/provider/ce/device_tel/device_tel.rb'\nrequire 'puppet/provider/ce/api/apibase.rb'\nrequire 'puppet/provider/ce/session/session.rb'\nrequire 'puppet/provider/ce...
ruby
chosen
[ { "from": "system", "value": "Fix typo in log output\n" }, { "from": "human", "value": "# encoding: UTF-8\n#\n# Author:: Tim Smith (<tim@cozy.co>)\n# Copyright:: Copyright (c) 2014 Tim Smith\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice...
ruby
chosen
[ { "from": "system", "value": "Remove deprecated hack from rake task\n" }, { "from": "human", "value": "namespace :js do\n desc \"Make a js file that will have functions that will return restful routes/urls.\"\n task :routes => :environment do\n require \"js-routes\"\n\n # Hack for actual...
ruby
chosen
[ { "from": "system", "value": "Make fast asset precompilation the default.\n" }, { "from": "human", "value": "settings.rails_env ||= 'production'\n# TODO: This should be lambda\nsettings.rake ||= %{RAILS_ENV=\"#{rails_env}\" bundle exec rake}\n\nnamespace :rails do\n desc \"Migrates the Rails da...
ruby
chosen
[ { "from": "system", "value": "Add option for showing DVTPlugInCompatibilityUUID\n" }, { "from": "human", "value": "module XcodeInstall\n class Command\n class Installed < Command\n self.command = 'installed'\n self.summary = 'List installed Xcodes.'\n\n def run\n instal...
ruby
chosen