conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Increase version number in preparation for release\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint MKLog.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optiona...
ruby
chosen
[ { "from": "system", "value": "Add test for getting area geometry\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass AreaTest < ActiveSupport::TestCase\n should have_many(:areas_messages)\n should have_many(:messages).through(:areas_messages)\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in latest player counts\n" }, { "from": "human", "value": "require 'sinatra/redis'\n\nmodule Sinatra\n module TreeStats\n module Routing\n module PlayerCounts\n def self.registered(app)\n app.get '/player_counts/?' do\n h...
ruby
chosen
[ { "from": "system", "value": "Define initial rspec tests for comments controller.\n" }, { "from": "human", "value": "require \"rails_helper\"\n\ndescribe CommentsController do\n describe 'GET #index' do\n it 'populates an array of all comment to a question' do\n comment1 = create(:q_com...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated Devise sign_in bypass option in tests\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'rails_helper'\n\nRSpec.describe 'Extension: Devise: sign_in with resource', type: :controller do\n class self::TestUser < User\n b...
ruby
chosen
[ { "from": "system", "value": "Add test for index on medical_condition and funder for a medical condition funder.\n" }, { "from": "human", "value": "require 'test_helper'\n\n# MedicalConditionFunderTest is the model tests for MedicalConditionFunders\nclass MedicalConditionFunderTest < ActiveSuppo...
ruby
chosen
[ { "from": "system", "value": "Fix typo in constant name.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\n$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'rwiki'\n\nworking_folder = ARGV[0] || Dir.pwd\nunless working_folder.start_with?('/')\n work...
ruby
chosen
[ { "from": "system", "value": "Add default value for when `followed_categories` is nil\n" }, { "from": "human", "value": "require 'ello/kinesis_consumer/base_processor'\nrequire 'ello/mailchimp_wrapper'\n\nmodule Ello\n module KinesisConsumer\n class MailchimpProcessor < BaseProcessor\n\n ...
ruby
chosen
[ { "from": "system", "value": "Stop requiring statsd in subscriber\n\nNothing statsd specific is referenced other than the client, but that is just through the class var so no need to require this.\n" }, { "from": "human", "value": "# Note: You should never need to require this file directly if y...
ruby
chosen
[ { "from": "system", "value": "Fix duplicate entry for 2x dynos\n" }, { "from": "human", "value": "module HerokuLineItemBilling\n class Formation < Base\n PRICES = {\n \"1x\" => {\"cents\" => 5, \"unit\" => \"hour\"},\n \"2x\" => {\"cents\" => 10, \"unit\" => \"hour\"},\n \"2x\...
ruby
chosen
[ { "from": "system", "value": "Add test for unsuccessful sign in\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.feature \"Signing Users In\" do\n\n before do\n @john = User.create!(email: \"john@example.com\", password: \"password\")\n end\n\n scenario \"with valid cre...
ruby
chosen
[ { "from": "system", "value": "Add specs for new ci status helper method\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe CiStatusHelper do\n include IconsHelper\n\n let(:success_commit) { double(\"Ci::Pipeline\", status: 'success') }\n let(:failed_commit) { double(\"Ci::Pi...
ruby
chosen
[ { "from": "system", "value": "Fix for putting files in subdirectory\n" }, { "from": "human", "value": "module CloudyUi\n require_relative 'cloudy_ui/button'\n require_relative 'cloudy_ui/slider'\n \n def self.load_images window, load_path=File.join(Dir.pwd, 'cloudy_ui/images')\n CloudyUi:...
ruby
chosen
[ { "from": "system", "value": "Remove no longer needed question model tests for valid_answers\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Poll::Question, type: :model do\n let(:poll_question) { build(:poll_question) }\n\n describe \"#valid_answers\" do\n it \"...
ruby
chosen
[ { "from": "system", "value": "Update podspec with summary and remove extra fields.\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint ForecastIOClient.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a ...
ruby
chosen
[ { "from": "system", "value": "Change http refernce to jquery at google to https\n" }, { "from": "human", "value": "\n\nrequire 'asciidoctor'\nrequire 'asciidoctor/extensions'\nrequire 'asciidoctor/latex/core_ext/colored_string'\n\n#\nmodule Asciidoctor::LaTeX\n\n class InjectHTML < Asciidoctor:...
ruby
chosen
[ { "from": "system", "value": "Add after sign up path\n" }, { "from": "human", "value": "require_dependency \"ajo_register/application_controller\"\nclass AjoRegister::RegistrationsController < Devise::RegistrationsController\n def index\n end\n\n def new\n super\n end\n\n def create\n ...
ruby
chosen
[ { "from": "system", "value": "Add files to gem specification\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"tzinfo_completer\"\n s.version = \"0.3.12\"\n s.date = \"2008-11-17\"\n s.summary = \"Contains the parts of the TZInfo gem not included in the ...
ruby
chosen
[ { "from": "system", "value": "Add jquery-rails and font-awesome-rails gems 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 'bootstrap_sb_admin_base_v2/version'\n\nGem::S...
ruby
chosen
[ { "from": "system", "value": "Set from/reply-to addresses on fact check requests to proper one\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass NoisyWorkflow < ActionMailer::Base\n default :from => \"winston@alphagov.co.uk\"\n \n def make_noise(publication,action)\n @publicati...
ruby
chosen
[ { "from": "human", "value": "Make a class to wrap around Faye's ws object\n" }, { "from": "gpt", "value": "module Ldash\n # Class that wraps around Faye's ws object so we can send events more easily\n class WSWrapper\n def initialize(ws)\n @ws = ws\n end\n\n def send_ready(sessio...
ruby
chosen
[ { "from": "human", "value": "Allow REDIS_URL to be set with ENV vars\n" }, { "from": "gpt", "value": "Sidekiq.configure_server do |config|\n config.redis = { url: ENV['REDIS_URL'] || 'redis://localhost:6379/12' }\nend\n\nSidekiq.configure_client do |config|\n config.redis = { url: ENV['REDIS_U...
ruby
chosen
[ { "from": "system", "value": "Add missing server side unique jobs config\n\nAs discussed in the previous commit, when we upgraded\nsidekiq-unique-gems to 7.0 we didn't add in all the required config.\n\nDefault config was removed from 7.0 of the unique sidekicks\njob gem. As a result, you have to manually c...
ruby
chosen
[ { "from": "system", "value": "Tweak to task as there seem to be councils that don't have parent groups.\n" }, { "from": "human", "value": "#\n# This will grant a group's access to its members. \n# This is for the migration to core's lock/key permission system to work \n# with data created before...
ruby
chosen
[ { "from": "system", "value": "Modify redirection in the user_owner helper\n\n" }, { "from": "human", "value": "require \"materialize_renderer\"\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n rescue_from ActiveRecord::RecordNotFound do\n ...
ruby
chosen
[ { "from": "system", "value": "Use `git ls-files` for file inclusion" }, { "from": "human", "value": "# encoding: UTF-8\nrequire File.expand_path '../lib/barge/version', __FILE__\n\nGem::Specification.new do |spec|\n spec.name = 'barge'\n spec.version = Barge::Version\n spec.summary...
ruby
chosen
[ { "from": "system", "value": "Add validations to the singleton guard & the mock synchronization token. Refs 16.\n" }, { "from": "human", "value": "require 'duckrails/synchronizer'\n\nmodule Duckrails\n # The application state\n class ApplicationState < ActiveRecord::Base\n self.table_name =...
ruby
chosen
[ { "from": "system", "value": "Add FIXME annotation to file\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n#\n# == Core namespace\n#\nmodule Core\n #\n # == FriendlyGlobalizeSluggable module\n #\n module FriendlyGlobalizeSluggable\n extend ActiveSupport::Concern\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add a session pool to the top level app tests\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rack_spec_helper'\nrequire 'tic_tac_toe/rack_shell'\n\ndescribe TicTacToe::RackShell do\n include Rack::Test::Methods\n\n def app\n TicTacToe::RackS...
ruby
chosen
[ { "from": "system", "value": "Add a test withdrawal function\n" }, { "from": "human", "value": "class PaymentsHandlerController < ApplicationController\n before_action :authenticate_user!\n\n def deposit\n params = deposit_params\n raise 'Test is not available in production' if params[:m...
ruby
chosen
[ { "from": "system", "value": "Update djay Pro to 1.2-201508141249\n" }, { "from": "human", "value": "cask :v1 => 'djay-pro' do\n version '1.1.3-201506261526'\n sha256 '47bb67196483e684ce3009088886e915fb9e83049fc263d3cc96d38755f5185c'\n\n url \"http://download.algoriddim.com/djay/#{version.sub...
ruby
chosen
[ { "from": "system", "value": "Make loader class configurable & keep copies of loaders on a per-format basis\n" }, { "from": "human", "value": "\nmodule Cutaneous\n class Engine\n def initialize(template_roots, lexer_class)\n @roots, @lexer_class = Array(template_roots), lexer_class\n ...
ruby
chosen
[ { "from": "system", "value": "Rename class of leaves for Template filter tree.\n\nRename class of leaves for Template filter tree as earlier renamed\nelsewhere in the big model rename.\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1283642\n" }, { "from": "human", "value": "class TreeBuilderTemp...
ruby
chosen
[ { "from": "system", "value": "Check that the notifiable classes include the Inquest::Notifiable module, and warn if they do not. Record reactor classes in config, as trying to automatically determine them is not working correctly.\n" }, { "from": "human", "value": "# Set classes that can be noti...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 0.86.0 to ~> 0.87.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/r...
ruby
chosen
[ { "from": "system", "value": "Improve the symbol->class resolution in Hdo::Search::Index\n" }, { "from": "human", "value": "module Hdo\n module Search\n module Index\n\n def update_index_on_change_of(*args)\n singular = self.to_s.downcase\n plural = singular.pluralize\n ...
ruby
chosen
[ { "from": "system", "value": "Remove debug only gem refs.\n" }, { "from": "human", "value": "# test env\nrequire 'rspec'\nrequire 'spec_helper'\nrequire 'rack/test'\nrequire 'sinatra'\n\n# gems\nrequire 'fog'\nrequire 'database_cleaner'\n\n# require the dependencies\nrequire File.join(File.dirna...
ruby
chosen
[ { "from": "system", "value": "Use `$!` to report the last Exception. The previous method does not work reliably." }, { "from": "human", "value": "module Safely\n class Backtrace\n \n class << self\n\n attr_accessor :trace_directory\n\n def enable!\n @enabled = true\n ...
ruby
chosen
[ { "from": "system", "value": "Enable checksum validation on upload.\n" }, { "from": "human", "value": "require \"digest/md5\"\nrequire \"mime/types\"\n\nrequire_relative \"meta/caching\"\nrequire_relative \"meta/compression\"\n\nmodule StaticSync\n class Meta\n\n def initialize(config)\n ...
ruby
chosen
[ { "from": "system", "value": "Add a more helpful message to NoSuitableVimError\n" }, { "from": "human", "value": "module Vimrunner\n class NoSuitableVimError < RuntimeError; end\n class InvalidCommandError < RuntimeError; end\n\n class TimeoutError < RuntimeError\n def message\n \"Ti...
ruby
chosen
[ { "from": "system", "value": "Set require for added validator class\n" }, { "from": "human", "value": "require 'weather_reporter/version'\nrequire 'weather_reporter/http_service/request'\nrequire 'weather_reporter/configuration'\nrequire 'weather_reporter/error/invalid_path'\nrequire 'weather_re...
ruby
chosen
[ { "from": "system", "value": "Add version to podspec source\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'LambdaKit'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'Closures on most used UIKit methods'\n s.homepage = 'https://github.com/Reflejo/ClosureKit'\n ...
ruby
chosen
[ { "from": "system", "value": "Fix database deletion and creation in test_app\n\nIn some circumstances, creating and deleting the database was failing\nwhen running rake test_app. This was likely broken in by\nbc8efcb5f66057e0a6e91abaf801528c556d28d0 as well as the rails 5 upgrade.\n\nFixes #1491\n" }, {...
ruby
chosen
[ { "from": "system", "value": "Remove redundant test-unit gem dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/configs/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Lance Ivy\"]\n gem.email = [\"l...
ruby
chosen
[ { "from": "system", "value": "Add column for password hash\n" }, { "from": "human", "value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :first_name, null: false\n t.string :last_name, null: false\n t.string :email, null:fa...
ruby
chosen
[ { "from": "system", "value": "Check for 1password also in /Applications\n" }, { "from": "human", "value": "directory \"#{ENV['HOME']}/Applications\"\n\nunless File.exists?(\"#{ENV['HOME']}/Applications/1Password.app\")\n\n remote_file \"#{Chef::Config[:file_cache_path]}/1password.zip\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add global_registry as a 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 'cru_lib/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update Gem number to 0.2.9\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 |s|\n s.name = \"fluent-plugin-juniper...
ruby
chosen
[ { "from": "system", "value": "Remove host and endpoint from CarrierWave configuration\n" }, { "from": "human", "value": "CarrierWave.configure do |config|\n if Rails.env.production? and Configuration[:aws_access_key]\n config.fog_credentials = {\n provider: 'AWS',\n host: 's3.amazo...
ruby
chosen
[ { "from": "human", "value": "Add specs for custom character limited input\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.describe CharacterLimitedInput do\n include RSpec::Rails::HelperExampleGroup\n\n describe '#input' do\n let(:input) { proc { |f| f.input(:attr_name, as: ...
ruby
chosen
[ { "from": "system", "value": "Fix when page has external links, test will fail.\n" }, { "from": "human", "value": "require \"test_helper\"\n\nfeature \"VisitAllPage\" do\n scenario \"全てのリンクからページを辿ってエラーが起きないことを確認する\" do\n visit root_path\n visited = []\n visit_all_links(visited)\n end\...
ruby
chosen
[ { "from": "system", "value": "Modify SQL in RecentView factory to support MySQL\n" }, { "from": "human", "value": "FactoryBot.define do\n factory :recent_view do\n transient do\n type { :ticket }\n user_role { :agent }\n end\n\n recent_view_object_id { ObjectLookup.by_name(ty...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary grouping from Twitter regex\n" }, { "from": "human", "value": "require 'uri'\nrequire 'net/http'\n\nAutoHtml.add_filter(:twitter).with({}) do |text, options|\n regex = %r{https://twitter\\.com(/#!)?/[A-Za-z0-9_]{1,15}/status(es)?/(\\d+)}\n\n tex...
ruby
chosen
[ { "from": "human", "value": "Add basic spec for Author.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe LJMedia::Author do\n describe '#new' do\n it 'must accept initialization by user id only and get username from profile page' do\n a = nil\n expect(a = LJMedia:...
ruby
chosen
[ { "from": "human", "value": "Add test for path helper\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"path helpers\", type: :helper do\n it do\n member = mock_model(Member, url_name: \"Foo_Bar\", url_electorate: \"Twist\",\n australian_house: \"representatives\")\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor parenthesize? test to be simpler\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule SQL\n module Generator\n class Emitter\n\n # Connective operation emitter base class\n class ConnectiveOperation < self\n\n TYPES = IceNine....
ruby
chosen
[ { "from": "system", "value": "Update path to static assets\n" }, { "from": "human", "value": "module PdfjsRailsEngine\n class Engine < ::Rails::Engine\n isolate_namespace PdfjsRailsEngine\n\n initializer 'pdfjs-rails-engine.assets.precompile', group: :all do |app|\n app.config.assets...
ruby
chosen
[ { "from": "system", "value": "Set timezone configuration for Sequel\n" }, { "from": "human", "value": "# Defaults for sensible migrations\nSequel::MySQL.default_engine = 'InnoDB'\nSequel::MySQL.default_charset = 'utf8'\n\nSequel::Model.plugin :take\nSequel::Model.plugin :validation_class_methods...
ruby
chosen
[ { "from": "system", "value": "Fix case when field is not in hstore/jsonb\n" }, { "from": "human", "value": "require \"carrierwave/orm/activerecord\"\n\nmodule CarrierWave\n module ActiveRecord\n module Accessable\n ##\n # See +CarrierWave::Mount#mount_uploader+ for documentation\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Swift support fix in podspec file\"\n\nThis reverts commit 616f0bc0dd4c8dabfba2916549021dd4d1f62cb8.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"CocoaTouchHelpers\"\n s.version = \"1.1.0\"\n s.summary = \"Help...
ruby
chosen
[ { "from": "system", "value": "Undo logic that makes no sense with an optional param.\"\n" }, { "from": "human", "value": "# Generates searchers with concrete functionality, when passed model names\n# i.e. rails g searcher User will create a UserSearcher\nclass SearcherGenerator < Rails::Generato...
ruby
chosen
[ { "from": "system", "value": "Use inner method to remove conditional\n" }, { "from": "human", "value": "require 'java'\n\nclass ASTTreeViewBuilder\n include JRubyFX\n attr_accessor :tree_view\n \n def initialize(tree_view)\n @tree_view = tree_view\n end\n \n def build_tree_item(node)\n...
ruby
chosen
[ { "from": "system", "value": "Remove executables line from 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 'alchemy/pg_search/version'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "system", "value": "Mark ARC as required in the podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"ZXingObjC\"\n s.version = \"2.1.0\"\n s.summary = \"An Objective-C Port of ZXing.\"\n s.homepa...
ruby
chosen
[ { "from": "system", "value": "Fix how we are checking bind tests, can't use coerce since the test methods are defined in an if block\n" }, { "from": "human", "value": "require 'cases/sqlserver_helper'\nrequire 'models/topic'\nrequire 'models_sqlserver/topic'\n\nclass BindParameterTestSqlServer <...
ruby
chosen
[ { "from": "system", "value": "Replace %w() with [] in gemspec\n\nBecause sometimes it doesn't worth... ;))\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'http/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Fix indexing new associated records\n" }, { "from": "human", "value": "# frozen_string_literal: true\n# author: Vadim Shaveiko <@vshaveyko>\nrequire 'activerecord_reindex/reflection_reindex'\n\nmodule Elasticsearch\n module Model\n module Indexing\n module ...
ruby
chosen
[ { "from": "system", "value": "[CS] Remove unused method from private API" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Adhearsion\n class CallController\n module Output\n class AbstractPlayer\n\n attr_accessor :controller\n\n def initialize(controller)\n ...
ruby
chosen
[ { "from": "system", "value": "Extend timeouts on cube upload\n" }, { "from": "human", "value": "require 'fog/octocloud/requests/compute/convert_cube'\n\nmodule Fog\n module Compute\n class Octocloud\n class Real\n\n def remote_upload_cube(id, file)\n # Get some VMDK acti...
ruby
chosen
[ { "from": "system", "value": "802: Add reimbursee to meal cost factory\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nFactoryBot.define do\n factory :meal_cost, class: \"Meals::Cost\" do\n meal\n ingredient_cost { 10.00 }\n pantry_cost { 2.00 }\n payment_method ...
ruby
chosen
[ { "from": "system", "value": "Fix _erubis_escaping spec plugin guard\n" }, { "from": "human", "value": "require File.expand_path(\"spec_helper\", File.dirname(File.dirname(__FILE__)))\n\nbegin\n require 'tilt/erb'\n begin\n require 'tilt/erubis'\n rescue LoadError\n # Tilt 1 support\n ...
ruby
chosen
[ { "from": "human", "value": "Prepare for the content routes.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe 'content routes' do\n # namespace :content do\n # resources :rows, only: [:index, :new, :destroy] do\n # concerns :positionable\n #\n # scope module: 'r...
ruby
chosen
[ { "from": "human", "value": "Add ruby implementation as \"check\"\n\nThe Jack implementation is incredibly slow, and may not actually work so we add a ruby implementation as a check that our impl actually works. This ruby implementation is a direct transliteration of the Jack one (without the boolean logic...
ruby
chosen
[ { "from": "system", "value": "Update library version in podspec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'POSDataStructures'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'Data Structures Collection. Contains only Binary Heap at tha...
ruby
chosen
[ { "from": "system", "value": "Revert \"temporary allowing to update schemes with token auth\"\n\nThis reverts commit 6c5e107737872cb27a4fb746126ea3d4bed8c2dd.\n" }, { "from": "human", "value": "module Backend\n class SchemesController < Backend::BaseController\n skip_before_filter :verify_au...
ruby
chosen
[ { "from": "system", "value": "Support other regions besides us-east-1\n" }, { "from": "human", "value": "include Opscode::Aws::Ec2\n\naction :register do\n elb.register_instances_with_load_balancer(new_resource.name, instance_id)\n new_resource.updated_by_last_action(true)\n Chef::Log.info(\"...
ruby
chosen
[ { "from": "system", "value": "Use https link in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MTBBarcodeScanner\"\n s.version = \"0.1.0\"\n s.summary = \"A lightweight, easy-to-use barcode scanning library for iOS 7.\"\n s.homepage...
ruby
chosen
[ { "from": "system", "value": "Add blank Taxation and TaxRule classes" }, { "from": "human", "value": "module Chargify\n class Transaction < Base\n def full_refund(attrs = {})\n return false if self.transaction_type != 'payment'\n\n attrs.merge!(:amount_in_cents => self.amount_in_ce...
ruby
chosen
[ { "from": "system", "value": "Check if User is defined on ResizeApiKeyField Migration (like others)\n" }, { "from": "human", "value": "class ResizeApiKeyField < ActiveRecord::Migration\n def change\n change_column :spree_users, :api_key, :string, :limit => 48\n end\nend\n" }, { "fro...
ruby
chosen
[ { "from": "system", "value": "Fix rebar recipe for Ubuntu 11.04, resolve conflicts\n" }, { "from": "human", "value": "#\n# Cookbook Name:: Rebar\n# Recipe:: default\n#\n# Copyright 2011, Ward Bekker\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f...
ruby
chosen
[ { "from": "system", "value": "Add Status field to spec\n" }, { "from": "human", "value": "describe CloudVolumeHelper::TextualSummary do\n include_examples \"textual_group\", \"Relationships\", %i(\n parent_ems_cloud\n ems\n availability_zone\n cloud_tenant\n base_snapshot\n cl...
ruby
chosen
[ { "from": "system", "value": "Include other systemd actions and override is_enabled check\n\nThis PR adds all systemd functions to opensuse and overrides the is_enabled check to ensure\nwe also check for sysv style files in case we don't have a systemd service\n" }, { "from": "human", "value": "...
ruby
chosen
[ { "from": "system", "value": "Drop the .html blog links\n" }, { "from": "human", "value": "activate :sprockets do |c|\n c.expose_middleman_helpers = true\nend\n\nactivate :autoprefixer do |prefix|\n prefix.browsers = \"last 2 versions\"\nend\n\npage '/*.xml', layout: false\npage '/*.json', lay...
ruby
chosen
[ { "from": "system", "value": "Remove development dependencies from the runtime dependency list\n\n* Update addressable to reference the latest stable version\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/dm-core/version', __FILE__)\n\nGem::Specifi...
ruby
chosen
[ { "from": "system", "value": "Fix the naming for the gem spec\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubychy/version'\n\nGem::Specification.new do |spec|\n spec.name = \"rubychy\"\...
ruby
chosen
[ { "from": "system", "value": "Fix the rakefile for RSpec 2.\n" }, { "from": "human", "value": "begin\n require 'spec'\nrescue LoadError\n begin \n require 'rubygems'\n require 'spec'\n rescue LoadError\n puts <<-EOS\n To use rspec for testing you must install rspec gem:\n ...
ruby
chosen
[ { "from": "system", "value": "Remove auto generated test case\nremove \"does something useful\" it block\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe WeatherReporter do\n it \"has a version number\" do\n expect(WeatherReporter::VERSION).not_to be nil\n end\n\n it ...
ruby
chosen
[ { "from": "human", "value": "Complete P43, but refactoring badly needed\n" }, { "from": "gpt", "value": "# The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9\n# in some order, but it also has a rather interesting sub-string divisibility prope...
ruby
chosen
[ { "from": "system", "value": "Write model tests for an answer.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass AnswerTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "require 'test_helper'\n\n...
ruby
chosen
[ { "from": "system", "value": "Add method to get categorical_traits from Otu\n" }, { "from": "human", "value": "class Otu < ActiveRecord::Base\n attr_accessible :author, :name, :taxon, :import_job\n belongs_to :taxon\n belongs_to :import_job\n has_one :csv_dataset, :through => :import_job\n ...
ruby
chosen
[ { "from": "system", "value": "Use a valid email address for administrator user account in 'I am logged in as an administrator' cucumber step\n" }, { "from": "human", "value": "Given /^I am logged in as an administrator$/ do\n @current_user = User.create!(\n :email => 'a@b.c',\n :name => '...
ruby
chosen
[ { "from": "system", "value": "Use mongo to sort messages instead of ruby\n" }, { "from": "human", "value": "class Chat::Rooms::MessagesController < ApplicationController\n \n include ActionView::Helpers::AssetTagHelper\n def controller;self;end;private(:controller)\n \n before_filter do\n ...
ruby
chosen
[ { "from": "human", "value": "Create feature spec for showing active matches\n\nActive matches are shown on project page\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Show active matches in project page' do\n background do\n @project = create(:project, state: 'online', on...
ruby
chosen
[ { "from": "system", "value": "Change to stub file close\n" }, { "from": "human", "value": "# encoding: utf-8\n\nRSpec.describe TTY::Prompt::Question, 'convert file' do\n it \"converts to file\" do\n file = double(:file)\n prompt = TTY::TestPrompt.new\n prompt.input << \"test.txt\"\n ...
ruby
chosen
[ { "from": "system", "value": "fix: Use RUBY_VERSION instead of VERSION\n" }, { "from": "human", "value": "require 'filelock/version'\nrequire 'timeout'\n\nif VERSION <= \"1.8.7\"\n require 'tempfile'\n\n def Filelock(lockname, options = {}, &block)\n lockname = lockname.path if lockname.is_...
ruby
chosen
[ { "from": "system", "value": "Allow passing options to Faraday, set adapter" }, { "from": "human", "value": "require \"faraday\"\nrequire \"faraday_middleware\"\n\nrequire \"justcoin/version\"\n\nclass Justcoin\n\n DEFAULT_URI = \"https://justcoin.com/api/v1\"\n\n attr_reader :key, :options, :...
ruby
chosen
[ { "from": "system", "value": "Change swap uri constant from http to https" }, { "from": "human", "value": "require \"faraday\"\nrequire \"faraday_middleware\"\n\nrequire \"tatooine/version\"\nrequire \"tatooine/error\"\nrequire \"tatooine/middleware/raise_http_error\"\nrequire \"tatooine/resourc...
ruby
chosen
[ { "from": "system", "value": "Define a generic Response record which checks the trailing success code\n" }, { "from": "human", "value": "module YubiOATH\n CLA = 0x00\n AID = [0xA0, 0x00, 0x00, 0x05, 0x27, 0x21, 0x01, 0x01]\nend\n" }, { "from": "gpt", "value": "require 'bindata'\n\n...
ruby
chosen
[ { "from": "system", "value": "Allow host to be specified\n" }, { "from": "human", "value": "module UrlHelper\n\n def url_for options = {}\n return super unless options.is_a? Hash\n\n # @domain.owner_type check avoids an early fetch of @domain.profile\n if (!@domain or @domain.owner_typ...
ruby
chosen
[ { "from": "system", "value": "Add touch to Taxon belongs_to Taxonomy association\n" }, { "from": "human", "value": "class Taxon < ActiveRecord::Base\n\n belongs_to :taxonomy, inverse_of: :taxons\n\n validates :name, presence: true\n validates :taxonomy_id, presence: true\n\nend\n" }, { ...
ruby
chosen