conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert \"Fix ambiguous column name in UpdateShipmentStateForCanceledOrders\"\n\nThis reverts commit 0c04aade284df9eb06adee5fb6fb3b9db5d4f43a.\n\nrake test_app was getting SQLite3::SQLException: near \".\": syntax error\n" }, { "from": "human", "value": "class Update...
ruby
chosen
[ { "from": "system", "value": "Correct the log file location.\n" }, { "from": "human", "value": "require 'imgur_up/imgur'\nrequire 'imgur_up/imgur_up'\nrequire 'imgur_up/version'\nrequire 'logger'\n\nmodule ImgurUp\n def self.logger\n @logger ||= Logger.new(File.expand_path(\"~/Library/Logs/c...
ruby
chosen
[ { "from": "system", "value": "Set 51013 as default port\n" }, { "from": "human", "value": "require \"iremocon/version\"\nrequire \"net/telnet\"\n\nclass Iremocon\n attr_reader :host, :port, :telnet\n\n def initialize(host, port)\n @host = host\n @port = port\n connect\n end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Use 'config_hash' instead of 'config_file'\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule Nehm\n\n ##\n # Cfg module manipulates with nehm's config file (~/.nehmconfig)\n\n module Cfg\n\n FILE_PATH = File.join(ENV['HOME'], '.nehmconfig')\n\n de...
ruby
chosen
[ { "from": "human", "value": "Remove limit(5) from repo_activity_matview_last_0 table\n" }, { "from": "gpt", "value": "class RemoveLimitFromRepoActivityMatviewLast0 < ActiveRecord::Migration[5.0]\n def up\n name = \"repo_activity_matview_last_0\"\n execute <<-SQL\n DROP MATERIALIZED V...
ruby
chosen
[ { "from": "system", "value": "Fix wrong aliases at Fog::Volume::SakuraCloud::Archive\n" }, { "from": "human", "value": "require 'fog/core/model'\n\nmodule Fog\n module Volume\n class SakuraCloud\n class Archive < Fog::Model\n\n identity :id, :aliases => :ID\n attribute :na...
ruby
chosen
[ { "from": "system", "value": "Define versions for all dependencies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'postino/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use app.route_url for routing app (defaults to underscore of app name)\n" }, { "from": "human", "value": "module Spider\n \n class SpiderController < Controller\n \n def self.route_app(app)\n Spider::Logger.debug(\"ROUTING APP #{app.na...
ruby
chosen
[ { "from": "human", "value": "Add Tmptoml v0.1.3 bottle release\n\nps-id: 8942449E-57CA-4419-ABD6-40BDBBBE8E0D\n" }, { "from": "gpt", "value": "class TmpToml < Formula\n desc \"Command-line utility to render Tera templates using a toml config file as the variable source.\"\n homepage \"https://...
ruby
chosen
[ { "from": "system", "value": "Add routes for questions and choices\n" }, { "from": "human", "value": "get '/surveys' do\n @surveys = Survey.all\n erb :\"surveys/index\"\nend\n\nget '/surveys/new' do\n erb :\"surveys/new\"\nend\n\npost '/surveys' do\n @survey = Survey.new(params[:survey])\n ...
ruby
chosen
[ { "from": "system", "value": "Send notify after organisation has changed.\n" }, { "from": "human", "value": "# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/\n\nclass Organization < ApplicationModel\n require 'organization/assets'\n include Organization::Assets\n ext...
ruby
chosen
[ { "from": "system", "value": "Update email and licensing information\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pure360/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Fix positional parameters in `phar_wrapper`\n\nFixes #2537 by @aadmathijssen.\n\nCloses #2885.\n\nSigned-off-by: Andy Blyler <e3579b1e47f273529f0f929453e939a68ede9fd1@blyler.cc>\n" }, { "from": "human", "value": "require 'formula'\nrequire File.join(File.dirname(__F...
ruby
chosen
[ { "from": "system", "value": "Use hash-rockets for the 1.8 folks\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"LVDebounce\"\n s.version = \"0.0.3\"\n s.summary = \"LVDebounce provides an NSTimer-like class for debouncing method calls.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add support for fingerprint column" }, { "from": "human", "value": "require 'rails_admin/config/fields'\nrequire 'rails_admin/config/fields/types'\nrequire 'rails_admin/config/fields/types/file_upload'\n\nRailsAdmin::Config::Fields.register_factory do |parent, prope...
ruby
chosen
[ { "from": "system", "value": "Fix podspec after directory rename\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TVMLKitchen\"\n s.version = \"0.6.0\"\n s.summary = \"Swifty TVML template manager with or without client-server\"\n s.descripti...
ruby
chosen
[ { "from": "system", "value": "Update STS to 3.6.4 and remove unneeded manual step before linking\n" }, { "from": "human", "value": "cask :v1 => 'sts' do\n version '3.5.1'\n sha256 'f71274c9f946d2af6bbd12e811d7c8d371d3031415839b9aa6ed35347d2980f8'\n\n module Utils\n def self.based_on_eclips...
ruby
chosen
[ { "from": "system", "value": "Revert API key to placeholder.\n" }, { "from": "human", "value": "require 'bridge-ruby'\n\nEventMachine.run do\n\n bridge = Bridge::Bridge.new(:api_key => 'abcdefgh')\n\n class AuthHandler\n def initialize bridge\n @bridge = bridge\n end\n\n def join...
ruby
chosen
[ { "from": "human", "value": "Add check for elasticsearch file descriptor usage\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n#\n# Checks ElasticSearch file descriptor status\n# ===\n#\n# DESCRIPTION:\n# This plugin checks the ElasticSearch file descriptor usage, using its API.\n#\n# OU...
ruby
chosen
[ { "from": "human", "value": "Remove fta_asset_category_id from audit_results table.\n" }, { "from": "gpt", "value": "class RemoveFtaAssetCategoryIdFromAuditResults < ActiveRecord::Migration[5.2]\n def change\n remove_column :audit_results, :fta_asset_category_id, :int if column_exists?(:audi...
ruby
chosen
[ { "from": "human", "value": "Fix odd behavior on sqlite 3.7.17\n\nOlder sqlite raise foreign key constraint errors even though the data is valid.\nThe same code works with newer sqlite so I guess it is a bug in sqlite which was\nfixed in the meantime.\n" }, { "from": "gpt", "value": "# frozen_st...
ruby
chosen
[ { "from": "system", "value": "Mark the user's library as updated for recommendations when favorite\ngenres are changed.\n" }, { "from": "human", "value": "class GenresController < ApplicationController\n def index\n @genres = params.keys.select {|x| params[x] == \".#{x}\" }.uniq\n ...
ruby
chosen
[ { "from": "system", "value": "Add conditional to prevent errors for when no user is signed in\n" }, { "from": "human", "value": "class SkillsController < ApplicationController\n def index\n @new_skill = Skill.new\n @skills = current_user.skills.order(:id)\n @first_link = true\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Remove force-flush-to-db when archiving trace\n" }, { "from": "human", "value": "class BuildFinishedWorker\n include ApplicationWorker\n include PipelineQueue\n\n queue_namespace :pipeline_processing\n\n def perform(build_id)\n Ci::Build.find_by(id: build_id)...
ruby
chosen
[ { "from": "system", "value": "Switch to Aerosol. Make just SSH for now\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'slugger_deploys'\nrequire 'clamp'\n\nclass SluggerDeploys::AbstractCommand < Clamp::Command\n option ['-f', '--file'], 'FILE', 'deploys file to read', :default ...
ruby
chosen
[ { "from": "system", "value": "Fix mass assignment check on Ruby 2.0\n" }, { "from": "human", "value": "require \"basic_model/version\"\nrequire \"active_model\"\nrequire \"active_support/concern\"\n\nmodule BasicModel\n extend ActiveSupport::Concern\n include ActiveModel::Conversion\n include...
ruby
chosen
[ { "from": "system", "value": "Load .compath.yml only if exists\n" }, { "from": "human", "value": "module Compath\n class CLI\n def self.run\n finder = Compath::Finder.new\n paths = Compath::PathSorter.sort(finder.paths.keys)\n\n config = Compath::ConfigLoader.load(File.read('....
ruby
chosen
[ { "from": "system", "value": "Make .delay method work with ActionMailer::Parameterized::Mailer\n\nThis PR unifies the DelayedJob behavior of ActionMailer::Base and ActionMailer::Parameterized::Mailer\r\n\r\nNow, the following syntax works equivalently:\r\n\r\n```ruby\r\n# works currently\r\nMyMailer.delay.m...
ruby
chosen
[ { "from": "system", "value": "Use \"include?\" instead of case statment\n" }, { "from": "human", "value": "require 'rdf'\nrequire 'linkeddata'\n\nrequire_relative 'semantology/reader'\n\n# The module that contains everything Semantology-related\nmodule Semantology\n # Convinience method\n # @p...
ruby
chosen
[ { "from": "system", "value": "Update files for release v1.0.2\n" }, { "from": "human", "value": "module Sfn\n # Current library version\n VERSION = Gem::Version.new('1.0.1')\nend\n" }, { "from": "gpt", "value": "module Sfn\n # Current library version\n VERSION = Gem::Version.new(...
ruby
chosen
[ { "from": "system", "value": "Add bower components to Dummy app asset path\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railti...
ruby
chosen
[ { "from": "system", "value": "Use random rank for better uniqueness in tests\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nFactoryGirl.define do\n factory :entity_source do\n enabled true\n rank { (Time.now.to_f * 100).to_i }\n sequence(:source_tag) { |n| \"#{Fake...
ruby
chosen
[ { "from": "human", "value": "Add google admob ads sdk.\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = \"Google-AdMob-Ads-SDK\"\n s.version = \"6.2.1\"\n s.summary = \"Google AdMob Ads SDK 6.2.1 for iOS.\"\n s.description = \"The Google AdMob Ads SDK allows developers to eas...
ruby
chosen
[ { "from": "system", "value": "Refactor user registrations controller, early return to reduce indentation\n" }, { "from": "human", "value": "require 'open_food_network/error_logger'\n\nclass UserRegistrationsController < Spree::UserRegistrationsController\n I18N_SCOPE = 'devise.user_registration...
ruby
chosen
[ { "from": "system", "value": "Remove user_return_to info in frontpage\n" }, { "from": "human", "value": "FrontpageController.class_eval do\n def terms_of_service\n end\nend\n" }, { "from": "gpt", "value": "FrontpageController.class_eval do\n before_filter :delete_redirect, only: :...
ruby
chosen
[ { "from": "system", "value": "Return active block from cms_blocks_by_group\n" }, { "from": "human", "value": "module Spree\n module CmsBlockOwnership\n extend ActiveSupport::Concern\n included do\n has_many :cms_block_owners, as: :owner\n has_many :cms_blocks, through: :cms_bloc...
ruby
chosen
[ { "from": "system", "value": "Move everything but open out of the begin/rescue/end structure\n" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'cinch'\nrequire 'open-uri'\nrequire 'cgi'\nrequire 'yajl'\n\n# Use this:\n# http://code.google.com/apis/language/translate/v1/using_rest_tra...
ruby
chosen
[ { "from": "system", "value": "Add end to ratings controller\n" }, { "from": "human", "value": "class RatingsController < ApplicationController\n def new\n @rating = Rating.new\n end\n\n def create\n @rating = Rating.new\n\n if @rating.save\n redirect_to #somewhere react? probabl...
ruby
chosen
[ { "from": "system", "value": "Modify index method for mapbox.\n\nComment out gon.schools. Create geojson from schools database. Create respond_to method to return json for ajax call for the map.\n" }, { "from": "human", "value": "class SchoolsController < ApplicationController\n\t# skip_before...
ruby
chosen
[ { "from": "system", "value": "Use libexec instead of lib, maybe should be share\n" }, { "from": "human", "value": "class PicardTools < Formula\n desc 'Java tools to manipulate BAM/SAM/CRAM files'\n homepage 'https://broadinstitute.github.io/picard'\n\n url 'https://github.com/broadinstitute/p...
ruby
chosen
[ { "from": "system", "value": "Remove flagged stories and snippets\n" }, { "from": "human", "value": "class WelcomeController < ApplicationController\n def index\n @recent_snippets = Snippet.most_recent\n @popular_snippets = Snippet.most_popular\n @recent_stories = Story.most_recent\n ...
ruby
chosen
[ { "from": "system", "value": "Complete welcome controller action functionality: index\n" }, { "from": "human", "value": "class WelcomeController < ApplicationController\n def index\n end\nend\n" }, { "from": "gpt", "value": "class WelcomeController < ApplicationController\n def in...
ruby
chosen
[ { "from": "human", "value": "Fix length of text fields\n" }, { "from": "gpt", "value": "class FixLengthOfTextFields < ActiveRecord::Migration\n def change\n change_column :casino_proxy_tickets, :service, :text, :limit => nil\n change_column :casino_service_tickets, :service, :text, :limit...
ruby
chosen
[ { "from": "system", "value": "Add helpers that make use of state ordering\n" }, { "from": "human", "value": "# Mixin for models with linear AASM-defined workflows.\n#\n# This mixin provides the aasm_state_order class settor, as well as\n# a similarly-named instance gettor.\n#\n# @author Brendan ...
ruby
chosen
[ { "from": "system", "value": "Uninstall timecop, replacing with simple stub\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rubygems'\nrequire 'bundler/setup'\n\nBundler.require(:default, :test)\n\nrequire 'pry'\nrequire 'find'\nrequire 'excon'\nrequire 'vcr'\nrequir...
ruby
chosen
[ { "from": "system", "value": "Check if statistic value is present first\n" }, { "from": "human", "value": "class StatisticPresenter\n def initialize model\n @model = model\n @statistic = model.statistic\n end\n\n def percentage_of_global_pas\n percentage = (pa_area / global_statistic...
ruby
chosen
[ { "from": "system", "value": "Fix a race condition at boot time\n" }, { "from": "human", "value": "at_exit do\n Juici::App.shutdown\nend\n\nmodule Juici\n class App\n @@watchers = []\n\n def self.shutdown\n ::Juici.dbgp \"Shutting down Juici\"\n ::Juici::Watcher.instance.shutdo...
ruby
chosen
[ { "from": "system", "value": "Add better description for learn test\n" }, { "from": "human", "value": "module Learn\n class CLI < Thor\n desc \"[test] [options]\", \"Run a lesson's test suite\"\n def test(opts=nil)\n system(\"learn-test #{opts}\")\n end\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Align submit buttons with other form inputs\n" }, { "from": "human", "value": "module ButtonComponents\n def submit_button(*args, &block)\n options = args.extract_options!\n if object.new_record?\n loading = I18n.t('simple_form.creating')\n else\n ...
ruby
chosen
[ { "from": "system", "value": "Make compatible with ruby 1.8" }, { "from": "human", "value": "require 'faraday_middleware/response_middleware'\n\nmodule FaradayMiddleware\n class MultiJson < ResponseMiddleware\n dependency 'multi_json'\n\n def parse(body)\n ::MultiJson.load(body, @opt...
ruby
chosen
[ { "from": "human", "value": "Add resource decorator controller module to use draper with inherited_resource." }, { "from": "gpt", "value": "module OpenMensa\n module ResourceDecorator\n include ActiveSupport::Inflector\n\n protected\n def collection\n @cached_collection ||= decorate...
ruby
chosen
[ { "from": "system", "value": "Add preliminary Apple Calendar support\n" }, { "from": "human", "value": "module Waddup\n\n class Source::AppleCalendar < Waddup::Source\n extend Waddup::Extension::AppleScript\n\n ALIAS = 'ical'\n\n def events(from, to)\n []\n end\n\n # Require...
ruby
chosen
[ { "from": "system", "value": "Use 127.0.0.1 instead of 0.0.0.0, uniformly in all socket specs.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire File.dirname(__FILE__) + '/../fixtures/classes'\nrequire 'socket'\n\ndescribe \"Socket#for_fd given ...
ruby
chosen
[ { "from": "system", "value": "Enable maintainer mode so changes to Makefile.am are picked up." }, { "from": "human", "value": "require 'rake/testtask'\n\nnamespace :test do\n\n Rake::TestTask.new(:run) do |t|\n t.libs = ['lib']\n t.test_files = FileList['test/**/*_test.rb']\n t.ruby_op...
ruby
chosen
[ { "from": "system", "value": "Update country serializer to reflect land and marine changes\n" }, { "from": "human", "value": "class CountrySerializer < BaseSerializer\n PER_PAGE = 15.freeze\n\n def initialize(params={}, data = nil)\n super(Country, params, data)\n end\n\n private\n\n def...
ruby
chosen
[ { "from": "system", "value": "Tweak 2nd line regex to accept \"on\" location prefix\n\nThis fixes clipping parsing after the latest Kindle software upgrade.\n" }, { "from": "human", "value": "# encoding: utf-8\nmodule KindleClippings\n\n class Parser\n\n def parse_file(path)\n file_cont...
ruby
chosen
[ { "from": "system", "value": "Add better unknown status code reporting, comments\n" }, { "from": "human", "value": "require 'httpclient'\nrequire 'colored'\nmodule Scorebutt\n class HostWatcher\n attr_accessor :ip, :blocks\n def initialize(attributes)\n self.ip = attributes[:ip]\n ...
ruby
chosen
[ { "from": "system", "value": "Remove the period in the extension.\n" }, { "from": "human", "value": "module StartingBlocks\n class Runner\n\n def initialize options\n @contract = StartingBlocks::Contract.for options\n end\n\n def run_files files\n files = files.select { |x| @...
ruby
chosen
[ { "from": "system", "value": "Validate all of request post, not just the content member\n" }, { "from": "human", "value": "require 'tent-schemas'\nrequire 'tent-validator'\n\nmodule TentD\n class SchemaValidator < TentValidator::ResponseExpectation::SchemaValidator\n\n @schemas = TentSchemas...
ruby
chosen
[ { "from": "system", "value": "Allow camp location without membership required\n" }, { "from": "human", "value": "class PeriodicPaymentsController < MyplaceonlineController\n skip_authorization_check :only => MyplaceonlineController::DEFAULT_SKIP_AUTHORIZATION_CHECK + [:monthly_total]\n\n def m...
ruby
chosen
[ { "from": "system", "value": "Fix repository access in CollectionMemberService\n\nIt is stored on `blacklight_config` in Blacklight 7.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Hyrax\n ##\n # Returns a list of solr documents for collections the item is a part o...
ruby
chosen
[ { "from": "system", "value": "Remove bundler version 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 'turnip/dry_run/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Load visualization based on the user specified in the URL\n" }, { "from": "human", "value": "module VisualizationsControllerHelper\n # Implicit order due to legacy code: 1st return canonical/table/Dataset if present, else derived/visualization/Map\n def get_priori...
ruby
chosen
[ { "from": "system", "value": "Make assert_running work with latest platform\n" }, { "from": "human", "value": "raise SkipTest unless service?(:webapp)\n\nrequire 'json'\n\nclass Pixelated < LeapTest\n depends_on \"Network\"\n\n def setup\n end\n def test_01_Are_daemons_running?\n assert_r...
ruby
chosen
[ { "from": "system", "value": "Fix uninstall script formatting in log replayer\n\n\nFormer-commit-id: ae5542a386c0ef37216073dfad17c1d797766740 [formerly 79c92eefab9334f7cb22b4c27a1f9bd11a8f4d61] [formerly f745e74da46b87f04cf253632c63e728ea0b2600 [formerly 69afb9f8c5bc23f3657e6321fc2f6dabd94a6fbb]]\nFormer-co...
ruby
chosen
[ { "from": "system", "value": "Fix hard-coded domain in release name\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'uri'\nrequire 'net/http'\nrequire 'json'\n\nclass Travis::Web::SentryDeployHook < Sinatra::Base\n set sentry_api_key: ENV['SENTRY_API_KEY']\n set sentry_org: 'trav...
ruby
chosen
[ { "from": "system", "value": "Add another tab to interface interaction to make headless work\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire_relative '../page_root.rb'\n\nclass CatalinkerClient < PageRoot\n def visit\n @browser.goto catalinker_client(:home)\n self\n ...
ruby
chosen
[ { "from": "system", "value": "Configure bind and dhcp for Dublin\n" }, { "from": "human", "value": "name \"fafnir\"\ndescription \"Master role applied to fafnir\"\n\ndefault_attributes(\n :networking => {\n :interfaces => {\n :internal_ipv4 => {\n :interface => \"bond0\",\n ...
ruby
chosen
[ { "from": "system", "value": "Exit with the return status from rspec in testing\n" }, { "from": "human", "value": "require 'zeus/rails'\n\nrequire_relative 'spec/support/redis'\nrequire_relative 'spec/helpers/spec_helper_helpers'\n\nclass CustomPlan < Zeus::Rails\n include SpecHelperHelpers\n\n...
ruby
chosen
[ { "from": "system", "value": "Use the route of the engine\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule EmberCart\n describe CartsController do\n describe 'GET index' do\n before(:each) do\n get :index, format: :json, use_route: :ember_cart\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Remove time zone information from assertion in timeago tooltips spec\n\nThis allows the test to pass when your local time zone is different\nthan UTC.\n\"Date Format\" JavaScript library uses a custom, non-standard format\nwhen displaying time zone part of the datetime. There i...
ruby
chosen
[ { "from": "system", "value": "Backup serialize_data method from discourse application controller\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n ...
ruby
chosen
[ { "from": "system", "value": "Deploy to both web servers.\n" }, { "from": "human", "value": "# Set the servers for this stage.\nrole :app, \"api-web1.anydns.com\"\nrole :web, \"api-web1.anydns.com\"\n\n# Set the base path for deployment.\nset :deploy_to_base, \"/srv\"\n\n# Set the accessible web...
ruby
chosen
[ { "from": "system", "value": "Use state predicate methods in VirusScanWorker spec\n\nThis means we're using a slightly higher level of abstraction and means\nthis spec is more readable and more consistent with the\nSaveToCloudStorageWorker spec.\n" }, { "from": "human", "value": "require 'rails_...
ruby
chosen
[ { "from": "system", "value": "Add TODO note for a future refactoring\n" }, { "from": "human", "value": "# encoding: utf-8\n\n# Base IceNine module\nmodule IceNine\n\n # Deep Freeze object\n #\n # @example\n # object = IceNine.deep_freeze(object)\n #\n # @param [Object] object\n #\n # @...
ruby
chosen
[ { "from": "system", "value": "Fix issue with migrating locally\n" }, { "from": "human", "value": "require 'rake'\nrequire 'dotenv/tasks'\n\nnamespace :db do\n desc 'Run migrations up to specified version or to latest.'\n task :migrate, [:version] => [:dotenv] do |_, args|\n require 'sequel...
ruby
chosen
[ { "from": "system", "value": "Use correct name for activesupport gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'maxmind/version'\n\nGem::Specification.new do |s|\n s.name = \"maxmind\"\n s.version = Maxmind::VERSION\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add specs for pipeline chain builder sequence class\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Pipeline::Chain::Sequence do\n set(:project) { create(:project) }\n set(:user) { create(:user) }\n\n let(:pipeline) { build_stubbed(:...
ruby
chosen
[ { "from": "human", "value": "Add tests for the vcloud-net-launch schema\n\nAdd some simple tests for the Vcloud::NetLauncher::Schema::NET_LAUNCH\nschema, used by the `vcloud-net-launch` command.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Vcloud::NetLauncher do\n context ...
ruby
chosen
[ { "from": "human", "value": "Add Cross GCC 4.8.1 for Linux 64bit cask\n" }, { "from": "gpt", "value": "class Gcc481Linux64 < Cask\n url 'http://crossgcc.rts-software.org/download/gcc-4.8.1-for-linux32-linux64/gcc-4.8.1-for-linux64.dmg'\n homepage 'http://crossgcc.rts-software.org/doku.php?id=s...
ruby
chosen
[ { "from": "system", "value": "Fix sha256 checksum for iTerm2-2_9_20160403-nightly.zip\n\nThe checksum was incorrect stopping the nightly from installing." }, { "from": "human", "value": "cask 'iterm2-nightly' do\n version '2.9.20160403'\n sha256 'b1992760bd943256d568cd2648a09b46b422489254984fc...
ruby
chosen
[ { "from": "system", "value": "[dm-validations] Add error message expectations to 'valid model' and 'invalid model' shared spec groups\n" }, { "from": "human", "value": "describe \"valid model\", :shared => true do\n it \"is valid\" do\n @model.should be_valid\n end\n\n it \"has no error me...
ruby
chosen
[ { "from": "human", "value": "Add spec on references for PostgreSQL\n" }, { "from": "gpt", "value": "describe 'Ridgepole::Client#diff -> migrate' do\n context 'when use references (no change)' do\n let(:actual_dsl) {\n erbh(<<-EOS)\n create_table \"employees\", primary_key: \"emp_...
ruby
chosen
[ { "from": "system", "value": "Unify ip addresses for now\n" }, { "from": "human", "value": "Brain.request(path: \"/cluster-api/v1/cells/discovery\",\n method: :post,\n payload: {\n cell: {\n uuid: Cell.uuid,\n fqdn: Cell....
ruby
chosen
[ { "from": "system", "value": "Fix merb-haml spec to pull proper config\n\nSigned-off-by: Ezra Zygmuntowicz <4aca359fa1b78e51bc8226c4f161d16fdc1e21c8@engineyard.com>\n" }, { "from": "human", "value": "$TESTING=true\n$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')\nrequire \"rubygems\"\n...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for 瀑布.\n" }, { "from": "human", "value": "cask 'pubu' do\n version '2.0.0'\n sha256 'f0ce2abd31867de7f545a1d9a04a082e597178ca6697c0ae9c3404eb1f7c1b71'\n\n url \"http://facecdn.u.qiniudn.com/downloads/%E7%80%91%E5%B8%83_OSX_V#{version}_Be...
ruby
chosen
[ { "from": "system", "value": "Update YNAB to new version." }, { "from": "human", "value": "class Ynab < Cask\n url 'http://www.youneedabudget.com/CDNOrigin/download/ynab4/liveCaptive/Mac/YNAB4_LiveCaptive_4.3.351.dmg'\n homepage 'http://www.youneedabudget.com/'\n version '4.3.351'\n sha256 '...
ruby
chosen
[ { "from": "system", "value": "Include all appropriate files in the gem\n" }, { "from": "human", "value": "require File.expand_path('../lib/toro/version', __FILE__)\n\nGem::Specification.new do |s|\n s.authors = ['Tom Benner']\n s.email = ['tombenner@gmail.com']\n s.description =...
ruby
chosen
[ { "from": "system", "value": "Fix code smell reported by rubocop\n" }, { "from": "human", "value": "lib = File.expand_path('../lib/', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jwt/version'\n\nGem::Specification.new do |spec|\n spec.name = 'jwt'\n spec.version...
ruby
chosen
[ { "from": "system", "value": "Remove log and fix conditional\n" }, { "from": "human", "value": "\nmodule CabooseStore\n class ApplicationController < Caboose::ApplicationController\n protect_from_forgery\n layout 'layouts/caboose/application'\n helper :all\n before_filter :init_cart...
ruby
chosen
[ { "from": "system", "value": "Use Ruby commands in preference to UNIX commands\n" }, { "from": "human", "value": "require 'formula'\n\nSOLR_START_SCRIPT = <<-end_script\n#!/bin/sh\nif [ -z \"$1\" ]; then\n echo \"Usage: $ solr path/to/config/dir\"\nelse \n cd %s/example && java -Dsolr.solr.hom...
ruby
chosen
[ { "from": "system", "value": "Install system-info with gem_package instead\n" }, { "from": "human", "value": "#\n# Cookbook Name:: travis_system_info\n# Recipe:: default\n#\n# Copyright 2015, Travis CI GmbH\n#\n# MIT License\n#\n\nlocal_gem = \"#{Chef::Config[:file_cache_path]}/system-info.gem\"...
ruby
chosen
[ { "from": "system", "value": "Mark behavior with the reported upstream bug\n\n* Fixed in trunk, not yet in 2.4.\n* See https://bugs.ruby-lang.org/issues/14014\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\nruby_version_is \"2.4\" do\n describe \...
ruby
chosen
[ { "from": "system", "value": "Check if Spree::Dash is configured before trying to sync with Jirafe\n" }, { "from": "human", "value": "module Spree\n class Admin::OverviewController < Admin::BaseController\n before_filter :check_last_jirafe_sync_time, :only => :index\n\n JIRAFE_LOCALES = {...
ruby
chosen
[ { "from": "system", "value": "Make sure password is set\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Make sure ssh login is via ssh key only. This is required since we are enabling\n# a password for root per IMAGE-459\ndescribe file('/etc/ssh/sshd_config') do\n it { should be_f...
ruby
chosen
[ { "from": "human", "value": "Add a tags integration spec\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule LIFX\n describe \"tags\", integration: true do\n it 'Clearing, setting and using tags' do\n sleep(2)\n light.tags.each do |tag_label|\n light.remove_tag(...
ruby
chosen
[ { "from": "system", "value": "Fix Rails4 integs under JRuby's Ruby 2.0 mode\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production...
ruby
chosen
[ { "from": "system", "value": "Add rake as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/parceira/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Marcos G. Zimmermann\"]\n gem.email =...
ruby
chosen
[ { "from": "human", "value": "Add test coverage for DefaultSignInGuard\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Clearance::DefaultSignInGuard do\n context 'session is signed in' do\n it 'returns success' do\n session = stub('Session', signed_in?: true)\n gu...
ruby
chosen
[ { "from": "system", "value": "Implement extensions to content_tag_selector to accept additional classes.\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'rspec/expectations'\nrequire 'action_view/record_identifier'\n\nmodule ContentTag; end\nmodule ContentTag::TestExamp...
ruby
chosen