conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add global error handler for unexpected exceptions\n"
},
{
"from": "human",
"value": "module API\n module V1\n # Default options for all API endpoints and versions\n module Defaults\n extend ActiveSupport::Concern\n\n included do\n # Common G... | ruby | chosen |
[
{
"from": "system",
"value": "Add vcr as a development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire File.expand_path('../lib/striped/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'striped'\n gem.version = Striped::VERSION\n gem.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove an example, It is needless\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Space2underscore do\n it 'should be Successful execution' do\n expect(Space2underscore.convert(['fuga hoge foo'])).to include('_') # String case\n expect(Sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing newline to EOF.\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(true).load do\n after \"deploy:finalize_update\", \"airbrake:symlink\"\n \n namespace :airbrake do\n desc \"Sets the symlink to shared/config/initializers/airbrak... | ruby | chosen |
[
{
"from": "system",
"value": "Support updating from multiple repositories."
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n\nrequire 'optparse'\nrequire 'sqlite3'\nrequire 'apt'\n\noptions = {\n\t:config => 'testrepo.txt',\n\t:database => 'test.db'\n}\n\nOptionParser.new do |opts|\n\topts.bann... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rails 2 initialization block\n"
},
{
"from": "human",
"value": "require \"instana/rack\"\n\nif defined?(::Rails)\n # In Rails, let's use the Rails logger\n ::Instana.logger = ::Rails.logger if ::Rails.logger\n\n if ::Rails::VERSION::MAJOR < 3\n ::Rails.con... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade Ruby version requirement to >= 2.0.0\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'thailang4r'\n s.version = '0.1.0'\n s.authors = ['Vee Satayamas']\n s.email = ['5ssgdxltv@relay.firefox.com']\n s.description = \"Thai la... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude hidden field from check_box\n"
},
{
"from": "human",
"value": "require 'bootstrap_form'\n\nmodule BootstrapValidatorRails\n class FormBuilder < BootstrapForm::FormBuilder\n def initialize(object_name, object, template, options)\n @attributes = Boots... | ruby | chosen |
[
{
"from": "system",
"value": "[JT][111704448] Add ie_safe_checkbox_click to webdriver monkey patch\n"
},
{
"from": "human",
"value": "require 'selenium-webdriver'\n\nmodule Selenium\n module WebDriver\n\n ##\n # Monkey Patch to add ie_safe_click method to webdriver\n #\n class Eleme... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to wait for socket to be readable.\n\ngit-svn-id: ab86ecd26fe50a6a239cacb71380e346f71cee7d@67004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe 'Socket.udp_server_recv' do\n before do\... | ruby | chosen |
[
{
"from": "system",
"value": "Add mkdir command to imdb\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ImdbTags < Formula\n homepage \"http://imdb-tags.dillonhafer.com\"\n url \"https://github.com/dillonhafer/imdb-tags/archive/v0.4.0.tar.gz\"\n sha1 \"f9ce04ffd39758ef4b4b0209b4... | ruby | chosen |
[
{
"from": "system",
"value": "Fix model references in product factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n sequence(:product_sequence) { |n| \"Product ##{n} - #{rand(9999)}\" }\n\n factory :product, :class => Spree::Product do\n name { Factory.next :product_sequence }\... | ruby | chosen |
[
{
"from": "system",
"value": "Add json dependency to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/nacre/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Damon Allen Davison\"]\n gem.email = [\"damo... | ruby | chosen |
[
{
"from": "system",
"value": "Use doc formatter for rspec, when rspec is run with one file\n"
},
{
"from": "human",
"value": "require \"simplecov\"\nrequire \"simplecov-json\"\nSimpleCov.start \"rails\" do\n add_group \"Services\", \"app/services\"\nend\nSimpleCov.formatter = SimpleCov::Formatt... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for user models\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UserTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass User... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"fileutils\" instead of \"ftools\"\n"
},
{
"from": "human",
"value": "# delete RMagick documentation created by post-setup.rb\n# doc/*.rb.html\n# doc/ex/* (!rb)\n# Bug #246: Don't use chdir!\nrequire 'ftools'\n\ntargets = Dir['doc/*.rb.html']\nFile.safe_unlink(... | ruby | chosen |
[
{
"from": "system",
"value": "Remove some unnecessary stuff 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 'recurly_event/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade test-unit version to \"~> 3.2.1\"\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"color-sche... | ruby | chosen |
[
{
"from": "system",
"value": "Remove suffix in preparation for release\n\ngit-svn-id: d8f3215415546ce936cf3b822120ca56e5ebeaa0@1456386 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor licen... | ruby | chosen |
[
{
"from": "system",
"value": "Add url parameter to parse_feed method\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'rss'\nrequire 'time'\n\nmodule EndiFeed\n # This module contains various useful functions.\n module Util\n def self.included(base)\n base.extend self\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Handle unsupported response headers method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n# Proxy Rb\nmodule ProxyRb\n # Setup proxy rb\n class Setup\n private\n\n attr_reader :runtime\n\n public\n\n def initialize(runtime)\n @r... | ruby | chosen |
[
{
"from": "system",
"value": "Replace STDIN with and use an instance variable to provide for switchable IO.\n"
},
{
"from": "human",
"value": "require 'remedy/console_resized'\n\nmodule Remedy\n module Console\n require 'io/console'\n\n TIOCGWINSZ = 0x40087468\n\n module_function\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the output matcher in PP.pp to avoid touching $stdout directly\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'pp'\n\ndescribe \"PP.pp\" do\n before :each do\n @original_stdout = $stdout\n end\n\n aft... | ruby | chosen |
[
{
"from": "system",
"value": "Add checks for draft and live content items\n"
},
{
"from": "human",
"value": "class Document < ApplicationRecord\n has_many :content_items\n\n validates :content_id, presence: true, uuid: true\n\n validates :locale, inclusion: {\n in: I18n.available_locales.m... | ruby | chosen |
[
{
"from": "human",
"value": "Include exercises table just in case we're not linking the site to a student-checklist web app."
},
{
"from": "gpt",
"value": "class EmptyExercises < ActiveRecord::Migration\n def up\n create_table :exercises do |t|\n t.string :task_id\n t.text :yaml\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add required summary to gemspec"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'scraper_tools/version'\n \nGem::Specification.new do |s|\n s.name = \"scraper_tools\"\n s.versio... | ruby | chosen |
[
{
"from": "system",
"value": "Write a test to make sure that the last child of an\nExpansionBlock knows its an arg if the ExpansionBlock\nis expected to return."
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire_relative '../../lib/tritium/parser/macro_expander'\n\nclass MacroT... | ruby | chosen |
[
{
"from": "system",
"value": "Remove write test from html writer\n"
},
{
"from": "human",
"value": "# html 2.0 writer tests - document\n\n# History:\n# Stan Smith 2017-03-22 original script\n\nrequire 'minitest/autorun'\nrequire 'json'\nrequire 'adiwg-mdtranslator'\n\nclass TestHtmlDocument < ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename test case name for ChartDoneRatio\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass ChartTimeEntryTest < ActiveSupport::TestCase\n\n def test_aggregation\n aggregation = ChartDoneRatio.get_aggregation_for_issue... | ruby | chosen |
[
{
"from": "system",
"value": "Add required Ruby version to gemspec\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/fakeetc/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Sebastian Boehm']\n gem.email = ['sebastian@sometimesfood.org']\... | ruby | chosen |
[
{
"from": "system",
"value": "Use of custom objects is not necessary here\n"
},
{
"from": "human",
"value": "lib = \"faraday\"\nlib_file = File.expand_path(\"../lib/#{lib}.rb\", __FILE__)\nFile.read(lib_file) =~ /\\bVERSION\\s*=\\s*[\"'](.+?)[\"']/\nversion = $1\n\nGem::Specification.new do |spe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove br-tun check from beaker\n\nCurrently this check is flapping because the ovs agent is hitting\ntimeouts when trying to get a response from the neutron-server. This is\nlikely because we start all the services at the same time and if\nneutron-server takes too long to star... | ruby | chosen |
[
{
"from": "human",
"value": "Add wall_of_fame action test to bump coverage\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature 'when visiting the coaches page' do\n let!(:coach) { Fabricate(:coach_session_invitation, attended: true).member }\n\n scenario 'I can see the most activ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove vcr tag from stubbed test in downloads spec\n"
},
{
"from": "human",
"value": "require 'helper'\n\ndescribe Octokit::Client::Downloads do\n\n before do\n Octokit.reset!\n @client = oauth_client\n end\n\n describe \".downloads\", :vcr do\n it \"lis... | ruby | chosen |
[
{
"from": "system",
"value": "Update contact email in Gemspec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = \"jekyll-theme-tactile\"\n s.version = \"0.0.1\"\n s.authors = [\"Jason Long\"]\n s.email = [\"support@g... | ruby | chosen |
[
{
"from": "human",
"value": "Add a separate set of test cases for the cache_fetch_includes traversal\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass CacheFetchIncludesTest < IdentityCache::TestCase\n def setup\n super\n end\n\n def test_cached_embedded_has_manys_are_inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct comment character\n"
},
{
"from": "human",
"value": "\nrequire 'rbcoremidi.bundle'\n\nmodule CoreMIDI\n\n def sources\n API.sources\n end\n \n def number_of_sources\n API.get_num_sources\n end\n \n def create_input_port(client_name, port... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor auth check and add user list\n"
},
{
"from": "human",
"value": "require 'tilt/erubis'\nrequire 'sinatra'\nrequire 'haml'\n\n\nrequire './repository/Posts.rb'\nrequire './repository/Info.rb'\nrequire './repository/Api.rb'\n\nrequire \"dm-core\"\nrequire \"dm... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken password reset controller tests\n\nUntil recently, this code was never actually running. It appears\nthat wiring it up broke some functionality.\n\nFurther to that, the duplicated Devise code didn't match. I\ndecided to avoid copying code entirely, and instead use a ... | ruby | chosen |
[
{
"from": "system",
"value": "Drop fileicon decorator from MiqRequestDecorator\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1514620\n"
},
{
"from": "human",
"value": "class MiqRequestDecorator < MiqDecorator\n def fonticon\n case request_status.to_s.downcase\n when \"ok\"\n \"pfico... | ruby | chosen |
[
{
"from": "system",
"value": "Add CompCert 3.2.0 to the black-list for flaky Makefile\n"
},
{
"from": "human",
"value": "# A list of packages with errors which we chose to ignore (for now). It\n# contains an exact package name together with a string which should be\n# included in the error messa... | ruby | chosen |
[
{
"from": "system",
"value": "Use new helper methods for getting fields\n"
},
{
"from": "human",
"value": "name :bmi\r\n\r\nexecute do\r\n\traise FieldError.new(\"weight\", \"weight must be a number\") if !field_weight.is_float?\r\n\traise FieldError.new(\"height\", \"height must be a number\") ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix new dependencies and Migrations\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"catarse_stripe/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage url to 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 'fastlane/plugin/github_status/version'\n\nGem::Specification.new do |spec|... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from 0.0.2.0 to 0.0.3.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'clock'\n s.summary = 'Clock interface with support for dependency configuration for real and null object ... | ruby | chosen |
[
{
"from": "system",
"value": "Update package name for 2.1.x\n"
},
{
"from": "human",
"value": "\ndefault['cassandra']['package_name'] = 'dsc20'\ndefault['cassandra']['release'] = '1'\n\ndefault['cassandra']['yum']['repo'] = 'datastax'\ndefault['cassandra']['yum']['description'] = 'DataSta... | ruby | chosen |
[
{
"from": "system",
"value": "Correct the \"version tag\" in the podspec. Also waiting for the pod people to let me claim this software.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'ios-ntp'\n s.version = '1.0.0'\n s.summary = 'SNTP implementation for... | ruby | chosen |
[
{
"from": "system",
"value": "Add uniqueness expectation to RedditApi::Comments\n\nRedditApi::Comments#most_recent_comments\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe RedditApi::Comments do\n\n describe \"#most_recent_subreddits\" do\n it \"returns the names of n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add routine check for nested cmaps subids\n"
},
{
"from": "gpt",
"value": "\n#\n# specifying flor\n#\n# Mon Jan 9 07:54:05 JST 2017\n#\n\nrequire 'spec_helper'\n\n\ndescribe 'Flor unit' do\n\n before :each do\n\n @unit = Flor::Unit.new('envs/test/etc/conf.json')... | ruby | chosen |
[
{
"from": "system",
"value": "Update Balsamiq Mockups to 3.1.6.\n"
},
{
"from": "human",
"value": "cask :v1 => 'balsamiq-mockups' do\n version '3.1.5'\n sha256 '738c986bc3d43d6a9cd0bbef9e8bd50edf5b5e7b865ff72c8fa9fe9048c662d8'\n\n # amazonaws is the official download host per the vendor homep... | ruby | chosen |
[
{
"from": "human",
"value": "Add sample script to build OPDS catalog from EPUB files\n"
},
{
"from": "gpt",
"value": "# This is an example that aggregates info from EPUB files and build OPDS catalog feed using them\n# \n# Usage:\n# ruby examples/build-catalog-from-epub.rb EPUBFILE\n# ruby ex... | ruby | chosen |
[
{
"from": "system",
"value": "Update Thunderbird Beta to 32.0b1\n"
},
{
"from": "human",
"value": "class ThunderbirdBeta < Cask\n version '31.0b3'\n sha256 '82cf13b42f72a660920cfd025220d2ce9ddfb56327b01721b4b02e065752061d'\n\n url 'https://download-installer.cdn.mozilla.net/pub/thunderbird/re... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the .gemspec to be used by Bundler. Shelling out to git presumes that you're generating a gem from the current directory.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire 'rubygems' unless defined? Gem\nrequire File.dirname(__FILE__) + \"/... | ruby | chosen |
[
{
"from": "system",
"value": "Include content_type and disposition in CachedData upload service\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoData\n class CachedData\n CACHED_DATA_BASE_PATH = \"gobierto_data/cache/\"\n\n attr_reader :resource, :resourc... | ruby | chosen |
[
{
"from": "system",
"value": "Update events sample seeds for RABBIT\n"
},
{
"from": "human",
"value": "module Renalware\n log \"Adding Events for Roger RABBIT\" do\n\n rabbit = Patient.find_by(family_name: \"RABBIT\", given_name: \"Roger\")\n\n Events::Event.find_or_create_by!(\n pat... | ruby | chosen |
[
{
"from": "system",
"value": "Use meeting_url instead of path\n"
},
{
"from": "human",
"value": "class MeetingInvitationMailer < ActionMailer::Base\n include EmailHeaderHelper\n include ApplicationHelper\n\n helper ApplicationHelper\n\n def attending meeting, member, invitation\n @member ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix vars loading issue during plugin initialization\n"
},
{
"from": "human",
"value": "module Capistrano\n class Puma::Nginx < Capistrano::Plugin\n include PumaCommon\n def set_defaults\n # Nginx and puma configuration\n set_if_empty :nginx_config_n... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to extract tags from descriptions\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\nrequire 'contracts'\nrequire_relative 'service'\n\nmodule Cloudstrap\n module Amazon\n class ELB < Service\n include ::Contracts::Core\n include ::Contra... | ruby | chosen |
[
{
"from": "system",
"value": "Fix NPE if user does not exist in discourse instance\n"
},
{
"from": "human",
"value": "class DiscourseSignOutWorker < DiscourseWorker\n include Sidekiq::Worker\n\n def perform(user_id)\n for_each_tenant(user_id) do |u,t|\n client(t) do |c|\n discou... | ruby | chosen |
[
{
"from": "system",
"value": "Undo behavior change on specs.\n\nSee\nhttps://github.com/doorkeeper-gem/doorkeeper/pull/448/files#diff-403546b64759d2fcb933e8345a827403L2.\n"
},
{
"from": "human",
"value": "class SemiProtectedResourcesController < ApplicationController\n before_filter :doorkeeper... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak some assignments in the initialize.\n"
},
{
"from": "human",
"value": "require 'nest_thermostat'\n\nrequire 'nest_wrapper/version'\nrequire 'nest_wrapper/device'\nrequire 'nest_wrapper/state'\n\nmodule NestWrapper\n \n class << self\n attr_accessor :nest,... | ruby | chosen |
[
{
"from": "system",
"value": "Create file hashes on forced execution aswell. This way the next unforced run can take advantage of the hashes.\n"
},
{
"from": "human",
"value": "module Rubbr\n\n # Checks if source files have changed since last time they was accessed by\n # computing and storing... | ruby | chosen |
[
{
"from": "system",
"value": "Use pound for channel names\n"
},
{
"from": "human",
"value": "require \"slack-notify/version\"\nrequire \"slack-notify/error\"\n\nrequire \"json\"\nrequire \"faraday\"\n\nmodule SlackNotify\n class Client\n def initialize(subdomain, token, options={})\n @s... | ruby | chosen |
[
{
"from": "human",
"value": "Add example test runner rake command\n\nEncourage testing via providing a default spec running command\n"
},
{
"from": "gpt",
"value": "require 'rspec-puppet'\n\ndesc \"Run any defined tests\"\nRSpec::Core::RakeTask.new(:spec) do |t|\n t.pattern = 'spec/*.rb'\n t.r... | ruby | chosen |
[
{
"from": "system",
"value": "Return `self` instead of using `tap` for clarity\n"
},
{
"from": "human",
"value": "require_relative 'diff'\nrequire_relative 'diff_collection'\n\nmodule SubDiff\n class DiffBuilder\n def initialize(default)\n @default = default\n @diffs = []\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor without_proxy so it returns the result of the block.\n"
},
{
"from": "human",
"value": "require \"sunspot/queue/session_proxy\"\n\nmodule Sunspot::Queue\n module Helpers\n def without_proxy\n # Pop off the queueing proxy for the block if it's in pl... | ruby | chosen |
[
{
"from": "system",
"value": "Use a convention to allow multiple hosts on a ENV url.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nmodule Tiki\n module Torch\n class Connection\n\n include Logging\n include Celluloid\n\n attr_reader :connection, :connection_a... | ruby | chosen |
[
{
"from": "system",
"value": "Change to aggregate boolean expression\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Unparser\n class Emitter\n # Arguments emitter\n class Args < self\n def emit_block_arguments\n delimited(normal_arguments)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Butler class & dummy method list\n"
},
{
"from": "human",
"value": "RSpec.describe \"Butler\" do\n describe '#list' do\n it 'returns a list of available commands' do\n expect(Butler.new.list).to eq ['command1', 'command2', 'command3']\n end\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Stop error when param not supplied\n\nFixes https://rollbar.com/cyclestreets/cyclescape/items/132/\n"
},
{
"from": "human",
"value": "class Users::RegistrationsController < Devise::RegistrationsController\n\n def create\n if params[:bicycle_wheels].strip == '12'... | ruby | chosen |
[
{
"from": "system",
"value": "Drop specifying log level for unit tests\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nRSpec.configure do |config|\n config.formatter = :documentation\n config.color = true\n config.platform = 'ubuntu'\n config.versi... | ruby | chosen |
[
{
"from": "system",
"value": "Reset configuration after tests so we can use a real configuration for testing\n"
},
{
"from": "human",
"value": "begin\n require 'simplecov'\n SimpleCov.start do\n add_filter \"spec/\"\n end\nrescue LoadError\n puts \"Skipping SimpleCov\"\nend\n\nrequire Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add monkeypatch for full implicit coverage\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::... | ruby | chosen |
[
{
"from": "system",
"value": "Add converse to the load path\n"
},
{
"from": "human",
"value": "require \"rspec\"\nrequire \"converse\"\n\nRSpec.configure do |config|\n config.expect_with :rspec do |expectations|\n expectations.include_chain_clauses_in_custom_matcher_descriptions = true\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Remove needless inclusion of \"ruby-debug\".\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"spec\"\nrequire \"rr\"\nrequire \"ruby-debug\"\n\nproject_root = File.expand_path(\"#{__FILE__}/../..\")\n$LOAD_PATH << \"#{project_root}/lib\"\n$LOAD_PAT... | ruby | chosen |
[
{
"from": "system",
"value": "Add back encoding comment in for JRuby\n"
},
{
"from": "human",
"value": "if ENV['COV']\n require 'simplecov'\n SimpleCov.start\nend\n\nrequire 'bundler/setup'\nrequire 'babosa'\n\nshared_examples_for \"a latin transliterator\" do\n let(:t) { described_class.inst... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec configuration. Set mongoid log level to debug in order to\nprevent poluting RSpec's output\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), \"lib\"))\nMODELS = File.join(... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete tweak for JRuby\n\nWe are not testing against JRuby anymore\n"
},
{
"from": "human",
"value": "begin\n require \"coveralls\"\n Coveralls.wear!\nrescue LoadError\nend\n\nRSpec.configure do |config|\n config.run_all_when_everything_filtered = true\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test suite for Paperclip 5.1\n\nEnsure Active Support `delegate`, which is used by paperclip, is\npresent.\n"
},
{
"from": "human",
"value": "require 'rspec'\n\nPROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze\n$LOAD_PATH << File.j... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to override Testing values w/ environment variables.\n"
},
{
"from": "human",
"value": "require 'coveralls'\nCoveralls.wear!\n\nrequire_relative 'togglv8_spec_helper'\nrequire_relative '../lib/togglv8'\n\n# See http://rubydoc.info/gems/rspec-core/RSpec/C... | ruby | chosen |
[
{
"from": "system",
"value": "Use curly braces for cassette filter to please URI parser\n"
},
{
"from": "human",
"value": "require 'vcr'\n\nVCR.configure do |c|\n c.cassette_library_dir = 'spec/fixtures/vcr'\n c.hook_into :webmock\n c.default_cassette_options = { serialize_with: :json, record... | ruby | chosen |
[
{
"from": "system",
"value": "Remove before expense, find user\n"
},
{
"from": "human",
"value": "class ExpensesheetsController < ApplicationController\n before_action :find_user, only: [:new, :create, :show, :edit, :update]\n\n def new\n @expenses = Expense.new\n end\n\n def show\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clear session on each test\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# For debugging in development\nCapybara.register_driver :chrome do |app|\n Capybara::Selenium::Driver.new(app, browser: :chrome)\nend\n\nCapybara.register_driver :headle... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken unit tests in Ruby < 2.0.\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'minitest/autorun'\nrequire \"mocha/mini_test\"\nrequire 'securerandom'\nrequire 'twine'\nrequire 'twine_file_dsl'\n\nclass TwineTestCase < Minitest::Test\n include Twine... | ruby | chosen |
[
{
"from": "system",
"value": "Test was not in sync with latest changes to prevent duplicate import.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'import/factory_examples'\n\nRSpec.describe Import::Zendesk::Ticket::Comment::AttachmentFactory do\n it_behaves_like 'Import::Fa... | ruby | chosen |
[
{
"from": "system",
"value": "Set an upper limit on the coveralls version in the gemspec\n\ncoveralls 0.8.8 have the dependency tins ~> 1.6.0, and tins 1.7.0\nrequired Ruby version >= 2.0. Fixes #127.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Set authorship to FlavourSys Technology.\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sampling-hash/version'\n\nGem::Specification.new do |gem|\n gem.name =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec of returned result from job\n\nThe jobs returned result is not important\nand prevents adding logging for job completion.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe StatsReportGenerationJob, type: :job do\n describe '#pe... | ruby | chosen |
[
{
"from": "system",
"value": "Use shallow routes in specs\n\nVerify that shallow routes do, in fact, work by adding specs.\n\nCloses #1\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nrequire 'action_dispatch'\nrequire 'strong_routes/rails/route_mapper'\n\ndescribe ::StrongRoutes::Ra... | ruby | chosen |
[
{
"from": "system",
"value": "Use Gem::Requirement for checking versions\n"
},
{
"from": "human",
"value": "minitest_version = ::MiniTest::Unit::VERSION.split(/\\./)\nif minitest_version[0].to_i >= 5 && (minitest_version[1].to_i > 0 || minitest_version[2].to_i >= 4)\n require 'guard/minitest/re... | ruby | chosen |
[
{
"from": "system",
"value": "Add item property to ContractPriceV2\n"
},
{
"from": "human",
"value": "class Podio::ContractPriceV2 < ActivePodio::Base\n\n has_one :employee, :class => 'ContractPriceItemV2'\n has_one :external, :class => 'ContractPriceItemV2'\n\n def total\n self.employee.s... | ruby | chosen |
[
{
"from": "system",
"value": "Add TODO comment to remove .next enumeration\n"
},
{
"from": "human",
"value": "require_relative 'null_processor'\n\nmodule Processor\n module Data\n class BatchProcessor < NullProcessor\n def initialize(batch_size = 10)\n @batch_size = batch_size\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Define Kogo::Genre class inheriting BaseGenre\n"
},
{
"from": "human",
"value": "require 'rakuten_web_service/resource'\n\nmodule RakutenWebService\n module Kobo\n class Genre < RakutenWebService::Resource\n endpoint 'https://app.rakuten.co.jp/services/api/... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Allow users to unsubscribe to digests while not logged in if\n`login_required` is set to true.\n"
},
{
"from": "human",
"value": "class EmailController < ApplicationController\n skip_before_filter :check_xhr\n layout 'no_js'\n\n before_filter :ensure_logged_... | ruby | chosen |
[
{
"from": "system",
"value": "Set cookie['editing'] to false after mercury update.\n"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n layout :layout_with_mercury\n helper_method :is_editing?\n\n def show\n params[:slug] ||= '/'\n @page = Page.where(\"slug... | ruby | chosen |
[
{
"from": "system",
"value": "Add security level to the user controller\n\nCreate require_user_owner method to verify who is the current user (if exists in session) and verify too if they can edit the account "
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missed change from UsersController\n"
},
{
"from": "human",
"value": "require_relative 'application_controller'\n\nclass UsersController < ApplicationController\n get '/login' do\n if !logged_in?\n erb :'/users/login'\n else\n redirect to \"/\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop warning in LoadBalancerHelper\n"
},
{
"from": "human",
"value": "module LoadBalancerHelper\n include_concern 'TextualSummary'\n\n # Display a protocol and port_range as a string suitable for rendering (e.g.\n # \"TCP:1000-1010\").\n #\n # @param p... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration file for schools to add additional fields for new data\n"
},
{
"from": "human",
"value": "class CreateSchools < ActiveRecord::Migration\n def change\n create_table :schools do |t|\n t.string :dbn\n t.string :school\n t.integer :to... | ruby | chosen |
[
{
"from": "human",
"value": "Add the spec for the google analytics helper\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\ninclude Nanoc::Toolbox::Helpers::GoogleAnalytics\n\ndescribe Nanoc::Toolbox::Helpers::GoogleAnalytics do\n subject { Nanoc::Toolbox::Helpers::GoogleAnalytics }\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.