conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add missing directory to released gem.\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'rails_event_store/browser/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specifica...
ruby
chosen
[ { "from": "system", "value": "Update Homebrew formula for v0.7.0\n" }, { "from": "human", "value": "require 'formula'\n\nclass ChrubyFish < Formula\n homepage 'https://github.com/JeanMertz/chruby-fish#readme'\n url 'https://github.com/JeanMertz/chruby-fish/archive/v0.6.0.tar.gz'\n sha1 'e8262...
ruby
chosen
[ { "from": "system", "value": "Correct the name of librarian-puppet in description\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-puppet-modules/version'\n\nGem::Specificatio...
ruby
chosen
[ { "from": "system", "value": "Add case Instance/Vm without ext_management_system\n" }, { "from": "human", "value": "describe ApplicationHelper::Button::SetOwnership do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n\n let(:ext_management_system) do\n FactoryGirl.create(:ext_m...
ruby
chosen
[ { "from": "human", "value": "Add tests for the category class\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'helper'\n\ndescribe Dimples::Category do\n before do\n @site = Dimples::Site.new(test_configuration)\n end\n\n describe 'w...
ruby
chosen
[ { "from": "system", "value": "Add svg to image preprocessor\n" }, { "from": "human", "value": "Pakyow::Assets.preprocessor :ico\nPakyow::Assets.preprocessor :png, :jpg, :gif, fingerprint: true\n" }, { "from": "gpt", "value": "Pakyow::Assets.preprocessor :ico\nPakyow::Assets.preproces...
ruby
chosen
[ { "from": "system", "value": "Build bump to version 1.0.1.\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'UIImage-SolidColor'\n spec.version = '1.0.0'\n spec.license = { :type => 'MIT' }\n spec.homepage = 'h...
ruby
chosen
[ { "from": "system", "value": "Update modis for Rails 5.2 support\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rpush/redis/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Add redcarpet to deps to use Markdown\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rss/dcterms/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"KITAITI Makoto\"]\n gem.email =...
ruby
chosen
[ { "from": "system", "value": "Upgrade active_attr to 0.10.2 to support latest Discourse\n" }, { "from": "human", "value": "# name: discourse-nntp-bridge\n# about: Discourse plugin to keep NNTP & Discourse in sync\n# version: 0.1.10\n# authors: Stuart Olivera\n# url: https://github.com/sman591/di...
ruby
chosen
[ { "from": "system", "value": "Fix Model filter integration test\n\nI'm not sure why it was broken with ActiveModel ~> 3.0. This fixes it,\nthough.\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'ModelInteraction' do\n it_behaves_like 'an interaction', :m...
ruby
chosen
[ { "from": "human", "value": "Add self referential 1:N veritas integration specs\n" }, { "from": "gpt", "value": "require 'spec_helper_integration'\n\ndescribe 'Relationship - Self referential Many To One' do\n include_context 'Models and Mappers'\n\n before(:all) do\n setup_db\n\n insert...
ruby
chosen
[ { "from": "system", "value": "Add rake to the bundle\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"gem_template/version\"\n\nGem::Specification.new do |s|\n s.name = \"gem_template\"\n s.version = GemTemplate:...
ruby
chosen
[ { "from": "system", "value": "Make sure all source files are included in cocoapod\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SwiftCBOR'\n s.version = '0.4.0'\n s.license = { type: 'public domain', file: 'UNLICENSE' }\n s.summary = 'A CBOR implementation for Swift'\n ...
ruby
chosen
[ { "from": "system", "value": "Update mailer to use attachments[] instead of attachment[]\n" }, { "from": "human", "value": "module ImportProducts\n module UserMailerExt\n def self.included(base)\n base.class_eval do\n def product_import_results(user, error_message = nil)\n ...
ruby
chosen
[ { "from": "system", "value": "Remove premailer adjust on core\n" }, { "from": "human", "value": "class ActionMailer::Base\n\n attr_accessor :environment\n\n # Set default host automatically if environment is set\n def url_for options = {}\n options[:host] ||= environment.default_hostname i...
ruby
chosen
[ { "from": "system", "value": "Make the homepage a real URL.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"pdfjs/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name...
ruby
chosen
[ { "from": "system", "value": "Fix http generated images path when using Compass sprites \n\nOtherwise compass uses '/source/images' for the sprite image URL" }, { "from": "human", "value": "require 'sass-globbing'\n\n# Require any additional compass plugins here.\nproject_type = :stand_alone\n\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Added rule to redirect naked domain to www\"\n\nThis reverts commit ae00b3e3d40408cac71e3e0a13dcf717a2ef2345.\n" }, { "from": "human", "value": "require \"rubygems\"\nrequire 'rack/contrib'\nrequire 'rack-rewrite'\nDOMAIN = 'www.ruby-pt.org'\n \n\nuse Rack:...
ruby
chosen
[ { "from": "system", "value": "Remove silly client get line\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'dotenv'\nDotenv.load\n\nrequire 'scrumbot'\nrequire 'web'\n\nThread.abort_on_exception = true\n\nThread.new do\n begin\n Scrum::Bot.run\n resc...
ruby
chosen
[ { "from": "system", "value": "Use yml for plural model name\n" }, { "from": "human", "value": "module TabsHelper\n\n def tab_link_to(model_or_name, link, current=nil)\n model_or_name = model_or_name.model_name.human.capitalize.pluralize if Class === model_or_name\n current ||= request.pat...
ruby
chosen
[ { "from": "system", "value": "Make the searches perform a like\n" }, { "from": "human", "value": "class SavedSearch < ActiveRecord::Base\n\n before_save :set_available_fields\n serialize :available_fields\n serialize :query_parameters\n serialize :display_fields\n\n def set_available_fields...
ruby
chosen
[ { "from": "system", "value": "Define included examples as strings\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\ntemplate = $stdin.read\nexamples = template.scan(/include_example (.*)/).flatten\n\nexamples.each do |example|\n file = \"examples/#{example}.rb\"\n if File.exists?(file)...
ruby
chosen
[ { "from": "system", "value": "Create the perforce bin_dif if it does not exist\n" }, { "from": "human", "value": "p4_exe = node[:os] == 'windows' ? 'p4.exe' : 'p4'\np4d_exe = node[:os] == 'windows' ? 'p4d.exe' : 'p4d'\n\nremote_file get_ftp_path(node['perforce']['version'], p4_exe) do\n path ::...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated any_instance in server spec\n\nhttp://stackoverflow.com/a/24595457/1058366\n" }, { "from": "human", "value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\ndescribe 'burp::server' do\n\n it 'creates a proper client config in clientconfdir/'...
ruby
chosen
[ { "from": "system", "value": "Handle pry no present on CI\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nif ENV[\"CODECLIMATE_REPO_TOKEN\"]\n # report coverage only for latest mri ruby\n if RUBY_ENGINE == \"ruby\" && RUBY_VERSION >= \"2.2.0\"\n...
ruby
chosen
[ { "from": "system", "value": "Comment out SQL logging magic for now\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 filter to not look at spec and .gems directories for test coverage.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'sports_database'\nrequire 'byebug'\nrequire 'simplecov'\nSimpleCov.start\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Set $DB mysql as default\n" }, { "from": "human", "value": "require \"simplecov\"\nSimpleCov.start\n\n# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../../test/dummy/config/environment.rb\", __FILE__)\nActiveRecord::Migra...
ruby
chosen
[ { "from": "system", "value": "Use ||= in spec class helpers (so that referencing the class again gives back the same class, not a new one)\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Fix Error handling on .find method\n" }, { "from": "human", "value": "module Cheatly\n class Sheet\n attr_accessor :title, :body, :persisted\n\n def initialize(title, body = nil, options = {})\n @title, @body = title, body\n @persisted = options[:pe...
ruby
chosen
[ { "from": "system", "value": "Change Enum type to use tighter database constraints\n" }, { "from": "human", "value": "require 'dm-core'\nrequire 'dm-types/support/flags'\n\nmodule DataMapper\n class Property\n class Enum < Integer\n\n include Flags\n\n def initialize(model, name, o...
ruby
chosen
[ { "from": "system", "value": "Raise warning on LoadError, too\n" }, { "from": "human", "value": "module Gherkin\n module Lexer\n I18nLexerNotFound = Class.new(LoadError)\n LexingError = Class.new(StandardError)\n\n class << self\n def [](i18n_lang)\n begin\n # Unco...
ruby
chosen
[ { "from": "system", "value": "Add docs for Controls constants\n" }, { "from": "human", "value": "module Poke\n # The +Controls+ controller handles keyboard input from the user.\n class Controls\n\n PARAMS_REQUIRED = [:window]\n\n BUTTONS = { up: Gosu::KbUp,\n down: G...
ruby
chosen
[ { "from": "system", "value": "Make implicit helper method for PopularItems private\n" }, { "from": "human", "value": "require 'active_support/core_ext/string/inflections'\n\nclass PopularItems\n attr_accessor :items\n\n def initialize(filename, logger = nil)\n @items = load(filename)\n @...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary mime type declaration\n" }, { "from": "human", "value": "require \"emcee/processors/directive_processor\"\nrequire \"emcee/processors/import_processor\"\nrequire \"emcee/processors/script_processor\"\nrequire \"emcee/processors/stylesheet_processo...
ruby
chosen
[ { "from": "system", "value": "Update API module to hit production URL\n" }, { "from": "human", "value": "require 'faraday'\nrequire 'json'\n\nmodule GitFeats\n module API\n\n extend self\n\n URL = 'http://localhost:3000'\n\n def upload_feats\n # Post json to git-feats\n begin...
ruby
chosen
[ { "from": "system", "value": "Remove surprise mkdir which means you can't later check out\n" }, { "from": "human", "value": "require 'orc/cmdb/namespace'\nrequire 'pathname'\nrequire 'yaml'\n\nclass Orc::CMDB::Yaml\n def initialize(args)\n @data_dir = args[:data_dir]\n if !Pathname.new(@d...
ruby
chosen
[ { "from": "system", "value": "Use gem instead of using cli tool.\n" }, { "from": "human", "value": "task :find_dead_links do\n cmd = 'htmlproofer ./_site --only-4xx --url-ignore \"/blog/,/#content/\"'\n system(\"bundle exec #{cmd}\")\nend\n" }, { "from": "gpt", "value": "require 'h...
ruby
chosen
[ { "from": "system", "value": "Update attribute interactions in delete action of lwrp\n" }, { "from": "human", "value": "def load_current_resource\n node[:stunnel][:services] ||= {}\n unless(new_resource.service_name)\n new_resource.service_name new_resource.name\n end\nend\n\naction :creat...
ruby
chosen
[ { "from": "human", "value": "Allow multiple notifications per transaction as long as they have different payment statuses\n\nWe need this because PayPal seems to send another IPN when an authorization expires.\n" }, { "from": "gpt", "value": "class ChangeUniqueIndexOnSpreeWebsitePaymentsStandard...
ruby
chosen
[ { "from": "system", "value": "Use git ls-files for gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'haproxy_log_parser'\n s.version = IO.read('VERSION').chomp\n s.authors = ['Toby Hsieh']\n s.homepage = 'https://github.com/tobyhs/haproxy_log_parser'\n s.s...
ruby
chosen
[ { "from": "system", "value": "Update spec to pass new rubocop-rspec requirements\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.feature 'Switching languages' do\n before do skip 'Features specs not yet fixed' end\n\n include FeaturesHelper\n\n scenario 'switching between a...
ruby
chosen
[ { "from": "system", "value": "Use simplified form for signature.\n" }, { "from": "human", "value": "require 'jit'\n\nfib = nil\nsignature = JIT::Type.create_signature(\n :CDECL,\n :INT,\n [ :INT ])\nfib = JIT::Function.build(signature) do |f|\n n = f.param(0)\n\n a = f.value(:INT, 0)\...
ruby
chosen
[ { "from": "human", "value": "Set higher value for key space limit\n\nThis should fix the deployment & restart of unicorn workers\n" }, { "from": "gpt", "value": "\n# This is a temporary workaround to fix 'RangeError: exceeded available param key\n# space error', pls see https://github.com/rack/r...
ruby
chosen
[ { "from": "system", "value": "Add specs for `--pre` flag\n\nRemove pry\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire \"pry-byebug\"\nrequire \"spec_helper\"\n\ndescribe \"bundle add\" do\n before :each do\n gemfile <<-G\n source \"file://#{gem_repo1}\"\n G...
ruby
chosen
[ { "from": "system", "value": "Remove configuration of projects as this should happen in a wrapper cookbook.\n" }, { "from": "human", "value": "if node['rundeck']['use_mysql']\n # Configure rundeck to talk to mysql\n template \"/etc/rundeck/rundeck-config.properties\" do\n source \"rundeck-c...
ruby
chosen
[ { "from": "system", "value": "Add Cucumber and Aruba to project" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'buffer/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix enumberable implementation for Collection\n\nChanged the each method to only check the total count of the collection\nonce because if you are deleting the items in the collection the total\ncount will be falling and you won't iterate over the whole collection\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Fix mis-call of transrate assembly score function\n" }, { "from": "human", "value": "# The objective function for the optimisation procedure.\n#\n# This class conforms to the API for a Biopsy::ObjectiveFunction.\nclass AssemblyScore < Biopsy::ObjectiveFunction\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update gem authors + summary\n" }, { "from": "human", "value": "require File.expand_path('../lib/csv_monster/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jeff Iacono\"]\n gem.email = [\"iacono@squarup.com\"]\n gem.summar...
ruby
chosen
[ { "from": "system", "value": "Fix issue with list in mock mode.\n" }, { "from": "human", "value": "module Fog\n module Compute\n class HP\n class Real\n\n # List all key pairs\n #\n # ==== Returns\n # * response<~Excon::Response>:\n # * body<~Hash>:\...
ruby
chosen
[ { "from": "system", "value": "Add a method to simlplify git clone/pull\n" }, { "from": "human", "value": "require \"git\"\nrequire \"yaml\"\n\n# 1. Parse YAML File\nyaml = YAML.load(File.read(\"sources.yaml\"))\nschemes_url = yaml[\"schemes\"]\ntemplates_url = yaml[\"templates\"]\n\nschemes_repo...
ruby
chosen
[ { "from": "system", "value": "Use channel id instead of name\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'httparty'\nrequire 'json'\n\nSLACK_WEBHOOK = ENV['SLACK_WEBHOOK_URL']\nCHANNEL_NAME = ENV['CHANNEL_NAME']\n\nget '/anon' do\n print('HOLIS')\n print params\n print(param...
ruby
chosen
[ { "from": "system", "value": "Add another gameover spec test\n" }, { "from": "human", "value": "\nrequire File.expand_path('../../lib/state.rb', __FILE__)\n\n\ndescribe State, \"#gameOver?\" do\n\n state = State.new\n\n whitewins = [\n ['.','q','b','n','r'],\n ['p','p','p','p','p'],\...
ruby
chosen
[ { "from": "human", "value": "Create smiley faces formatter that really works!\n" }, { "from": "gpt", "value": "module EmojiTestLove\n class Smiles\n def passed_display\n \"\\u{1f60a} \"\n end\n\n def failed_display\n \"\\u{1f621} \"\n end\n\n def pending_display\n ...
ruby
chosen
[ { "from": "system", "value": "Fix issue introduced by using class methods\n" }, { "from": "human", "value": "require 'oj'\n\nmodule JsonKeyTransformerMiddleware\n\n class OutgoingJsonFormatter < Middleware\n\n def initialize(app)\n @app = app\n end\n\n def call(env)\n status,...
ruby
chosen
[ { "from": "system", "value": "Make the tests actually test something\n" }, { "from": "human", "value": "Given(/^the following addresses exist:$/) do |addresses|\n addresses.hashes.each do |address|\n FactoryGirl.create(:address,\n sao: address[:saon],\n ...
ruby
chosen
[ { "from": "system", "value": "Improve performance of the Logger middleware by using simpler versions of methods\n" }, { "from": "human", "value": "require 'rails/log_subscriber'\n\nmodule Rails\n module Rack\n # Log the request started and flush all loggers after it.\n class Logger < Rail...
ruby
chosen
[ { "from": "system", "value": "Fix route addition step in install generator\n" }, { "from": "human", "value": "module ActiveApplication\n module Generators\n class InstallGenerator < Rails::Generators::Base\n class_option :user_model, type: :string, default: \"User\"\n c...
ruby
chosen
[ { "from": "system", "value": "Save order & cutomer information\n" }, { "from": "human", "value": "#encoding: utf-8\nrequire 'rubygems'\nrequire 'sinatra'\nrequire 'sinatra/reloader'\nrequire 'sinatra/activerecord'\n\n#Создание подключения к БД при помощи Active Record\nset :database, \"sqlite3:p...
ruby
chosen
[ { "from": "system", "value": "Add puts_e, p_e and pp_e\n" }, { "from": "human", "value": "require \"sinatra\"\nrequire \"sinatra/reloader\"\nset :method_override, true\n\nrequire \"json\"\n\nrequire \"./lib/erb_context\"\n\n# set :bind, '0.0.0.0'\n# set :port, 4567\n\ndef _render name, context\n...
ruby
chosen
[ { "from": "human", "value": "Add day 15: Timing Discs\n" }, { "from": "gpt", "value": "base_discs = ARGF.each_line.map { |l|\n id, positions, _, initial = l.scan(/\\d+/).map(&method(:Integer))\n [id, positions, initial].freeze\n}\n\n[[], [[base_discs.size + 1, 11, 0].freeze]].each { |more_disc...
ruby
chosen
[ { "from": "system", "value": "Add more development gem related\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'distribute_tree'\n s.version = '0.0.1'\n s.date = '2013-12-04'\n s.summary = File.read(\"README.markdown\").split(/===+/)[1].strip...
ruby
chosen
[ { "from": "system", "value": "Fix SQL tests to test pool size properly\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'ruby_event_store/rom/sql'\nrequire 'ruby_event_store/spec/rom/spec_helper_lint'\n\nmodule RubyEventStore::ROM::SQL\n RSpec.describe SpecHelper do\n let(:r...
ruby
chosen
[ { "from": "system", "value": "Include tests in the gemfile (useful for example generation, etc)" }, { "from": "human", "value": "version = File.read(\"VERSION\").strip\nif File.exists?\"JENKINS\"\n version += \".\"\n version += File.read(\"JENKINS\").strip\nend\n\nbuildf = File.open(\"BUILD_VE...
ruby
chosen
[ { "from": "system", "value": "Fix potential nil issue in inbox\n\nWhen querying viewed/total exercises for people one of the values might come\nback as nil. Or both of them, for that matter. This should ensure that we get\na reasonable default rather than a 500 error.\n" }, { "from": "human", "v...
ruby
chosen
[ { "from": "system", "value": "Add code to move over the Bootstrap fonts as well\n" }, { "from": "human", "value": "require \"frontend_generators/version\"\n\nmodule FrontendGenerators\n class Bootstrap\n\n def run\n FileUtils.cp(bootstrap_css, css_destination)\n end\n\n def css_de...
ruby
chosen
[ { "from": "system", "value": "rpearce/jheister: Move virtual_service function to lb cluster, switch\nto using virtual_services instead of server group\n" }, { "from": "human", "value": "require 'stacks/namespace'\n\nclass Stacks::LoadBalancer < Stacks::MachineDef\n\n attr_accessor :virtual_rout...
ruby
chosen
[ { "from": "system", "value": "Update minimum SVGO version to 1.3.0\n" }, { "from": "human", "value": "module Svgeez\n class Optimizer\n SVGO_MINIMUM_VERSION = '1.1.1'.freeze\n SVGO_MINIMUM_VERSION_MESSAGE = \"svgeez relies on SVGO #{SVGO_MINIMUM_VERSION} or newer. Continuing with standard...
ruby
chosen
[ { "from": "system", "value": "Use Thread.current for exception on View class\n\nIt broke the View#only_on_error_page method.\n" }, { "from": "human", "value": "module WebConsole\n class View < ActionView::Base\n # Execute a block only on error pages.\n #\n # The error pages are special...
ruby
chosen
[ { "from": "human", "value": "Add thin wrapper of narou command\n" }, { "from": "gpt", "value": "module Yomou\n module Narou\n\n class Downloader\n\n def initialize\n @conf = Yomou::Config.new\n\n Dir.chdir(@conf.directory) do\n @downloaded = []\n Dir.glob...
ruby
chosen
[ { "from": "system", "value": "Use param in capistrano recipe.\n" }, { "from": "human", "value": "namespace :releaser do\n desc \"Write current revision to CURRENT_VERSION file.\"\n task :write_current do\n version = self[:current_revision]\n run \"echo \\\"#{version}\\\" > #{release_path...
ruby
chosen
[ { "from": "system", "value": "Use a local tmp dir\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'action_controller'\nrequire 'generator_spec/test_case'\nrequire 'generators/double_entry/install/install_generator'\n\n\ndescribe DoubleEntry::Generators::InstallGenerator do\n i...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary negation from spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Axiom::Types::NegativeInfinity, '.<=>' do\n subject { object <=> other }\n\n let(:object) { described_class }\n\n [\n 1, # Fixnum\n 2**...
ruby
chosen
[ { "from": "system", "value": "Revert \"Bump up mail dependency to take advantage of relaxed i18n version requirement\"\n\nLocking to ~> 2.2.9.1 means locking to < 2.2.10, not intended behaviour.\n\nThis reverts commit e7de5dd11e04f03e32865be8bb8c090a96a79ec9.\n" }, { "from": "human", "value": "v...
ruby
chosen
[ { "from": "human", "value": "Remove deleted Welsh attachment translation drafts\n\nThis fixes the locale from the migration in #124d654. The Welsh\ntranslations had been saved at some point with an `en` locale but the\nprevious commit discarded them as `cy`.\n" }, { "from": "gpt", "value": "en_c...
ruby
chosen
[ { "from": "system", "value": "Remove pessimistic dependency -> listen\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'entangler/version'\n\nGem::Specification.new do |spec|\n spec.name = 'e...
ruby
chosen
[ { "from": "system", "value": "Add spec for orders having many products\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Order, type: :model do\n customer = Customer.create(first_name: 'Jon', last_name: 'Chen')\n order = customer.orders.create\n\n it 'creates success...
ruby
chosen
[ { "from": "system", "value": "Test for format facet query.\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe \"Title Search\" do\n\n it \"700t included in title search: Gothic classics b4156972\" do\n #Quick sanity check - exact title match.\n match =...
ruby
chosen
[ { "from": "human", "value": "Add spec for SSL validation\n\n[finishes #114698423]\n\nSigned-off-by: Henry Stanley <b0b1d04541cab6bb75fdc9ee8f1c2e7f813af8bc@pivotal.io>\n" }, { "from": "gpt", "value": "require 'yaml'\nrequire 'bosh/template/renderer'\nrequire 'tempfile'\nrequire 'fileutils'\n\nde...
ruby
chosen
[ { "from": "human", "value": "Add first test for CT101 rendering\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.feature \"Clinical Trials 101\", type: :feature, js: true do\n scenario \"renders CT101 component\" do\n visit \"/\"\n page.driver.browser.switch_to.alert.accep...
ruby
chosen
[ { "from": "human", "value": "Add an rspec example for the existing behaviour of FakeCatalogue\n\n - Next up - need to ensure only matched songs are returned\n" }, { "from": "gpt", "value": "require 'wedding_jukebox'\n\ndescribe FakeCatalogue do\n let(:catalogue) { FakeCatalogue.new }\n\n cont...
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.4\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.3\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectures...
ruby
chosen
[ { "from": "system", "value": "Update formula to version 4.3.0\n" }, { "from": "human", "value": "class Bartycrouch < Formula\n desc \"Incrementally update/translate your Strings files\"\n homepage \"https://github.com/Flinesoft/BartyCrouch\"\n url \"https://github.com/Flinesoft/BartyCrouch.gi...
ruby
chosen
[ { "from": "system", "value": "Revert \"Make unescape tests work on windows.\"\n\nThis reverts commit 775334fc79533e2d75d79b07e2c412f875ebb629.\n" }, { "from": "human", "value": "require File.expand_path('../helper', __FILE__)\nrequire 'mini_portile'\n\nclass TestUnescapingCommands < TestCase\n ...
ruby
chosen
[ { "from": "system", "value": "Switch to production db name." }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'dm-core'\nrequire 'dm-timestamps'\nrequire 'dm-validations'\nrequire 'dm-aggregates'\nrequire 'dm-migrations'\nrequire 'ostruct'\n\nrequire 'sinatra'...
ruby
chosen
[ { "from": "system", "value": "Add test for index on user and initiative for an enrolment.\n" }, { "from": "human", "value": "require 'test_helper'\n\n# EnrolmentTest is the generic model test for enrolments\nclass EnrolmentTest < ActiveSupport::TestCase\n def setup\n @enrolment = enrolments(...
ruby
chosen
[ { "from": "human", "value": "Add tests for desired behavior\n" }, { "from": "gpt", "value": "require_relative './spec_helper'\nrequire 'tempfile'\n\ndescribe Mumukit::IsolatedEnvironment do\n class DemoRunner\n include Mumukit::Templates::WithIsolatedEnvironment,\n Mumukit::WithTe...
ruby
chosen
[ { "from": "system", "value": "Rework service spec using new features.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\ndescribe RegApi2 do\n\n describe :nop do\n it \"should return list of services if requested\" do\n answer = RegApi2.service.nop(services: [\n { dna...
ruby
chosen
[ { "from": "system", "value": "Fix spec broken by bde19c0\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe UsersProject do\n describe \"Associations\" do\n it { should belong_to(:project) }\n it { should belong_to(:user) }\n end\n\n describe \"Validation\" do\n let...
ruby
chosen
[ { "from": "system", "value": "Fix user info controller spec.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe UserInfoController do\n render_views\n let(:user) { FactoryGirl.create :user, admin: false }\n before { sign_in user }\n\n describe \"GET 'dashboard'\" do\n it...
ruby
chosen
[ { "from": "system", "value": "Extend specs for the admin panel.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature 'Admin panel' do\n\n describe 'an admin user' do\n let!(:user) { create(:user, :email => 'admin@email.com', :admin => true) }\n\n scenario 'should be able to...
ruby
chosen
[ { "from": "system", "value": "Add module-level accessors for PivotalTracker and the config\n" }, { "from": "human", "value": "require 'pv/command'\nrequire 'pv/version'\n\nmodule Pv\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require 'pv/configuration'\nrequire ...
ruby
chosen
[ { "from": "human", "value": "Add migration for create shopify data feed\n" }, { "from": "gpt", "value": "class CreateShopifyDataFeeds < ActiveRecord::Migration\n def change\n create_table :shopify_data_feeds do |t|\n t.integer :shopify_object_id, limit: 8, null: false\n t.string :s...
ruby
chosen
[ { "from": "system", "value": "Disable broken capybara feature spec\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nfeature \"User starts new game\" do\n let(:username) { Faker::Name.name }\n\n scenario \"with a valid username\" do\n visit games_path\n click_button \"New gam...
ruby
chosen
[ { "from": "system", "value": "Improve polling adapter spec for JRuby\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Listen::Adapters::Polling do\n\n describe \"#poll\" do\n let(:listener) { mock(Listen::Listener, :directory => 'path')}\n\n it \"calls listener.on_chan...
ruby
chosen
[ { "from": "system", "value": "Add test for handling answers that don't need to be shortened for tweets\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe Services::Twitter do\n describe \"#post\" do\n let(:user) { FactoryBot.create(:user) }...
ruby
chosen
[ { "from": "system", "value": "Update FileUtils to use outside scope\n" }, { "from": "human", "value": "require 'nokogiri'\nrequire 'open-uri'\nrequire 'uri'\nrequire_relative './user_agents.rb'\n\nmodule XP\n def to_nokogiri\n source = url? ? self.page_source : self\n\n Nokogiri(source)\n...
ruby
chosen
[ { "from": "system", "value": "FIX issue with unpredictable dates using faker gem\n" }, { "from": "human", "value": "# Auto-generated by Remi.\n# Add user-customizations to env_app.rb\n\nrequire 'bundler/setup'\nrequire 'remi'\nrequire 'remi/cucumber'\n\nRemi::Settings.log_level = Logger::ERROR\n...
ruby
chosen