conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use prebuilt binary instead of requiring go\n\nFaster installs and better reliability that we're\ninstalling the exact same version we've tested and signed.\n" }, { "from": "human", "value": "class Jp < Formula\n desc \"Command-line interface to JMESPath, a query l...
ruby
chosen
[ { "from": "system", "value": "Update Hush.app to use latest with :no_check.\n" }, { "from": "human", "value": "class Hush < Cask\n version '1.0'\n sha256 'da31f0abd7c531e87c9f171493d318535cb24f1335e7e2b1c0fa68eeed685b2e'\n\n url 'https://coffitivity.com/hush/files/Hush.dmg.zip'\n homepage 'h...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Zest.\n" }, { "from": "human", "value": "cask 'zest' do\n version '0.1.1'\n sha256 '9405fecb40731b47bb357e87714711afe6d1f6a9c3a4fa9d01b0109da9c3f947'\n\n url \"https://github.com/zestdocs/zest/releases/download/v#{version}/zest-v#{ver...
ruby
chosen
[ { "from": "system", "value": "Implement nested shift attribute acceptance\n" }, { "from": "human", "value": "class Event < ApplicationRecord\n has_many :shifts, dependent: :destroy\n\n validates :shift_length, :address, presence: true\n\nend\n" }, { "from": "gpt", "value": "class E...
ruby
chosen
[ { "from": "system", "value": "Correct reference to Spree::Country in Admin::StatesController\n" }, { "from": "human", "value": "module Spree\n module Admin\n class StatesController < ResourceController\n belongs_to :country\n before_filter :load_data\n\n def index\n res...
ruby
chosen
[ { "from": "system", "value": "Change email address in pod specification.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = 'ActivityKit'\n s.version = '1.0.2'\n s.summary = 'Custom application activities for iOS.'\n s.homepage = 'https://github.com/ccrazy88/activity-kit'\n...
ruby
chosen
[ { "from": "system", "value": "Add octokit as runtime 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 'upstreamer/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Move Parallels 9 to Cask versions repo\n" }, { "from": "gpt", "value": "class Parallels < Cask\n version '9.0.24237.1028877'\n sha256 'da71645ff1f0076ab5b2f8fa5eefb63bcd921e5f52161fd4dd85e6fb19ae2c57'\n\n url \"http://download.parallels.com/desktop/v9/update2.hotf...
ruby
chosen
[ { "from": "system", "value": "Use open instead of File.open\n\nThat way we can open the online URLs instead of just local files.\n" }, { "from": "human", "value": "module Shopify\n class ProductImageFactory\n def initialize(spree_variant)\n @spree_variant = spree_variant\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Change the order of initialization\n" }, { "from": "human", "value": "require 'colored'\n\nrequire 'nehm/client'\nrequire 'nehm/cfg'\nrequire 'nehm/command_manager'\nrequire 'nehm/os'\nrequire 'nehm/path_manager'\nrequire 'nehm/playlist_manager'\nrequire 'nehm/track...
ruby
chosen
[ { "from": "system", "value": "Add missing information 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 'hasugar/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add Rake to dependent gems\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = \"rubygems-yardoc\"...
ruby
chosen
[ { "from": "system", "value": "Fix Depricated features used! Warning\n" }, { "from": "human", "value": "provides :slack_notify\n\nproperty :message, String, name_property: true\nproperty :channels, Array, default: []\nproperty :username, String\nproperty :webhook_url, String\nproperty :icon_emoji...
ruby
chosen
[ { "from": "system", "value": "Add basic GET /posts?types=... validation\n" }, { "from": "human", "value": "module TentValidator\n class PostsFeedValidator < TentValidator::Spec\n\n SetupFailure = Class.new(StandardError)\n\n require 'tent-validator/validators/support/post_generators'\n ...
ruby
chosen
[ { "from": "system", "value": "Complete the answer for 4.3.2 Defining Math Methods.\n" }, { "from": "human", "value": "# Math Methods\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\n\ndef add(num_1, num_2)\n #your code here\nend\n\ndef subtract(num_1, num_2)\n #yo...
ruby
chosen
[ { "from": "system", "value": "Rename from code_generator to code_gen.\n" }, { "from": "human", "value": "require 'test/unit'\nrequire File.expand_path '../../../assert_helper.rb', __FILE__\nrequire File.expand_path '../../../../lib/support/supported_programming_languages.rb', __FILE__\nrequire F...
ruby
chosen
[ { "from": "system", "value": "Update and fix Rails locale fetch script\n" }, { "from": "human", "value": "curr_dir = File.expand_path(File.dirname(__FILE__))\nrails_locale_dir = File.expand_path(File.join(curr_dir, \"..\", \"rails\"))\n\nputs \"Fetching latest Rails locale files to #{rails_local...
ruby
chosen
[ { "from": "system", "value": "Fix in case help extension not installed.\n" }, { "from": "human", "value": "require_dependency 'application'\n\nclass VaporExtension < Radiant::Extension\n version \"1.0\"\n description \"Manage redirects without creating useless pages\"\n url \"http://saturnfly...
ruby
chosen
[ { "from": "system", "value": "Fix bug in JSON k/v ordering\n\nDon't assign null properties\n" }, { "from": "human", "value": "# Adds a method for formatting payload contents.\nmodule PayloadFormatter\n extend self\n\n def format_payload(payload)\n new_payload = {}\n new_payload['@context...
ruby
chosen
[ { "from": "system", "value": "Add spec for showing monthly sold for a product\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe 'Products', type: :request do\n describe 'GET /products' do\n it 'successful request' do\n get '/api/products'\n expect(response...
ruby
chosen
[ { "from": "system", "value": "Change a content type of opml\n" }, { "from": "human", "value": "# Load the rails application\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the rails application\nFastladder::Application.initialize!\n\nrequire 'fastladder'\nrequire 'string_ut...
ruby
chosen
[ { "from": "system", "value": "Fix rdb path in example.\n" }, { "from": "human", "value": "$:.unshift File.expand_path('../lib', File.dirname(__FILE__))\n\nrequire 'rdb'\n\nRDB::Reader.read_file('test/rdb/multiple_databases.rdb', callbacks: RDB::DebugCallbacks.new)\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Update gemspec so that when used as a source gem, warnings aren't thrown for duplicate VERSION Constant\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/virtualbox/version\", __FILE__)\n\nGem::Specification.new do |s|\n...
ruby
chosen
[ { "from": "system", "value": "Enhance source_files selector to only work with swift files\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftDDP\"\n s.version = \"0.1.9\"\n s.summary = \"A DDP Client for communicating with Meteor servers, w...
ruby
chosen
[ { "from": "human", "value": "Add action to check GitHub access via user request\n" }, { "from": "gpt", "value": "module Fastlane\n module Actions\n module SharedValues\n end\n\n class TestGithubAccessAction < Action\n def self.run(params)\n UI.important(\"Testing access to ...
ruby
chosen
[ { "from": "system", "value": "Fix \"ERROR: Chef::Exceptions::InvalidCookbookVersion: '6' does not match 'x.y.z' or 'x.y'\"\n" }, { "from": "human", "value": "name \"cernvm-fs\"\nmaintainer \"GSI, HPC Department\"\nmaintainer_email \"hpc@gsi.de\"\nlicense \"Apache 2.0\"...
ruby
chosen
[ { "from": "system", "value": "Change this back to a suggest\n\nOnly the wrapper cookbook needs to mark it as a dependency to load the\nlibrary.\n" }, { "from": "human", "value": "name \"sensu\"\nmaintainer \"Sonian, Inc.\"\nmaintainer_email \"chefs@sonian.net\"\nlicense ...
ruby
chosen
[ { "from": "system", "value": "Fix description, expand platforms, depend on all deps\n\nSuggests does nothing and should not be used. There's a foodcritic rule\nto check for this in 6.0\n\nThere was a missing question mark in the source_url check that would\nfail things\n\nWrite an actual description of wha...
ruby
chosen
[ { "from": "system", "value": "Remove restricted route; need to figure out what format works for regex on that\n" }, { "from": "human", "value": "RESTRICTED_PATHS = [/\\/users\\/.+/]\n\nRESTRICTED_PATHS.each do |path|\n redirect \"/\" unless current_user\nend\n\nget '/' do\n erb :index\nend\n\n...
ruby
chosen
[ { "from": "system", "value": "Create POST route for new song\n" }, { "from": "human", "value": "get '/songs' do\n 'all songs'\nend\n\nget '/songs/new' do\n 'create a song'\nend\n\npost '/s'\n\nget '/songs/:id' do\n 'show single song'\nend\n\nput '/songs/:id' do\n 'edit single song'\nend\n\nd...
ruby
chosen
[ { "from": "human", "value": "Test assigned file is never affected\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Original assigned file\" do\n before { allow(Saviour::Config).to receive(:storage).and_return(Saviour::LocalStorage.new(local_prefix: @tmpdir, public_url_prefix...
ruby
chosen
[ { "from": "system", "value": "Allow ssl for explore site endpoints\n" }, { "from": "human", "value": "# coding: UTF-8\n\nclass ExploreController < ApplicationController\n layout 'explore'\n\n before_filter :get_viewed_user\n\n def index\n render_404 and return if @viewed_user.nil? || !@vie...
ruby
chosen
[ { "from": "system", "value": "Order organizations by name in the main list\n" }, { "from": "human", "value": "class MembersController < ApplicationController\n\n def index\n @organizations = Organization.all\n end\n\n def show\n # Get member\n @member = Member.where(:membership_numbe...
ruby
chosen
[ { "from": "system", "value": "Use markdown syntax in podspec description\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"XPCSwift\"\n s.version = \"0.0.5\"\n s.summary = \"Type safe Swift wrapper for libxpc\"\n\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Add pry as a development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/vim-flavor/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Kana Natsuno']\n gem.email = ['dev@...
ruby
chosen
[ { "from": "system", "value": "Update podspec for Swift 4.2 and Xcode 10" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ts.name = 'ActiveLabel'\n\ts.version = '1.0.0'\n\n\ts.author = { 'Optonaut' => 'hello@optonaut.co' }\n\ts.homepage = 'https://github.com/optonaut/ActiveLabel...
ruby
chosen
[ { "from": "system", "value": "Use support email for pay mailer\n" }, { "from": "human", "value": "module Pay\n class ApplicationMailer < ActionMailer::Base\n default from: 'from@example.com'\n layout 'mailer'\n end\nend\n" }, { "from": "gpt", "value": "module Pay\n class App...
ruby
chosen
[ { "from": "system", "value": "Add spree includes to the Refinery::User decorator\n" }, { "from": "human", "value": "Refinery::User.class_eval do\n before_validation :copy_username_from_email\n\n protected\n\n def copy_username_from_email\n if self.username.blank? && self.email.present?...
ruby
chosen
[ { "from": "system", "value": "Revert to utf8 as with latin1 things were breaking\n" }, { "from": "human", "value": "require 'psql_command'\nclass Species::CsvCopyExport < Species::CsvExport\n\nprivate\n def query_sql\n headers = csv_column_headers\n select_columns = sql_columns.each_with_...
ruby
chosen
[ { "from": "system", "value": "Add helper for generating page header.\n" }, { "from": "human", "value": "module ApplicationHelper\n def markdown(text)\n options = {\n filter_html: true,\n hard_wrap: true, \n link_attributes: { rel: 'nofollow', target: \"_blank\" },\n ...
ruby
chosen
[ { "from": "system", "value": "Put break between address lines, remove local authority\n\nDisplay address, street and place on separate lines in school view.\n" }, { "from": "human", "value": "module ApplicationHelper\n\n def display_address address\n street = address.try(:_street)\n addre...
ruby
chosen
[ { "from": "system", "value": "Clean up biodiverity's delete_plant_samples method\n" }, { "from": "human", "value": "class BiodiversityReport < ApplicationRecord\n belongs_to :author, class_name: 'User'\n belongs_to :plot\n\n has_one :soil_sample\n accepts_nested_attributes_for :soil_sample, ...
ruby
chosen
[ { "from": "system", "value": "Add a description, summary and homepage to the gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tomafro/deploy/version\"\n\nGem::Specification.new do |s|\n s.name = \"tomafro-depl...
ruby
chosen
[ { "from": "system", "value": "Check for examples before parsing them\n" }, { "from": "human", "value": "require 'nokogiri'\n\nmodule OxfordLearnersDictionaries\n class Definition\n attr_reader :signification, :examples\n\n def initialize page\n @page = page\n @examples = Array.n...
ruby
chosen
[ { "from": "system", "value": "Return empty list if key not present.\n\nIf the example hash doesn't contain any illustrations-key, it should\nreturn an empty list instead of nil. This happens during --dry-run.\n" }, { "from": "human", "value": "\nmodule RSpec\n module Formatters\n\n # @privat...
ruby
chosen
[ { "from": "system", "value": "Add user_type field to mailbox\n" }, { "from": "human", "value": "MailboxType = GraphQL::ObjectType.define do\n name 'Mailbox'\n model_names ['Mailboxer::Mailbox']\n description 'Fetch mailbox conversations'\n interfaces [GraphQL::Relay::Node.interface]\n globa...
ruby
chosen
[ { "from": "system", "value": "Add https to survey link\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SurveysUrlHelper\n def course_survey_url(notification)\n \"#{survey_url(notification.survey)}?course_slug=#{notification.course.slug.gsub('&', '%26')}\"\n end\ne...
ruby
chosen
[ { "from": "system", "value": "Add default message id for spam\n\nhttp://blog.mailgun.com/tips-tricks-avoiding-gmail-spam-filtering-when-using-ruby-on-rails-action-mailer/\n" }, { "from": "human", "value": "class ApplicationMailer < ActionMailer::Base\n default from: Rails.application.config.act...
ruby
chosen
[ { "from": "system", "value": "Set up Sneakers amqp from Hightops configuration\n" }, { "from": "human", "value": "require 'singleton'\n\nrequire 'active_support/hash_with_indifferent_access'\nrequire 'active_support/inflector'\nrequire 'multi_json'\nrequire 'sneakers'\n\nrequire 'hightops/versio...
ruby
chosen
[ { "from": "system", "value": "Add parameter checking code to allow search on specific attributes.\n" }, { "from": "human", "value": "require \"pry\"\nrequire \"json\"\nrequire \"mp3info\"\nrequire \"sinatra/base\"\n\nrequire 'jukeberx/version'\nrequire 'jukeberx/song'\nrequire 'jukeberx/searcher...
ruby
chosen
[ { "from": "system", "value": "Fix uninitialized constant Naginata (NameError)\n\nThis raises when require external_command before define Naginata\nnamespace.\n" }, { "from": "human", "value": "require \"naginata/command/external_command\"\nrequire \"naginata/configuration\"\nrequire \"naginata/c...
ruby
chosen
[ { "from": "system", "value": "Update rails-sass dependency to be compatible with rails 4.2\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"blogo/version\"\nrequire 'blogo/constants'\n\n# Describe your gem and declare ...
ruby
chosen
[ { "from": "system", "value": "Use private flag for yard\n" }, { "from": "human", "value": "if Kernel.const_defined?(:CALABASH_BACKWARDS_COMPATIBILITY_SCRIPT_RUN)\n raise 'Calabash backwards compatibility script can only be run once'\nend\n\nKernel.const_set(:CALABASH_BACKWARDS_COMPATIBILITY_SCR...
ruby
chosen
[ { "from": "system", "value": "Fix support for RxSwift 6.x\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NSObject+Rx\"\n s.version = \"5.2.0\"\n s.summary = \"Handy RxSwift extensions on NSObject.\"\n s.description = <<-DESC\n Right now, we just ha...
ruby
chosen
[ { "from": "system", "value": "Update authors and url. Version bump to 0.9.6\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'redmine'\nrequire 'dispatcher'\n\nDispatcher.to_prepare :redmine_project_filtering do\n\n require_dependency 'redmine_project_filtering'\n require_depend...
ruby
chosen
[ { "from": "system", "value": "Make nexus3_tasks integration tests compatible with 3.8.0\n" }, { "from": "human", "value": "require 'serverspec_helper'\n\ndescribe 'nexus::tasks' do\n describe command('curl -uadmin:admin123 http://localhost:8081/service/siesta/rest/v1/script/get_task/run -X POST...
ruby
chosen
[ { "from": "system", "value": "Fix exception handling example typo\n" }, { "from": "human", "value": "require 'bigcommerce'\n\nBigcommerce.configure do |config|\n config.store_hash = ENV['BC_STORE_HASH']\n config.client_id = ENV['BC_CLIENT_ID']\n config.access_token = ENV['BC_ACCESS_TOKEN']\ne...
ruby
chosen
[ { "from": "system", "value": "Add tests for accounts A/B test\n" }, { "from": "human", "value": "require \"test_helper\"\n\ndescribe TransitionLandingPageController do\n include TaxonHelpers\n include GovukAbTesting::MinitestHelpers\n\n describe \"GET show\" do\n before do\n brexit_ta...
ruby
chosen
[ { "from": "system", "value": "Move to new rspec expectation format" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DataKitten::Dataset do\n\n before :all do\n @r = DataKitten::Dataset.new(access_url: \"http://github.com/theodi/github-viewer-test-data.git\")\n end\n\n # i...
ruby
chosen
[ { "from": "system", "value": "Add Lookback 1.4.1 as a dependency to be installed by cocoapods\n" }, { "from": "human", "value": "require \"json\"\n\njson = File.read(File.join(__dir__, \"package.json\"))\npackage = JSON.parse(json).deep_symbolize_keys\n\nPod::Spec.new do |s|\n s.name = package[...
ruby
chosen
[ { "from": "system", "value": "Add rubocop gem in development\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'holiday_list/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Refactor UpdateItem::Movie: extract methods for readability\n" }, { "from": "human", "value": "class UpdateItem::Movie < UpdateItem\n private\n\n def update_item!\n item.assign_attributes(updated_attributes)\n update_association!(tmdb_movie, :tmdb_id, Genre,...
ruby
chosen
[ { "from": "system", "value": "Add plugin_root method to plugin superclass\n" }, { "from": "human", "value": "# encoding: utf-8\n# This file is part of the K5 bot project.\n# See files README.md and COPYING for copyright and licensing information.\n\n# IRCPlugin is the superclass of all plugins\n...
ruby
chosen
[ { "from": "system", "value": "Update email and github 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 'fastlane/plugin/wait_xcrun/version'\n\nGem::Specification.new do |spe...
ruby
chosen
[ { "from": "system", "value": "Sort tarball entries in tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Stove\n describe Cookbook do\n describe '#tarball' do\n let(:path) { generate_cookbook('basic', 'basic-cookbook') }\n it 'contains a directory with the sam...
ruby
chosen
[ { "from": "system", "value": "Fix copy and paste blunder on ChefSpec.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe_recipe 'consul::default' do\n it { expect(chef_run).to include_recipe('consul::_service') }\n\n context 'with default attributes' do\n it { expect(chef_...
ruby
chosen
[ { "from": "system", "value": "Increase version number to 0.1.4\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Treasure'\n s.version = '0.1.3'\n s.summary = 'A small set of tools for deserializing JSON API objects.'\n\n s.description = <...
ruby
chosen
[ { "from": "system", "value": "Remove prototype from product management permission set\n" }, { "from": "human", "value": "module Spree\n module PermissionSets\n class ProductManagement < PermissionSets::Base\n def activate!\n can :manage, Spree::Product\n can :manage, Spree...
ruby
chosen
[ { "from": "system", "value": "Move create defaults for privillege into migration\n\ngit-svn-id: 6fb0b63dee43263dbd2534f09c80ea129ca0b2b4@2354 1b8ff446-76f8-11e0-a33c-ba5893e5f458\n" }, { "from": "human", "value": "class AddFieldsToPrivilege < ActiveRecord::Migration\n def self.up\n add_colum...
ruby
chosen
[ { "from": "human", "value": "Migration: Change serialized column from Marshal to JSON.\n" }, { "from": "gpt", "value": "require 'oj'\nrequire 'common'\n::Sequel.migration do\n up do\n # Change all serialized column initial Marshalled to JSON.\n self[:orders].each do |row|\n [:state, ...
ruby
chosen
[ { "from": "system", "value": "Add warning message about requiring having a test vm running\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'vagrant-list'\n\n\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Add API key loading from environment for rspec\n\nUltimately we'll use something like vcr so that anyone can re-run these\ntests without having an API key, although why anyone would want to\ndevelop this library without an API key is beyond me.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Make it easier to run specs" }, { "from": "human", "value": "require 'spec'\n\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'active_api'\nrequire 'faker'\nrequire 'rr'\nrequire 'domain'\n\nmo...
ruby
chosen
[ { "from": "system", "value": "Move Code Climate instance to the very first line.\n" }, { "from": "human", "value": "require \"piu_piu\"\nrequire \"codeclimate-test-reporter\"\n\nCodeClimate::TestReporter.start\n\nRSpec.configure do |config|\n # Use color in STDOUT\n config.color = true\n\n # ...
ruby
chosen
[ { "from": "system", "value": "Normalize ASTs before mutating spec examples\n\n* Reduces smantically unneded empty begin nodes etc.\n* Allows to sharp specs.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n Sim...
ruby
chosen
[ { "from": "system", "value": "Change to remove unnecessary options\n" }, { "from": "human", "value": "if ENV['COVERAGE'] || ENV['TRAVIS']\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n ...
ruby
chosen
[ { "from": "system", "value": "Update specs to report coverage to coveralls\n" }, { "from": "human", "value": "# encoding: utf-8\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n\n SimpleCov.start do\n command_name 'spec:unit'\n add_filter 'config'\n add_filter 's...
ruby
chosen
[ { "from": "system", "value": "Fix the test suite to run against latest Guard.\n\nThe test suite works fine with Guard 2.1, but fails with Guard 2.13.\n\nThe failure comes from heavy refactoring in recent version of Guard,\nwhere static initialization is expected by the runtime. The init just\ndoes not happe...
ruby
chosen
[ { "from": "system", "value": "Stop requiring i18n/core_ext/hash that is not in use\n\ni18n removed i18n/core_ext/hash at v1.9.0 (https://github.com/ruby-i18n/i18n/releases/tag/v1.9.0)\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] = \"test\"\n\nrequire 'i18n-spec'\nrequire 'i18n/core_ext/...
ruby
chosen
[ { "from": "system", "value": "Delete fixture configuration at spec.\n" }, { "from": "human", "value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire 'rspec/rails...
ruby
chosen
[ { "from": "system", "value": "Add spec filter for coverage\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\n$:.unshift File.expand_path(\"../..\", __FILE__)\n\nrequire 'lib/shuttle'\n\ndef fixture_path(filename=nil)\n path = File.expand_path(\"../fixtures\", __FILE__)\...
ruby
chosen
[ { "from": "system", "value": "Revert the last change...onClick does not need to return a value\n" }, { "from": "human", "value": "require 'ruboto.rb'\n\nruboto_import_widgets :TextView, :LinearLayout, :Button\n\n$activity.handle_create do |bundle|\n setTitle 'This is the Title'\n\n setup_conte...
ruby
chosen
[ { "from": "human", "value": "Add Sidekiq base auth configuration\n" }, { "from": "gpt", "value": "require 'sidekiq/web'\n\nif ENV[\"USERNAME\"] and ENV[\"PASSWORD\"]\n Sidekiq::Web.use(Rack::Auth::Basic) do |user, password|\n user = ENV[\"USERNAME\"]\n password = ENV[\"PASSWORD\"]\n end\...
ruby
chosen
[ { "from": "human", "value": "Add 6.5 Nested Data Structures file\n" }, { "from": "gpt", "value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:\n# ===============================...
ruby
chosen
[ { "from": "system", "value": "Enforce localised URL convention for styleguide\n\nScopes the styleguide resource by locale but restricts it to the default\nlocale (en) only. This keeps routing consistent and ensures we have one\nway to concern ourselves with how to determine the locale." }, { "from":...
ruby
chosen
[ { "from": "system", "value": "Update description on rubygems.org to match Github\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"op_cart/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Revert \"Revert \"Revert \"unblock build for beta release\"\"\"\n\nThis reverts commit 37c3066234d308fa502e30994c7cfe84d0dad8c0.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n#\n# Copyright (C) 2021 - present Instructure, Inc.\n#\n# This file i...
ruby
chosen
[ { "from": "system", "value": "Update Swift version in Podfile\n" }, { "from": "human", "value": "# Run `pod lib lint KeyboardKit.podspec' to ensure this is a valid spec.\n\nPod::Spec.new do |s|\n s.name = 'KeyboardKit'\n s.version = '3.1.1'\n s.swift_versions = ['5.2']\...
ruby
chosen
[ { "from": "system", "value": "Fix Reachability reference in Podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'PusherSwift'\n s.version = '5.1.1'\n s.summary = 'A Pusher client library in Swift'\n s.homepage = 'https://github.com...
ruby
chosen
[ { "from": "system", "value": "Put Hash options in Datamapper config instead an adress uri\n" }, { "from": "human", "value": "\nperiod_dir = File.expand_path('.')\n$LOAD_PATH.unshift(period_dir) unless $LOAD_PATH.include?(period_dir)\n\nbegin\n require File.expand_path(\".bundle/environment\", _...
ruby
chosen
[ { "from": "system", "value": "Add required Ruby version to gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'rack-zip'\n spec.version = '0.0.1'\n spec.summary = 'Zip file server'\n spec.description = 'Rack::Zip serves files in zip archives.'\n spec.a...
ruby
chosen
[ { "from": "human", "value": "Add missing indexes in database\n" }, { "from": "gpt", "value": "class AddMissingIndexes < ActiveRecord::Migration\n\n def up\n add_index :jenkins_settings, :project_id\n\n add_index :jenkins_jobs, :project_id\n add_index :jenkins_jobs, :repository_id\n ...
ruby
chosen
[ { "from": "system", "value": "Add the homepage for plugin and increase version\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = 'jekyll-remote-plantuml'\n ...
ruby
chosen
[ { "from": "system", "value": "Fix error in world calling.\n" }, { "from": "human", "value": "module PageModels\n module RegistrationSuccessAsserts\n\n def assert_welcome_message\n expect(registration_success_page.welcome_label).to have_content(test_data('messages', 'welcome'), :visible ...
ruby
chosen
[ { "from": "system", "value": "Return object while using bang methods\n" }, { "from": "human", "value": "module Amorail # :nodoc: all\n class Entity\n class InvalidRecord < ::Amorail::Error; end\n class NotPersisted < ::Amorail::Error; end\n\n def new_record?\n id.blank?\n end\n...
ruby
chosen
[ { "from": "human", "value": "Revert \"removing unused rack middleware\"\n\nThis reverts commit 4676a0c0606a3a506b432c3fa8f56787bb972579.\n" }, { "from": "gpt", "value": "module CacheBack\n class RackMiddleware\n def initialize(app)\n @app = app\n end\n\n def call(env)\n resul...
ruby
chosen
[ { "from": "system", "value": "Fix MRI Ruby 2.x warnings\n" }, { "from": "human", "value": "require \"middleman-core\"\n\nmodule Middleman\n class DisqusExtension < Extension\n option :shortname, nil, \"Your short name for Disqus\"\n\n def initialize(app, options_hash={}, &block)\n su...
ruby
chosen
[ { "from": "system", "value": "Improve performance of lines classifier\n\nPrefer `Regexp#match?` over `String#=~` which improves the speed\nby ~50% for these methods.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SimpleCov\n # Classifies whether lines are relevant fo...
ruby
chosen
[ { "from": "system", "value": "Fix rake so it only deletes legends of the same type\n" }, { "from": "human", "value": "namespace :cartodb do\n desc \"fixes duplicated unique legends\"\n task fix_unique_legends: :environment do\n query = 'SELECT layer_id, count(*) from legends group by layer_...
ruby
chosen
[ { "from": "system", "value": "Refactor dispatcher spec with shared example\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'torkify/event/dispatcher'\nrequire 'torkify/event/event'\n\nmodule Torkify::Event\n\n class ExampleObserver\n def on_test(event)\n end\n\n def o...
ruby
chosen