conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make rubyzip version slightly more specific\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'docx_replace/version'\n\nGem::Specification.new do...
ruby
chosen
[ { "from": "system", "value": "Include discussion focus in embedded serializer attributes" }, { "from": "human", "value": "module EmbeddedAttributes\n extend ActiveSupport::Concern\n \n included do\n class_attribute :_embedded_attributes\n self._embedded_attributes = []\n end\n \n mod...
ruby
chosen
[ { "from": "system", "value": "Add example to EventData::Read control\n" }, { "from": "human", "value": "module EventStore\n module Client\n module HTTP\n module Controls\n module EventData\n module Read\n def self.raw_data(number=nil, time: nil, stream_name: n...
ruby
chosen
[ { "from": "system", "value": "Increase Mac OS X deployment target to 10.8\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Primus\"\n s.version = \"0.0.2\"\n s.summary = \"Easily switch between different real-time Objective-C fr...
ruby
chosen
[ { "from": "system", "value": "Fix support for older Ruby not compatible with Rack >= 2.0.\n\nFrom Ruby versions that do not work with Rack >= 2.0, only version 2.1\nis still maintained, so support for other versions can be dropped.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nre...
ruby
chosen
[ { "from": "human", "value": "Add Command line bin script for testing from the command line\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nbegin\n require 'dest'\nrescue LoadError\n require 'rubygems'\n require 'dest'\nend\n\n# Do a check for rails in here.\n\nif ARGV[0]\n if File.fi...
ruby
chosen
[ { "from": "system", "value": "Add :search to parameters filter\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Configure sensitive parameters which will be filtered from the log file.\n\n\n\n\n\n\n\nRails.application.config.filter_parameters +=...
ruby
chosen
[ { "from": "system", "value": "Revert \"update homebrew to v0.16.0\"\n" }, { "from": "human", "value": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy ...
ruby
chosen
[ { "from": "system", "value": "Add example to ensure the aliases are in the expected state after optimization\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Optimizer::Relation::Operation::Insertion::RenameLeft, '#optimize' do\n subject { object.optimiz...
ruby
chosen
[ { "from": "system", "value": "Fix error while trying to withdraw from a run you aren't signed up for\n" }, { "from": "human", "value": "class Mutations::WithdrawMySignup < GraphQL::Schema::RelayClassicMutation\n field :signup, Types::Signup, null: false\n argument :run_id, Int, required: true,...
ruby
chosen
[ { "from": "system", "value": "Make it so that the organizations API call can filter based on categories\n" }, { "from": "human", "value": "class Api::V1::OrganizationsController < Api::V1::ApplicationController\n def index\n @organizations = Organization.paginate(:page => params[:page])\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary flash messages about logging in and out\n" }, { "from": "human", "value": "module Casein\n class UserSessionsController < Casein::CaseinController\n \n unloadable\n \n skip_before_filter :authorise, :only => [:new, :create]\n befor...
ruby
chosen
[ { "from": "system", "value": "Fix ls-taps for v3 API\n\nThis doesn't handle paginated results, but it fetches the 100 most\nstarred results so that's probably good enough for now.\n\nFixes #26566.\n" }, { "from": "human", "value": "require 'utils/json'\n\nGitHub.open \"https://api.github.com/leg...
ruby
chosen
[ { "from": "system", "value": "Increment gem version to 0.1.1\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'antimony'\n s.version = '0.1.0'\n s.summary = 'TN5250/AS400 automation'\n s.description = 'DSL for writing scripts to drive TN5250 green-sc...
ruby
chosen
[ { "from": "system", "value": "Fix env variable to username\n" }, { "from": "human", "value": "# Copyright 2015 Nordstrom, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of t...
ruby
chosen
[ { "from": "system", "value": "Modify migration to make sure it doesn't run if column exists.\n" }, { "from": "human", "value": "class AddToiletToPois < ActiveRecord::Migration\n def change\n add_column :pois, :toilet, :boolean\n add_index :pois, [ :toilet, :status ]\n end\nend\n" }, ...
ruby
chosen
[ { "from": "human", "value": "Add in definition required to create the template\n" }, { "from": "gpt", "value": "execute 'create_postgis_template' do\n not_if \"psql -qAt --list | grep -q '^#{node['postgis']['template_name']}\\|'\", :user => 'postgres'\n user 'postgres'\n command <<CMD\n(creat...
ruby
chosen
[ { "from": "system", "value": "Fix logic error in redirect_on_failure method for auth controller\n" }, { "from": "human", "value": "# TODO: Make it run on Heroku\n\nclass AuthController < ApplicationController\n skip_before_filter :login_required\n\n def callback\n provider = params[:provide...
ruby
chosen
[ { "from": "system", "value": "Allow admins to view any pod\n" }, { "from": "human", "value": "class PodsController < ApplicationController\n\n def index\n end\n\n def show\n case params[:id]\n when 'this-month'\n @pod = Pod.where(month: Date.today.beginning_of_month).first\n whe...
ruby
chosen
[ { "from": "system", "value": "Add : to confirmation email subject\n" }, { "from": "human", "value": "class ConfirmationMailer < ApplicationMailer\n def invitation_accepted(invitation)\n @user = invitation.user\n @event = invitation.event\n mail(to: @user.email, subject: \"🚀 #{@event.n...
ruby
chosen
[ { "from": "system", "value": "Add user name in notification mail\n" }, { "from": "human", "value": "class NotificationMailer < ActionMailer::Base\n include Resque::Mailer\n\n helper :markdown, :comments\n\n def mention(user_id, comment_id)\n @user = User.find user_id\n @comment = Commen...
ruby
chosen
[ { "from": "system", "value": "Fix importer by adding back in the reject_if condition\n" }, { "from": "human", "value": "module Edition::HtmlVersion\n extend ActiveSupport::Concern\n\n class Trait < Edition::Traits::Trait\n def process_associations_before_save(edition)\n return unless @...
ruby
chosen
[ { "from": "system", "value": "Refactor BlankRdate to disentangle some methods\n" }, { "from": "human", "value": "class BlankRdate < Problem\n\n def self.model_name\n Problem.model_name\n end\n\n before_validation :select \n validate :query\n \n DESCRIPTION = 'Order rdate is blank but st...
ruby
chosen
[ { "from": "human", "value": "Add a gemspec for bundling\n" }, { "from": "gpt", "value": "Gem::Specification.new do |s|\n s.name = 'dynamic_form'\n s.version = '1.0.0'\n s.author = 'David Heinemeier Hansson'\n s.email = 'david@loudthinking.com'\n s.summary = 'Deprecated dynamic form helpers:...
ruby
chosen
[ { "from": "system", "value": "Add artefact_api helper to ApplicationController\n" }, { "from": "human", "value": "require 'publisher_api'\nrequire 'imminence_api'\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery\n\n helper_method :api_host\n def api_host\n Ple...
ruby
chosen
[ { "from": "system", "value": "Add brief p message on future update logic\n" }, { "from": "human", "value": "class ExperimentsController < ApplicationController\n\n def index\n @experiments = Experiment.all\n render :index\n end\n\n def show\n @experiment = Experiment.find(params[:id]...
ruby
chosen
[ { "from": "system", "value": "Clean up style for seed script\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 alongside the db with db:setup)...
ruby
chosen
[ { "from": "system", "value": "Add rake development dependency for travis-ci.\n" }, { "from": "human", "value": "# rspec-sleeping_king_studios.gemspec\n\nrequire File.expand_path \"lib/rspec/sleeping_king_studios/version\"\n\nGem::Specification.new do |gem|\n gem.name = 'rspec-sleeping_ki...
ruby
chosen
[ { "from": "system", "value": "Add debug information to converge run.\n\nAdd a call to `note.debug_value()` to the default recipe. This call\nallows us to see the value of `ipaddress` at run-time.\n\nNote tha the printing **does not** occur as part of the command `kitchen\nlogin` but only during the call to ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.3.0 ⇒ 0.0.3.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'connection'\n s.version = '0.3.0'\n s.summary = 'TCP client/server connection library offering both blocking ...
ruby
chosen
[ { "from": "human", "value": "Add specs for the DataExtractor\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe Page::DataExtractor do\n describe \"page title and description fields\" do\n it \"extracts data from basic markdown\" do\n md = <<~MD\n # Page ti...
ruby
chosen
[ { "from": "system", "value": "Write an rspec table matcher that gives informative error messages\n" }, { "from": "human", "value": "RSpec::Matchers.define :have_table_row do |row|\n\n match_for_should do |node|\n @row = row\n\n node.has_selector? \"tr\", text: row.join(\" \").strip # Chec...
ruby
chosen
[ { "from": "system", "value": "Use LICENSE not LICENSE.txt in gemspec\n" }, { "from": "human", "value": "SPEC = Gem::Specification.new do |s|\n s.name = \"tadpole\"\n s.version = \"0.1.0\"\n s.date = \"2008-05-13\"\n s.author = \"Loren Segal\"\n s.email ...
ruby
chosen
[ { "from": "system", "value": "Delete versions where release doesn't exist\n" }, { "from": "human", "value": "class SyncExtensionRepoWorker\n include Sidekiq::Worker\n\n def perform(extension_id, compatible_platforms = [])\n @extension = Extension.find(extension_id)\n `git clone #{@extens...
ruby
chosen
[ { "from": "system", "value": "Make log directory not relative to gem installation path" }, { "from": "human", "value": "require 'logger'\n\nmodule AdhearsionStats\n\n class MetricsLogger < Logger\n def format_message(severity, timestamp, progname, msg)\n nice = timestamp.strftime(\"%Y-%...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to reflect FriendlyId 3.1.0 dependency\n\nSigned-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>\n" }, { "from": "human", "value": "require File.expand_path('../lib/friendly_id/datamapper_adapter/version', __FILE__...
ruby
chosen
[ { "from": "system", "value": "Exclude Indexifier paths based on regex\n" }, { "from": "human", "value": "module Awestruct\n module Extensions\n class Indexifier\n\n def execute(site)\n site.pages.each do |page|\n if ( page.inhibit_indexifier || ( page.output_path =~ /^(....
ruby
chosen
[ { "from": "system", "value": "Print out of backtrace when working with threads\n" }, { "from": "human", "value": "module XYZ\n module CreateThread\n def self.defer(&block)\n Ramaze::defer(&wrap(&block))\n end\n\n private\n\n # wrap() - Added this part of code so if thread fails...
ruby
chosen
[ { "from": "system", "value": "Add dependency version for rspec and line 'em up\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\nrequire 'snapme/version'\n\nGem::Specification.new do |gem|\n gem.name = 'snapme'\n g...
ruby
chosen
[ { "from": "human", "value": "Add a rake task to import Orgs, Sites and Hosts\n" }, { "from": "gpt", "value": "namespace :import do\n task :orgs_sites_hosts, [:filename_or_mask] => :environment do\n begin\n Transition::Import::OrgsSitesHosts.from_redirector_yaml!(filename_or_mask)\n r...
ruby
chosen
[ { "from": "system", "value": "Add benchmark cucumber profile to profile loader spec\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire 'trisano/cucumber/profile_loader'\n\ninclude Trisano::Cucumber\n\ndescribe ProfileLoader do\n\n before :all do...
ruby
chosen
[ { "from": "human", "value": "Add some tests for matrix class\n" }, { "from": "gpt", "value": "describe Chatrix::Matrix do\n context 'when created with no args' do\n it 'has a default homeserver' do\n expect(subject.homeserver).to be_a String\n end\n\n it 'does not set an access to...
ruby
chosen
[ { "from": "system", "value": "Swap unless ... .nil? to if ...\n" }, { "from": "human", "value": "module Refinery\n class Plugins < Array\n\n def find_activity_by_model(model)\n unless (plugin = find_by_model(model)).nil?\n plugin.activity.detect {|activity| activity.class == mode...
ruby
chosen
[ { "from": "human", "value": "Add spec tests for ctxcfg define\n" }, { "from": "gpt", "value": "require 'spec_helper'\ndescribe 'citrix_unix::ctxcfg' do\n let(:title) { 'rspec-title' }\n let(:pre_condition) do\n <<-'ENDofPUPPETcode'\n class { '::citrix_unix':\n ctx_patch_base_path =...
ruby
chosen
[ { "from": "system", "value": "Fix specs in Ruby 1.8\n" }, { "from": "human", "value": "require 'helper'\n\ndescribe Octokit::Client do\n\n it \"should connect using the endpoint configuration\" do\n client = Octokit::Client.new\n endpoint = URI.parse(client.endpoint)\n connection = cli...
ruby
chosen
[ { "from": "system", "value": "Allow a custom SimpleCov adapter (aka profile)\n\nThis will fix the issue where code coverage is not fully reported for a Rails project or any other Ruby project containing files outside /lib." }, { "from": "human", "value": "module CodeClimate\n module TestReporte...
ruby
chosen
[ { "from": "system", "value": "Fix raising exception about unsupported stream callbacks\n\nException classes are not methods.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"action_cable/channel\"\n\nmodule ActionCable\n module Channel\n class Base # :nodoc:\n ...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warnings after rubocop update\n" }, { "from": "human", "value": "module Carrierwave\n module Base64\n module MountingHelper\n module_function\n\n def check_for_deprecations(options)\n return unless options[:file_name].is_a?(String)\n...
ruby
chosen
[ { "from": "system", "value": "Complete test gem is correctly desvribe\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe 'RubyRabbitmqJanus::RRJ', type: :config do\n it 'Has a version number' do\n expect(RubyRabbitmqJanus::VERSION).not_to be...
ruby
chosen
[ { "from": "system", "value": "Comment out debugger gem as dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cryptocoincharts_api/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "human", "value": "Add Kollaborate Marker Import 2.1.2.0\n\nImports Kollaborate marker lists into Final Cut Pro 7, FCP X\nand Adobe Premiere.\n\nUpdated license info\n" }, { "from": "gpt", "value": "cask 'marker-import' do\n version '2.1.2.0'\n sha256 '82654c0b409af3ce609840e196c7198...
ruby
chosen
[ { "from": "system", "value": "Change the author email address.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DateRangePicker'\n s.version = '1.0'\n\n s.homepage = 'https://github.com/MrMage/DateRangePicker'\n s.summary...
ruby
chosen
[ { "from": "human", "value": "Add gemspec to version controlled files so we can participate with bundler as a git gem\n" }, { "from": "gpt", "value": "# Generated by jeweler\n# DO NOT EDIT THIS FILE DIRECTLY\n# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command\n# -*- encoding:...
ruby
chosen
[ { "from": "system", "value": "Add a development dependency gem\n" }, { "from": "human", "value": "require File.expand_path('../lib/rack/revision/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"rack-revision\"\n s.version = Rack::Revision::VERSION\n s.summary =...
ruby
chosen
[ { "from": "system", "value": "Add Ruby on Rails as dependency of the gem.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'minitest/rails/assertions/version'\n\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Allow passing through of options to Solr::Connection\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@524982 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "human", "value": "# The ASF licenses this file to You under the Apache License, Version 2.0\n# (...
ruby
chosen
[ { "from": "system", "value": "Fix external command example: Cask => Hbc\n" }, { "from": "human", "value": "# brewcask-dumpcask\n#\n# A trivial `brew cask` external command, implemented in Ruby.\n# Loads a Cask definition, then dumps it in YAML format.\n# Example usage:\n#\n# brew cask dumpca...
ruby
chosen
[ { "from": "system", "value": "Move readonly load to katla\n" }, { "from": "human", "value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :rails => {\n :status => :role,\n :members => [:tomh, :gra...
ruby
chosen
[ { "from": "system", "value": "Send email to mailcatcher if MAILCATCHER env variable is set.\n" }, { "from": "human", "value": "OneBody::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your appli...
ruby
chosen
[ { "from": "system", "value": "Fix tests after module.pp change\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'selinux::module' do\n let(:title) { 'mymodule' }\n include_context 'RedHat 7'\n\n context 'present case' do\n let(:params) do\n {\n source: 'test...
ruby
chosen
[ { "from": "system", "value": "Update republish `StatisticsAnnouncement` data migration\n\n`StatisticsAnnouncement` has a default_scope that excludes unpublished\nannouncements. This commit adds unscoped.\n" }, { "from": "human", "value": "StatisticsAnnouncement.where.not(content_id: \"\").find_e...
ruby
chosen
[ { "from": "system", "value": "Add initial support for verification and instantiating a Watir Chrome browser.\n" }, { "from": "human", "value": "require 'pwelements'\n\ndef generate_hw(student_name)\n\tseed = student_name.to_i(36)\n\t$prng = Random.new(seed)\n\tdesc = $pwelements.map{ |element|\n...
ruby
chosen
[ { "from": "human", "value": "Test file for the mentors controller helper.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\n# Specs in this file have access to a helper object that includes\n# the MentorsHelper. For example:\n#\n# describe MentorsHelper do\n# describe \"string concat\...
ruby
chosen
[ { "from": "human", "value": "Add spec for QUIT command." }, { "from": "gpt", "value": "describe ToyRobot::Command::Quit do\n subject(:command) { described_class.new }\n\n describe \"#perform\" do\n it \"exits the execution\" do\n expect(command).to receive(:exit).with(0)\n\n comma...
ruby
chosen
[ { "from": "system", "value": "Update gem description to remove warning\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"rufo/version\"\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Add better specs for the redirect decorator.\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe RedirectDecorator do\n it '#respond_to?' do\n expect(build(:redirect).decorate).to respond_to(\n :status_code_collection, :summary\n )\n e...
ruby
chosen
[ { "from": "system", "value": "Modify gemspec to setup bugfix release version\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'git-external'\n s.version = '0.1'\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Daniel Cestari\"]\n s.email = [\"dcestari@gmail.com...
ruby
chosen
[ { "from": "system", "value": "Add an application error check for submitting paper.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature \"Submitting a paper\", js: true do\n before do\n sign_in_page = SignInPage.visit\n sign_in_page.sign_in author\n end\n\n let(:author) {...
ruby
chosen
[ { "from": "system", "value": "Use an explicitly not-valid requests to test ClientError\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe KJess::ClientError do\n before do\n @client = KJess::Spec.kjess_client()\n end\n\n after do\n KJess::Spec.reset_server( @client )\n...
ruby
chosen
[ { "from": "system", "value": "Allow -v or --version to get back the version\n" }, { "from": "human", "value": "require 'thor'\nrequire 'thor/group'\n\nmodule SpreeCmd\n class Command\n\n if ARGV.first == 'version'\n puts Gem.loaded_specs['spree_cmd'].version\n elsif ARGV.first == 'ex...
ruby
chosen
[ { "from": "system", "value": "Update build version and iteration for Graylog 1.2.0-rc.1\n" }, { "from": "human", "value": "name 'graylog'\nmaintainer 'Marius Sturm'\nhomepage 'https://graylog.org'\n\ninstall_dir '/opt/graylog'\nbuild_version '1.1.6'\nbuild_iteration 3\n\noverride :ruby, ...
ruby
chosen
[ { "from": "system", "value": "Make Seed data more realistic\n\nUpdates the organisation slug to be government-digital-service. This\nwill be needed to run the app locally when Manuals Publisher [requests\norganisational data][2] from the [/api/organisations][1] endpoint.\n\n[1]: https://www.gov.uk/api/organ...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec for easier automatic discovery" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/barber/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"tchak\", \"twinturbo\"]\n gem....
ruby
chosen
[ { "from": "system", "value": "Remove invalid shipments when changing shipping address\n" }, { "from": "human", "value": "module OnePageCheckout\n class ShippingAddressWidget < Apotomo::Widget\n has_widgets do |panel|\n panel << widget('one_page_checkout/shipping_address_book/panel',\n ...
ruby
chosen
[ { "from": "system", "value": "Add tvOS support to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"AlgoliaSearchClientSwift\"\n spec.module_name = 'AlgoliaSearchClientSwift'\n spec.version = \"8.0.0-beta.6\"\n spec.summary = \"Algolia Sear...
ruby
chosen
[ { "from": "system", "value": "[Spec] Fix return value of image_tags for mocked DockerClient\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nCONTAINER = Docker::Container.send(:new, Docker::Connection.new('http://example.org', {}), 'id' => SecureRandom.hex)\nIMAGE = Docker::Im...
ruby
chosen
[ { "from": "system", "value": "Update description type from string to text" }, { "from": "human", "value": "class CreatePosts < ActiveRecord::Migration\n def change\n create_table :spree_posts do |t|\n t.string :title\n t.string :description\n t.boolean :published\n\n t.ti...
ruby
chosen
[ { "from": "system", "value": "Edit migration -- remove redundant index statement on polymorphic association column\n" }, { "from": "human", "value": "class CreateVotes < ActiveRecord::Migration\n def change\n create_table :votes do |t|\n t.integer :user_id, index: true, foreign_key: tru...
ruby
chosen
[ { "from": "system", "value": "Use new named thread functionality in comps beats example" }, { "from": "human", "value": "def loopr\n sample :loop_compus, :rate, [0.5, 1, 1, 1, 1, 2].choose if rand < 0.9\n sleep sample_duration(:loop_compus)\nend\n\ndef bass\n sample :bass_voxy_c, :amp, rrand(...
ruby
chosen
[ { "from": "human", "value": "Add script to generate hive formatted json data\n" }, { "from": "gpt", "value": "require 'twitter'\nrequire 'colored'\nrequire 'pp'\nrequire 'CSV'\nrequire 'json'\nrequire 'fileutils'\n\n\ndef load_user_lib(filename)\n JSON.parse(IO.read(filename))\nend\n\nGROUP = \...
ruby
chosen
[ { "from": "human", "value": "Add serverspec tests for services default\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe service('ntpd') do\n it { should be_enabled }\nend\n\n# These shouldn't start on boot, they are confd enabled/disabled\ndescribe service('httpd') do\n it { ...
ruby
chosen
[ { "from": "system", "value": "Add the Rubyforge project name.\n" }, { "from": "human", "value": "spec = Gem::Specification.new do |s|\n s.name = 'google_analytics'\n s.version = '1.1.1'\n s.date = \"2009-01-02\"\n s.author = 'Graeme Mathieson'\n s.email = 'mathi...
ruby
chosen
[ { "from": "system", "value": "Update the Rails version check to accept 3.0.0.\n" }, { "from": "human", "value": "require 'caulfield/middleware'\n\nmodule Caulfield\n class << self\n delegate :reset, :request, :env, \n :status, :headers, :body,\n :session, :cookies, :set_session, :s...
ruby
chosen
[ { "from": "system", "value": "Add queue tag to freddy:respond span\n\nAll other traces already have this tag.\n" }, { "from": "human", "value": "class Freddy\n module Consumers\n class RespondToConsumer\n def self.consume(*attrs, &block)\n new(*attrs).consume(&block)\n end\n...
ruby
chosen
[ { "from": "system", "value": "Tidy Bruce up a little\n" }, { "from": "human", "value": "module Bruce\n module ::ActionView\n module Helpers\n #\n # Call the bruce function within your views like so\n # <%= bruce %>\n #\n def bruce\n # Render the image\n ...
ruby
chosen
[ { "from": "system", "value": "Stop using rubygems to compare versions\n" }, { "from": "human", "value": "require 'facter'\nrequire 'json'\nrequire 'rubygems'\n\n# just in case we don't get any of them\nprovider = nil\nproviderid = nil\n\nif Facter.value('ec2_instance_id')\n # It's an amazon c...
ruby
chosen
[ { "from": "system", "value": "Fix - missing keyword argument name\n" }, { "from": "human", "value": "module AggregateRoot\n class Repository\n def initialize(event_store = default_event_store)\n @event_store = event_store\n end\n\n def store(aggregate)\n aggregate.unpublished...
ruby
chosen
[ { "from": "system", "value": "Make private step method private\n" }, { "from": "human", "value": "module PGQuilter\n class BuildRunner\n\n class BuildError < StandardError; end\n\n attr_reader :build, :harness\n\n def initialize(build, harness)\n @build = build\n @harness = h...
ruby
chosen
[ { "from": "human", "value": "Add interface to IAM service\n" }, { "from": "gpt", "value": "require 'aws-sdk'\nrequire 'contracts'\nrequire_relative 'service'\n\nmodule StackatoLKG\n module Amazon\n class IAM < Service\n Contract None => ::Aws::IAM::Types::User\n def user\n @...
ruby
chosen
[ { "from": "system", "value": "Add option to remove the last update time of whois DB\n" }, { "from": "human", "value": "require 'rack/ssl-enforcer'\nrequire 'simpleidn'\nrequire 'sinatra'\nrequire 'slim'\nrequire 'whois'\nrequire_relative 'helpers'\n\nhelpers { prepend Helpers }\n\nconfigure :pro...
ruby
chosen
[ { "from": "system", "value": "Add specs for updating score logic\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.describe Annotation, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "require \"rails...
ruby
chosen
[ { "from": "system", "value": "Remove explicit JSON.parse in search.\n\nIf you provide a JSON object, parse it before passing it to search.\n" }, { "from": "human", "value": "require_relative './jamespath/tokenizer'\nrequire_relative './jamespath/parser'\nrequire_relative './jamespath/vm'\nrequir...
ruby
chosen
[ { "from": "system", "value": "Add gds-sso mock auth autologin to feature specs\n\nWhen running feature specs individually, they were failing due to a missing\nauthentication.\n" }, { "from": "human", "value": "module AuthenticationHelpers\n def stub_user\n @stub_user ||= User.create!(uid: Se...
ruby
chosen
[ { "from": "system", "value": "Update specs since Post now has a type\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Admin\n describe PostsController do\n before { sign_in(FactoryGirl.create(:admin)) }\n\n describe 'a GET to :index' do\n let(:posts) { [FactoryGirl....
ruby
chosen
[ { "from": "system", "value": "Use the version constant rather than rubygems to get the version.\n\nGem.loaded_specs['redis'] was returning nil when using bundler's\nstandalone mode (which avoids using rubygems at runtime)." }, { "from": "human", "value": "module Qless\n class Lua\n LUA_SCRIP...
ruby
chosen
[ { "from": "system", "value": "FIx reference to SQL adapter\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule RubyEventStore::ROM\n RSpec.describe SQL::SpecHelper do\n include SchemaHelper\n\n around(:each) do |example|\n begin\n establish_database_connection\n...
ruby
chosen
[ { "from": "system", "value": "Fix already-initialized constant errors in Cucumber tests\n" }, { "from": "human", "value": "Given /^the Reddit service returns comments for the user \"(.*?)\"$/ do |user|\n ROOT = File.expand_path(\"../../../test/responses\", __FILE__)\n \n stub_request(:get, \"...
ruby
chosen
[ { "from": "system", "value": "Clean up gem root file\n" }, { "from": "human", "value": "require 'tamarillo/version'\nrequire 'tamarillo/tomato'\nrequire 'tamarillo/tomato_basket'\n\nmodule Tamarillo\nend\n" }, { "from": "gpt", "value": "require 'tamarillo/version'\nrequire 'tamarillo...
ruby
chosen
[ { "from": "system", "value": "Fix path to version file\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'i2c/drivers/SS1602/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add development dependencies to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/sinatra/param/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"sinatra-param\"\n s.authors = [\"Mattt...
ruby
chosen