conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Create Location object for calculating distances\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'geokit'\nrequire'pry'\n\nGeokit::default_units = :miles\nGeokit::default_formula = :sphere\nGeokit::Geocoders::request_timeout = 3\n\nclass Location\n # in... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to sniff out RUBY_PLATFORM strings.\n"
},
{
"from": "gpt",
"value": "project_path = File.expand_path('..', __dir__)\n\nruby_version = ARGV[0]\nraise 'Missing version argument' if ruby_version.nil? || ruby_version.empty?\n\ntarget_basepath = \"Debug (#{ruby... | ruby | chosen |
[
{
"from": "system",
"value": "vagrant: Bump all Vagrant box versions\n\nThese new VM images include a new Ubuntu 20.04.4 version and updated\nprepulled Docker images.\n\nSigned-off-by: Paul Chaignon <a027184a55211cd23e3f3094f1fdc728df5e0500@cilium.io>\n"
},
{
"from": "human",
"value": "# -*- mod... | ruby | chosen |
[
{
"from": "human",
"value": "Add RubyInstaller VTune build override sample.\n\nThis sample assumes you're trying to build using the RubyInstaller\nrecipes and trying to build an MRI Ruby source branch that's had\nit's configure.in updated to recognize the --enable-vtune command\nline option.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ARGF.gets specs to run on Rspec.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire File.dirname(__FILE__) + '/shared/gets'\n\ndescribe \"ARGF.gets\" do\n it_behaves_like :argf_gets, :gets\nend\n\ndescribe \"ARGF.g... | ruby | chosen |
[
{
"from": "system",
"value": "Add Haml as development dependency"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/hogan_assets/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Les Hill\"]\n gem.email = [\"leshil... | ruby | chosen |
[
{
"from": "system",
"value": "Set deprecation behavior to :notify in rails\n"
},
{
"from": "human",
"value": "begin\n require 'rails/railtie'\n\n # Register as early as possible to catch more warnings.\n # Warnings are enqueued and sent after gem is configured.\n GitHub::Deprecation.register... | ruby | chosen |
[
{
"from": "system",
"value": "Modify podspec to avoid globbing umbrella header in source_files\n\nIn order to ensure the podspec validates and avoid grouping the umbrella\nheader into the source_files of the podspec, this commit replaces the\nfile glob with a more specific one.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Change country factory to 'United States of Foo' to prevent conflicts\nwith real United States from fixtures\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :country, :class => Spree::Country do\n iso_name 'UNITED STATES'\n name 'United Sta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented out noop test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ChargeFlowTest < ActionDispatch::IntegrationTest\n # test \"the truth\" do\n # assert true\n # end\n setup do\n @charity = Charity.new\n @round = Round.creat... | ruby | chosen |
[
{
"from": "system",
"value": "Add index before going through builds in a migration\n"
},
{
"from": "human",
"value": "class ScheduleBuildStageMigration < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n MIGRATION = 'MigrateBuildStage'.freeze\n BATCH... | ruby | chosen |
[
{
"from": "system",
"value": "Update Fantasque Sans Mono to 1.6.3\n"
},
{
"from": "human",
"value": "class FontFantasqueSansMono < Cask\n url 'https://github.com/belluzj/fantasque-sans/releases/download/v1.6.2/FantasqueSansMono.zip'\n homepage 'https://github.com/belluzj/fantasque-sans'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken tests on Ruby 1.8.\n\nIf not on Ruby 1.9, the call to #force_encoding doesn't happen because the\ntest fails, and since that's the last expression in the method, it returns\nnil instead of the data from the file.\n"
},
{
"from": "human",
"value": "module ... | ruby | chosen |
[
{
"from": "system",
"value": "Update support and add description and summary\n\nSigned-off-by: Mikael Henriksson <db0bc01cafdcc5adfb51f6844b2d7ab21963ee5d@zoolutions.se>\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless... | ruby | chosen |
[
{
"from": "human",
"value": "Add a file for misc tests, starting with test_empty_repository to try to\nreproduce an issue reported by a user on the mailing list\n\n\ngit-svn-id: 907a5e332d9df9b9d6ff346e9993373f8c03b4a0@273 59d7d9da-0ff4-4beb-9ab8-e480f87378b2\n"
},
{
"from": "gpt",
"value": "#!/... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor on omniauth callbacks controller\n"
},
{
"from": "human",
"value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\n def self.add_providers\n OauthProvider.all.each do |p|\n define_method p.name.downcase do\n omnia... | ruby | chosen |
[
{
"from": "system",
"value": "Change product permalink references to slug\n"
},
{
"from": "human",
"value": "module Spree\n module Admin\n class SoundsController < ResourceController\n helper Spree::ProductSoundsHelper\n\n before_filter :load_data\n\n create.before :set_viewab... | ruby | chosen |
[
{
"from": "system",
"value": "Add backend support for email transactions\n"
},
{
"from": "human",
"value": "class TransactionsController < ApplicationController\n\n def create\n @bill = Bill.find(params[:bill_id])\n @customer = Customer.find_by(username: params[:username])\n @transacti... | ruby | chosen |
[
{
"from": "system",
"value": "ENHANCE: Add email to comments serialiser\n"
},
{
"from": "human",
"value": "class TaskCommentSerializer < ActiveModel::Serializer\n attributes :id, :comment, :created_at, :author, :recipient\n\n def author\n {\n id: object.user.id,\n name: object.use... | ruby | chosen |
[
{
"from": "system",
"value": "Disable CSRF checking for email signups."
},
{
"from": "human",
"value": "class EmailSignupsController < ApplicationController\n def new\n return error_404 unless subtopic.present?\n end\n\n def create\n return error_404 unless subtopic.present?\n\n if e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with Edit User button\n"
},
{
"from": "human",
"value": "class RegistrationsController < Devise::RegistrationsController\n add_breadcrumb 'New Account', :new_user_registration_path, only: %i[new create]\n add_breadcrumb 'Edit User', :edit_user_registrati... | ruby | chosen |
[
{
"from": "human",
"value": "Add Flymaster Firmware Installer (1.2)\n"
},
{
"from": "gpt",
"value": "class FmFwInstaller < Cask\n url 'http://www.flymaster-avionics.com/LinkClick.aspx?fileticket=Udjm4iuMhL8%3d&tabid=199&mid=804&forcedownload=true'\n homepage 'http://www.flymaster-avionics.com/... | ruby | chosen |
[
{
"from": "system",
"value": "Change pod version to 0.0.7\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'AvitoMediaPicker'\n s.module_name = 'AvitoMediaPicker'\n s.version = '0.0.6'\n s.summary = 'Avito Media Pic... | ruby | chosen |
[
{
"from": "system",
"value": "Load fabricators in deterministic order\n\nGlob sort order is platform dependent.\n"
},
{
"from": "human",
"value": "class Fabrication::Support\n\n class << self\n\n def fabricatable?(name)\n Fabrication::Fabricator.schematics.include?(name) || class_for(na... | ruby | chosen |
[
{
"from": "system",
"value": "Add flexibility to change the resource_name in Jeckle::RESTActions::Collection.search method.\n"
},
{
"from": "human",
"value": "module Jeckle\n module RESTActions\n def self.included(base)\n base.send :extend, Jeckle::RESTActions::Collection\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add valid atom:link tag to RSS feed.\n"
},
{
"from": "human",
"value": "xml.instruct! :xml, :version=>\"1.0\", :encoding=>\"UTF-8\"\nxml.instruct! 'xml-stylesheet', :type=>\"text/css\", :href => url_for(\"/stylesheets/rss.css\")\n\nxml.rss \"version\" => \"2.0\", \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix of issues with sentest dependency.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Kiwi-KIF\"\n s.version = \"1.0.1\"\n s.summary = \"Allows to write KIF integration tests using Kiwi framework\"\n s.homepage = \"h... | ruby | chosen |
[
{
"from": "system",
"value": "Bugfix: Correct sig handling defined in Rake task\n\nThe queue_classic rake task will now respond to the following signals:\n\n* INT - Instructs the worker to stop accepting new jobs.\n* INT - If INT is sent twice (or the worker's @running ivar is false) exit(1).\n* TERM - Set ... | ruby | chosen |
[
{
"from": "system",
"value": "Add better skeleton for dirty binding\n"
},
{
"from": "human",
"value": "require 'action_controller'\n\nmodule StrWatch\n module Controller\n extend ActiveSupport::Concern\n\n module ClassMethods\n\n # Creates a binding between an activerecord model\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable UAC via the windows_uac resource\n\nI wrote this specifically for this workflow\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "registry_key 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\... | ruby | chosen |
[
{
"from": "system",
"value": "Use '_' for unused variable\n"
},
{
"from": "human",
"value": "namespace :data_import do\n desc \"Migrate MS Access data from legacy database to new Postgres database\"\n task :import_csv_data, [:csv_filename] => [:environment] do |t, args|\n puts \"Importing C... | ruby | chosen |
[
{
"from": "system",
"value": "Use keyword proc in specs for 1.8.7.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Coupon do\n let(:coupon) { Coupon.find 'bettercallsaul' }\n\n before do\n stub_api_request :get, 'coupons/bettercallsaul', 'coupons/show-200'\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Cover all ruby files, not just those loaded already\n"
},
{
"from": "human",
"value": "module DeepCover\n class CoveredCode\n def tracker_info\n [@nb, @tracker_count]\n end\n end\n\n class Coverage\n def tracker_sizes\n @covered_code.values.map... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for StackOverflow::fetch yielding nil\n"
},
{
"from": "gpt",
"value": "require_relative 'spec_helper'\nrequire 'service/stack_overflow'\n\ninclude Service\n\ndescribe StackOverflow, '.fetch' do\n describe \"responses\" do\n let(:endpoint) { \"http://api.... | ruby | chosen |
[
{
"from": "system",
"value": "Add proper load order for testing\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire \"action_controller/railtie\"\nrequire \"action_view/railtie\"\nrequire 'active_support/all'\n\nrequire 'hal_api/rails'\n\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Expand the sample todo coverage.\n\nProjects and contexts are valid for all characters except spaces. Fun.\n"
},
{
"from": "human",
"value": "# Testing framework {{{\nrequire 'nanotest'\n# Optional testing dependency: nanotest_extensions\n# Gets some nice speed stat... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil from Message.quick_reply instead of crashing\n"
},
{
"from": "human",
"value": "module Facebook\n module Messenger\n module Incoming\n # The Message class represents an incoming Facebook Messenger message.\n class Message\n attr_reade... | ruby | chosen |
[
{
"from": "system",
"value": "Delete useless genereted spec example\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Npm::Rails do\n it 'has a version number' do\n expect(Npm::Rails::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n expect(false).to eq... | ruby | chosen |
[
{
"from": "system",
"value": "Support both bash and zsh\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: git\n# Recipe:: ldk\n#\n# Copyright (C) 2013 Logan Koester\n# \n# All rights reserved - Do Not Redistribute\n#\n\ntemplate '/home/ldk/.gitconfig' do\n source 'ldk/gitconfig.erb'\n ow... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Proposition.new spec to kill mutation\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Function::Proposition, '.new' do\n let(:object) { described_class }\n\n context 'with true argument' do\n subject { object.new(ar... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to send errors to GA\n"
},
{
"from": "human",
"value": "require \"capistrano/ghostinspector/analytics\"\nrequire \"staccato\"\n\nmodule Capistrano\n module Ghostinspector\n\t module Analytics\n\t def self.pushDeployment(ga_property, current_revision)... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil for api_user when api key invalid\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass Api::ApplicationController < ActionController::Base\n\n respond_to :json\n rescue_from ActiveRecord::RecordNotFound, :with => :handle_not_fou... | ruby | chosen |
[
{
"from": "system",
"value": "Allow getting started mode with 2 users.\n"
},
{
"from": "human",
"value": "class GettingStartedController < ApplicationController\n\n def index\n\n # check if first user already exists\n master_user = 0\n count = User.all.count()\n if count == 1\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add multiple countries' ratings fetching for iOS\n"
},
{
"from": "human",
"value": "require 'rest-client'\nrequire_relative '../util/string'\nrequire_relative '../ratings'\n\nmodule AppReputation\n class IosRatingsBuilder\n @@base_url = 'https://itunes.apple.com... | ruby | chosen |
[
{
"from": "system",
"value": "Add option to specify location of npm binary\n\nNow the Capistrano recipe has the ability to specify an npm binary to\nuse. Defaults to /usr/bin/npm.\n"
},
{
"from": "human",
"value": "namespace :breakfast do\n desc \"Compile assets for production use\"\n task :co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in missing source_root path\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Awe\n module Generators\n class UpdateGenerator < ::Rails::Generators::Base\n\n desc \"This generator updates AWE (Artefact Web Extensions) to the latest\"\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a few more specs to Warning.warn\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../spec_helper\", __FILE__)\n\ndescribe \"Warning.warn\" do\n ruby_version_is \"2.4\" do\n it \"complains\" do\n -> {\n Warning.warn(\"Chunky bac... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler-audit to version 0.5.0\n\nThis new release https://github.com/rubysec/bundler-audit/issues/137\nFixes https://github.com/rubysec/bundler-audit/issues/95\nAnd avoids confusion when there's a need of ignoring a certain security\nissue.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust count on hand for stock items based on variant in stock location factory\n\nGiven that stock_location.stock_items is unsorted, the behaviour of calling 'first' and 'last' is effectively random, leading it update the same stock item to have 30 items on hand.\n\nBy explici... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to store token on credit cards\n"
},
{
"from": "gpt",
"value": "class AddAdyenTokenToSpreeCreditCards < SolidusSupport::Migration[5.0]\n def change\n add_column :spree_credit_cards, :adyen_token, :text\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.3.0.1 to 2.3.0.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.3.0.1'\n s.descri... | ruby | chosen |
[
{
"from": "system",
"value": "Allow TimeoutError initialization without arguments\n\nFixes failing test in Rack adapter on Ruby 2.1.0\n"
},
{
"from": "human",
"value": "module Faraday\n class Error < StandardError; end\n class MissingDependency < Error; end\n\n class ClientError < Error\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ssl being true always\n"
},
{
"from": "human",
"value": "require 'logger'\n\nmodule Freshdesk\n class App\n attr_accessor :url, :username, :password, :ssl\n\n def initialize(url, username, password = 'X', ssl = false)\n @url = url\n @username = ... | ruby | chosen |
[
{
"from": "system",
"value": "Set timeout options to the Github::Client\n"
},
{
"from": "human",
"value": "module Github\n class Client\n attr_reader :connection, :rate_limit\n\n def initialize(options)\n @connection = Faraday.new(url: options.fetch(:url)) do |faraday|\n farad... | ruby | chosen |
[
{
"from": "system",
"value": "Add code to load main app extensions & overrides\n\nBased on: http://edgeguides.rubyonrails.org/engines.html#overriding-models-and-controllers\nbut modified paths to locate override files in common Rails location\n"
},
{
"from": "human",
"value": "module Orchid\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Add Tracker id to TasksTable\n"
},
{
"from": "human",
"value": "require 'hirb'\n\nmodule PT\n\n class DataTable\n\n extend ::Hirb::Console\n\n def initialize(dataset)\n @rows = dataset.map{ |row| DataRow.new(row, dataset) }\n end\n\n def print\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Fix remaining etablissements with shared dossier\n"
},
{
"from": "gpt",
"value": "namespace :after_party do\n desc 'Deployment task: fix_dossier_etablissement'\n task fix_dossier_etablissement: :environment do\n puts \"Running deploy task 'fix_dossier_etablissem... | ruby | chosen |
[
{
"from": "system",
"value": "Add app, bin, and lib to gem.\n"
},
{
"from": "human",
"value": "require './lib/vines/web/version'\n\nGem::Specification.new do |s|\n s.name = 'vines-web'\n s.version = Vines::Web::VERSION\n s.summary = %q[A web chat client for the Vines XMPP ch... | ruby | chosen |
[
{
"from": "system",
"value": "Use only one before block"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FCReminder::Gateways::Twilio do\n subject(:gateway) { FCReminder::Gateways::Twilio.new }\n let(:config) do\n {\n account_sid: \"accound sid\",\n auth_token: \... | ruby | chosen |
[
{
"from": "system",
"value": "Add initial dependencies to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'spira/active_record_isomorphisms/version'\n\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a global variable what has named pipe path\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'omniauth'\nrequire 'omniauth-deviantart'\n\nconfigure do\n set :sessions, true\n set :inline_templates, true\nend\n\nuse OmniAuth::Bui... | ruby | chosen |
[
{
"from": "system",
"value": "Fix | GridFS callback to destroy chunks\n"
},
{
"from": "human",
"value": "module Cenit\n class AccountGridFs < CarrierWave::Storage::GridFS\n class File < CarrierWave::Storage::GridFS::File\n\n def initialize(uploader, path, grid = nil)\n super(uplo... | ruby | chosen |
[
{
"from": "system",
"value": "Change to simpify color resolution.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule Pastel\n # Contains logic for resolving styles applied to component\n #\n # Used internally by {Delegator}.\n #\n # @api private\n class ColorResolver\n attr_re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in Error class name catched in the rake task.\n"
},
{
"from": "human",
"value": "# require 'queueing_rabbit/tasks'\n# will give you the queueing_rabbit tasks\n\nnamespace :queueing_rabbit do\n task :setup\n\n desc \"Start a queueing rabbit worker\"\n t... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude specjour internals from rspec backtraces\n"
},
{
"from": "human",
"value": "module Specjour::RSpec::Runner\n def self.run(spec, output)\n args = ['--format=Specjour::RSpec::DistributedFormatter', spec]\n ::RSpec::Core::Runner.run args, $stderr, output... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration for Orders table\n"
},
{
"from": "gpt",
"value": "class CreateOrders < ActiveRecord::Migration[5.1]\n def change\n create_table :orders do |t|\n t.integer :status, null: false, default: 0\n t.integer :customer_id, null: false\n\n t.ti... | ruby | chosen |
[
{
"from": "system",
"value": "[gemspec] Include C ext for Ruby 1.8.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/xcodeproj/gem_version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"xcodeproj\"\n s.version = Xcodeproj::VERSION\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec to test redis."
},
{
"from": "human",
"value": "require \"helper\"\n\ndescribe Redis::Lock, redis: true do\n\n before do\n @it = Redis::Lock.new( redis, \"test\" )\n end\n\n it \"can acquire and release a lock\" do\n redis.lock(\"test\") { true }... | ruby | chosen |
[
{
"from": "system",
"value": "Remove now-obsolete note about inspiration for specs\n"
},
{
"from": "human",
"value": "# This code is based on http://blog.datagraph.org/2010/04/rdf-repository-howto\n\nrequire 'spec_helper'\n\ndescribe RDF::AllegroGraph::Repository do\n before :each do\n @repo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Nagios server installs via package using a closed out pull request\n\n\nFormer-commit-id: 9d7bb90849b633cb2606f0bd5d4212319a059c6c [formerly bc361734ad782814e369a6a5c317cfc0b08efd0a] [formerly f3bd6eef3d2758750a4016907ef6c5d4c61dc50b [formerly ab8d153331ef3c8cde1a489d06e7ae... | ruby | chosen |
[
{
"from": "system",
"value": "Transform darwin TMO to RSO for uniformity.\n"
},
{
"from": "human",
"value": "module Hets\n module Prove\n class SZSParser\n attr_reader :prover, :output\n\n def initialize(prover, output)\n @prover = prover\n @output = output\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Load receipt class with the gem\n"
},
{
"from": "human",
"value": "# Lightspeed Restaurant Ruby Bindings\n# API spec at http://staging-exact-integration.posios.com/PosServer/swagger-ui.html\n\nrequire 'excon'\nrequire 'json'\n\nrequire 'lightspeed_restaurant/ver... | ruby | chosen |
[
{
"from": "system",
"value": "Replace conditionals with try/rescue blocks.\n"
},
{
"from": "human",
"value": "require 'rails'\nrequire 'rails/generators'\nrequire 'rails/generators/rails/plugin_new/plugin_new_generator' if Rails.version.to_f >= 3.1 && Rails.version.to_f <= 4.0\nrequire 'rails/ge... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to clear sidekiq\n\nI keep wanting to do this and end up in a console session copy/pasting\nfrom the API docs:\n\n```\nhttps://github.com/mperham/sidekiq/wiki/API\n```\n\nThis is better because now I don't have to remember anything.\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Modify podspec to support tvos\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\ts.name = 'GRMustache.swift'\n\ts.version = '0.11.0'\n\ts.license = { :type => 'MIT', :file => 'LICENSE' }\n\ts.summary = 'Flexible Mustache templates for Swift.'\n\ts.ho... | ruby | chosen |
[
{
"from": "human",
"value": "Add a script to parse the instruction data.\n\n* Instruction data is from http://unusedino.de/ec64/technical/aay/c64/bmain.htm\n* It is output to a CSV file format\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# Parse the 6510 instruction data from HTML pa... | ruby | chosen |
[
{
"from": "system",
"value": "Move action around in RunesController\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class RunesController < BaseController\n def index\n @runes = Rune.all\n end\n\n def create\n @rune = current_user.runes.new rune_param... | ruby | chosen |
[
{
"from": "system",
"value": "Use superclass method, removing needlessly overidden method\n\nThey have the same result:\n\n```\nirb(main):002:0> GuestDeviceController.method(:model).source_location\n=> [\"/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-96fc53321eda/app/controllers/gues... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused variable from mailer\n\nThe second variable passed by Devise is actually a hash, not a token.\n"
},
{
"from": "human",
"value": "Spree::UserMailer.class_eval do\n def signup_confirmation(user)\n @user = user\n mail(:to => user.email, :from => fr... | ruby | chosen |
[
{
"from": "system",
"value": "Use a proper config file for CKAN-meta location, rather than hardcoding\n\nThis ALSO removes all references to my filesystem from the source code :). Not that those references contain any sensitive information, but still, better not to put them in.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for method specificity in pretenders\n"
},
{
"from": "human",
"value": "require 'great_pretender/pretender'\nrequire 'ostruct'\n\nclass PrefixSlugPretender\n def say_hello\n \"Hello, guest!\"\n end\nend\n\nclass TestSlugPretender\n def ohai\n \"oha... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests to ensure centos/rhel google packages are installed\n\n[#116463189](https://www.pivotaltracker.com/story/show/11646318)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Google Stemcell', stemcell_image: true do\n context 'installed by... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary methods in the Node class\n"
},
{
"from": "human",
"value": "require_relative 'set'\n\n# The Node class is odd since it is used in LinkedLists, Graphs, and Trees. Such a complicated GodObject *could* be refactored into smaller\n# entities. Doing s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test to work in an order independent manner\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe GenericFileHelper do\n it \"draws add button\" do\n helper.add_field(:test).should == \n \"<button class=\\\"adder btn\\\" id=\\\"additional... | ruby | chosen |
[
{
"from": "system",
"value": "Use newer chef, relax constraint on ohai"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/pushy_client/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Mark Anderson\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Edit user controller so that login and signup immediately create a new session\n"
},
{
"from": "human",
"value": "get '/signup' do\n erb :'users/signup'\nend\n\nget '/login' do\n erb :'users/login'\nend\n\nget '/logout' do\n session.clear\n redirect '/'\nend\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add errors method to custom exception handler\n"
},
{
"from": "human",
"value": "module Bcx\n class ResponseError < Rapidash::ResponseError; end\nend\n"
},
{
"from": "gpt",
"value": "module Bcx\n class ResponseError < Rapidash::ResponseError\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"put reservations on a seperate queue\"\n\nThis reverts commit 544ebceef876b1aaf55df51cf346ecaf559ffebb.\n"
},
{
"from": "human",
"value": "class ReservationWorker\n include Sidekiq::Worker\n\n sidekiq_options :retry => false, :queue => :reservations\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use ActionController Base instead of API\n\nUntil Rails 5 is required\n"
},
{
"from": "human",
"value": "require 'action_controller'\nrequire 'active_support/configurable'\nrequire 'caprese/concerns/versioning'\nrequire 'caprese/controller/concerns/callbacks'\nrequi... | ruby | chosen |
[
{
"from": "human",
"value": "Add rest of 4.3 files\n"
},
{
"from": "gpt",
"value": "puts \"What is your first name?\"\nfirst_name = gets.chomp\nputs \"What is your middle name?\"\nmiddle_name = gets.chomp\nputs \"What is your last name?\"\nlast_name = gets.chomp\nputs \"Hello, #{first_name} #{mi... | ruby | chosen |
[
{
"from": "system",
"value": "TECH-4409: Use alias_method instead of prepend to avoid conflicts with hobo_support\n\nUses prepend causes infinite recursion when the hobo_support gem is also present. This gem will be present for a while until we remove it everywhere. Use the hobo version of the code here to ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the Steps debug panel\n"
},
{
"from": "human",
"value": "class Views::Steps::Index < Views::Base\n def content\n content_for :header_title, \"Navigation\"\n\n div class: \"slab\" do\n StepNavigation.sections.each do |section, steps|\n h3 secti... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to import contractors from a csv file\n"
},
{
"from": "gpt",
"value": "namespace :import_from_csv do\n desc \"Import contractors from CSV\"\n task :contractors, [:csv_path] => :environment do |t, args|\n current_count = Contractor.count\n Contractor.... | ruby | chosen |
[
{
"from": "system",
"value": "Change method from move files to copy files\n"
},
{
"from": "human",
"value": "module UltrasoundDriver\n class ProcessDirectory\n\n def initialize(input_path, destination_path)\n @input_path, @destination_path = input_path, destination_path\n @patients... | ruby | chosen |
[
{
"from": "system",
"value": "Improve AR 4.1 fallbacks clarity\n"
},
{
"from": "human",
"value": "module ActiveRecord::TypedStore\n\n module AR41Fallbacks\n\n def reload(*)\n _ar_41_reload_stores!\n super\n end\n\n private\n\n def _ar_41_reload_stores!\n self.class.st... | ruby | chosen |
[
{
"from": "system",
"value": "Replace \".should\" with \"expect\" as \".should\" is\ndeprecated."
},
{
"from": "human",
"value": "require 'proxyprotocol'\nrequire 'socket'\n\ndescribe \"Proxyprotocol::TCPSocket\" do\n\n it \"should send the proxy protocol header\" do\n server_socket = TCPSer... | ruby | chosen |
[
{
"from": "system",
"value": "[BUGFIX] Allow underscores and dashes in subdomains\n"
},
{
"from": "human",
"value": "module Fulmar\n module Domain\n module Service\n module Helper\n # Provides access helper to the database service from within a task\n module VhostHelper\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove command from test file\n"
},
{
"from": "human",
"value": "require 'helper'\n\nmodule Deploy\n class TestCommand < UnitTest\n\n def test_execute_returns_command\n c = Command.new('test')\n assert_equal '/usr/bin/env test', String(c)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace inspect with to_s for entry path\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby -w\n# -*- ruby -*-\n\nrequire 'svnx/base/action'\n\nmodule Svnx\n module Log\n end\nend\n\nmodule Svnx::Log\n class EntryPath\n include Comparable\n \n attr_reade... | ruby | chosen |
[
{
"from": "system",
"value": "Add a 'kind' parameter when registering calendars.\n\nWithout this, they were showing up as a 'custom application', rather\nthan an answer.\n"
},
{
"from": "human",
"value": "require 'registerable_calendar'\n\nnamespace :panopticon do\n desc \"Register application ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.