conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add test to check if Plus instance was created\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass PlusOneTest < ActiveSupport::TestCase\n\n test \"pluses someone with valid params\" do\n team = PrepareTeam.new.call(team_params)\n PlusOne.new(te... | ruby | chosen |
[
{
"from": "human",
"value": "Add bulk participant id generator\n"
},
{
"from": "gpt",
"value": "require './participant_verhoeff'\n\nParticipantTypes = ['A', 'B', 'C']\nFacilityRange = 0..5\nParticipantRange = 0..99\n\nparticipants = []\n\nParticipantTypes.each do |type|\n FacilityRange.each do ... | ruby | chosen |
[
{
"from": "system",
"value": "Use have_protected_instance_method for 1.9 compat\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire 'tempfile'\n\ndescribe \"Tempfile#_close\" do\n before(:each) do\n @tempfile = Tempfile.new(\"specs\")\n end\n \... | ruby | chosen |
[
{
"from": "system",
"value": "Update formula to version 4.3.1\n"
},
{
"from": "human",
"value": "class Bartycrouch < Formula\n desc \"Incrementally update/translate your Strings files\"\n homepage \"https://github.com/Flinesoft/BartyCrouch\"\n url \"https://github.com/Flinesoft/BartyCrouch.gi... | ruby | chosen |
[
{
"from": "system",
"value": "Prepend /usr/local/bin if docker keg not installed\n\nThis allows Homebrew users who prefer non-brew docker installations to\ncontinue using this formula.\n"
},
{
"from": "human",
"value": "class Codeclimate < Formula\n desc \"Code Climate CLI\"\n homepage \"https... | ruby | chosen |
[
{
"from": "system",
"value": "Bump Version to 1.0.118, based on SVN r118\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"gtm-oauth2-thekey\"\n s.version = \"1.0.0\"\n s.summary = \"Google OAuth2 Framework modified for TheKey.\"\n s.homepage = \"http... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing SSH module to git :bomb:\n"
},
{
"from": "gpt",
"value": "require 'net/ssh'\n\nmodule ElectricSheep\n module SSH\n def ssh_session(host, user, private_key, &block)\n Net::SSH.start(host.hostname, user,\n port: host.ssh_port,\n k... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to remove code when we are in Ruby 2.4\n"
},
{
"from": "human",
"value": "class Hash\n # Returns a new hash with the results of running +block+ once for every value.\n # The keys are unchanged.\n #\n # { a: 1, b: 2, c: 3 }.transform_values { |x| x ... | ruby | chosen |
[
{
"from": "system",
"value": "Test rendering a shadowed method\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\nrequire 'table'\n\nclass TableTest < Minitest::Unit::TestCase\n include Table\n def test_context\n t1 = Main.new(:template=>\"Hi <%= m %> and <%= n %>\", :contex... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for provers retrieval when parsing.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'OntologyVersion - Provers' do\n setup_hets\n let(:user) { create :user }\n let(:repository) { create :repository }\n\n before do\n stub_hets_for('p... | ruby | chosen |
[
{
"from": "system",
"value": "Remove underscore for ActiveSupport gem\n\nwhich works only for Rails 3\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/nacre/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Damon Allen ... | ruby | chosen |
[
{
"from": "system",
"value": "Update guard and rspec versions in gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'guard/spork/version'\n\nGem::Specification.new do |s|\n s.name = 'guard-spork'\n s.version = Gu... | ruby | chosen |
[
{
"from": "system",
"value": "Add fields in user show view\n"
},
{
"from": "human",
"value": "json.user @user, :id, :uid, :email, :name, :surname, :admin_role"
},
{
"from": "gpt",
"value": "json.user @user, :id, :uid, :email, :phone, :name, :surname, :admin_role, :created_at, :confir... | ruby | chosen |
[
{
"from": "human",
"value": "Add new GithubService via Octokit\n\nThis NewGithubService will eventually replace the current github_api\nGithubService class.\n"
},
{
"from": "gpt",
"value": "module NewGithubService\n ##\n # GithubService is miq-bot's interface to the Github API. It acts as a\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change dependency on rails to 4.0 and up"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"postgresql_lo_streamer/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Join the path with File.join\n\nHardcoding '/' as a path separator will break on systems where '\\' or some other path separator is used instead."
},
{
"from": "human",
"value": "require 'dotenv'\n\nmodule VagrantPlugins\n module Env\n class Config < Vagrant.plu... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for OS X\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\ts.name\t\t\t\t= 'JSQSystemSoundPlayer'\n\ts.version\t\t\t= '2.0.1'\n\ts.summary\t\t\t= 'A fancy Obj-C wrapper for iOS System Sound Services'\n\ts.homepage\t\t\t= 'https://github.com/j... | ruby | chosen |
[
{
"from": "system",
"value": "Change Method Name, Count Votes To Get User Votes\n\nChange the name and function of Count Votes from to Get User Votes\nbecause the count votes is doing too many select statements to the\ndatabase. Get User Votes will find a participially vote type and return\nan array of obje... | ruby | chosen |
[
{
"from": "system",
"value": "Add sizes to image model\n"
},
{
"from": "human",
"value": "class Item < ApplicationRecord\n belongs_to :user\n belongs_to :section\n has_attached_file :image,\n storage: :s3,\n s3_credentials: {access_key_id: ENV[\"AWS_KEY\"], secret_access_key: ENV[\"AWS_... | ruby | chosen |
[
{
"from": "system",
"value": "Add default order by latest first"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n belongs_to :category\n belongs_to :user\n\n\n has_and_belongs_to_many :joined_users,\n class_name: \"User\",\n join_table: \"user_joined_post\",\n foreig... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ActiveSupport:: to prevent deprecation warning\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :token_authenticatable, :encryptable, :confirmable, :timeoutable and :omniauthabl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where exception is thrown when trying to edit User\n\nThis is caused because User model objects do not have \"posted_by\" field,\ninstead, they have \"username\". Thus, instance_of? method is used to determine\nthe type of the argument, and get the \"owner\" of that obj... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for active? method of project model\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Project do\n\n describe \"next\" do\n before do\n @first = create(:project)\n @second = create(:project)\n @third = create(:projec... | ruby | chosen |
[
{
"from": "human",
"value": "Test for clearing all delayed jobs\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nfeature 'clearing all of the delayed jobs' do\n\n include SharedFunctionsForFeatures\n\n scenario 'clearing the jobs from the delayed index' do\n given_there_are_two_de... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify Find scanner spec set-up\n\nSigned-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')\n\ndescribe CommandT::Scanner::Find do... | ruby | chosen |
[
{
"from": "system",
"value": "Test for matching ACL grants on copied file\n\nUntil now we didn't ensure that the files generated with\nCarrierWave::Storage::AWSFile#copy_to were given the same ACL\n(Access Control List) as the original files.\n\nAs explained in https://github.com/sorentwo/carrierwave-aws/is... | ruby | chosen |
[
{
"from": "system",
"value": "Use one second timeout in cukes\n"
},
{
"from": "human",
"value": "require 'stringio'\nrequire 'timeout'\nrequire_relative '../../lib/passman'\nrequire_relative 'mock_standard_in'\n\nmodule CommandHelper\n attr_reader :stdout, :stderr\n\n def invoke(*argv)\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Add pending specs to describe expected behavior\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Henson::Source::Git do\n it \"can be instantiated\" do\n Henson::Source::Git.new('foo', :bar => :baz).should_not be_nil\n end\nend"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs broken by removing test_classes require\n"
},
{
"from": "human",
"value": "require 'perpetuity/mapper'\n\nmodule Perpetuity\n describe Mapper do\n let(:mapper) do\n Mapper.new do\n end\n end\n\n subject { mapper }\n\n it { should be_... | ruby | chosen |
[
{
"from": "system",
"value": "Support Rails 6 by increasing max version constraint"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'rails_admin_rollincode/version'\n\n# Describe your gem and declare its dependencies:\nGem::... | ruby | chosen |
[
{
"from": "system",
"value": "Update CaptureHelper to reflect the new capture method.\n\nMay need to adjust this a little more.\n"
},
{
"from": "human",
"value": "module CaptureHelper\n # capture(iface, options) { 'ping -c 125 127.0.0.1 }\n def capture(iface, options={}, &blk)\n timeout = o... | ruby | chosen |
[
{
"from": "system",
"value": "Enable Ruby warnings during test suite execution\n\nThis will allow us to spot possible issues in advance.\n"
},
{
"from": "human",
"value": "require 'datadog/statsd'\n\nrequire 'rspec'\nrequire 'rspec/its'\nrequire 'byebug'\nrequire 'timeout'\nrequire 'timecop'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec helper to be similar to other gems\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'devtools/spec_helper'\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::Multi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented out lines [ci skip]\n"
},
{
"from": "human",
"value": "# $: << File.join(File.dirname(__FILE__),\"..\", \"lib\")\n\nrequire 'pry'\nrequire 'alephant/publisher'\nrequire 'alephant/publisher/models/writer'\nrequire 'alephant/publisher/models/queue'\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Allow running the specs even if the Bundler gem is not installed.\n\nSince the gem may well be used without Bundler at all, don't force its\npresence during the spec running.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.u... | ruby | chosen |
[
{
"from": "system",
"value": "Check whether submodule is initialized\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n#\n\nif ENV[\"CI\"]\n require 'coveralls'\n Coveralls.wear!\nend\n\n$: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__)\n\nrequire 'chatwork'\n\nrequire 'rspec/its... | ruby | chosen |
[
{
"from": "system",
"value": "Use doc formatter in Chefspec and avoid deprecation warnings\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nRSpec.configure do |config|\n config.c... | ruby | chosen |
[
{
"from": "system",
"value": "Change rspec config to stop truncating output\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$:.unshift File.expand_path(\"../../exe\", __FILE__)\n\nif ENV[\"COVERAGE\"] || ENV[\"TRAVIS\"]\n require \"simplecov\"\n require \"coveralls\"\n\n S... | ruby | chosen |
[
{
"from": "system",
"value": "Allow focus in rspec tests\n"
},
{
"from": "human",
"value": "require 'dbd'\n\n# load all test_factories\nroot = File.expand_path('../', __FILE__)\nDir[root + '/test_factories/**/*.rb'].each {|f| require f}\n\nRSpec.configure do |config|\n config.treat_symbols_as_m... | ruby | chosen |
[
{
"from": "system",
"value": "Add the support group to SimpleCov\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'simplecov'\nSimpleCov.start do\n add_filter { |source| source.lines_of_code <= 3 }\n add_filter { |source| source.filename ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove example codes on SimpleCov.\n"
},
{
"from": "human",
"value": "require \"bundler/setup\"\nrequire \"simplecov\"\n\nSimpleCov.start do\n add_filter \"/spec\"\nend\n\nrequire \"anodator\"\n\nRSpec.configure do |config|\n # Enable flags like --only-failures an... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that lshw is available on all system. This was making the switch_config variables empty and the UI having issues.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: ohai\n# Recipe:: default\n#\n# Copyright 2010, Opscode, Inc\n#\n# Licensed under the ... | ruby | chosen |
[
{
"from": "system",
"value": "Change debug to info and make it grey\n"
},
{
"from": "human",
"value": "require \"hipchat\"\n\nrequire \"notifier/version\"\nrequire \"notifier/configuration\"\n\nmodule Notifier\n class << self\n def configure(config_hash=nil)\n if config_hash\n co... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod spec to make sure it works again\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Zeeguu-API-iOS\"\n s.version = \"1.0.8\"\n s.summary = \"An API for Zeeguu for iOS\"\n s.description = <<-DESC\n \t\t\t\t The i... | ruby | chosen |
[
{
"from": "system",
"value": "Correct the name for configuration file\n"
},
{
"from": "human",
"value": "require 'test_bed/version'\n\nrequire 'grit'\nrequire 'pivotal-tracker'\nrequire 'optparse'\nrequire 'fileutils'\n\nrequire 'test_bed/config'\nrequire 'test_bed/base'\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Use a module to extend Hash"
},
{
"from": "human",
"value": "require \"grab/version\"\n\nclass Hash\n alias_method :old_values, :values\n\n def grab(*keys)\n keys.map { |k| self.fetch(k) }\n end\n\n def values(*args)\n if args.empty?\n old_values\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Create ~/.solvebio if its not there.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# SolveBio Ruby Client\n# ~~~~~~~~~~~~~~~~~~~\n#\n# This is the Ruby client & library for the SolveBio API.\n#\n# Have questions or comments? email us at: contact@solveb... | ruby | chosen |
[
{
"from": "system",
"value": "Remove create method from search controller\n"
},
{
"from": "human",
"value": "class SearchesController < ApplicationController\n def save\n search = Search.find_by(id: params[:id])\n if search\n search.update(is_saved: true)\n render json: {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove help from the artefact retreiver\n"
},
{
"from": "human",
"value": "class ArtefactRetriever\n class UnsupportedArtefactFormat < StandardError; end\n class RecordArchived < StandardError; end\n class RecordNotFound < StandardError; end\n\n attr_accessor :s... | ruby | chosen |
[
{
"from": "system",
"value": "Add post-process handler that runs before SendOut\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'sinatra/json'\nrequire 'casa/publisher/persistence/memory_storage_handler'\n\nmodule CASA\n module Publisher\n class App < Sinatra::Base\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add custom tag for creating local links\n\nEnglish pages are at /page while non-English pages are at /lang/page.\nThis makes linking to translated pages a bit messy.\n\nThe custom tag added in this commit makes local page links simpler:\n`{% lingual_link <page> %}` yields the co... | ruby | chosen |
[
{
"from": "human",
"value": "Add image to options value"
},
{
"from": "gpt",
"value": "class AddImageToPiggybakVariantsOptionValues < ActiveRecord::Migration\n def self.up\n add_attachment :piggybak_variants_option_values, :image\n end\n\n def self.down\n remove_attachment :piggybak_var... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods antennas and datetime to Decoder\n"
},
{
"from": "human",
"value": "require 'socket'\n\nmodule RaceResult\n class Decoder\n attr_accessor :host, :port\n\n STATUS_KEYS = [:date, :time, :has_power, :antennas, :timing_mode, :file_no,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Implement hacker news collection task\n\nMotivation:\n-so that the top-notch chat over at HN can be collected and investigated\n\nChange Explanation\n-implement simple :hackernews task to collect the comment for a given ID\n-comment nesting is retained\n"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Improve error handling in ow:console.\n"
},
{
"from": "human",
"value": "namespace :ow do\n\n require 'momentum/opsworks'\n require 'momentum/tasks'\n\n desc \"Open a Rails console on the given remote OpsWorks stack (uses AWS_USER as SSH username or falls back to... | ruby | chosen |
[
{
"from": "system",
"value": "Add controller to devise to accept extra fields\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'application#index'\n # get '*path' => 'application#index'\n devise_for :users, defaults: { format: :json }\n devise_for :teams, defaults: ... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.basename instead of sub()\n"
},
{
"from": "human",
"value": "module VundleCli\n module Helpers\n module_function\n\n def file_validate(fpath, check_dir = false)\n fpath = File.expand_path(fpath)\n\n unless File.exist?(fpath)\n raise ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented out line from mock\n"
},
{
"from": "human",
"value": "module Mocks\n class Observer\n def update(api_call)\n # puts \"hello I am observer for #{api_call.api_call_type.to_s} #{api_call.path}\"\n end\n end\nend\n"
},
{
"from": "gp... | ruby | chosen |
[
{
"from": "human",
"value": "Add Google API for cal. Works\n"
},
{
"from": "gpt",
"value": "require 'google/apis/calendar_v3'\nrequire 'googleauth'\nrequire 'googleauth/stores/file_token_store'\n\nrequire 'fileutils'\n\nOOB_URI = 'urn:ietf:wg:oauth:2.0:oob'\nAPPLICATION_NAME = 'Google Calendar A... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs for saved scenario\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: saved_scenarios\n#\n# id :integer not null, primary key\n# user_id :integer not null\n# scenario_id :integer not null... | ruby | chosen |
[
{
"from": "system",
"value": "Allow access to the customised materials component name even if it is disabled by the lecturer (e.g. by direct URL access)\n"
},
{
"from": "human",
"value": "module MaterialsHelper\n def get_pretty_file_size(size_in_bytes)\n suffixes = [\"B\", \"KB\", \"MB\", \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use a nested path to prevent hitting the directory limitation\n\nEXT3 has a limit on the number of files that a directory can hold. To\nprevent us hitting this limit we'll distribute our files to a depth of\ntwo directories.\n\ne.g. If our BSON ID is '5124bd9a686c8228a9000005',... | ruby | chosen |
[
{
"from": "system",
"value": "Allow specifying max number of entries to take from each stream\n"
},
{
"from": "human",
"value": "require 'doing_stream/version'\nrequire 'doing_stream/stream'\nrequire 'doing_stream/streams'\n\nclass DoingStream::DoingStream\n attr_accessor :streams\n\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Update webmock requirement to ~> 3.3.0\n\nUpdates the requirements on [webmock](https://github.com/bblimke/webmock) to permit the latest version.\n- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)\n- [Commits](https://github.com/bblimke/webmock/commits/... | ruby | chosen |
[
{
"from": "system",
"value": "Add respond_to? method definition for search panes"
},
{
"from": "human",
"value": "class ThinkingSphinx::Search::Glaze < BasicObject\n def initialize(context, object, raw = {}, pane_classes = [])\n @object, @raw = object, raw\n\n @panes = pane_classes.collec... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic specs for proj::epsg\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'proj::epsg' do\n let (:title) { '900913' }\n\n let (:pre_condition) { 'require ::augeas' }\n\n let (:facts) { {\n :osfamily => 'Debian',\n :rubyversion => R... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for ChatWork::Task.get and ChatWork::Task.create\n"
},
{
"from": "gpt",
"value": "describe ChatWork::Task do\n describe \".get\", type: :api do\n subject do\n ChatWork::Task.get(\n room_id: room_id,\n account_id: ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Hopper Debugger Server.app to v2.4\n"
},
{
"from": "human",
"value": "cask :v1 => 'hopper-debugger-server' do\n version '2.3'\n sha256 '291bcabcd84f395d9aba08532c1fff54101ec8d02aeb46e32c82a8a9b621c098'\n\n url \"http://www.hopperapp.com/HopperGDBServer/Ho... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for utils for adding proxy chain\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'rspec_ssltls'\n\ndescribe RspecSsltls::Util do\n describe '#self.open_socket' do\n before :each do\n proxy = double('proxy')\n allow(proxy).to rec... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 0.47.1 to ~> 0.75.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for GNU ed when running without MSYS2 in the path.\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\n\nclass TestGemInstall < Minitest::Test\n def test_gem_install\n res = system <<-EOT.gsub(\"\\n\", \"&\")\ncd test/helper/testgem\ngem bu... | ruby | chosen |
[
{
"from": "human",
"value": "Add events table foreign key\n"
},
{
"from": "gpt",
"value": "class AddEventsForeignKey < ActiveRecord::Migration\n def up\n add_foreign_key \"events\", \"activity_objects\", :name => \"events_on_activity_object_id\"\n end\n\n def down\n remove_foreign_key \... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.1.1.1 to 2.1.1.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-log'\n s.version = '2.1.1.1'\n s.summary = 'Logging to STD IO with levels, tagging, and coloring'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude more stress tests from CI runs\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Bunny::Channel, \"#basic_publish\" do\n let(:connection) do\n c = Bunny.new(:user => \"bunny_gem\",\n :password => \"bunny_password... | ruby | chosen |
[
{
"from": "system",
"value": "Add simple tests for OauthContainer class\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe WebBouncer::OauthContainer do\n pending \"write it\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'dry-monads'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Remove shipping_method_id column from spree_orders\n\nThis is a relic from before spree separated shipments from orders.\n"
},
{
"from": "gpt",
"value": "class RemoveShippingMethodIdFromSpreeOrders < ActiveRecord::Migration\n def up\n remove_column :spree_orders,... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"ensure 'binman:web' task works the first time thru\"\n\nThis reverts commit dd0511e78e02546cac4903b5c6de6243607a8bba,\nwhich was causing the following error under Ruby 2.3.0p0.\n\n % rake build\n mkdir -p man/man1\n rake aborted!\n LoadError: cannot load such file ... | ruby | chosen |
[
{
"from": "system",
"value": "Return filepath from Loader as opposed to file contents\n\nSigned-off-by: David Celis <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@davidcel.is>\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Creperie\n module Loader\n class << self\n # If we f... | ruby | chosen |
[
{
"from": "system",
"value": "Add newline to god config file\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: practicingruby\n# Recipe:: god\n#\n# Installs, configures, and starts God\n#\n\n# Install Ruby first\ninclude_recipe \"practicingruby::_ruby\"\n\n# Install god gem\ngem_package \"... | ruby | chosen |
[
{
"from": "system",
"value": "Allow additional_options to be optional\n"
},
{
"from": "human",
"value": "class Ettu\n module FreshWhen\n extend ActiveSupport::Concern\n\n included do\n alias_method :old_fresh_when, :fresh_when\n\n def fresh_when(record_or_options, additional_opt... | ruby | chosen |
[
{
"from": "system",
"value": "Database: Use more intelligent parsing solution for Logger.level sets\n"
},
{
"from": "human",
"value": "# lib/frecon/database.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part... | ruby | chosen |
[
{
"from": "human",
"value": "Move Featurette class to own file.\n"
},
{
"from": "gpt",
"value": "module Lime\n\n # Convenience method for creating a feature mixin.\n #\n # @example\n #\n # module MyStepDefinitions\n # include Lime::Featurette\n #\n # Given \"customer's name is ... | ruby | chosen |
[
{
"from": "system",
"value": "Make FileUtilz inherit from right class, Spree => Spree::Core\n"
},
{
"from": "human",
"value": "namespace :spree_additional_calculators do\n desc \"Copies all migrations and assets (NOTE: This will be obsolete with Rails 3.1)\"\n task :install do\n Rake::Task[... | ruby | chosen |
[
{
"from": "system",
"value": "Make :group not mutate input\n"
},
{
"from": "human",
"value": "module Transproc\n register(:map_array) do |array, *fns|\n Transproc(:map_array!, *fns)[array.dup]\n end\n\n register(:map_array!) do |array, *fns|\n fn = fns.size == 1 ? fns[0] : fns.reduce(:+... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cause of tilt/erb autoload warning\n"
},
{
"from": "human",
"value": "require 'rack'\nrequire 'opal'\n\nclass Yeah::Web::Server\n def initialize(port = 1234)\n Rack::Server.start(\n app: Opal::Server.new { |s|\n s.append_path File.expand_path(\".... | ruby | chosen |
[
{
"from": "human",
"value": "Convert script from shell to ruby\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# A script to get or set the provisioning profile UUID from a XCode .pbxproj files given its configuration name\n#\nrequire 'rubygems'\nrequire 'json'\nrequire 'logger'\n\n@log... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require so that tests can be run from alaveteli Rails.root.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AlavetelithemeTest < ActiveSupport::TestCase\n # Replace this with your real tests.\n test \"the truth\" do\n assert true\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "fix(migration): Use change instead of up/down\n"
},
{
"from": "human",
"value": "require_relative 'migration_helper'\n\nSequel.migration do\n up do\n create_table(:pact_versions, charset: 'utf8') do\n primary_key :id\n foreign_key :consumer_id, :pactic... | ruby | chosen |
[
{
"from": "system",
"value": "Add mutex support for commands\n"
},
{
"from": "human",
"value": "require 'artoo/robot'\n\nclass SpheroRobot < Artoo::Robot\n\n connection :sphero, :adaptor => :sphero, :port => '127.0.0.1:4560'\n device :sphero, :driver => :sphero\n\n def calibration_led(led_bri... | ruby | chosen |
[
{
"from": "system",
"value": "Update owner, add chef_version and additional platforms\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'runit'\nmaintainer 'Heavy Water Operations, LLC.'\nmaintainer_email 'support@hw-ops.com'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make version configurable from CI\n"
},
{
"from": "human",
"value": "name 'visualstudio'\nmaintainer 'Shawn Neal'\nmaintainer_email 'sneal@daptiv.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures Visual Studio 2012'\nlong_d... | ruby | chosen |
[
{
"from": "system",
"value": "Define supported platforms and suggest cookbooks\n"
},
{
"from": "human",
"value": "name 'pdns'\nmaintainer 'Opscode, Inc.'\nmaintainer_email 'cookbooks@opscode.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures pdns'\nlong_... | ruby | chosen |
[
{
"from": "system",
"value": "Return message from the write method.\n"
},
{
"from": "human",
"value": "module EventStore\n module Messaging\n class Writer\n # TODO Dependency on client writer (writes stream entry)\n # dependency :entry_writer\n\n pure_virtual :write\n\n #... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Revert \"Revert \"Revert \"Migration to remove an org created in error\"\"\"\"\n"
},
{
"from": "gpt",
"value": "class RemoveAppointedPersonForEnglandAndWalesTag < Mongoid::Migration\n def self.up\n organisation_tag = Tag.where(tag_type: 'organisation', t... | ruby | chosen |
[
{
"from": "system",
"value": "Add per sentence gunning frog\n"
},
{
"from": "human",
"value": "class GunningFog < Formula\n\n def score(text, stats)\n percent = three_syllables(stats['word_count'], text['syllables'])\n calc_score(stats['average_words_per_sentence'], percent)\n end\n\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Change Sanitizer to class with class methods.\n"
},
{
"from": "human",
"value": "require \"rails/html/sanitizer/version\"\nrequire \"loofah\"\nrequire \"rails/html/scrubbers\"\nrequire \"rails/html/sanitizer\"\n\nmodule Rails\n module Html\n module Sanitizer\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs, add a little DSL to the Command::Base for defining an option\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule Relish\n module Command\n class Base\n DEFAULT_HOST = 'relishapp.com'\n GLOBAL_OPTIONS_FILE = File.join(File.expand_path... | ruby | chosen |
[
{
"from": "system",
"value": "Drop the Action View warnings for Rails 6\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule WebConsole\n # A facade that handles template rendering and composition.\n #\n # It introduces template helpers to ease the inclusion of scripts o... | ruby | chosen |
[
{
"from": "system",
"value": "Update Fluid to version 1.8.4\n\nThis commit changes the version number and the SHA. I have also\nchanged the licence type to commercial.\n"
},
{
"from": "human",
"value": "cask :v1 => 'fluid' do\n version '1.8.3'\n sha256 '56438a946b281b009626a06cb099a7198e948bc8... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop issues for NFV support\n\nFix rubocop issues for NFV support\n\n\n(transferred from ManageIQ/manageiq@3ff720d354039416cef82df1c1a6dcee393f481c)\n"
},
{
"from": "human",
"value": "module MiqAeMethodService\n class MiqAeServiceOrchestrationTemplateVnfd < ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.