conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add computed attributes that return in DateTime objects\n"
},
{
"from": "human",
"value": "module GreenButtonData\n module Parser\n class Interval\n include SAXMachine\n include Utilities\n\n element :duration, class: Integer do |t|\n norma... | ruby | chosen |
[
{
"from": "system",
"value": "Make this compatible with more recent Rails versions that support more advanced functionality.\n"
},
{
"from": "human",
"value": "module ExactTarget\n class Subscriber\n include ActiveModel::Model\n\n attr_accessor :email, :travel_weekly, :enews, :travel_espe... | ruby | chosen |
[
{
"from": "system",
"value": "Add status override to liquid rendering\n"
},
{
"from": "human",
"value": "module LiquidRenderer\n class Railtie < ::Rails::Railtie\n config.liquid_renderer = ActiveSupport::OrderedOptions.new\n\n initializer 'liquid_renderer.initialize' do |app|\n app.c... | ruby | chosen |
[
{
"from": "system",
"value": "Use Oboe::API.trace and not start_trace_with_target\n"
},
{
"from": "human",
"value": "# Copyright (c) 2012 by Tracelytics, Inc.\n# All rights reserved.\n\nif defined?(ActionView::Base)\n if Rails::VERSION::MAJOR == 3\n Oboe::API.report_init('rails')\n puts \... | ruby | chosen |
[
{
"from": "system",
"value": "Add undelegated getter/setter methods to Delegator.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# Copyright (c) 2016 Nathan Currier\n\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di... | ruby | chosen |
[
{
"from": "system",
"value": "Add coverage for AR::MTI.root helper\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ActiveRecord::MTI do\n\n context 'helper' do\n\n describe '#testify' do\n it \"returns true for truthy values\" do\n expect(ActiveRecord::MTI.te... | ruby | chosen |
[
{
"from": "system",
"value": "Remove js: true from Capybara test\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature \"Mission\", type: :feature, js: true do\n scenario \"renders Mission component\" do\n visit \"/\"\n expect(page).to have_content \"Less than 5% of c... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependencies to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/carrierwave-imagesorcery/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Carlo Bertini\"]\n gem.email =... | ruby | chosen |
[
{
"from": "system",
"value": "Add fake guid to test helper response\n"
},
{
"from": "human",
"value": "require \"ostruct\"\n\nmodule EventMachine\n class Kannel\n def self.deliveries\n @deliveries ||= []\n end\n\n Client.class_eval do\n def fake_response\n status = Ope... | ruby | chosen |
[
{
"from": "system",
"value": "Work with fabulator-0.0.7; have 'module' as a top-level structural element\n"
},
{
"from": "human",
"value": "module Fabulator\n WLC_NS = \"http://dh.tamu.edu/ns/fabulator/wlc/1.0#\"\n ASSETS_NS = \"http://dh.tamu.edu/ns/fabulator/assets/1.0#\"\n\n require 'fabul... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove redundant const_missing class method.\"\n\nThis reverts commit df5471078ce1fd45f094ad77c892ee9657d13c92.\n"
},
{
"from": "human",
"value": "module FactoryBot\n class Decorator < BasicObject\n undef_method :==\n\n def initialize(component)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Support elapsed time in MiniTest formatter.\n"
},
{
"from": "human",
"value": "require 'minitest/unit'\n\nmodule Fivemat\n module MiniTest\n class Unit < ::MiniTest::Unit\n def _run_suites(suites, type)\n offset = 0\n suites.reject do |suite|\... | ruby | chosen |
[
{
"from": "system",
"value": "Add :timeout and :open_timeout option\n"
},
{
"from": "human",
"value": "module GarageClient\n module Request\n MIME_DICT = 'application/vnd.cookpad.dictionary+json'\n\n def get(path, params = nil, options = {})\n request(:get, path, params, nil, options... | ruby | chosen |
[
{
"from": "system",
"value": "Change to compare whole output\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nRSpec.describe 'teletype' do\n it \"prints available commands and global options\" do\n command = \"bundle exec teletype\"\n\n out = `#{command}`\n\n expect(out).to incl... | ruby | chosen |
[
{
"from": "system",
"value": "Allow resuming saved machine state when gui is enabled\n\nAttempting to resume a suspended (saved) machine would result in:\n\n```\nCall to virDomainUndefine failed: Requested operation is not valid:\nRefusing to undefine while domain managed save image exists\n(Libvirt::Error)... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Queue. Split it to UniqQueue and ObjectQueue\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\nrequire \"save_queue/object_queue\"\n\ndescribe SaveQueue::ObjectQueue do\n let(:queue) { SaveQueue::ObjectQueue.new }\n let(:element) { new_eleme... | ruby | chosen |
[
{
"from": "system",
"value": "Change name of errors spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.feature 'Errors' do\n scenario 'rescue exceptions by rendering error page' do\n visit '/posts/0'\n\n expect(page).to have_content 'File Not Found'\n expect(page).t... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for view helper load_more_btn\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n#require 'action_view' Necessary?\n\nmodule LoadMore\n describe ActionView, type: :helper do\n before(:all) do\n %w(a b c d e f g h i j).each do |i|\n Ent... | ruby | chosen |
[
{
"from": "human",
"value": "Split InstanceCounter class from service.rb.\n"
},
{
"from": "gpt",
"value": "module Wakame\n class InstanceCounter\n class OutOfLimitRangeError < StandardError; end\n \n include AttributeHelper\n \n def bind_resource(resource)\n @resource = reso... | ruby | chosen |
[
{
"from": "system",
"value": "Move before block of response spec to beginning\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Response do\n it { should respond_to(:question) }\n it { should respond_to(:survey) }\n\n before :each do\n @response = Response.new\n end\n... | ruby | chosen |
[
{
"from": "human",
"value": "Use FactoryGirl to lint all of the factories on startup\n"
},
{
"from": "gpt",
"value": "# RSpec\n# spec/support/factory_girl.rb\nRSpec.configure do |config|\n config.include FactoryGirl::Syntax::Methods\n\n config.before(:suite) do\n begin\n DatabaseCleane... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor 25 in ruby for simplicity\n"
},
{
"from": "human",
"value": "last_two = [1, 1]\nfib_index = 2\n\nwhile last_two[1].to_s.length < 1000\n next_fib = last_two.reduce(:+)\n fib_index += 1\n last_two[0] = last_two[1]\n last_two[1] = next_fib\nend\n\np fib_in... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade VMware Fusion.app to v8.0.2-3164312\n"
},
{
"from": "human",
"value": "cask :v1_1 => 'vmware-fusion' do\n version '8.0.1-3094680'\n sha256 'e16f66349ee136fd961550f73af243f1ffec63c17847b5f89b74c1cc77898ab4'\n\n url \"https://download3.vmware.com/software/f... | ruby | chosen |
[
{
"from": "system",
"value": "Edit message when set the iTunes playlist\n"
},
{
"from": "human",
"value": "module PlaylistControl\n def self.playlist\n @temp_playlist || default_user_playlist || music_master_library\n end\n\n def self.set_playlist\n loop do\n playlist = HighLine.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Solve RSS bug for activities without a target\n"
},
{
"from": "human",
"value": "rss_activity_feed :root_url => projects_url do |feed|\n for activity in @activities\n feed.entry activity\n end\nend\n"
},
{
"from": "gpt",
"value": "rss_activity_feed ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a recipe that shows how to use the application_wlp cookbook\n"
},
{
"from": "gpt",
"value": "# Install the helloworld application\n# TODO: use app from wasdev\n\napplication \"HelloworldApp\" do\n\n serverName = \"Test1\"\n\n path \"/usr/local/helloworldApp\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set up initial variables that will be used accross different examples\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Samin do\n subject { Samin.new }\n\n it 'has a version number' do\n expect(Samin::VERSION).not_to be nil\n end\n\n conte... | ruby | chosen |
[
{
"from": "system",
"value": "Print the path of SPEC_TEMP_DIR to be more helpful\n"
},
{
"from": "human",
"value": "# Creates a temporary directory in the current working directory\n# for temporary files created while running the specs. All specs\n# should clean up any temporary files created so... | ruby | chosen |
[
{
"from": "system",
"value": "Add some debugging that is temporary for production\n"
},
{
"from": "human",
"value": "class CuttlefishLogDaemon\n def self.start(file)\n begin\n while true\n if File.exists?(file)\n File::Tail::Logfile.open(file) do |log|\n log.t... | ruby | chosen |
[
{
"from": "system",
"value": "Change archives and date_archives layouts to the singular\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Dimples\n module Configuration\n def self.defaults\n {\n source_path: Dir.pwd,\n destination_path: File.join(D... | ruby | chosen |
[
{
"from": "system",
"value": "Update TODO script to ignore files in /Vendor\n\nCase insensitive\n"
},
{
"from": "human",
"value": "TODO_WARNING_SCRIPT = <<WARNING\nKEYWORDS=\"TODO:|FIXME:|\\\\?\\\\?\\\\?:|\\\\!\\\\!\\\\!:\"\nfind \"${SRCROOT}\" \\\\( -name \"*.h\" -or -name \"*.m\" \\\\) -print0... | ruby | chosen |
[
{
"from": "system",
"value": "Use property_is_set instead of a nil check\n"
},
{
"from": "human",
"value": "resource_name :exabgp\n\nproperty :instance, String, name_property: true\nproperty :install_type, Symbol, default: :pip\nproperty :package_version, String, default: lazy { node['exabgp']['... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the returned time is the same instance\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'time'\n\nruby_version_is \"2.4\" do\n describe \"Time#to_time\" do\n it \"returns itself in the same timezone... | ruby | chosen |
[
{
"from": "human",
"value": "Add serverspec tests for racktables::application.\n"
},
{
"from": "gpt",
"value": "# Tests for specific Racktable application items\nrequire 'serverspec'\n\ndescribe user('racktables') do\n it { should exist }\n it { should belong_to_group 'racktables' }\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary parenthesis from exception\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nnamespace :metrics do\n allowed_versions = %w(mri-1.9.3 rbx-1.9.3)\n\n if allowed_versions.include?(Devtools.rvm) && system(\"which mutant > #{File::NULL}\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change default data dir to public (dev)\n"
},
{
"from": "human",
"value": "GEM_PREFIX = \"rails-assets-\"\nBOWER_BIN = File.expand_path(\"../../../node_modules/.bin/bower\", __FILE__)\nGIT_BIN = \"git\"\nRAKE_BIN = \"rake\"\nREDIS_NAMESPACE = \"rails-assets\"\nDATA_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove login links from header first.\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => 'spree/shared/_nav_bar',\n :name => 'remove_searchbar_from_header',\n :remove => \"code[erb-loud]:contains('spree/s... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to Balanced step\n"
},
{
"from": "human",
"value": "require \"balanced\"\n\nmodule Stairs\n module Steps\n class Balanced < Step\n title \"Balanced Payments\"\n\n def run\n ::Balanced.configure(api_key.secret)\n\n env \"BA... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken spec on latest version of Mongoid.\n\nIn new versions of Mongoid setting a limit to nil actually sets the limit to 0, which behaves the same as nil. So if the limit is 0 in #per_page we make sure to return nil."
},
{
"from": "human",
"value": "require 'mo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the test requirement for an image\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule MAS\n module Feedback\n describe ZendeskTab do\n let(:config) { double(:[] => { id: 1, url: 2 }) }\n\n describe '#url' do\n context 'basi... | ruby | chosen |
[
{
"from": "system",
"value": "Use JRuby's rubyised method names\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'saxon/processor'\n\ndescribe Saxon::Processor do\n let(:processor) { Saxon::Processor.new }\n let(:xsl_file) { File.open(fixture_path('eg.xsl')) }\n\n it \"can ma... | ruby | chosen |
[
{
"from": "system",
"value": "Update test mail setup for Spree 2\n\nhttps://github.com/openfoodfoundation/openfoodnetwork/issues/2882\n\nThe email setup differs between Spree 1 and Spree 2. We already\nencapsulated that setup in a single method which now needed changing.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Allow failover passsword for CAP (Car Cost)\n"
},
{
"from": "human",
"value": "CarCostTool.parent_controller = '::EmbeddedToolsController'\n\nCarCostTool.config = {\n 'DOMAIN' => ENV['CAR_COST_TOOL_DOMAIN'],\n 'CAP_SUBSCRIBER_ID' => ENV['CAR_COST_T... | ruby | chosen |
[
{
"from": "system",
"value": "Use cache store for cookies"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nExampleApp::Application.config.session_store :cookie_store, key: '_exampleapp_session'\n"
},
{
"from": "gpt",
"value": "# Be sure ... | ruby | chosen |
[
{
"from": "system",
"value": "Set cookies to only be served over https and to be http only\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nNeedOTron::Application.config.session_store :cookie_store, key: '_need-o-tron_session'\n\n# Use the databas... | ruby | chosen |
[
{
"from": "system",
"value": "Change activity title for followings\n"
},
{
"from": "human",
"value": "class FollowingActivityNotifier\n\n def self.deliver(following)\n a = Activity.find_or_initialize_by(user_id: following.leader_id, target_user_id: following.user.id, activity_type: 'FOLLOWIN... | ruby | chosen |
[
{
"from": "system",
"value": "Add licencing details to gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sauce_whisk/version'\n\nGem::Specification.new do |gem|\n g... | ruby | chosen |
[
{
"from": "human",
"value": "Add a fact called rubysuffix\n"
},
{
"from": "gpt",
"value": "# \n\nFacter.add(:rubysuffix) do\n confine :kernel => [ 'OpenBSD' ]\n setcode do\n version = Facter.value(:rubyversion)\n version.gsub!(/^(\\d+)\\.(\\d+)\\..*/, '\\1\\2')\n end\nend\n\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in function name\n"
},
{
"from": "human",
"value": "class Lasagna\n def remaining_minutes_in_oven(actual_minutes_in_oven)\n raise NotImplementedError, 'Please implement the remaining_minutes_in_oven method'\n end\n\n def preperation_time_in_minutes(la... | ruby | chosen |
[
{
"from": "system",
"value": "Fix many 2.3.2 specs by including assertion modules\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/test_helper')\n\ntmp = $-w\n$-w = nil\nrequire 'action_controller'\nrequire 'action_controller/test_process'\nrequire 'active_r... | ruby | chosen |
[
{
"from": "human",
"value": "Add test stubs - currently unsure as to how to test the CLI command\n"
},
{
"from": "gpt",
"value": "require 'test/unit'\nrequire 'vagrant-list'\n\nclass VagrantListTest < Test::Unit::TestCase\n\n def test_virtual_machine_present\n\n end\n\n def test_virtual_machi... | ruby | chosen |
[
{
"from": "system",
"value": "Increase to 100% test coverage\n"
},
{
"from": "human",
"value": "require_relative \"test_helper\"\n\nclass AlreadySolvedState < BfsBruteForce::State\n def solved?\n true\n end\nend\n\nclass BrokenState < BfsBruteForce::State\n def solved?\n false\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Remove script-tutorials.com from link checks\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'html-proofer'\n\nHTMLProofer.check_directory('./_site', {\n\t:parallel => {\n\t\t:in_processes => 4,\n\t},\n\t:check_html => true,\n\t:cache => {\n\t\t:ti... | ruby | chosen |
[
{
"from": "system",
"value": "Allow public gem pushes to RubyGems\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'beachball/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change api docs base url.\n"
},
{
"from": "human",
"value": "Apipie.configure do |config|\n config.app_name = \"AACT 2 API\"\n config.api_base_url = \"/api\"\n config.doc_base_url = \"/docs\"\n # where is your API defined?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use `make` instead of `command` in spawn-fgci"
},
{
"from": "human",
"value": "#\n# Copyright 2012-2014 Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n#... | ruby | chosen |
[
{
"from": "human",
"value": "Update slug for British Consulate Sylhet\n\nPart of https://trello.com/c/4p0ojDbC/494-september-redirects-medium\n\n`WorldwideOrganisation` implements `PublishesToPublishingApi` which\nwill automatically republish and create the appropriate redirects, so\nthis should be sufficie... | ruby | chosen |
[
{
"from": "system",
"value": "Update the URL to the new android mobile client\n"
},
{
"from": "human",
"value": "require 'version'\n\nmodule CustomBigbluebuttonRoomsHelper\n\n def mobile_google_play_link\n \"https://play.google.com/store/apps/details?id=org.mconf.android.mconfmobile\"\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove outdated comment and related code\"\n\nThis reverts commit 2aba0d62b480657bfbf2571f23b2c309d3e20566.\n"
},
{
"from": "human",
"value": "module ProjectInheritedPolicyHelpers\n def create?\n done_by_owner_or_admin?\n end\n\n def destroy?\n cre... | ruby | chosen |
[
{
"from": "system",
"value": "Add error for failed update request\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def index\n @users = User.all\n end\n\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n if @us... | ruby | chosen |
[
{
"from": "system",
"value": "Set more reasonable defaults for team members in test\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_bot\n\nFactoryBot.define do\n factory :team_member do\n event\n\n after(:build) do |team_member|\n te... | ruby | chosen |
[
{
"from": "human",
"value": "Set content_id for all publisher's artefacts\n\nArtefacts belonging to the publisher application are created in\npanopticon. We are adding `content_ids` to each artefact on creation.\nThis migration adds them wherever they're missing.\n\nUses the atomic `Artefact#set` to prevent... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for other failures when executing bundling command\n"
},
{
"from": "human",
"value": "require 'support/test_case'\nrequire 'jekyll/minibundle/asset_bundle'\n\nmodule Jekyll::Minibundle::Test\n class AssetBundleTest < TestCase\n def test_raise_exception... | ruby | chosen |
[
{
"from": "system",
"value": "Terminate Rabbit current_modality if present before seeding more\n"
},
{
"from": "human",
"value": "module Renalware\n log \"Adding Modalities for Roger RABBIT\" do\n\n rabbit = Patient.find_by(family_name: \"RABBIT\", given_name: \"Roger\")\n file_path = Fil... | ruby | chosen |
[
{
"from": "human",
"value": "Add test to ensure rake script setup correctly\n"
},
{
"from": "gpt",
"value": "require 'rake'\n\ndescribe 'evm_export_import' do\n let(:task_path) {'lib/tasks/evm_export_import'}\n\n describe 'evm:import:alerts', :type => :rake_task do\n it 'depends on the envi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix obsolete reference to RSpec-1 in a test\n"
},
{
"from": "human",
"value": "require File.expand_path(\"#{File.dirname(__FILE__)}/../spec_helper\")\n\ndescribe RR do\n subject { Object.new }\n\n # TODO: Not sure where this goes atm\n describe \"spies\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Sort the files list in the asset copying before comparing.\n"
},
{
"from": "human",
"value": "require 'dimples'\n\ndescribe 'A site' do\n\n subject { @site }\n\n before do\n @site.prepare_site\n end\n\n it \"should find its templates for publishing\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify uuid test to account for nanosecond precision on some platforms\n"
},
{
"from": "human",
"value": "require File.expand_path('spec_helper.rb', File.dirname(__FILE__))\ninclude CassandraCQL\n\ndescribe \"UUID\" do\n it \"should respond_to to_guid\" do\n UUI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix case sensitivy bug on logins\n"
},
{
"from": "human",
"value": "class CreateAccounts < ActiveRecord::Migration\n def self.up\n create_table :accounts do |t|\n t.references :user\n t.string :login, :limit => 40, :null => false\n t.string :... | ruby | chosen |
[
{
"from": "human",
"value": "Test building latest source gem\n"
},
{
"from": "gpt",
"value": "require 'minitest/autorun'\n\nclass TestBuildSourceGem < MiniTest::Test\n def test_build_latest_source_gem\n version = File.read(\"source-versions.txt\").split(\"\\n\").last\n output = `rake vend... | ruby | chosen |
[
{
"from": "system",
"value": "Use ActiveRecord version instead of Rails'\n\n...So this will work in non-Rails apps\n"
},
{
"from": "human",
"value": "# lib/postgresql_cursor/active_record/connection_adapters/postgresql_type_map\nmodule PostgreSQLCursor\n module ActiveRecord\n module Connecti... | ruby | chosen |
[
{
"from": "system",
"value": "Reset the DB before running specs\n"
},
{
"from": "human",
"value": "ENV['RACK_ENV'] = 'test'\nENV['RAILS_ENV'] = 'test'\n\nrequire File.expand_path(\"../dummy/config/environment\", __FILE__)\nrequire 'rspec/rails'\n\nDir[File.expand_path(\"../support/**/*.rb\", __F... | ruby | chosen |
[
{
"from": "system",
"value": "Return empty string rather than nil for path prefix\n"
},
{
"from": "human",
"value": "require \"given_filesystem/spec_helpers\"\n\ninclude GivenFilesystemSpecHelpers\n\ndef setup_test_git_repo(version, dir)\n tarball = \"spec/data/red_herring-#{version}.tar.gz\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set up simplecov (it was in the Gemfile before, but it wasn't actually used)\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'homesick'\nrequire 'rspec'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Set default connection for DatabaseCleaner\n"
},
{
"from": "human",
"value": "RACK_ENV = ENV['RACK_ENV'] || 'test'\n\nif ENV['CODECLIMATE_REPO_TOKEN']\n require 'codeclimate-test-reporter'\n CodeClimate::TestReporter.start\nend\n\n# FIXME: This should go to boot, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec model reloading when using mutant\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'mongoid-embedded-errors'\nrequire 'database_cleaner'\n\ncurrent_path = File.dirname(__FILE__)\nDir[File.join(current_path, 'support/**/*.rb')].each { |f| ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit require of rspec to fix builds\n\nNot sure why this works, or is even possible? But I can reproduce locally that\nall non-1.8 builds fail when using a bundler cache unless this line is removed.\n\nMy guess is that, when using the --path option to bundler, all ge... | ruby | chosen |
[
{
"from": "system",
"value": "Test the local nom script, rather than the system installed one\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib])))\n\nrequire 'nom'\n\nSpec::Runner.configure do |config|\n # == Mock Framework\n #\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for Sequel > 5.1\n"
},
{
"from": "human",
"value": "require \"sequel\"\nrequire \"sequel/string_nilifier\"\n\nclass << Sequel::Model\n attr_writer :db_schema\n alias orig_columns columns\n def columns(*cols)\n return super if cols.empty?\n define_m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix slashes and spacing issue for system call for Run worker thread\n"
},
{
"from": "human",
"value": "module WatirRobotGui\n\n module Worker\n\n class RunButton < javax.swing.SwingWorker\n attr_accessor :status_bar, :test_path\n\n def doInBackground\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add java doc deploy script\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire 'fileutils'\nextend FileUtils\n\nREPO='git@github.com:beyama/winter.git'\nGROUP_ID = 'io.jentz.winter'\nDIR = 'tmp_clone'\n\nrm_rf DIR\n`git clone #{REPO} #{DIR}`\n\ncd DIR\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Increase API connection timeout time\n"
},
{
"from": "human",
"value": "class ApiHelper\n def initialize(email, password)\n raise ArgumentError.new \"Undefined email or password\" if email.nil? || password.nil?\n @email = email\n @password = password\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix how to override failure message\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'rspec'\nrequire 'rspec/its'\nrequire 'specinfra'\nrequire 'serverspec/version'\nrequire 'serverspec/matchers'\nrequire 'serverspec/helper'\nrequire 'serverspec/setup'... | ruby | chosen |
[
{
"from": "system",
"value": "Change how version is detected for Ruby 1.9 compat\n"
},
{
"from": "human",
"value": "require 'rubygems'\ngem 'thrift', '< 0.2.5'\nrequire 'thrift'\nrequire 'thrift_client'\nrequire 'json' unless defined?(JSON)\nrequire 'simple_uuid'\n\nhere = File.expand_path(File.... | ruby | chosen |
[
{
"from": "system",
"value": "Change module path for UT\n"
},
{
"from": "human",
"value": "require_relative './../../../spec_helper'\n\ndescribe 'oneview_test_api1600_c7000::hypervisor_cluster_profile_delete' do\n let(:resource_name) { 'hypervisor_cluster_profile' }\n include_context 'chef con... | ruby | chosen |
[
{
"from": "system",
"value": "Add reek as a development dependency\n"
},
{
"from": "human",
"value": "require 'rake'\n\nGem::Specification.new do |s|\n s.name = 'diversity'\n s.homepage = 'https://github.com/DiversityTemplating/diversity-ruby'\n s.license ... | ruby | chosen |
[
{
"from": "human",
"value": "Add half-baked test for Net::SFTP.start\n"
},
{
"from": "gpt",
"value": "require 'common'\n\nclass StartTest < Net::SFTP::TestCase\n def test_with_block\n ssh = mock('ssh')\n ssh.expects(:close)\n Net::SSH.expects(:start).with('host', 'user', {}).returns(ss... | ruby | chosen |
[
{
"from": "system",
"value": "Apply 3ds rename to checkout transaction\n"
},
{
"from": "human",
"value": "module Ravelin\n # Represents a transaction as used in the checkout endpoint.\n # As such it can have all the fields of a regular Transaction but only requires the fields of PreTransaction... | ruby | chosen |
[
{
"from": "system",
"value": "Make sample data zone read from the environment variable CHECKOUT_ZONE\n"
},
{
"from": "human",
"value": "module Addressing\n private\n\n def address(string)\n state = country.states.first\n parts = string.split(\", \")\n Spree::Address.new(\n addres... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Hem bundler self reference\n\nThe use of Bundler is having trouble requiring multiple separate definitions\n"
},
{
"from": "human",
"value": "require 'bundler'\nrequire_relative 'version'\nrequire_relative 'plugins'\n\nHem::Plugins.new(__dir__, '.noGemfile', ... | ruby | chosen |
[
{
"from": "system",
"value": "Add React as a dependency on the PodFile\n"
},
{
"from": "human",
"value": "require 'json'\npkg = JSON.parse(File.read(\"package.json\"))\n\nPod::Spec.new do |s|\n s.name = pkg[\"name\"]\n s.version = pkg[\"version\"]\n s.summary = pkg[\"descrip... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Util module to work on Windows\n"
},
{
"from": "human",
"value": "module Opal\n module Util\n extend self\n\n # Used for uglifying source to minify\n def uglify(str)\n IO.popen('uglifyjs 2> /dev/null', 'r+') do |i|\n i.puts str\n i.c... | ruby | chosen |
[
{
"from": "system",
"value": "Implement root redirect and favicon path base case\n"
},
{
"from": "human",
"value": "require \"simplemvc/version\"\n\nmodule Simplemvc\n class Application\n def call(env)\n # env[\"PATH_INFO\"] = \"/pages/about\" => \"PagesController.send(:about)\"\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for Generic Button with Disable\n"
},
{
"from": "gpt",
"value": "describe ApplicationHelper::Button::GenericFeatureButtonWithDisable do\n [:start].each do |feature|\n describe '#skip?' do\n context \"when vm supports feature #{feature}\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[Executable] Indent warning if command fails.\n"
},
{
"from": "human",
"value": "require 'open4'\n\nmodule Pod\n module Executable\n class Indenter < ::Array\n attr_accessor :indent\n attr_accessor :io\n\n def initialize(io = nil, indent = ' ')\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor 'Category tree nodes should match category relationships' test\n\nSubstitue assert with assert_equal and remove message\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass CategoryTest < ActiveSupport::TestCase\n setup do\n @category = cat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary private access modifier\n"
},
{
"from": "human",
"value": "module Swow\n module Error\n class RessourceNotFound < ::Faraday::ResourceNotFound\n\n def self.raise_ressource_not_found(response)\n if nok?(response)\n case resp... | ruby | chosen |
[
{
"from": "system",
"value": "Use the action_controller hook for overriding the referer method because there is no action_dispatch hook\n"
},
{
"from": "human",
"value": "require 'turbolinks/version'\nrequire 'turbolinks/xhr_headers'\nrequire 'turbolinks/xhr_url_for'\nrequire 'turbolinks/cookies... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.27.0.1 to 0.28.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.27.0.1'\n s.summary = 'Common primitives for platform-specific messaging... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependencies to gemsepc\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'metamodel/version'\nrequire 'date'\n\nGem::Specification.new d... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.