conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove swift version from podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Futuristic\"\n s.version = \"1.0.0\"\n s.description = \"A full featured Future implementation written in pure Swift\"\n s.homepage = \"http:...
ruby
chosen
[ { "from": "human", "value": "Add DB index to `reset_password_token` field\n\nThis field should have an index in order to ensure uniqueness also at DB level\nand to speed up search performances.\n\nThe index is added only if it does not exist yet and if the field actually\nexists on the DB.\n\nThis index is ...
ruby
chosen
[ { "from": "system", "value": "Reset ResqueSpec before each UserMailer test\n\nRunning the test suite with 'bundle exec rspec --seed 58707'\nused to make tests fail, as it ran these out of order and\nthe tests were not resetting the queues appropriately.\nThis fixes that.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Make the author finding more tolerant\n" }, { "from": "human", "value": "class GitLogImporter\n attr_reader :file, :file_contents, :repository\n\n def initialize(file:, repository:)\n @file = file\n @file_contents = File.readlines(@file)\n @repository = r...
ruby
chosen
[ { "from": "system", "value": "Use rspec expect syntax instead of should\n" }, { "from": "human", "value": "describe RunLoop::Lipo do\n\n let(:app_bundle_path) { Resources.shared.app_bundle_path }\n subject(:lipo) { RunLoop::Lipo.new(app_bundle_path) }\n\n describe '#bundle_path' do\n subje...
ruby
chosen
[ { "from": "system", "value": "Add json-jwt since local comm use json\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'omf_rc_shm/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Fix specs to use proper rack protocol\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + \"/spec_helper\"\n\ndescribe \"YARD::Server::RackMiddleware\" do\n before do\n begin; require 'rack'; rescue LoadError; pending \"rack required for these te...
ruby
chosen
[ { "from": "human", "value": "Add ScanSnap Manager for Fujitsu ScanSnap s1500\n" }, { "from": "gpt", "value": "cask 'scansnap-manager-s1500' do\n version :latest\n sha256 :no_check\n\n # pfultd.com is the official download host per the vendor homepage\n url 'http://origin.pfultd.com/downloads...
ruby
chosen
[ { "from": "system", "value": "Enable loading FFI gem on rubinius\n" }, { "from": "human", "value": "if !defined?(RUBY_ENGINE) || RUBY_ENGINE == \"ruby\"\n begin\n if RUBY_VERSION =~ /1.8/\n require '1.8/ffi_c'\n elsif RUBY_VERSION =~ /1.9/\n require '1.9/ffi_c'\n else\n ...
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.18\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.17\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur...
ruby
chosen
[ { "from": "system", "value": "Move version test to different context\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass RemotelyExceptionalTest < RemotelyExceptional::TestCase\n Subject = RemotelyExceptional\n\n [\n Subject,\n ].each do |mod|\n context mod.name do\n ...
ruby
chosen
[ { "from": "system", "value": "Make this cart only top 10 too\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass ArtistsController < ApplicationController\n before_action :require_login\n\n def new\n @artist = Artist.new\n end\n\n def create\n @artist = Artist.new...
ruby
chosen
[ { "from": "system", "value": "Update create and destroy actions\n" }, { "from": "human", "value": "class FollowsController < ApplicationController\n\n def create\n current_user.followees << User.find(params[:id])\n end\n\n def destroy\n user = User.find(params[:id])\n user.followers....
ruby
chosen
[ { "from": "system", "value": "Update migration to generate fingerprint in best system\n\nSee #557\n" }, { "from": "human", "value": "class RegenerateErrFingerprints < Mongoid::Migration\n def self.up\n Err.all.each do |err|\n if err.notices.any?\n fingerprint_source = {\n ...
ruby
chosen
[ { "from": "system", "value": "Fix typo. Include task in comment payload.\n\n[Fixes #77048202]" }, { "from": "human", "value": "class CommentSerializer < ActiveModel::Serializer\n embed :ids\n attributes :id, :body, :created_at\n\n has_one :task, embed: :id, polymorpic: true\n has_one :comme...
ruby
chosen
[ { "from": "system", "value": "Remove blank line at start of method body\n" }, { "from": "human", "value": "class SubjectSerializer\n include RestPack::Serializer\n include FilterHasMany\n\n attributes :id, :metadata, :locations, :zooniverse_id,\n :created_at, :updated_at, :href\n\n option...
ruby
chosen
[ { "from": "system", "value": "Reduce unneeded DB calls when checking if user_added?\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass NewClubApplicationPolicy < ApplicationPolicy\n def show?\n user_added?\n end\n\n def update?\n if user.admin?\n true\n el...
ruby
chosen
[ { "from": "system", "value": "Fix tests for dropping .total suffix\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass RequestTest < ActiveSupport::IntegrationCase\n \n # Each request\n \n test 'increment total and status' do\n visit root_path\n \n assert_equal 1, coun...
ruby
chosen
[ { "from": "system", "value": "Fix relative require problem in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire_relative 'lib/backbone_fixtures_rails/version'\n\nGem::Specification.new do |s|\n s.name = \"backbone_fixtures_rails\"\n s.version = BackboneFi...
ruby
chosen
[ { "from": "system", "value": "Set proxy env variable so that rubygems works\n\nChange-Id: Ia07abee94484137a870c0dd07678bde293e86d7f\n" }, { "from": "human", "value": "log_level :info\nlog_location '/dev/null'\n#if $getVar('chef_url', '') != \"\"\nchef_server_url '$chef_url'\n#end if\...
ruby
chosen
[ { "from": "system", "value": "Add homepage and required ruby version to gemspec file\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'promisepay/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Add more platforms to sauce's 'browsers' config\n" }, { "from": "human", "value": "require 'sauce'\nrequire 'sauce/capybara'\nrequire 'capybara/rspec'\n\n# See https://docs.saucelabs.com/tutorials/ruby/ and https://github.com/saucelabs/sauce_ruby for\n# documentati...
ruby
chosen
[ { "from": "system", "value": "Add coveralls when running tests" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire 'test/unit'\nrequire 'fluent/test'\nrequire 'fluent/plugin/in_udp_event'\n\nunless defined?(Test::Unit::AssertionFailedError)\n class Test::Unit::AssertionFailedE...
ruby
chosen
[ { "from": "system", "value": "Refactor a bit how channels are loaded\n" }, { "from": "human", "value": "require 'banjo/version'\n\nrequire 'eventmachine'\nrequire 'unimidi'\n\nrequire 'banjo/channel'\n\n$: << '.'\n\nmodule Banjo\n class << self\n attr_accessor :beats_per_measure\n attr_ac...
ruby
chosen
[ { "from": "system", "value": "Clean plugin-conf.d too after install\n" }, { "from": "human", "value": "\nexecute 'clean-default-plugins' do\n command \"rm -f /etc/munin/plugins/*\"\n action :nothing\nend\n\nexecute 'clean-default-plugin-confd' do\n command \"rm -f /etc/munin/plugin-conf.d/*\"...
ruby
chosen
[ { "from": "human", "value": "Add Railtie for Rails 3 compatibility.\n" }, { "from": "gpt", "value": "require 'i18n_rails_helpers'\nrequire 'rails'\n\nmodule I18nRailsHelpers\n class Railtie < Rails::Railtie\n initializer :after_initialize do\n ActionController::Base.helper I18nRailsHelp...
ruby
chosen
[ { "from": "system", "value": "Fix breakage resulting from Rails 6 upgrade\n\nUse Module.module_parent instead of Module.parent because Rails\ndeprecated the parent() method in 6 and removed it in 6.1. This is part\nof the Rails 6.1.4 upgrade.\n" }, { "from": "human", "value": "require 'active_jo...
ruby
chosen
[ { "from": "system", "value": "Make abstract method private to class definitions\n" }, { "from": "human", "value": "# Custom class attributes.\nclass Class\n\n # Defines an abstract method.\n # The method will throw a {NotImplementedError} when invoked.\n # This requires that the method be def...
ruby
chosen
[ { "from": "system", "value": "Use correct path to find assets\n" }, { "from": "human", "value": "namespace :pretty_flash do\n desc \"Copies assets to proper application directories\"\n task :install do\n ASSETS = File.join(File.dirname(__FILE__), '..', 'assets')\n Dir.glob(\"#{ASSETS}/*\...
ruby
chosen
[ { "from": "system", "value": "Include Magick.rb and Pixel.rb suites\n" }, { "from": "human", "value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\nrequire 'test/unit'\nrequire 'test/unit/ui/console/testrunner'\n\n\nmodule Test\n\tmodule Unit\n\t\tclass TestCase\n\t\t\talias :_old_run_ :run\n\t...
ruby
chosen
[ { "from": "system", "value": "Use better wording in the tests\n" }, { "from": "human", "value": "\n$:.unshift(File.dirname(__FILE__) + \"/../lib/\")\n\nrequire 'rubygems'\nrequire 'riot'\nrequire 'riot/rack'\n\n\ncontext \"A Rack app\" do\n app { lambda { [200, {}, \"Hello, World!\"] } }\n\n c...
ruby
chosen
[ { "from": "system", "value": "797: Set country code in community factory\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nFactoryBot.define do\n factory :community do\n sequence(:name) { |n| \"Community #{n}\" }\n sequence(:abbrv) { |n| \"C#{n % 10}\" }\n sequence(:s...
ruby
chosen
[ { "from": "system", "value": "Refactor user test using users helper\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire_relative '../spec_helper'\n\n# Tests should define `get_twitter_imports_count_by_user_id` method\nshared_examples_for \"user models\" do\n\n describe '#get_twitter...
ruby
chosen
[ { "from": "system", "value": "Fix earth spec for removal of config management\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Earth do\n describe '.init' do\n before :all do\n Earth.init :all\n end\n\n it 'should require all Earth models' do\n lambda do\n...
ruby
chosen
[ { "from": "system", "value": "Add an explicit \"Press Enter to Continue\"\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire File.expand_path('../config/environment', __dir__)\nrequire \"optimist\"\n\nopts = Optimist.options do\n opt :dry_run, \"Just print out what would be done wi...
ruby
chosen
[ { "from": "system", "value": "Set gem version to 0.7.2\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'scoped_search'\n s.version = '0.7.1'\n s.date = '2008-10-11'\n \n s.summary = \"A Rails plugin to search your models using a named_scope\"\n s.descripti...
ruby
chosen
[ { "from": "system", "value": "Update to Sencha Cmd 5.1.3.61" }, { "from": "human", "value": "cask :v1 => 'sencha' do\n version '5.1.1.39'\n sha256 'bb3de716b825fe9f8908f96a3f7570499ffbf41bac860a16f57f680b3cd341ad'\n\n url \"http://cdn.sencha.com/cmd/#{version}/SenchaCmd-#{version}-osx.app.zip...
ruby
chosen
[ { "from": "system", "value": "Upgrade Mono MRE to 3.12.0\n" }, { "from": "human", "value": "cask :v1 => 'mono-mre' do\n version '3.10.0'\n sha256 'c9973d1206a36b71964a8b173d452780c19200cac2955723e0d48f969a3f6d28'\n\n url \"http://download.mono-project.com/archive/#{version}/macos-10-x86/MonoF...
ruby
chosen
[ { "from": "system", "value": "Update Swift version in .podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n\tspec.name = 'Changeset'\n\tspec.version = '3.1'\n\tspec.license = { :type => 'MIT', :file => 'LICENSE.md' }\n\tspec.homepage = 'https://github.com/osteslag/Changeset'\n\ts...
ruby
chosen
[ { "from": "system", "value": "Add 'dotenv' as development dependency\n\nSigned-off-by: Aymeric Brisse <a462d6a602eb500679b027b39ff035d803cbe1e9@perfect-memory.com>" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_P...
ruby
chosen
[ { "from": "system", "value": "Update private header pattern in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CoreHound\"\n s.version = \"0.2.0\"\n s.summary = \"The MediaHound iOS SDK\"\n s.homepage = \"https://github.com/M...
ruby
chosen
[ { "from": "system", "value": "Remove check for older files.\n\nRake task now takes care of this.\n" }, { "from": "human", "value": "module S3File\n\n def url\n s3 = AWS::S3.new\n bucket = s3.buckets[\"gradecraft-#{Rails.env}\"]\n return bucket.objects[CGI::unescape(filepath || filename...
ruby
chosen
[ { "from": "system", "value": "Swap calls to Oboe with TraceView\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"oboe/version\"\n\nGem::Specification.new do |s|\n s.name = %q{oboe}\n s.version = Oboe::Version::STRING\n s.date = Time.now.strftime('%Y...
ruby
chosen
[ { "from": "system", "value": "Add active_record as a dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'i_am_valid/version'\n\nGem::Specification.new do |s|\n s.rubygems_version = '1.3.5'\n\n s.name ...
ruby
chosen
[ { "from": "human", "value": "Add formula for Attica 0.1.2.\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass Attica <Formula\n url 'ftp://ftp.kde.org/pub/kde/stable/attica/attica-0.1.2.tar.bz2'\n homepage 'http://www.kde.org/'\n md5 '8b4207dbc0a826d422632bdb9c50d51a'\n\n depends_on...
ruby
chosen
[ { "from": "system", "value": "Simplify the platform check logic a bit\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Author:: Matt Ray <matt@chef.io>\n# Cookbook:: drbd\n# Recipe:: default\n#\n# Copyright:: 2009-2016, Chef S...
ruby
chosen
[ { "from": "system", "value": "Fix Node attributes are read-only when you do not specify which\nprecedence level to set. To set an attribute\n" }, { "from": "human", "value": "#\n# Cookbook Name:: rubygems_app\n# Recipe:: default\n# Copyright 2014, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do...
ruby
chosen
[ { "from": "system", "value": "Add supported Swift versions to the podspec\n\nTurns out we support a bunch of swift versions\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'Curry'\n spec.version = '4.0.2'\n spec.summary = 'Function Currying for Swift'\n spec.homepage...
ruby
chosen
[ { "from": "system", "value": "Fix where coverage folder is being output for generated apps\n" }, { "from": "human", "value": "# Starts SimpleCov for code coverage.\n\nif ENV[\"COVERAGE\"]\n require \"simplecov\"\n\n # Using a command name prevents results from getting clobbered by other test s...
ruby
chosen
[ { "from": "human", "value": "Add Database tests for User\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe User do\n\n describe \"Database tests\" do\n it { should have_db_column(:user_name).of_type(:string) }\n it { should have_db_column(:email).of_type(:string) }\n ...
ruby
chosen
[ { "from": "system", "value": "Update pod spec dependency version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ns.name = 'SwiftyAds'\ns.version = '11.2.0'\ns.license = 'MIT'\ns.summary = 'A swift helper to show Google AdMob ads. GDPR compliant.'\ns.homepage = 'https://github.com/cras...
ruby
chosen
[ { "from": "system", "value": "Add tvOS support to podspec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TJDropbox\"\n s.version = \"0.5\"\n s.summary = \"A Dropbox v2 client library written in Objective-C\"\n s.description = \"Dropbox provides a v2 ...
ruby
chosen
[ { "from": "system", "value": "Fix the build by adjusting dependency version specs\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/phantomjs/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Christoph Olszowka\"]\n gem...
ruby
chosen
[ { "from": "system", "value": "Update GPSOAuth gem version to 0.1.2\n\nThis allows for backwards compatibility with older Ruby versions." }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire_relative 'lib/po...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from = 0.45 to = 0.74.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/ruboc...
ruby
chosen
[ { "from": "system", "value": "Use AS.on_load when touching AC::Base in the initializer\n" }, { "from": "human", "value": "module RescueTracer\n class Railtie < Rails::Railtie\n initializer \"rescue_tracer\" do\n ActionController::Base.send(:include, RescueTracer::Traceable)\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Make lang_map optional in txconfig\n" }, { "from": "human", "value": "require 'parseconfig'\nrequire 'strava/l10n/tx_resource'\n\nmodule Strava\n module L10n\n class TxConfig\n def initialize(path)\n config = ParseConfig.new(path)\n @resources...
ruby
chosen
[ { "from": "system", "value": "Add gems for fetching information from PT and git repository" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/test_bed/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"TheHamon\"]\n gem.ema...
ruby
chosen
[ { "from": "system", "value": "Make aspect more readable by defining constants for all methods pattern\n" }, { "from": "human", "value": "class A\n\n def test input\n input.upcase\n end\n\nend\n\n##############################\n\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'li...
ruby
chosen
[ { "from": "system", "value": "Increase pool timeout, add more connections\n" }, { "from": "human", "value": "DB = Sequel.connect(ENV['DATABASE_URL'], pool_timeout: 25)\n\nclass Package < Sequel::Model\nend\n\nclass Build < Sequel::Model\nend\n\nclass Repoman < Sequel::Model(:repomans)\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Implement external connection creation in RedisStore\n" }, { "from": "human", "value": "module Rack\n class MiniProfiler\n class RedisStore < AbstractStore\n\n EXPIRE_SECONDS = 60 * 60 * 24\n \n def initialize(args)\n @args = args || {}\n ...
ruby
chosen
[ { "from": "human", "value": "Test the navbar brand bar\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'application_system_test_case'\n\nclass NavbarBrandTest < ApplicationSystemTestCase\n test 'the navbar brand logo goes to the root path' do\n when_current_user_is ...
ruby
chosen
[ { "from": "system", "value": "Fix possible bug with thin pid\n" }, { "from": "human", "value": "require 'boxcar/helpers'\nrequire 'boxcar/command/base'\n\n# Manage Boxcar server\n#\nclass Boxcar::Command::Server < Boxcar::Command::Base\n include Boxcar::Helpers\n\n def index\n validate_argu...
ruby
chosen
[ { "from": "system", "value": "Use Windows NUMBER_OF_PROCESSORS for Cygwin" }, { "from": "human", "value": "require 'rbconfig'\n\nmodule Celluloid\n module CPUCounter\n def self.cores\n @cores ||= count_cores\n end\n\n private\n\n def self.count_cores\n case RbConfig::CONFIG[...
ruby
chosen
[ { "from": "system", "value": "Increase performance and decrease memory usage\n" }, { "from": "human", "value": "require_relative 'display_width/constants'\nrequire_relative 'display_width/index'\n\nmodule Unicode\n module DisplayWidth\n def self.of(string, ambiguous = 1, overwrite = {})\n ...
ruby
chosen
[ { "from": "system", "value": "Remove warning noise in ProjectImportOptions\n\nSqulches these warnings:\n\n```\n/opt/gitlab/embedded/service/gitlab-rails/app/workers/concerns/project_import_options.rb:5: warning: already initialized constant ProjectImportOptions::IMPORT_RETRY_COUNT\n/opt/gitlab/embedded/serv...
ruby
chosen
[ { "from": "system", "value": "gemspec: Set Ruby 2.0.0 as minimum accepted version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'raptor/version'\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Automate files / executables in the gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'reagan'\n s.version = '0.6.1'\n s.date = Date.today.to_s\n s.platform = Gem::Platform::RUBY\n s.extra_rdoc_files = ['READM...
ruby
chosen
[ { "from": "system", "value": "Use HTTP's accept method for specifying JSON\n\nI’ve noticed some sporadic incorrect text/html mime type errors when we\nare expecting JSON consistently. While the library supports specifying\nit in a few different ways I’m going to stick with this one for now.\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Use super instead of splat\n" }, { "from": "human", "value": "require 'delegate'\nrequire 'end_view'\nrequire 'haml'\nrequire 'tilt/haml'\n\nmodule EndView\n class RailsLayout < SimpleDelegator\n include EndView.new(__FILE__, Tilt::HamlTemplate)\n\n def initi...
ruby
chosen
[ { "from": "system", "value": "Implement a Float generator (squash into previous)\n" }, { "from": "human", "value": "require \"properties/generators/character\"\nrequire \"properties/generators/integer\"\nrequire \"properties/generators/string\"\n" }, { "from": "gpt", "value": "requir...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated sha1 with sha256" }, { "from": "human", "value": "require \"formula\"\n\nclass Cmc < Formula\n homepage \"https://github.com/ClockworkNet/cmc\"\n url \"https://github.com/ClockworkNet/cmc/archive/1.0.1.tar.gz\"\n sha1 \"ba6502a6b034ab7af44e7a71...
ruby
chosen
[ { "from": "system", "value": "Reformat nil spec for consistency\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"spec_helper\"\n\ndescribe NilClass do\n let(:type) { 10.chr }\n let(:obj) { nil }\n let(:bson) { BSON::NO_VALUE }\n\n it_behaves_like \"a bson element\"\n it_beha...
ruby
chosen
[ { "from": "human", "value": "Add some specs for the Happy module." }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Happy do\n describe '#env' do\n it \"is a StringInquirer instance describing the RACK environment\" do\n Happy.env.should be_kind_of(ActiveSupport::StringIn...
ruby
chosen
[ { "from": "system", "value": "Add test to demonstrate default configuration not being read." }, { "from": "human", "value": "require 'spec_helper'\nrequire 'riak-shim/store'\n\ndescribe Riak::Shim::Store do\n let(:store) { Riak::Shim::Store.new }\n\n\n describe '#config_location' do\n it 'k...
ruby
chosen
[ { "from": "system", "value": "Add spec for visiting event page when logged in\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.feature 'User joins an event', js: true do\n before { create(:event) }\n\n scenario \"User visits event page when not logged in\" do\n puts Event....
ruby
chosen
[ { "from": "system", "value": "Fix GivenCourse spec. GivenCourse does no longer exists\n" }, { "from": "human", "value": "describe GivenCourse do\n describe \"validation\" do\n it \"requires a course\" do\n Factory.build(:given_course, course: nil).should_not be_valid\n Factory.buil...
ruby
chosen
[ { "from": "system", "value": "Fix status change event spec using wrong variable\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'torkify/status_change_event'\n\nmodule Torkify\n describe StatusChangeEvent do\n\n context \"with a pass_now_fail event\" do\n before do\n ...
ruby
chosen
[ { "from": "system", "value": "Adjust when the database cleaner runs to prevent deadlocks.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"database_cleaner\"\n\nRSpec.configure do |config|\n config.before(:suite) do\n DatabaseCleaner.clean_with(:truncation)\n en...
ruby
chosen
[ { "from": "system", "value": "Use broader regexp for extracting version\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n# Grabs the current version of the API, downloads the latest and if\n# there is a difference commits the new version. Used by our release\n# script to document in the...
ruby
chosen
[ { "from": "system", "value": "Add comp_move method to class\n" }, { "from": "human", "value": "class CompPlayer\n\n def minimax(board, rules, increment = 10)\n return 1000 if rules.won?(board, \"X\")\n return -1000 if rules.won?(board, \"O\")\n return 0 if rules.draw?(board, board.turn...
ruby
chosen
[ { "from": "system", "value": "Allow OSX default desktop image to be customized\n" }, { "from": "human", "value": "require 'sqlite3'\n\nmodule Desktop\n class OSX\n class DesktopImagePermissionsError < StandardError; end\n\n def self.desktop_image=(image)\n self.new.desktop_image = im...
ruby
chosen
[ { "from": "human", "value": "Add rspec file for challenge 4.3 release 2\n" }, { "from": "gpt", "value": "require_relative \"my_solution\"\n\ndescribe 'do_something' do\n it 'is defined as a method' do\n expect(defined?(do_something)).to eq 'method'\n end\n it 'should accept exactly three p...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 1.1.0.1 to 1.2.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '1.1.0.1'\n s.descri...
ruby
chosen
[ { "from": "system", "value": "Add redis and json dependencies for 1.8\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"schlep/version\"\n\nGem::Specification.new do |s|\n s.name = \"schlep\"\n s.version = Schlep:...
ruby
chosen
[ { "from": "system", "value": "Add faraday and activesupport as dependencies" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'peat/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Update ROM dependency to 2.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rom/yaml/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update rom dep 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 'rom/yaml/version'\n\nGem::Specification.new do |spec|\n spec.name = ...
ruby
chosen
[ { "from": "human", "value": "Add red spec for component ancestors\n" }, { "from": "gpt", "value": "# GitCompound\n#\nmodule GitCompound\n describe Component do\n before do\n git_build_test_environment!\n component_dir = @base_component_dir\n @component = Component.new(:bas...
ruby
chosen
[ { "from": "system", "value": "Add checking players presence in clubs view feature spec\n" }, { "from": "human", "value": "require 'spec_helper.rb'\n\nfeature \"Viewing a Club\", js: true do\n let(:club1) {FactoryGirl::create(:club)}\n let(:club2) {FactoryGirl::create(:club)}\n\n scenario \"vi...
ruby
chosen
[ { "from": "system", "value": "Fix requires because they aren't working\n" }, { "from": "human", "value": "Dir[\"File.dirname(__FILE__)/raml\"].each {|file| require file}\n" }, { "from": "gpt", "value": "require_relative \"./raml_models/api\"\nrequire_relative \"./raml_models/body\"\n...
ruby
chosen
[ { "from": "system", "value": "Change Tempfile path for Heroku\n" }, { "from": "human", "value": "require 'zip'\n\nclass SiteController < ApplicationController\n include Settings\n\n before_action :authenticate_user!\n before_action :authenthicate_admin!, except: [:members, :activities]\n\n d...
ruby
chosen
[ { "from": "system", "value": "Use SQL BETWEEN & remove unneeded .to_date\n" }, { "from": "human", "value": "# coding: UTF-8\n\nrequire 'active_support/concern'\n\nmodule Kpi::EstadisticaKpi\n include Kpi::Comun\n extend ActiveSupport::Concern\n\n included do\n extend ComunScopes\n scope...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Electron.\n" }, { "from": "human", "value": "cask 'electron' do\n version '1.2.5'\n sha256 'd27f0e1f7712c01e49e3bbf40e741be39fc21790b4206edd1e141a6b75ead9e5'\n\n url \"https://github.com/atom/electron/releases/download/v#{version}/ele...
ruby
chosen
[ { "from": "system", "value": "Remove 'one' from default ranks\n" }, { "from": "human", "value": "class Deck\n DEFAULT_SUITS = %w(spades clubs diamonds hearts)\n DEFAULT_RANKS = %w(ace one two three four five six seven eight nine ten jack queen king)\n\n def initialize(suits, ranks)\n @suit...
ruby
chosen
[ { "from": "system", "value": "Change ownCloud license to GPL\n\nSee: https://github.com/owncloud/mirall/blob/master/COPYING" }, { "from": "human", "value": "cask :v1 => 'owncloud' do\n version '1.7.0.1339'\n sha256 'baa848c46e0a1cc0e88cf78a2419bfdb7d55fd984100d9fe1babc4a97eb00d9a'\n\n url \"h...
ruby
chosen
[ { "from": "system", "value": "Remove page from the index list\n" }, { "from": "human", "value": "module ApplicationHelper\n def head\n hoptoad_javascript_notifier\n end\n\n def main_navigation(menu)\n if ENV[\"APP_NAME\"] == \"vowessly\"\n menu.item \"Canterbury\", \"/by_province/C...
ruby
chosen
[ { "from": "system", "value": "Fix for creating new projects.\n" }, { "from": "human", "value": "module Totem\n class Shell\n @cmds = {}\n\n def self.register_cmd(cmd, klass)\n @cmds[cmd.to_sym] = klass\n\n return nil\n end\n\n def initialize(args)\n @args = args\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unused private method from confirmation presenter" }, { "from": "human", "value": "class ConfirmationPresenter < Presenter\n def submission_information\n if office.present? && remission_claimant_count.zero?\n I18n.t 'claim_confirmations.show.submissi...
ruby
chosen
[ { "from": "system", "value": "Change FollowerNotifier event link to spread page.\n" }, { "from": "human", "value": "class FollowerNotifier\n include MailHelper\n\n def self.publish(args)\n new(args).publish\n end\n\n def initialize(args)\n @topic_arn = args[:topic_arn]\n @effort_dat...
ruby
chosen