conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update podspec preparing to publish fork to trunk.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"UIActivityIndicator-for-SDWebImage\"\n s.version = \"1.2\"\n s.summary = \"The easiest way to add a UIActivityView to your... | ruby | chosen |
[
{
"from": "system",
"value": "Make the rails version in the gemspec more restrictive\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"transam_lib/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Spe... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - make them bark\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/5535572c1de94ba2db0000f6\n# --- iteration 1 ---\nclass Object\n def bark\n \"Woof!\"\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Write end-to-end spec for audio only"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule FFSplitter\n describe \"End to end\" do\n before { Dir.mkdir(\"tmp\") unless Dir.exist?(\"tmp\") }\n\n describe \"split\" do\n before { `bundle exec rub... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for Shell module"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\n\nmodule Tara\n describe Shell do\n let :shell do\n described_class\n end\n\n let :tmpdir do\n Dir.mktmpdir\n end\n\n after do\n Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented out code from cert module."
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule CertModule\n class CompletionPdf < Prawn::Document\n def initialize(options)\n set_fallback_fonts\n options[:background] ||= Rails.root... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem files yet again.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.unshift File.expand_path('lib', File.dirname(__FILE__))\nrequire 'contacts/version'\n\nGem::Specification.new do |s|\n s.name = 'patch-contacts'\n s.date = Date... | ruby | chosen |
[
{
"from": "system",
"value": "Fix undefined method where for Array error in migration.\n"
},
{
"from": "human",
"value": "class MigrateStripePreferences < ActiveRecord::Migration\n def up\n Spree::Preference.all.where(\"key LIKE 'spree/gateway/stripe_gateway/login%'\").each do |pref|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch java recommendation to suggests\n\nThis gets around a rather insane set of circumstances wherein Berkshelf\nwon't let you ignore recommends [1]. Basically, Berkshelf will always\ndownload a recommends, but not a suggests, so if we downgrade this\nkeyword (which is of cou... | ruby | chosen |
[
{
"from": "system",
"value": "Update the patch version for the pull request"
},
{
"from": "human",
"value": "# encoding: utf-8\n#\n# Cookbook Name:: windows_cert\n#\n\nname 'windows_cert'\nmaintainer 'Shawn Weitzel'\nmaintainer_email 'sweitzel74@gmail.com'\nlicense 'all_rights'\ndescription 'Ins... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo with partial naming\n"
},
{
"from": "human",
"value": "Deface::Override.new(\n virtual_path: 'spree/admin/orders/_shipment',\n name: 'add_fulfillment_date_in_orders',\n insert_after: \"\",\n partial: 'spree/admin/orders/fullfillment',\n disabled: false... | ruby | chosen |
[
{
"from": "system",
"value": "Change the way MultiSpork prefork and each_run work, remove debugging instruction\n"
},
{
"from": "human",
"value": "require \"spork\"\nrequire 'parallel'\n\nmodule MultiSpork\n autoload :TestExecutor, \"multi_spork/test_executor\"\n autoload :TestResolver, \"mult... | ruby | chosen |
[
{
"from": "system",
"value": "Check for method on instance\n"
},
{
"from": "human",
"value": "begin\n require 'eventmachine'\nrescue LoadError\n require 'rubygems'\n require 'eventmachine'\nend\n\n# Check for get_outbound_data_size support, fake it out if it doesn't exist, e.g. jruby\nif !EM:... | ruby | chosen |
[
{
"from": "human",
"value": "Add test of top page\n"
},
{
"from": "gpt",
"value": "# -*- coding: utf-8 -*-\nrequire 'test_helper'\n\nclass Toptest < ActionDispatch::IntegrationTest\n test \"Sponserd link should be exist\" do\n get \"/\"\n assert_select 'section.sponsers_logo a[href]',... | ruby | chosen |
[
{
"from": "system",
"value": "Switch arguments for delta to avoid confusion"
},
{
"from": "human",
"value": "require \"tempfile\"\n\nmodule RRDiff\n module File\n # File interface to RRDiff\n \n def patch(ofile, dfile)\n nfile = Tempfile.new(\"nfile\")\n RRDiff.patch(ofile.pa... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec version to 1.0.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Mantle-HAL-Remix\"\n s.version = \"1.0.0\"\n s.summary = \"HAL Parser for Objective-C with added strong typing.\"\n s.homepage = \"https://... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new Bundler gemspec conventions\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/process_exists/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"process_exists\"\n gem.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add line numbers to the output\n"
},
{
"from": "human",
"value": "require 'colorize'\nrequire 'todo_finder/version'\n\nmodule TodoFinder\n class Finder\n attr_accessor :matches\n\n def initialize\n @matches = Hash.new { |h,k| h[k]=[] }\n end\n\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Add sorbet types to Vonage::GSM7\n"
},
{
"from": "human",
"value": "# typed: ignore\n\nmodule Vonage\n module GSM7\n CHARACTERS = \"\\n\\f\\r !\\\"\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_abcdefghijklmnopqrstuvwxyz{|}~ ¡£¤¥§¿ÄÅÆÉÑÖØÜßàäå... | ruby | chosen |
[
{
"from": "system",
"value": "Set message thread public tokens on threads in DB seed file.\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created a... | ruby | chosen |
[
{
"from": "human",
"value": "Add more columns to pages\n"
},
{
"from": "gpt",
"value": "Sequel.migration do\n change do\n alter_table(:pages) do\n add_column :shorthand_title, String, unique: true\n add_column :title_char, String\n add_column :compiled_content, String, text: t... | ruby | chosen |
[
{
"from": "system",
"value": "Update sublime text dev to 3064."
},
{
"from": "human",
"value": "class SublimeTextDev < Cask\n url 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203062.dmg'\n homepage 'http://www.sublimetext.com/3dev'\n version 'Build 3062'\n sha256 '641459fb786f3... | ruby | chosen |
[
{
"from": "system",
"value": "Add github to gemspec as homepage\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'xmlrpc/scgi/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Store the current page in the session.\n\npublic_website uses this to know where to redirect to after login.\n"
},
{
"from": "human",
"value": "module Authentication\n extend ActiveSupport::Concern\n\n included do\n helper_method :user_signed_in?\n end\n\n pr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix being able to report otherwise inaccessible statuses\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Api::V1::ReportsController < Api::BaseController\n before_action -> { doorkeeper_authorize! :write, :'write:reports' }, only: [:create... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old guarded spec, implementations should be allowed to do either.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../../../shared/fiber/resume', __FILE__)\n\nwith_feature :fiber do\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Correct Summa view tests by loading the show action.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SummaControllerViewTest < ActionController::TestCase\n def setup\n @controller = SummaController.new\n get(:index)\n @lists = css_select(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug when book.book_data is nil'\n"
},
{
"from": "human",
"value": "class Admin::DashboardController < Admin::ApplicationController\n\n skip_before_filter :authentication_admin_check, if: -> { current_user and current_user.publisher? }\n\n def index\n if par... | ruby | chosen |
[
{
"from": "system",
"value": "Replace user_* routes with session_* routes\n\nThe OBS routes has been changed with\n https://github.com/openSUSE/open-build-service/pull/4731\n"
},
{
"from": "human",
"value": "module ObsFactory\n module ApplicationHelper\n\n # Catch some url helpers used in t... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that the summary listing is JSON.\n"
},
{
"from": "human",
"value": "require 'octokit'\n\nmodule EmberSecureBuilder\n class OpenPullRequests\n include S3Uploader\n\n attr_accessor :repo, :redis\n\n def initialize(repo, options = {})\n self.r... | ruby | chosen |
[
{
"from": "human",
"value": "Add bddfire cucumber common steps\n"
},
{
"from": "gpt",
"value": "require 'bddfire'\n\n# Load config\nrequire 'yaml'\n$config = YAML.load_file(\"config.yml\")\nputs($config.inspect)\n\ndef navigate_to(page)\n visit($config['baseurl'] + page)\nend\n\nGiven(/^I am on... | ruby | chosen |
[
{
"from": "system",
"value": "Make gem work with test-kitchen 1.16.0.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire 'kitchen/provisioner/chef_zero'\nrequire 'kitchen/provisioner/sandbox_berks_env'\n\nmodule Kitchen\n module Provisioner\n # Chef Zero Berkshelf Enviro... | ruby | chosen |
[
{
"from": "system",
"value": "Update maintainer to be chef inc.\n"
},
{
"from": "human",
"value": "name 'chef_slack'\nmaintainer 'Ian Henry'\nmaintainer_email 'ihenry@chef.io'\nlicense 'Apache 2.0'\ndescription 'slack LWRP for notifying slack.com channels'\nlong_d... | ruby | chosen |
[
{
"from": "human",
"value": "Add a starter file for spec\n"
},
{
"from": "gpt",
"value": "describe \"brew extract\", :integration_test do\n it \"extracts the most recent formula version without version argument\" do\n path = Tap::TAP_DIRECTORY/\"homebrew/homebrew-foo\"\n (path/\"Formula\"... | ruby | chosen |
[
{
"from": "system",
"value": "Allow us to use newer bundler\n"
},
{
"from": "human",
"value": "# coding: utf-8\n# frozen_string_literal: true\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 ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a package for Docking Port Alignment Indicator.\n"
},
{
"from": "gpt",
"value": "class DockingPortAlignmentIndicator < Kosmos::Package\n title 'Docking Port Alignment Indicator'\n url 'http://addons.cursecdn.com/files/2201/632/DockingPortAlignment_3.1.zip'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Item to Sales Cycle Relationship\n"
},
{
"from": "human",
"value": "class SalesCycle < ActiveRecord::Base\n\n\tbelongs_to :user\n\thas_many :inventory_items\n\thas_many :orders\nend\n"
},
{
"from": "gpt",
"value": "class SalesCycle < ActiveRecord::Ba... | ruby | chosen |
[
{
"from": "system",
"value": "Add actions to the payment method\n"
},
{
"from": "human",
"value": "module Spree\n class Check < Spree::Base\n\n attr_accessor :imported\n\n belongs_to :payment_method\n belongs_to :user, class_name: Spree.user_class.to_s, foreign_key: 'user_id',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update test name to the corresponding method name\n\nSigned-off-by: Santiago Pastorino <792d28329de7ed446c01b83f731a071248ffeaf4@wyeworks.com>\n"
},
{
"from": "human",
"value": "require 'abstract_unit'\nrequire 'active_support/core_ext/object/inclusion'\n\nclass InT... | ruby | chosen |
[
{
"from": "system",
"value": "2844: Remove filename for security reasons.\n"
},
{
"from": "human",
"value": "module UploadProcessable\n extend ActiveSupport::Concern\n\n protected\n\n def store_uploaded_file(uploaded)\n file_name = \"#{controller_name}-#{SecureRandom.uuid}-#{uploaded.o... | ruby | chosen |
[
{
"from": "system",
"value": "Return an empty array when they are no pinned items\n\nWhen no items are pinned to the finder, `ordered_related_items`\nis not present in `links`, therefore nothing is returned by\n`pinned_item_links`. This then leads to an error when `.include?`\nis invoked on the returned ob... | ruby | chosen |
[
{
"from": "system",
"value": "Document Vimeo workaround in code.\n"
},
{
"from": "human",
"value": "require 'link_thumbnailer/scrapers/opengraph/base'\n\nmodule LinkThumbnailer\n module Scrapers\n module Opengraph\n class Video < ::LinkThumbnailer::Scrapers::Opengraph::Base\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add pysch dependency to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.authors = [\"Alister Scott\", \"Jeff Morgan\"]\n gem.email = [\"alister.scott@gmail.com\", \"jeff.morgan@leandog.com... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to allow installing on Rails 4\n\nAdapted from devise's gemspec (https://github.com/plataformatec/devise/blob/master/devise.gemspec)"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"... | ruby | chosen |
[
{
"from": "system",
"value": "Add 10.9 requirement to podspec \n\nNSURLSession is available on 10.9 or later the pod spec previously had 10.8."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"YTVimeoExtractor\"\n s.version = \"0.2.0\"\n s.summary = \"Fetche... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure all queries are finished also when MULTI_STATEMENTS is enabled\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule DatabaseRewinder\n module MultipleStatementsExecutor\n refine ActiveRecord::ConnectionAdapters::AbstractAdapter do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor test to extract duplicate code\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire_relative 'game' \n\nclass GameTest < Test::Unit::TestCase\n\n def test_gutter_game\n game = Game.new\n 20.times do\n game.roll(0)\n end\n assert... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec: depend explicitly on current versions of omniauth and ruby-bcrypt, fix homepage."
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift(lib) unless $:.include?(lib)\n\nrequire 'omnisocial/version'\nrequire 'bundler'\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec with simple symbols\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nmodule Scanny::Checks::Session\n describe SessionSecureCheck do\n before do\n @runner = Scanny::Runner.new(SessionSecureCheck.new)\n @message = \"Bad session ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax error in Ruby1.8\n"
},
{
"from": "human",
"value": "module RailsAdmin\n module Adapters\n module Mongoid\n module Extension\n extend ActiveSupport::Concern\n\n included do\n def self.rails_admin(&block)\n RailsAd... | ruby | chosen |
[
{
"from": "system",
"value": "Fix description for Parent Information Center school\n"
},
{
"from": "human",
"value": "namespace :data_migration do\n desc \"Add Capuano school\"\n task add_pic: :environment do\n School.create(local_id: \"PIC\", name: \"Parent Information Center\")\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Add gulp to npm packages\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nputs \"Running Node version: #{`node --version`}\"\nnpms = {\n # module name => module command\n # leave command blank if they are the same\n \"coffee-script\" => \"coffee\",\n \"... | ruby | chosen |
[
{
"from": "system",
"value": "Update fixture_path helper to take a file name that way we can use it separately if necessary. We'll need it for our YAML config implementation test.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'test/unit'\nrequire 'shoulda'\nrequire 'mocha'\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "QUALITY: Move generation of auth token to auth token class\n"
},
{
"from": "human",
"value": "class AuthToken < ActiveRecord::Base\n\n # Auth token encryption settings\n attr_encrypted :auth_token,\n key: Doubtfire::Application.secrets.secret_key_attr,\n enc... | ruby | chosen |
[
{
"from": "human",
"value": "[pedant] Add specs for analytics-required config exports\n\nSigned-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>\n"
},
{
"from": "gpt",
"value": "require 'json'\nrequire 'pedant/rspec/common'\n\ndescribe 'running configs required by Analytic... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mimic call as we're now explicitly invoking the applicable methods,\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: UTF-8\n\n$: << File.dirname(__FILE__)\n\nrequire 'helper'\nrequire 'oj'\n\nclass ObjectFolder < Minitest::Test\n class Rac... | ruby | chosen |
[
{
"from": "system",
"value": "Apply change to ssl section too."
},
{
"from": "human",
"value": "module Moonshine\n module NoWWW\n\n def self.included(manifest)\n manifest.class_eval do\n extend ClassMethods\n end\n end\n\n module ClassMethods\n end\n\n def no_www... | ruby | chosen |
[
{
"from": "system",
"value": "Fix format option used in the submit_feed method\n"
},
{
"from": "human",
"value": "module MWS\n module API\n class Feeds < Base\n XSD_PATH = File.join(File.dirname(__FILE__), \"feeds\", \"xsd\")\n\n Actions = [:get_feed_submission_list, :get_feed_subm... | ruby | chosen |
[
{
"from": "human",
"value": "Add tree view example [merges 'kaspernj/master']\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')\nrequire 'gir_ffi-gtk3'\n\nGtk.init\n\n\n#Add window.\nwin = Gtk::Window.new(:toplevel)\nwin.resize(640, 480)\nGObject.... | ruby | chosen |
[
{
"from": "human",
"value": "Add development playground command for testing purposes\n"
},
{
"from": "gpt",
"value": "module ChatBotCommand\n class DevPlaygroundCommand\n TITLE = \"DevPlaygroundCommand\"\n REGEX = /\\b(NKB[0-9]+)/i # look for 'KB' followed by numbers, e.g. KB012983\n C... | ruby | chosen |
[
{
"from": "system",
"value": "Set default new credit score date\n"
},
{
"from": "human",
"value": "class CreditScoresController < MyplaceonlineController\n def model\n CreditScore\n end\n\n def display_obj(obj)\n Myp.display_date(obj.score_date, current_user) + \" (\" + obj.score.to_s +... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for inserting a lot of data to db\n"
},
{
"from": "gpt",
"value": "namespace :db do\n desc \"Create a lot of data in the database to test syncing performance\"\n task muchdata: :environment do\n 10.times do |i_n|\n i = Instrument.create!(title... | ruby | chosen |
[
{
"from": "system",
"value": "Fix achievements endpoint for new gameid param.\n"
},
{
"from": "human",
"value": "require 'httparty'\n\nclass XboxLeaders::Api\n\n include HTTParty\n base_uri 'https://www.xboxleaders.com/api/1.0'\n\n attr_accessor :timeout\n \n def initialize(timeout: 6)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up for testing - had wrong dns name.\n"
},
{
"from": "human",
"value": "Rails.application.config.middleware.use OmniAuth::Builder do\n if Rails.env.production?\n opts = YAML.load_file(File.join(Rails.root, 'config', 'shibboleth.yml'))[Rails.env]\n provide... | ruby | chosen |
[
{
"from": "system",
"value": "Load Headbanger version to avoid autoload errors\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nMetalArchives.configure do |c|\n ## Application identity (required)\n c.app_name = Headbanger::App::NAME\n c.app_version = Headbanger::Version:... | ruby | chosen |
[
{
"from": "system",
"value": "Use be_kind_of in class comparison.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'menu/menu_entry'\n\nmodule Abc\n describe MenuEntry do\n it \"wraps passed children\" do\n e = MenuEntry.new('My title', [{:title => 'Child 1'}])\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Support use of an HTTP proxy when running Cucumber features to assist debugging."
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[.. .. lib]))\n\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift(File.join(File.d... | ruby | chosen |
[
{
"from": "human",
"value": "Add file for simple string\n"
},
{
"from": "gpt",
"value": "# Solution Below\n\n\n\n\n\n# RSpec Tests. They are included in this file because the local variables you are creating are not accessible across files. If we try to run these files as a separate file per nor... | ruby | chosen |
[
{
"from": "human",
"value": "Add a benchmark at yehuda's request\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'rbench'\nrequire File.expand_path('../../lib/rack/acceptable', __FILE__)\n\nTIMES = 10_000\n\nSIMPLE = \"text/html\"\nSAFARI = \"application/xml,application/xhtml+xml,te... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake tasks, busted by b9e5a88 (Add code climate tag to README)\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'jeweler'\n\nREADME_PATH = File.expand_path('../README.md', File.dirname(__FILE__))\n\ndef extract_description_from_readme\n readme = ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix PATH in tests for new serverspec\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\ndescribe 'openstackrc' do\n case os[:family]\n when 'centos', 'redHat', 'fedora'\n RSpec.configure do |c|\n c.path = '/usr/local/sbin:/usr/local/bin:/sbin:/bin:... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec for main.private when given an undefined name\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"main#private\" do\n after :each do\n O... | ruby | chosen |
[
{
"from": "system",
"value": "Allow FinderSchema to humanize values\n"
},
{
"from": "human",
"value": "require \"multi_json\"\n\nclass FinderSchema\n def initialize(schema_path)\n @schema_path = schema_path\n end\n\n def facets\n schema.fetch(\"facets\", []).map do |facet|\n facet.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary or equals operator\n"
},
{
"from": "human",
"value": "class DependencyResolutionWorker\n include Sidekiq::Worker\n\n def perform(args = {})\n assign_attributes(args.deep_symbolize_keys)\n\n content_item_dependees.each do |dependent_content... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Android Studio Bundle to v0.5.2\n"
},
{
"from": "human",
"value": "class AndroidStudioBundle < Cask\n url 'https://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-mac.dmg'\n homepage 'http://developer.android.com/sdk/installing/... | ruby | chosen |
[
{
"from": "system",
"value": "Add TODO note about perhaps replacing our mock with the use of flexmock. Not worth adding this dependency just yet, only when we feel pain in mocking later\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@500588 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from... | ruby | chosen |
[
{
"from": "human",
"value": "Add dummy user to test CircleCI/Heroku continuous deployment\n"
},
{
"from": "gpt",
"value": "class AddADummyUser < ActiveRecord::Migration[5.0]\n USER_INFO = {\n name: 'Princess Rachael',\n email: 'princess@mail.com',\n password: '12345678'\n }\n\n def u... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for hbase recipe\n"
},
{
"from": "human",
"value": "require File.expand_path('../support/helpers', __FILE__)\n\ndescribe 'hadoop::hbase' do\n\n include Helpers::Hadoop\n\n # Example spec tests can be found at http://git.io/Fahwsw\n\nend\n"
},
{
"... | ruby | chosen |
[
{
"from": "system",
"value": "Use .to_sym interface for keys\n"
},
{
"from": "human",
"value": "module ROM\n module Plugins\n module Relation\n module SQL\n module AutoCombine\n # @api private\n def self.included(klass)\n super\n klass.clas... | ruby | chosen |
[
{
"from": "system",
"value": "Check if headers exist instead of crashing\r\n\r\nThis should solve problems with Rack::Test, which does not pass the Connection header."
},
{
"from": "human",
"value": "module SinatraWebsocket\n module Ext\n module Sinatra\n module Request\n\n # Tak... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo / strange presence of `double`.\n"
},
{
"from": "human",
"value": "RSpec.describe CategoryNavigationDecorator do\n include Draper::ViewHelpers\n\n let(:main_app_helper) { double }\n let(:item) { Object.new }\n\n subject(:decorator) { described_class.dec... | ruby | chosen |
[
{
"from": "system",
"value": "Save the way to run the goodies\n"
},
{
"from": "human",
"value": "class EmailProcessor\n def initialize(email)\n @email = email\n end\n\n def process\n Email.create(\n to: @email.headers[\"X-Forwarded-To\"],\n from: @email.from[:email],\n su... | ruby | chosen |
[
{
"from": "system",
"value": "Update Detailed Guide sync check rendering app\n\nNow checks that it is 'government-frontend'\n"
},
{
"from": "human",
"value": "module SyncChecker\n module Formats\n class DetailedGuideCheck < EditionBase\n def root_path\n \"/guidance/\"\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to disable various source code analysis phases\n"
},
{
"from": "human",
"value": "#\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# You may obtain a copy of ... | ruby | chosen |
[
{
"from": "system",
"value": "Print run time at start of run\n"
},
{
"from": "human",
"value": "require 'dotenv'\nDotenv.load\n\nrequire_relative 'booking_driver'\n\ndriver = BookingDriver.new\n\noptions = {\n username: ENV.fetch('DVSA_DRIVING_LICENSE_NUMBER'),\n password: ENV.fetch('DVSA_APPL... | ruby | chosen |
[
{
"from": "system",
"value": "Update drawing factory to make sure the mood_rating is between 1-5;\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :drawing do\n image { Rack::Test::UploadedFile.new(\"#{Rails.root}/spec/support/factories/sloth.jpg\", \"image/jpeg\") }\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to reflect changes in Author model\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe Author do\n\n should_allow_values_for :name, \"John Doe\", :allow_nil => true\n should_validate_length_of :name, :minim... | ruby | chosen |
[
{
"from": "system",
"value": "Test for calling a code block\n"
},
{
"from": "human",
"value": "require 'rspec/given'\nrequire 'subtime/timer'\n\nmodule Kernel\n def sleep(seconds)\n end\nend\n\ndescribe Timer do\n\n let(:output) { double('output').as_null_object }\n\n describe \"#start\" do\... | ruby | chosen |
[
{
"from": "system",
"value": "Update DummyView to pass in required arguments as required by Rails 6.1\n"
},
{
"from": "human",
"value": "require 'action_view'\n\nclass DummyView < ActionView::Base\n module FakeRequest\n class Request\n attr_accessor :path, :fullpath, :protocol, :host_wi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow editing reunion_confirmation fields when reuniter info is missing\n"
},
{
"from": "human",
"value": "class Report < ActiveRecord::Base\n has_attached_file :photo,\n styles: {\n thumb: \"140x140#\",\n medium: \"500x500>\",\n },\n :convert_op... | ruby | chosen |
[
{
"from": "system",
"value": "Check duplicated entry in public/groups.json\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# frozen_string_literal: true\n\nEncoding.default_external = Encoding::UTF_8\nEncoding.default_internal = Encoding::UTF_8\n\nrequire 'json'\n\nfiles_in_groups = []\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where the first page of results is skipped\n\n`page` was set to the next_url page before we looked at any of the\nresources on the first page.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'set'\n\nroutes_by_domain_url = {... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor NPM modules install script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nputs \"Running Node version: #{`node --version`}\"\nnpms = {\n # module name => module command\n # leave command blank if they are the same\n \"coffee-script\" => \"coff... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic implementation for first test in regexp.\n"
},
{
"from": "human",
"value": "require \"rbNFA/version\"\n\nmodule RbNFA\n class Regexp\n def initialize(string)\n \n end\n end\nend\n"
},
{
"from": "gpt",
"value": "require \"rbNFA/vers... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Added dependacy for mysql-chef-gem\"\n\nThis reverts commit 84f2f2fad79a882bcf6d97d69caf0f78099f52ed.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: mysql-chef_gem\n# Recipe:: default\n#\n# Copyright 2008-2013, Chef Software, Inc.\n#\n# Licensed un... | ruby | chosen |
[
{
"from": "system",
"value": "Use the plugin management cookbook to install any plugins.\n"
},
{
"from": "human",
"value": "#\n# Cookbook: rabbitmq-cluster\n# License: Apache 2.0\n#\n# Copyright (C) 2015 Sunggun Yu <sunggun.dev@gmail.com>\n# Copyright (C) 2015 Bloomberg Finance L.P.\n#\nnode.def... | ruby | chosen |
[
{
"from": "system",
"value": "Move spec tests to use poise-archive matchers\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire_relative '../../../libraries/consul_installation'\nrequire_relative '../../../libraries/consul_installation_webui'\n\ndescribe ConsulCookbook::Provider::C... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit test for deletion of valid document\n\nThis was previous part of https://github.com/alphagov/rummager/pull/864 which is closed.\nHowever it is still a useful test.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ElasticsearchProcessorTest ... | ruby | chosen |
[
{
"from": "system",
"value": "Use require_dependency instead of require in ActiveExchanger so we don't re-require all exchangers again.\n"
},
{
"from": "human",
"value": "module ActiveExchanger\n class Error < ::StandardError\n end\n\n class NotSupportedFormatError < Error\n end\n\n class N... | ruby | chosen |
[
{
"from": "system",
"value": "Fix :show urls and notify url\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Georgia\n module Concerns\n module Revisioning\n extend ActiveSupport::Concern\n include Helpers\n\n included do\n\n def review\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.