conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add precautionary conversion in config handling\n"
},
{
"from": "human",
"value": "require 'rack'\n\nmodule SecondMate\n\n class ResponseNotFound < Exception\n end\n\n @config = {\n :matcher_pattern => '_*_'\n }\n\n def self.method_missing(m, *attrs)\n # E... | ruby | chosen |
[
{
"from": "system",
"value": "Stop multiple copies of a single receipt\n"
},
{
"from": "human",
"value": "namespace :app do\n desc \"Load database from csv file\"\n task :load => :environment do\n CsvReader.load_csv(\"data/Kat Szum sales summary.csv\") do |hash|\n receipt = Receipt.fin... | ruby | chosen |
[
{
"from": "system",
"value": "Support other ways of writing TODO messages\n\nAdds:\n* TODO - blah blah blah\n* [todo] blah blah blah\n\nAlso pulled the regex out into a class-level global and used it for\nboth the match and sub. Should also be easier to test it now.\n"
},
{
"from": "human",
"val... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to prepare releasing\n\nThis task updated Changelog, version.rb, and Gemfile.lock.\n"
},
{
"from": "gpt",
"value": "namespace :release do\n desc \"Add header of now version release to Changelog and bump up version\"\n task :prepare do\n raise \"Use this... | ruby | chosen |
[
{
"from": "system",
"value": "Add query-string params to redirect.\n"
},
{
"from": "human",
"value": "require \"stringio\"\nrequire Pathname(__FILE__).dirname + \"view\"\n\nclass Response < StringIO\n\n attr_accessor :status, :content_type, :headers\n\n def initialize(request)\n @request = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Paul to the \"authors\" stanza in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"license_finder\"\n s.version = \"0.5.0\"\n s.authors = [\"Jacob Maine\", \"Matthew Kane Parker\", \"Ian Lesperance\", \"Davi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mime-types deve dependency 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 'rainbow/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add test demonstrating bug fixed in 90a0f8\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass RecordTest < Minitest::Test\n def setup\n @record = PeoplesoftModels::Record.new(recname: \"BLAH\")\n end\n\n def test_blank_table_name\n @record.st... | ruby | chosen |
[
{
"from": "system",
"value": "Remove fixtures from testing environment\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclass ActiveSupport::TestCase\n # Setup all fixtures in test/fixtur... | ruby | chosen |
[
{
"from": "system",
"value": "Add query-counting helper code from Rails"
},
{
"from": "human",
"value": "TEST_ROOT = File.dirname(__FILE__)\n$: << 'lib'\n\nrequire 'test/unit'\nrequire 'yaml'\nrequire 'rubygems'\nrequire 'active_record'\n\nrequire 'ruby-debug'\n\nActiveRecord::Base.configuration... | ruby | chosen |
[
{
"from": "human",
"value": "Copy over deploy script for now"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire 'aws-sdk'\nAWS.config access_key_id: ENV['S3_ACCESS_ID'], secret_access_key: ENV['S3_SECRET_KEY']\ns3 = AWS::S3.new\nbucket = s3.buckets['zooniverse-demo']\n\nbuild = <<-BAS... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to newest release\n\nUpdates podspec to newest release, and also fixes which tag it looks for in source."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name\t\t\t\t\t\t= \"Marshal\"\n s.version\t\t\t\t\t\t= \"1.2.1\"\n s.summary\t\t\t\t\... | ruby | chosen |
[
{
"from": "system",
"value": "Handle when piece doesn't exist yet\n"
},
{
"from": "human",
"value": "require 'everything/blog/site/page'\nrequire 'everything/blog/site/index'\nrequire 'everything/blog/site/media'\nrequire 'Everything/blog/site/css'\n\nmodule Everything\n class Blog\n class S... | ruby | chosen |
[
{
"from": "system",
"value": "Use super instead of setup_ivars for Rake task\n"
},
{
"from": "human",
"value": "require 'generative'\nrequire 'rspec/core/rake_task'\n\nmodule Generative\n class RakeTask < RSpec::Core::RakeTask\n def initialize(*args, &task_block)\n setup_ivars(args)\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove logging stuff from the JIRAService class\n\nThere is a logger ivar already in the Handsoap::Service class that will be used later on.\n"
},
{
"from": "human",
"value": "module JIRA\nclass JIRAService < Handsoap::Service\n include RemoteAPI\n\n attr_reader ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Array bounds values specific to Rubinius.\n"
},
{
"from": "human",
"value": "module ArraySpecs\n def self.max_32bit_size\n 2**32/4\n end\n\n def self.max_64bit_size\n 2**64/8\n end\n\n def self.frozen_array\n @frozen_array ||= [1,2,3]\n @frozen_... | ruby | chosen |
[
{
"from": "system",
"value": "Use command code to load current ext\n"
},
{
"from": "human",
"value": "require 'jasmine-core'\n\nmodule Lanes\n module API\n\n class TestSpecs\n cattr_accessor :current\n\n def initialize(root)\n @root = root\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the caching JSON reader\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nmodule Locations\n class Repository\n def initialize(geo_json_path_or_url = Locations.geo_json_path_or_url)\n json = open(geo_json_path_or_url).read\n features = RGeo:... | ruby | chosen |
[
{
"from": "system",
"value": "Introduce base classes for exceptions"
},
{
"from": "human",
"value": "module Roqua\n module Healthy\n class UnknownFailure < StandardError; end\n class IllegalMirthResponse < StandardError; end\n class PatientIdNotInRemote < StandardError; end\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself to the authors\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"with_model/version\"\n\nGem::Specification.new do |s|\n s.name = \"with_model\"\n s.version = WithModel::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Update for default return path of logger\n"
},
{
"from": "human",
"value": "require \"sprockets-derailleur/version\"\nrequire \"sprockets-derailleur/manifest\"\nrequire 'logging'\n\nmodule SpeedUp\n def self.logger\n SpeedUp.get_logger\n end\n\n def self.get_l... | ruby | chosen |
[
{
"from": "system",
"value": "[Gemspec] Reduce required bundler version for Travis\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version_kit/gem_metadata'\n\nGem::Specification.new... | ruby | chosen |
[
{
"from": "system",
"value": "Update the gravitar helper to properly call the avatar hash\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def title\n base_title = \"Prism\"\n if @title.nil?\n base_title\n else\n \"#{base_title} | #{@title}\"\n end\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add `warning` as acceptable flash key for alerts\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def compose_title(title)\n (title ? \"#{title} | \" : '') + 'DocumentCloud'\n end\n\n def compose_canonical_url(canonical_url)\n canonical_url |... | ruby | chosen |
[
{
"from": "system",
"value": "Remove project cache before project.destroy\n"
},
{
"from": "human",
"value": "class ProjectObserver < BaseObserver\n def after_create(project)\n unless project.forked?\n GitlabShellWorker.perform_async(\n :add_repository,\n project.path_w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ellen version to 0.2.0 or higher\n"
},
{
"from": "human",
"value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"ellen/slack/version\"\n\nGem::Specification.new do |spec|\n spec.name =... | ruby | chosen |
[
{
"from": "human",
"value": "Add recipe for installing igbinary module\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n#\n# Author:: Joshua Timberman (<joshua@opscode.com>)\n# Author:: Seth Chisamore (<schisamo@opscode.com>)\n# Author:: TranceLove (airwave209gt@gmail.com)\n# Cookbook Name... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for 2.13.3.rc1 release\n"
},
{
"from": "human",
"value": "require 'date'\nGem::Specification.new do |s|\n s.name = %q{rmagick}\n s.version = \"2.13.2\"\n s.date = Date.today.to_s\n s.summary = %q{Ruby binding to ImageMagick}\n s.description = %q{... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependence on Action model from migration\n"
},
{
"from": "human",
"value": "class DropInvalidActions < ActiveRecord::Migration\n def up\n Action.where(card:nil).each(&:destroy)\n Action.where(game:nil).each(&:destroy)\n Action.where(player:nil).eac... | ruby | chosen |
[
{
"from": "human",
"value": "Complete 4.2.2 - Simple String Methods\n"
},
{
"from": "gpt",
"value": "# Solution Below\n\nold_string = 'Ruby is cool'\nnew_string = old_string.reverse.upcase\n\n\n# RSpec Tests. They are included in this file because the local variables you are creating are not acc... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Use sshkit rather than specinfra...\"\n\nThis reverts commit 807af31e9f3a1425c09b3226d464ffbfe09a23d0.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 0.9.0 breaking YARD change\n\n>= 0.9.0 in YARD version changes the DOM structure of the templates\n which broke the nokogiri finder. This results in the docset being\n empty, changing the nokogiri the finder fixes the problem. This change\n also should be backwards compatib... | ruby | chosen |
[
{
"from": "system",
"value": "Add vegetative recipe; add pH hints\n"
},
{
"from": "human",
"value": "\ndef tsp_per_water(food_tsp, water_oz)\n\tfood_tsp.to_f * (water_oz.to_f / GALLON_IN_OZ.to_f)\nend\n\nGALLON_IN_OZ = 128 # 1 gal == 128 oz\nTSP_PER_OZ \t = 6 \t# 1 oz == 6 tsp\n\nwater_oz = AR... | ruby | chosen |
[
{
"from": "system",
"value": "Add to_s since user_agent might be nil\n"
},
{
"from": "human",
"value": "module Rack\n class SimpleUserAgent\n module Detector\n def from_smartphone?\n from_ios? || from_android? || from_windows_phone?\n end\n\n def from_iphone?\n u... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec - removed open ended dependency\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'poof'\n s.version = '0.0.0.dev'\n s.date = '2015-05-08'\n s.summary = \"Automatically cleanup and destroy ActiveReco... | ruby | chosen |
[
{
"from": "system",
"value": "Add file cleanup to extract resource\n"
},
{
"from": "human",
"value": "install = node['remote_syslog2']['install']\nbin_file = \"#{install['bin_path']}/#{install['bin']}\"\n\nremote_file install['download_path'] do\n source install['download_file']\n mode '0644'\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sleep while restarting Rails\n"
},
{
"from": "human",
"value": "service \"monit\" do\n supports :status => false, :restart => true, :reload => true\n action :nothing\nend\n\n\nnode[:deploy].each do |application, deploy|\n\n # Overwrite the unicorn restart ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in spec description\n"
},
{
"from": "human",
"value": "require File.expand_path('../spec_helper', __FILE__)\n\nload_extension(\"boolean\")\n\ndescribe \"CApiFalseSpecs\" do\n before :each do\n @b = CApiBooleanSpecs.new\n end\n\n describe \"a false val... | ruby | chosen |
[
{
"from": "system",
"value": "Define the methods as :class methods.\n"
},
{
"from": "human",
"value": "require 'yard/handlers/ruby/base'\n\nmodule YARD\n module Handlers\n module Ruby\n class PredefineHandler < Base\n\n handles :predefine, method_call(:predefine)\n\n def p... | ruby | chosen |
[
{
"from": "system",
"value": "Add RSS and sitemap ping Rake task\n"
},
{
"from": "human",
"value": "# Usage: rake minify\ndesc \"Minify files\"\ntask :minify do\n system \"java -jar _build/htmlcompressor.jar -r --type html --compress-js -o _site _site\"\nend # task :minify\n\n# Usage: rake draf... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify Relation::Wrap since now it inherits from Graph\n"
},
{
"from": "human",
"value": "require 'rom/relation/graph'\n\nmodule ROM\n class Relation\n # Relation wrapping other relations\n #\n # @api public\n class Wrap < Graph\n extend Initiali... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing within_io_actor block from UDPSocket spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Celluloid::IO::UDPSocket do\n let(:payload) { 'ohai' }\n subject do\n Celluloid::IO::UDPSocket.new.tap do |sock|\n sock.bind example_... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic tests for Address\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Location\n describe Address do\n pending \"add some examples to (or delete) #{__FILE__}\"\n end\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper... | ruby | chosen |
[
{
"from": "system",
"value": "Update from beta to final first version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'param_test'\n s.version = '0.0.1beta'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Nik Haldimann']\n s.email = ['n... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependencies 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 'bxamp/version'\n\nGem::Specification.new do |gem|\n g... | ruby | chosen |
[
{
"from": "system",
"value": "Use ::VERSION::STRING for gemspec version.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = %q{ruby-s3cmd}\n s.version = \"0.1.3\"\n s.date = %q{2012-06-13}\n s.authors = [\"Joel Bryan Juliano\"]\n s.email = %q{joelbryan.juliano@gmail... | ruby | chosen |
[
{
"from": "system",
"value": "Document warn and critical units"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n#\n# Check NTP offset - yeah this is horrible.\n#\n\nrequire 'rubygems' if RUBY_VERSION < '1.9.0'\nrequire 'sensu-plugin/check/cli'\n\nclass CheckNTP < Sensu::Plugin::Check::CLI\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update Beaker acceptance test spec\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'sks class' do\n\n context 'default parameters' do\n # Using puppet_apply as a helper\n it 'should work with no errors' do\n pp = <<-EOS\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to do exactly what the description says\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe CurriculumVitae do\n it 'has a version number' do\n expect(CurriculumVitae::VERSION).not_to be nil\n end\n\n context '.build' do\n it 'p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken test on Ruby 2\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'bigdecimal'\n\ndescribe Forgery::Monetary do\n\n it \"should return random number string\" do\n expect(Forgery(:monetary).money).to match(/^[\\d+\\.]+$/)\n end\n\n it ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Rspec controller test skeleton\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"IndexController (this is a skeleton controller test!)\" do\n\n describe 'get all bands' do\n it 'should see all bands' do\n get \"/bands\"\n expect(l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in the 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 'flickr/version'\n\nGem::Specification.new do |gem|\n gem.name = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Change gem dependencies to get Rake to work\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'neighborly/balanced/creditcard/version'\n\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem build errors in gemspec.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rails_wink/version\"\n\nGem::Specification.new do |s|\n s.name = \"rails_wink\"\n s.version = RailsWink::VERSION\n\n s.authors... | ruby | chosen |
[
{
"from": "system",
"value": "Update library cache after install.\n"
},
{
"from": "human",
"value": "remote_file 'freeimage.zip' do\n path \"#{Chef::Config[:file_cache_path]}/freeimage.zip\"\n source node[:freeimage][:source][:url]\n not_if 'ldconfig -v 2>&1 | grep -q libfreeimage'\nend\n\nex... | ruby | chosen |
[
{
"from": "system",
"value": "Update Cocoa Podspec to 1.1.1 - Jun 27, 2015 1:17 AM\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"DCViewController\"\n s.version = \"1.1\"\n s.summary = \"Some extension for UIViewController\"\n\n s.homepage = \"ht... | ruby | chosen |
[
{
"from": "system",
"value": "Use a more descriptive/humble description in gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path(File.join('..', 'lib'), __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sidetiq/version'\n\nGem::S... | ruby | chosen |
[
{
"from": "system",
"value": "Fix absolute links to markdown pages in repo docs\n\nAbsolute links to markdown pages should not be rendered relative.\n\nFixes prometheus/prometheus#4627\n\nSigned-off-by: Tobias Schmidt <25d72cd05b750b8e431a98389fb858a4199d229b@gmail.com>\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Set raise_in_transactional_callbacks on rails-4.2.x only\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_m... | ruby | chosen |
[
{
"from": "system",
"value": "Use exec to run migrations install\n"
},
{
"from": "human",
"value": "require 'rails/generators'\nmodule Notifications\n module Generators\n class InstallGenerator < Rails::Generators::Base\n desc \"Create Notifications's base files\"\n source_root Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add Active Record validations to Question model.\n"
},
{
"from": "human",
"value": "class Question < ApplicationRecord\nend\n"
},
{
"from": "gpt",
"value": "class Question < ApplicationRecord\n\n validates :question, presence: true, length: {maximum: 25... | ruby | chosen |
[
{
"from": "system",
"value": "Add data directory to the gemspec\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nGem::Specification.new do |s|\n \n # Variables\n s.author = 'Ryan Scott Lewis'\n s.email = 'roger.qiu@polycademy.com'\n s.name = 'snapsearch-client-ruby... | ruby | chosen |
[
{
"from": "system",
"value": "Use innerHTML where possible in see within steps\n\notherwise use I should see.\nProperly negate clause.\n"
},
{
"from": "human",
"value": "{\n 'in the title' => 'h2',\n 'in the watchers list' => '.watching',\n 'as a button' => 'a.button, button',\n 'in the prev... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade iTerm2 Beta to v2.9.20151001\n"
},
{
"from": "human",
"value": "cask :v1 => 'iterm2-beta' do\n version '2.9.20150830'\n sha256 '3248adc0281c03d5d367e042bcc373ae673bf5eea55fe181169e5824c8379e42'\n\n url 'https://iterm2.com/downloads/beta/iTerm2-2_9_2015083... | ruby | chosen |
[
{
"from": "system",
"value": "Make heat maps recipe version 0.10.4 so we can apply it in production\n\n\nFormer-commit-id: c6b9ee0d107d7fbed63c1c6bb95879de297697eb [formerly fe758180d49f32049942d79387278b1da2ede8e2] [formerly 7c5c3e4b194fa805d926e91e91b568c482e9191a [formerly a537ba0d9de7b3486690452d9f3d575... | ruby | chosen |
[
{
"from": "system",
"value": "Add more fields to Atom feed XML.\n"
},
{
"from": "human",
"value": "xml.instruct!\nxml.feed \"xmlns\" => \"http://www.w3.org/2005/Atom\" do\n site_url = site_root_uri\n xml.title blog_title\n xml.subtitle blog_subtitle\n xml.id URI.join(site_url, blog.options.p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix symlink path error in ZendStudio.app Cask\n"
},
{
"from": "human",
"value": "class Zendstudio < Cask\n url 'http://downloads.zend.com/studio-eclipse/10.6.0/ZendStudio-10.6.0-macosx.cocoa.x86_64.dmg'\n homepage 'http://www.zend.com/en/products/studio/'\n versi... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for get_events with named event stores\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass AnAggregate \n\tinclude Sandthorn::AggregateRoot\nend\n\ndescribe Sandthorn do\n\tbefore(:each) { AnAggregate.new.save }\n\tlet(:events) { Sandthorn.ge... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task to simplify removing old entries from the database.\n"
},
{
"from": "gpt",
"value": "namespace :idleserver do\n desc 'Clean stale clients out of database'\n task :dbclean, [:hours] => [:environment] do |t, args|\n if args.hours\n Client.find... | ruby | chosen |
[
{
"from": "human",
"value": "Add Noun Project.app version 1.0.2\n\nSearch over 100,000 icons. The Mac App constantly updates, giving you fresh content every day. https://thenounproject.com\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'noun-project' do\n version '1.0.2'\n sha256 '3063a23c568254... | ruby | chosen |
[
{
"from": "system",
"value": "Update PHPStorm-EAP to latest build 138.84"
},
{
"from": "human",
"value": "class PhpstormEap < Cask\n url 'http://download.jetbrains.com/webide/PhpStorm-EAP-138.38.dmg'\n homepage 'http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to whenever --update-crontab\n"
},
{
"from": "human",
"value": "template \"#{node[:whenever][:whenever_path]}/config/schedule.rb\" do\n variables({\n :whenever_tasks => node[:whenever][:whenever_tasks]\n })\n action :create\nend\n\nexecute 'wheneve... | ruby | chosen |
[
{
"from": "human",
"value": "Add proof-of-concept ruby script for posterity's sake.\n"
},
{
"from": "gpt",
"value": "require 'csv'\n\nRecord = Struct.new(:household, :primary, :secondary, :address)\n\nstates = [:scanning_for_next_record, :reading_primary, :reading_secondary, :reading_address]\nc... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Flag property to be nullable.\n\nSigned-off-by: Michael S. Klishin <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@novemberain.com>\n"
},
{
"from": "human",
"value": "module DataMapper\n module Types\n class Flag < DataMapper::Type(Integer)\n def self.inher... | ruby | chosen |
[
{
"from": "system",
"value": "Increase Aruba timeout to 5 seconds\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\n\nBundler.require\n\nrequire 'aruba/cucumber'\nrequire 'cucumber/rspec/doubles'\n\n# Following from 'aruba/cucumber'\nBefore do\n @__aruba_original_paths =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix method chain and quotations\n"
},
{
"from": "human",
"value": "# Thanks to https://github.com/simonwhitaker/github-fork-ribbon-css\nrequire 'rack/dev-mark/theme/base'\n\nmodule Rack\n module DevMark\n module Theme\n class GithubForkRibbon < Base\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make unix_file_mime_type compatible with file versions < 5\n"
},
{
"from": "human",
"value": "# AttachmentFu sets the Attachment content type from the browser sent Content-type header\n#\n# This monkey patch uses UNIX file utility to fix broken or missing content ty... | ruby | chosen |
[
{
"from": "system",
"value": "Make chruby part of the base recipe\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: omnibus\n# Recipe:: default\n#\n# Copyright 2013-2014, Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fil... | ruby | chosen |
[
{
"from": "system",
"value": "Fix my e-mail address in the gemspec.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"saga\"\n spec.version = \"0.9.0\"\n spec.date = \"2012-07-10\"\n \n spec.authors = [\"Manfred Stienstra\"]\n spec.ema... | ruby | chosen |
[
{
"from": "system",
"value": "Use 5 character mode def and strings not symbols for the node attributes\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: ubuntu\n# Recipe:: default\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add reference to React.js doc\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe React::Event do\n it \"should bridge attributes of native SyntheticEvent\" do\n element = React.create_element('div').on(:click) do |event|\n expect(event.b... | ruby | chosen |
[
{
"from": "system",
"value": "Test suite should fail when there are missing translations\n"
},
{
"from": "human",
"value": "require 'rails/generators'\n\nclass TestAppGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../../../../spec/test_app_templates\", __FILE__)\n\n def i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix additional Ruby 1.8 incompatibility.\n\nSigned-off-by: brian m. carlson <738bdd359be778fee9f0fc4e2934ad72f436ceda@crustytoothpaste.net>\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n# encoding: UTF-8\n\n$:.unshift File.join(File.dirname(__FILE__), '..', 'l... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing requirement to tests\n\nGravatarify was an unknown constant so the tests blew up.\n"
},
{
"from": "human",
"value": "require './test/integration_helper'\n\nrequire 'sinatra/base'\nrequire 'rack/test'\nrequire 'rack-flash'\nrequire 'approvals'\n\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Add examples that needed for checking crawled value is not empty\n"
},
{
"from": "human",
"value": "describe DMMCrawler::Ranking do\n let(:attachments) { described_class.new(arguments).arts }\n\n let(:agent) { DMMCrawler::Agent.instance.agent }\n let(:submedia) {... | ruby | chosen |
[
{
"from": "system",
"value": "Introduce a hacky way to run migrations from code across rails versions\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\nrequire \"test_app/config/environment\"\n# Prevent database truncation if the environment is production\nabort(\"The Rails environ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for some of the regexes\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'strscan'\n\ndef ScanShortcutFor(regex)\n Module.new { define_method :scan do |text|\n StringScanner.new(text).scan(Wptemplates::Regexes.send(regex))\n end }\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary call to `compact`\n"
},
{
"from": "human",
"value": "require 'byebug/command'\nrequire 'byebug/helpers/bin'\nrequire 'byebug/helpers/path'\nrequire 'shellwords'\nrequire 'English'\nrequire 'rbconfig'\n\nmodule Byebug\n #\n # Restart debugged pro... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary resources line from podspec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"EPSReactiveTableViewController\"\n s.version = \"1.0.0\"\n s.summary = \"A table view controller that automatically ... | ruby | chosen |
[
{
"from": "human",
"value": "Test to ensure Chef can successfully install\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n# Make sure Chef installs\n\ndescribe command('curl -kL https://www.chef.io/chef/install.sh | bash') do\n its(:exit_status) { should eq 0 }\nend\n\n"
}
] | ruby | chosen |
[
{
"from": "human",
"value": "Add a fuzz test for consumer groups\n"
},
{
"from": "gpt",
"value": "describe \"Consumer groups\", fuzz: true do\n let(:logger) { Logger.new(LOG) }\n let(:num_messages) { 750_000 }\n let(:num_partitions) { 30 }\n let(:num_consumers) { 10 }\n let(:topic) { \"fuzz... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up unnecessary puts lines\n\nSigned-off-by: Joan Tiffany Siy <e0397393f2258e8c6ee68e35ceb46d86a4ac5382@teamcodeflux.com>\n"
},
{
"from": "human",
"value": "module CategoryTree\n class Api::CategoriesController < ApplicationController\n def index\n @ca... | ruby | chosen |
[
{
"from": "system",
"value": "Make tmp folder in gem root\n"
},
{
"from": "human",
"value": "module DataKitten\n \n module Origins\n \n # Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.\n #\n # @see Dataset\n #\n modul... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused migrated subject factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :subject do\n project\n upload_user_id \"1\"\n\n sequence(:zooniverse_id) { |n| \"TES#{n.to_s(26).rjust(8, '0')}\" }\n metadata({distance_from_eart... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of silence_stream, now gone from Rails\n\nRails 5 removed it. It doesn't suppress a lot of noise anyway, so it's no big deal. Might even be nicer to see this output (from migrating the DB) to know what is going on.\n"
},
{
"from": "human",
"value": "RSpec... | ruby | chosen |
[
{
"from": "system",
"value": "Make RUPNP::SSDP::Listener should ignore and log unknown requests pass.\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\nmodule RUPNP\n module SSDP\n\n describe Listener do\n include EM::SpecHelper\n\n it \"should receive alive a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compatibility with Rails' own options like :root, :except and :only\n"
},
{
"from": "human",
"value": "require \"rails/patch/json/encode/version\"\n\n# Code from http://devblog.agworld.com.au/post/42586025923/the-performance-of-to-json-in-rails-sucks-and-theres\... | ruby | chosen |
[
{
"from": "system",
"value": "Make explicit warnings when an asset is not found\n"
},
{
"from": "human",
"value": "require 'requirejs/rails'\n\nrequire 'pathname'\nrequire 'ostruct'\n\nmodule Requirejs::Rails\n class Builder\n # config should be an instance of Requirejs::Rails::Config\n \... | ruby | chosen |
[
{
"from": "system",
"value": "Add signup template integration test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SiteLayoutTest < ActionDispatch::IntegrationTest\n\n test 'layout links' do\n get root_path\n assert_template 'static_pages/home'\n assert_select 'a[href... | ruby | chosen |
[
{
"from": "human",
"value": "Add server-side clang ptrace test\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire_relative '../test_base'\n\nmodule Dual\n class RunClangPtraceTest < TestBase\n\n def self.id58_prefix\n 's8E'\n end\n\n # - - - - - - - - - - - - ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.