conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make code a bit better\n"
},
{
"from": "human",
"value": "module ActionMetaTags\n class Base\n def initialize(object)\n @object = object\n end\n\n class << self\n def tags\n @tags ||= []\n end\n\n def title(&block)\n tags ... | ruby | chosen |
[
{
"from": "system",
"value": "Change location redirection to collection path\n"
},
{
"from": "human",
"value": "class ApplicationResponder < ActionController::Responder\n include Responders::FlashResponder\n include Responders::HttpCacheResponder\n\n # Redirects resources to the collection pa... | ruby | chosen |
[
{
"from": "human",
"value": "Add LoginPdf class to generate student login PDFs\n"
},
{
"from": "gpt",
"value": "class LoginPdf\n include Prawn::View\n\n def initialize(classroom)\n @classroom = classroom\n list_students\n end\n\n def list_students\n count = 0\n @classroom.student... | ruby | chosen |
[
{
"from": "system",
"value": "Remove required ruby version from gemspec\n"
},
{
"from": "human",
"value": "require './lib/mutations/version'\n\nGem::Specification.new do |s|\n s.name = 'mutations'\n s.version = Mutations::VERSION\n s.author = 'Jonathan Novak'\n s.email = 'jnovak@gmail.com'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove custom predicates mod (dry-logic now has type? predicate)\n"
},
{
"from": "human",
"value": "require 'dry/logic/rule_compiler'\nrequire 'dry/logic/predicates'\n\nmodule Dry\n module Types\n module Predicates\n include Logic::Predicates\n\n predi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ./views/ as a default view path."
},
{
"from": "human",
"value": "require 'happy-helpers'\n\nmodule Happy\n class Context\n module Helpers\n include HappyHelpers::Helpers\n\n def render(what, options = {}, &blk)\n case what\n when N... | ruby | chosen |
[
{
"from": "system",
"value": "Foreach: Fix broken continue confirmation question.\n"
},
{
"from": "human",
"value": "module MGit\n class ForEachCommand < Command\n def execute(args)\n command = args.join(' ')\n\n Registry.chdir_each do |repo|\n pinfo \"Executing command in r... | ruby | chosen |
[
{
"from": "system",
"value": "Read results from the queue\n"
},
{
"from": "human",
"value": "require \"testjour/commands/command\"\nrequire \"testjour/http_queue\"\nrequire \"systemu\"\nrequire \"net/http\"\n\nmodule Testjour\nmodule Commands\n \n class Run < Command\n \n def execute\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated :conditions for ActiveRecord associations\n"
},
{
"from": "human",
"value": "module ActiveAdmin::Gallery\n module ActiveRecordExtension\n\n def has_image(name)\n has_one name,\n as: :imageable,\n class_name: \"ActiveAdmin::Ga... | ruby | chosen |
[
{
"from": "system",
"value": "Add test on anaconda install file\n"
},
{
"from": "human",
"value": "# # encoding: utf-8\n\n# Inspec test for recipe universe-ubuntu::default\n\n# The Inspec reference, with examples and extensive documentation, can be\n# found at https://docs.chef.io/inspec_referen... | ruby | chosen |
[
{
"from": "system",
"value": "Update Sequel dep, again, geez\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rom/sql/version'\n\nGem::Specification.new do |spec|\n spec.name = 'rom-sql'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify ruby code by using sample instead of rand\n"
},
{
"from": "human",
"value": "module Sequel\n module SchemaSharding\n module ConnectionStrategy\n class Random\n def self.choose(db, config)\n choice = rand(config['replicas'].size)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in a puts statement\n"
},
{
"from": "human",
"value": "require \"httparty\"\n\nmodule Genesis\n module RetryingFetcher\n FETCH_RETRY_INTERVALS = [0,1,5,30,60,90,180,300,300,300,300,300,1800,3600]\n \n def self.get what, base_url = '', fetch_inte... | ruby | chosen |
[
{
"from": "system",
"value": "Use Apache archive instead of mirror\n\nMirror does not have thrift 0.9.0 anymore.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: thrift\n# Attributes:: default\n#\n# Copyright 2011, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use symbols, not strings, for component object keys\n\nWe should only use one style of keys for objects used in components,\nto avoid reduce confusion when using components. Consistency is good.\n\nAfter discussion with @edds we agreed to use symbols as this makes\nmore sense i... | ruby | chosen |
[
{
"from": "system",
"value": "Hide 'UTE' prefix in bidder group name if there's only one group in the UTE\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n # render bidder group name from award\n def render_bidder_group award\n if award.is_ute?\n str = 'UTE: '\n award.... | ruby | chosen |
[
{
"from": "system",
"value": "Set site.tagline to meta description for now\n\nTODO: Add site.description?\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def render_markdown(markdown_text)\n markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)\n markdown.render(markdo... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"rewrite if block guard to return guard\"\n\nThis reverts commit fb3fae5a1b0e9b4dee6cd896fc641c2d2a53e67b.\n\nConflicts:\n\tapp/mailers/application_mailer.rb\n"
},
{
"from": "human",
"value": "# coding: utf-8\nclass ApplicationMailer\n class << self\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Add the timing-fields to the generated migration\n\nOtherwise, these are not persisted."
},
{
"from": "human",
"value": "module Announcements\n\tclass InstallGenerator < Rails::Generators::Base\n\t\t\n\t\tdesc \"Installs the Announcement gem\"\n\t\tsource_root File... | ruby | chosen |
[
{
"from": "system",
"value": "Update metrics spec to run in parallel"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\n\ndescribe \"JVM Metrics\" do\n\n before(:each) do\n set_java_version(app.directory, jdk_version)\n app.setup!\n app.set_config(\n \"JVM_COMMON_BUI... | ruby | chosen |
[
{
"from": "system",
"value": "Complete generator with creation file\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Generators\n # Create an class for generate a custom configuration file\n class CreateRequestGenerator < Rails::Generat... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem description and summary.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hash_db/version'\n\nGem::Specification.new do |gem|\n gem.na... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for VariableDuplicates validator\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe VariableDuplicatesValidator do\n let(:validator) { described_class.new(attributes: [:variables], **options) }\n\n describe '#validate_each' do\n let(:pr... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests compatible with older rubies."
},
{
"from": "human",
"value": "require 'duffel'\n\ndescribe Duffel do\n it 'should not raise an error' do\n expect { subject }.to_not raise_error\n end\n\n describe '.not_an_existing_method' do\n context 'without a... | ruby | chosen |
[
{
"from": "system",
"value": "Edit the Profile page to be more descriptive\n"
},
{
"from": "human",
"value": "require_relative 'server'\nrequire_relative 'pages'\n\nhomepage = Page.new(\n\tpage: %{\n\t<html>\n\t<head>\n\t\t<title>Welcome</title>\n\t</head>\n\t<body>\n\t\t<h1>Hello World!</h1>\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove side effect on Pipe initialization\n"
},
{
"from": "human",
"value": "module GitStatistics\n class Pipe\n include Enumerable\n\n attr_reader :command\n def initialize(command)\n command.gsub!(/^\\|/i, '')\n @command = command\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add task object to block params\n"
},
{
"from": "human",
"value": "module Jobmon\n module RakeMonitor\n def resolve_args(args)\n estimate_time = args.first.delete(:estimate_time)\n [args, estimate_time]\n end\n\n def client\n @client ||= Job... | ruby | chosen |
[
{
"from": "system",
"value": "Fix N+1 query with blogs objects\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#\n# == BlogsController\n#\nclass BlogsController < ApplicationController\n include OptionalModules::Bloggable\n include Commentable\n\n before_action :set_blog, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add keep alive for free heroku hosting\n"
},
{
"from": "gpt",
"value": "require 'rufus/scheduler'\nscheduler = Rufus::Scheduler.start_new\n\nif Rails.env.production?\n scheduler.every '10m' do\n require \"net/http\"\n require \"uri\"\n Net::HTTP.get_resp... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up whitespace in the SearchController initializer\n"
},
{
"from": "human",
"value": "# Re-open SearchController to support different institutional search methods.\n# We override initialize and extend with the search module via a before \n# filter since we may ... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for rsync finalizer\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\nrequire \"roger/testing/mock_release\"\n\nmodule Roger\n # Test for Roger Rsync finalizer\n class RsyncTest < ::Test::Unit::TestCase\n include TestConstruct::Helpers\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Use system instead of %x{} so we see all the output.\n\nHelpful for Jenkins.\n"
},
{
"from": "human",
"value": "namespace :ci do\n\n desc 'Setup and run rspec'\n task :rspec do\n %x{\n mkdir -p spec/reports\n mkdir -p coverage/rcov\n COVERAGE=true bund... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for populating sample bikes\n"
},
{
"from": "gpt",
"value": "namespace :db do\n desc \"Fill the database with sample data\"\n task populate: :environment do\n Bike.create!(name: \"Mountain Bike\")\n Bike.create!(name: \"Road Bike\")\n Bike.cr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code when label is empty\n"
},
{
"from": "human",
"value": "require 'pivotal-tracker'\n\nmodule Tracker\n class Project\n\n attr_reader :tracker_token, :project_id\n\n def initialize(tracker_token, project_id)\n @tracker_token = tracker_token\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete hooks for Capistrano 3 integration"
},
{
"from": "human",
"value": "namespace :load do\n\n task :defaults do\n set :eye_config, -> { \"config/eye.yml\" }\n set :eye_bin, -> { \"bundle exec eye-patch\" }\n set :eye_roles, -> { :app }\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Update state? method to use present? internally. All tests passing.\n"
},
{
"from": "human",
"value": "module SalesforceBulk\n class Batch\n \n attr_accessor :id\n attr_accessor :job_id\n attr_accessor :state\n \n# <id>751D0000000004rIAA</id>\n# <job... | ruby | chosen |
[
{
"from": "system",
"value": "Update homebrew formula for 0.2.0.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Dvm < Formula\n homepage 'http://fnichol.github.io/dvm'\n url 'https://github.com/fnichol/dvm/archive/v0.1.0.tar.gz'\n sha1 '55562579262edfb1aca6a96568e561e362b4d96b'... | ruby | chosen |
[
{
"from": "system",
"value": "Create an alias attribute for device_name to resolve guest device page error\n"
},
{
"from": "human",
"value": "class GuestDevice < ApplicationRecord\n belongs_to :hardware\n\n has_one :vm_or_template, :through => :hardware\n has_one :vm, :through => ... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for Broadcast class.\n"
},
{
"from": "gpt",
"value": "require File.expand_path(\"./helper\", File.dirname(__FILE__))\n\ndescribe 'Broadcast' do\n context 'search' do\n before(:all) do\n @gs = Grooveshark::Client.new\n end\n\n it 'should retur... | ruby | chosen |
[
{
"from": "system",
"value": "Fix type in spec desc\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'mas/development_dependencies/guard'\n\ndescribe 'Mas Guardfile' do\n describe 'Guard::Dsl#mas_guard' do\n describe 'By defaults' do\n\n it 'includes all MAS guard plugi... | ruby | chosen |
[
{
"from": "system",
"value": "Add deadlines to todo items\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nTodo::Item = Struct.new(:text) do\n attr_reader :assignee\n\n def assign_to(assignee)\n @assignee = assignee\n end\n\n def mark_complete\n @completed = true\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change example to show color configuration with a callable object\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative \"../lib/tty-prompt\"\n\nprompt = TTY::Prompt.new\n\nprompt.ask('What is your name?', default: ENV['USER'])\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rspec version compatibility issue\n"
},
{
"from": "human",
"value": "require 'open3'\n\n# Add the bin directory, to allow testing of gem executables as if the gem is\n# already installed.\nroot_dir = RSpec::Core::RubyProject.root\nexec_dir = root_dir.join('bin')... | ruby | chosen |
[
{
"from": "system",
"value": "Remove authorization on :save callback from resource\n\nThis should be covered by :create_resource_operation in the operations\nprocessor.\n"
},
{
"from": "human",
"value": "require 'pundit'\n\nmodule JSONAPI\n module Authorization\n module ResourcePolicyAuthori... | ruby | chosen |
[
{
"from": "system",
"value": "Add search scores to JSON output\n\nUseful during development to see how it's actually coming up with the\nmatches.\n"
},
{
"from": "human",
"value": "require \"blurrily/map\"\nrequire \"json\"\nrequire \"sinatra\"\n\nPRACTICES = JSON.parse(File.read(\"data/general-... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust migration to use person instead of student\n"
},
{
"from": "human",
"value": "class MoveNotesToCommentsInStudents < ActiveRecord::Migration\n class Comment < ActiveRecord::Base\n\n end\n class Student < ActiveRecord::Base\n\n end\n def self.up\n user ... | ruby | chosen |
[
{
"from": "system",
"value": "Implement basic spec test for swift::storage::node\n"
},
{
"from": "human",
"value": "describe 'swift::storage::node' do\n # this is just for the SAOI\n # add tests\nend\n"
},
{
"from": "gpt",
"value": "describe 'swift::storage::node' do\n\n let :fact... | ruby | chosen |
[
{
"from": "system",
"value": "Test success? after acknowledge on return.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UniversalReturnTest < Test::Unit::TestCase\n include OffsitePayments::Integrations\n\n def setup\n @secret = 'TO78ghHCfBQ6ZBw2Q2fJ3wRwGkWkUHVs'\n @re... | ruby | chosen |
[
{
"from": "system",
"value": "Send notification when there's a new Freddie\n"
},
{
"from": "human",
"value": "require 'bundler'\nrequire 'open-uri'\n\nBundler.require\n\nrequire_relative 'config/datamapper'\nrequire_relative 'models/post'\n\ndef send_notification\n mg_client = Mailgun::Client.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use app-specific color constants. Use result of execute method instead of rereading the stack.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.dirname($0)\n\nrequire 'clipboard'\nrequire_relative 'processor'\nrequire_relative 'ansi_colors'\n\nprocessor = ... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests work from Rails 3.2 to 5.2\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"themes/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specif... | ruby | chosen |
[
{
"from": "human",
"value": "Add index on council contact area and deleted.\n"
},
{
"from": "gpt",
"value": "class AddCouncilContactsIndexOnAreaIdAndDeleted < ActiveRecord::Migration\n def self.up\n add_index :council_contacts, [:area_id, :deleted], :name => 'index_council_contacts_on_area_i... | ruby | chosen |
[
{
"from": "system",
"value": ":bug: Fix fonts install skipping issue\n\nnot_if condition isn't correct.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# https://github.com/adobe-fonts/source-han-code-jp/archive/2.011R.tar.gz\n# node['source_han_code_jp_conts']['version']\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add button class to toolbar\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Toolbar::MiqAlertCenter < ApplicationHelper::Toolbar::Basic\n button_group('miq_alert_vmdb', [\n select(\n :miq_alert_vmdb_choice,\n 'fa fa-cog fa-lg',\n t = N... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ENV var check in http basic auth\n"
},
{
"from": "human",
"value": "module Spree\n class AdyenNotificationsController < StoreController\n skip_before_filter :verify_authenticity_token\n\n before_filter :authenticate\n\n def notify\n @notification ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the substitutable document types accessible\n\nAs the SubstitutionHelper is involved in publishing content, to work out\nif a draft can be published, you need to know what the substitutable\ndocument types are.\n"
},
{
"from": "human",
"value": "module Substitu... | ruby | chosen |
[
{
"from": "system",
"value": "Add a let for the game object\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass MockDisplay\nend\n\ndescribe TicTacToe::Game do\n let(:display) { double(:display) }\n\n it 'can start a game' do\n allow(display).to receive(:printf)\n game = Ti... | ruby | chosen |
[
{
"from": "system",
"value": "Make Aruba::Runtime specs test something\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe Aruba::Runtime do\n describe '#fixtures_directory' do\n let(:api) do\n klass = Class.new do\n include Aruba::Api\n\n def root_d... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests around route loading functionality\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"loading routes from the db\" do\n start_backend_around_all :port => 3160, :identifier => \"backend 1\"\n start_backend_around_all :port => 3161, :ide... | ruby | chosen |
[
{
"from": "system",
"value": "Add stub for downtime unit tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass DowntimeTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add terraform as Rake target.\n\nEnables build of Terraform by: rake compile:terraform\n\nChange-Id: Ib9dac46d4cf6a8e3446d9aab6da29019f0335f38\n"
},
{
"from": "human",
"value": "# Copyright 2018 Google Inc.\n# Licensed under the Apache License, Version 2.0 (the \"Li... | ruby | chosen |
[
{
"from": "system",
"value": "Set working directory to pwd\n"
},
{
"from": "human",
"value": "require 'god'\n\nunless ENV.has_key?('HIPCHAT_API_TOKEN')\n abort 'Set HIPCHAT_API_TOKEN environment variable with your HipChat API Token: https://hipchat.com/account/api'\nend\n\nGod.watch do |w|\n w... | ruby | chosen |
[
{
"from": "human",
"value": "Put in attempt at Blueberry Hill, but the timing seems a bit off at the moment\n"
},
{
"from": "gpt",
"value": "# Section 2, Lesson 3 - Rhythm 3 - Blueberry Hill Rhythm\n# FIXME: The timing is a bit off here...\n# not sure how to accurately do 12/8 time\nrequire \"#{... | ruby | chosen |
[
{
"from": "system",
"value": "Convert raw SQL to Arel\n"
},
{
"from": "human",
"value": "require 'memoist'\n\nclass County < ActiveRecord::Base\n extend Memoist\n belongs_to :state\n has_many :zipcodes\n\n validates :name, uniqueness: { scope: :state_id, case_sensitive: false },\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec with a few more details\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'auto_js'\n s.version = '0.9.0'\n s.date = '2015-03-20'\n s.summary = \"Auto-executes javascript based on current view\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec to point to new README format\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"jquery_mobile_rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec ensuring only disables are checked\n\nWe only want to enforce reasons for disabling of a linter, since when\ndisabling over a range you don't want to have to justify both control\ncomments.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescrib... | ruby | chosen |
[
{
"from": "system",
"value": "Print carriage crowding information like the 80’s\n"
},
{
"from": "human",
"value": "module Blocktrain\n class TrainCrowding\n CAR_LOADS = %w[2E64930W 2E64932W 2E64934W 2E64936W]\n\n def initialize(from, to)\n @atp_query = ATPQuery.new(from: from, to: to... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec test for fix of broken tagging in Datastores and My Services\n"
},
{
"from": "human",
"value": "describe ProviderForemanController, \"::AdvancedSearch\" do\n before :each do\n stub_user(:features => :all)\n controller.instance_variable_set(:@sb, {})\... | ruby | chosen |
[
{
"from": "human",
"value": "Add non-regression test for IO mocks\n"
},
{
"from": "gpt",
"value": "require_relative 'test_helper'\n\n# Trivial IO test class\n# Behavior is not really tested, as call is forwarded to File class\nclass IOTest < Minitest::Test\n def test_method_IO_read_works\n :... | ruby | chosen |
[
{
"from": "system",
"value": "Add array helper for getting surface"
},
{
"from": "human",
"value": "module MCSchematic\n class ArrayHelper\n # Create a multidimensional array\n def self.multi_array(data, width, height, length)\n blocks = []\n for y in 0..(height - 1)\n y_... | ruby | chosen |
[
{
"from": "system",
"value": "Add --version flag to print the version\n"
},
{
"from": "human",
"value": "require 'rails5/spec_converter/text_transformer'\nrequire 'optparse'\n\nmodule Rails5\n module SpecConverter\n class CLI\n def initialize\n @options = {}\n OptionParser... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify collection management in Interface\n"
},
{
"from": "human",
"value": "require \"rspec/contracts/interaction\"\nrequire \"rspec/contracts/interaction_group\"\n\nmodule RSpec\n module Contracts\n class Interface\n attr_reader :name\n\n def initi... | ruby | chosen |
[
{
"from": "system",
"value": "Load the statsd handler by default without another require\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'camayoc/thread_safety'\nrequire 'camayoc/stat_event'\nrequire 'camayoc/handlers/timing'\nrequire 'camayoc/handlers/filter'\nrequire 'camayoc/ha... | ruby | chosen |
[
{
"from": "system",
"value": "Add newline after host file to fix fold"
},
{
"from": "human",
"value": "require 'shellwords'\nrequire 'travis/build/addons/base'\n\nmodule Travis\n module Build\n class Addons\n class Hosts < Base\n SUPER_USER_SAFE = true\n HOSTS_FILE = '/etc... | ruby | chosen |
[
{
"from": "system",
"value": "Use US East timezone as default - at least for the moment.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for case-sensitive systems in Kindle Cask\n"
},
{
"from": "human",
"value": "cask :v1 => 'kindle' do\n version '41015'\n sha256 '1c15ce4df69044dc9d2d3562b7f5a8589b65efa5b8e64bc2bcdd7ed41c05df38'\n\n url \"http://kindleformac.amazon.com/#{version}/KindleForMac... | ruby | chosen |
[
{
"from": "system",
"value": "Enable to create a song with a user by the factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :song do\n live\n name 'テーマソング'\n artist 'アンプラグダー'\n sequence(:order) { |n| n }\n status :closed\n youtube_id 'https://www.youtub... | ruby | chosen |
[
{
"from": "system",
"value": "Add poison null byte spec\n"
},
{
"from": "human",
"value": "require File.expand_path(File.join(File.dirname(__FILE__), \"spec_helper\"))\ndescribe \"String tests\" do\n include FFI\n module LibTest\n extend FFI::Library\n ffi_lib TestLibrary::PATH\n atta... | ruby | chosen |
[
{
"from": "system",
"value": "Use rspec metadata to load context\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Anvil::Config do\n subject { Anvil::Config }\n before { Anvil::Config.reset }\n\n its('github.user') { should be_nil }\n its('github.token') { should be_nil... | ruby | chosen |
[
{
"from": "system",
"value": "Use a relative factsdir for the lib\n"
},
{
"from": "human",
"value": "require 'facter'\nrequire 'jgrep'\n\nmodule FacterDB\n\n def self.get_os_facts(facter_version='*', filter=[])\n filter_str = filter.map { |f| f.map { |k,v | \"#{k}=#{v}\" }.join(' and ') }.jo... | ruby | chosen |
[
{
"from": "system",
"value": "Improve run the command to package the extension\n\nSigned-off-by: Johanna Mantilla Duque <5cd76578dd906d3abcbebcbe5b23d6d7232b4085@gmail.com>\n"
},
{
"from": "human",
"value": "require 'haml'\nrequire 'paprika/generator'\n\nmodule Paprika\n class Tasks < Thor\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use digest instead of hexdigest\n\nAPI doc use $raw_output = true for md5 and sha1 functions\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'digest/md5'\nrequire 'digest/sha1'\nrequire 'base64'\nrequire 'uri'\nrequire 'open-uri'\n\nclass Promobox\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add singly linked list class\n"
},
{
"from": "gpt",
"value": "class SinlglyLinkedList\n def initialize\n @head = Node.new(value)\n end\n\n def add(value)\n node = Node.new(value)\n node.next = @head\n @head = node\n end\n\n def remove_front\n curr... | ruby | chosen |
[
{
"from": "system",
"value": "Allow asset_hash to work with Rails 2.3.x.\n"
},
{
"from": "human",
"value": "require 'asset_hash'\nrequire 'rails'\nmodule AssetHash\n class Railtie < Rails::Railtie\n rake_tasks do\n load \"tasks/asset_hash.rake\"\n end\n end\nend"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Rename method to check if purchaser owns book\n"
},
{
"from": "human",
"value": "class Purchasing\n extend Surrounded::Context\n\n initialize :purchaser, :book\n\n role :book do\n def was_written_by_purchaser?\n self.author == purchaser\n end\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Use `YAML.load` instead of `YAML.safe_load` because although Rubocop\nwants `safe_load`, it doesn't parse symbols (which is what the example\n`lti.yml` uses).\n"
},
{
"from": "human",
"value": "# You also need to explicitly enable OAuth 1 support in the environment.... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Boostrap no longer creates an RDS database for a public mysql offering.\"\n\nThis reverts commit ea7a17091d4d5208ad11feb155427ae18022d443.\n\nRequires a cross team pair. Also retro-actively changing a migration\nthat has already run is a no-no.\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mail not sending properly in production\n"
},
{
"from": "human",
"value": "ActionMailer::Base.smtp_settings = {\n address: \"smtp.gmail.com\",\n port: 587,\n domain: \"gmail.com\",\n user_name: \"bugtrackerapplication\",\n password: ENV[\"EMAIL_PA... | ruby | chosen |
[
{
"from": "system",
"value": "Add rdiscount as gem dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'joofaq/version'\n\nGem::Specification.new do |gem|\n gem.name... | ruby | chosen |
[
{
"from": "system",
"value": "Change scoping for down migration too\n"
},
{
"from": "human",
"value": "class OrganisationDefaultStringValues < ActiveRecord::Migration\n\n ATTRS = %i[\n name\n address\n postcode\n email\n description\n website\n telephone\n donation_info\... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve NameError occurring in TravisCI\n\nThe build is failing with multiple occurrences of the following error:\n`uninitialized constant Cucumber::Rails::ActionDispatch::IntegrationTest\n(NameError)`\n\nExample:\nhttps://travis-ci.org/cucumber/cucumber-rails/jobs/650040930\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add array accessors and method to set (delete all and add new) tags.\n"
},
{
"from": "human",
"value": "module SharedMethods\n def to_hash\n result = {}\n\n self.each do |key, value|\n if result[key]\n if result[key].is_a? Array\n result[... | ruby | chosen |
[
{
"from": "system",
"value": "Remove serverspec tests that are unable to be tested w/o TS key\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire 'serverspec'\n\nset :backend, :exec\n\ndescribe package('threatstack-agent') do\n it { should be_installed }\nend\n\ndescribe service('clou... | ruby | chosen |
[
{
"from": "human",
"value": "Add serverspec coverage for the default recipe!\n"
},
{
"from": "gpt",
"value": "require 'serverspec'\nrequire 'pathname'\n\ninclude Serverspec::Helper::Exec\n\n# serverspec's FreeBSD support is craptastic. We'll just make it think\n# it's executing on OS X.\nif RUBY... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning about arity of prepare\n"
},
{
"from": "human",
"value": "require 'graphql'\nrequire 'graphql/validation/version'\n\nmodule Graphql\n module Validation\n class ArgumentValidationError < GraphQL::ExecutionError\n def initialize(result)\n m... | ruby | chosen |
[
{
"from": "human",
"value": "Test that data CSV is valid\n\nThis checks that the CSV has the right number of values in each\nrow, and that each value is in the format we expect. It also\nchecks that the headings are in the order we expect.\n\nThe regexes used in these tests are for sense-checking only. For\... | ruby | chosen |
[
{
"from": "system",
"value": "Make OrderCollection spec test the right things\n\nOrderCollection was testing things in Order, so now it just makes sure it has an Order, which seems like a reasonable thing to depend on until we add more resources.\n"
},
{
"from": "human",
"value": "require 'spec_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"can't modify frozen NilClass\".\n"
},
{
"from": "human",
"value": "module Instagram\n module Response\n def self.create( response_hash, ratelimit_hash )\n data = response_hash.data.dup rescue response_hash\n data.extend( self )\n data.instan... | ruby | chosen |
[
{
"from": "system",
"value": "Set it to true so it'll run in a whitelist.\n\n/cc @benbalter\n"
},
{
"from": "human",
"value": "require \"jekyll_test_plugin/version\"\nrequire \"jekyll\"\n\nmodule JekyllTestPlugin\n class TestPage < Jekyll::Page\n def initialize(site, base, dir, name)\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.