conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add a method to get matching datastores\n"
},
{
"from": "human",
"value": "require 'VMwareWebService/PbmService'\n\nmodule MiqPbmInventory\n def pbm_initialize(server, username, password)\n @pbm_svc = PbmService.new(server, username, password) if @apiVersion >= ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix postgres regexp search to case insensetive\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nrequire 'rademade_admin/model/adapter/query/active_record'\n\nmodule RademadeAdmin\n module Model\n module Adapter\n class Query\n class Pos... | ruby | chosen |
[
{
"from": "system",
"value": "Patch is applied to buildr proper\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:... | ruby | chosen |
[
{
"from": "system",
"value": "Use fakeweb not to contact the real net and see too much.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire \"test/unit\"\nrequire \"net/http\"\nrequire \"uri\"\nrequire \"logger\"\n\nrequire \"net-observer/net_logger\"\n\nclass BasicTest < Test::Unit:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix start-point service names in /sha/index page\n"
},
{
"from": "human",
"value": "\nclass ShaController < ApplicationController\n\n def index\n @services = {\n 'avatars' => info('avatars', avatars.sha),\n 'custom' => info('custom', custom.sha),\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow specifing of tag type and attributes through page_title helper\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "require 'redcarpet'\n\nmodule ApplicationHelper\n def page_title(text)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[Core] Implement global variables on application helper\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n include AccountHelper\n include FontAwesomeHelper\n\n def datetime_ago date\n content_tag :date, nil, title: date.to_s(:long), \"data-source\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tab_link_to helper when using blocks\n"
},
{
"from": "human",
"value": "module TabLinkToHelper\n def tab_link_to(name = nil, url = nil, attrs = nil, &block)\n html_options = if current_page?(url)\n attrs.to_h.merge(class: 'selected')\n else\n at... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct version for Result dependency"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Alamofire'\n s.version = '3.0.0-beta.1'\n s.license = 'MIT'\n s.summary = 'Elegant HTTP Networking in Swift'\n s.homepage = 'https://github.com/Alamofire... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"testing a different way of allowing more monkey patches\"\n\nThis reverts commit 3143ef62f79848ec05db98b705f4edef8a146a4a.\n"
},
{
"from": "human",
"value": "require 'delegate'\n\n# the ConnectionProxy sits between user-code and a real connection and says \... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust upgrader to page legacy timestamps\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"alchemy/upgrader\"\n\nmodule Alchemy::Upgrader::Tasks\n class AddPageVersions < Thor\n include Thor::Actions\n\n no_tasks do\n def cre... | ruby | chosen |
[
{
"from": "human",
"value": "Add a gemspec file to ease bundling from git"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{randexp}\n s.version = \"0.1.5\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Source Code Pro to sha256 checksums\n"
},
{
"from": "human",
"value": "class FontSourceCodePro < Cask\n url 'http://downloads.sourceforge.net/sourceforge/sourcecodepro.adobe/SourceCodePro_FontsOnly-1.017.zip'\n homepage 'http://store1.adobe.com/cfusion/stor... | ruby | chosen |
[
{
"from": "system",
"value": "Add a note about where the ::Rails.application is defined\n\nCo-authored-by: Adam McCrea <0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@adamlogic.com>"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"rack/test\"\n\nmodule Judoscale\n describe \"App Re... | ruby | chosen |
[
{
"from": "system",
"value": "Disable bitcode for pod spec target.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"KMSWebRTC\"\n s.version = \"1.1.1\"\n s.summary = \"Kurento Media Server iOS Web RTC Call.\"\n s.homepage = \"https://... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"labs.json errors when calling kind_name and url\"\"\n\nThis reverts commit ef413e8c4c295fa1b62db1f7a8dc922a94e882c8.\n"
},
{
"from": "human",
"value": "class LabSerializer < ActiveModel::Serializer\n\n # cached\n\n attributes :id,\n :name,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update yard to 0.9.20 [GHSA-xfhh-rx56-rxcr]\nUpdate rake spec to allow for 11.x and 12.x series\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Copy layover and hourly_cost from maps to associated lines\n"
},
{
"from": "human",
"value": "Sequel.migration do\n up do\n alter_table :maps do\n add_column :service_windows, String\n add_column :speed, Float\n add_column :weekdays_per_year, Inte... | ruby | chosen |
[
{
"from": "system",
"value": "Update responses_json method to return a timeline of data\n"
},
{
"from": "human",
"value": "class Topic < ActiveRecord::Base\n has_many :charts\n has_many :responses, through: :charts\n\n validates_presence_of :name\n\n include ResponsesHelper\n\n # def respon... | ruby | chosen |
[
{
"from": "system",
"value": "Allow parametrable php fpm restart task\n"
},
{
"from": "human",
"value": "module Capistrano\n class FileNotFound < StandardError\n end\nend\n\nnamespace :phpfpm do\n desc \"Restart php fpm\"\n task :restart do\n on roles(:web) do\n execute :sudo, :servi... | ruby | chosen |
[
{
"from": "system",
"value": "Add CRUD actions for url_contents controller\n"
},
{
"from": "human",
"value": "class UrlsController < ApplicationController\n\n def index\n @urls = Url.all\n\n render json: @urls\n end\n\n def show\n @url = Url.find(params[:id])\n\n render json: @url... | ruby | chosen |
[
{
"from": "system",
"value": "Append the created subcontext into parents' subcontexts association\n"
},
{
"from": "human",
"value": "module ESA\n class ContextProvider\n def self.check_subcontexts(context, namespace, options = {})\n existing = existing_subcontexts(context, namespace)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning, since scoped waas deprecated\n"
},
{
"from": "human",
"value": "class Reply < ActiveRecord::Base\n scope :base, -> { scoped }\n belongs_to :topic, -> { includes(:replies) }\n belongs_to :developer\n\n validates_presence_of :content\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the false bson document tests\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire \"spec_helper\"\n\ndescribe BSON::Document do\n\n let(:type) { 3.chr }\n let(:obj) { { :key => \"value\" } }\n let(:bson) {\n \"#{20.to_bson}#{String::BSON_TYPE... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem dependency on development env\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ceifpar/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix borked notification on approval\n"
},
{
"from": "human",
"value": "class Notify\n def self.everyone(submission, from, about)\n (submission.participants - [from]).each do |to|\n new(submission, to, from, about).save\n end\n end\n\n def self.source(s... | ruby | chosen |
[
{
"from": "system",
"value": "Put handling key in separate method\n"
},
{
"from": "human",
"value": "module Lita\n module Handlers\n class JiraIssues < Handler\n\n def self.default_config(config)\n config.enabled = true\n end\n\n route /[A-Z]+-\\d+/, :jira_message, help... | ruby | chosen |
[
{
"from": "system",
"value": "Use error() to print the message, and call abort to exit.\n"
},
{
"from": "human",
"value": "require 'rubygems/tasks/task'\n\nmodule Gem\n class Tasks\n module SCM\n #\n # The `scm:status` task.\n #\n class Status < Task\n\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use configuration in Engine init"
},
{
"from": "human",
"value": "module Thincloud\n module Postmark\n # Public: Thincloud Postmark Engine\n class Engine < ::Rails::Engine\n attr_accessor :options\n\n # initialize the configuration so it is availabl... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'utf-8' encoding to front matter reader\n"
},
{
"from": "human",
"value": "module Yarrow\n module Tools\n module FrontMatter\n\n def read_split_content(path)\n extract_split_content(File.read(path))\n end\n\n def extract_split_content(t... | ruby | chosen |
[
{
"from": "system",
"value": "[CocoaPods] Fix Version Number in Podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SwiftFlow\"\n s.version = \"0.2.1\"\n s.summary = \"Unidirectional Data Flow in Swift\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add vendor files to gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"translator/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use Bosh::Spec::Vm support methods to improve readability of integration test\n\nSigned-off-by: Tom McNeely <76fa767ac9cb5e290fd529f0d648ac34ac2ba9cb@pivotal.io>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'deploy job with addons', type: :in... | ruby | chosen |
[
{
"from": "system",
"value": "Add a bar under the Kanga\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": "Fix typo in variable name\n"
},
{
"from": "human",
"value": "class TopicsController < ApplicationController\n etag { can? :manage, Topic } # Don't cache admin content together with the rest\n\n # GET /topic\n def index\n @title = 'Temas'\n @topics = (can? :... | ruby | chosen |
[
{
"from": "system",
"value": "Add reply-to to notification email\n"
},
{
"from": "human",
"value": "class AdminNotifierMailer < ApplicationMailer\n default :from => ENV['EMAIL_ADDRESS']\n add_template_helper(EmailHelpers)\n\n # Send a notification email with the new matrix information\n def ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the asset encoding spec that demonstrates the issue\n"
},
{
"from": "gpt",
"value": "asset_directory = File.expand_path('../../../../assets', __FILE__)\nasset_file_paths = Dir.glob(File.join(asset_directory, '*.*'))\nasset_file_names = asset_file_paths.map{|e| Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out test that occasionally fails on travis\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FeedsController, :type => :request do\n include HTMLCompareHelper\n fixtures :all\n\n describe '#mp-info' do\n it { compare_static '/feeds/m... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"fix parameter to redirect route on pending user\"\n\nThis reverts commit ed27e23d08a1cac6e11b99eaa36e60b45808f2f3.\n"
},
{
"from": "human",
"value": "class EnsureActiveUser\n\n class << self\n\n def before(c) # c = controller\n return unless c.curr... | ruby | chosen |
[
{
"from": "system",
"value": "Add options support to link_to_profile helper.\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def cancel_link(url = {action: :index})\n content_tag(\"li\", class: \"cancel\") do\n link_to t(\"cancel\"), url\n end\n end\n\n def user_group... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that is no pending migrations in Gitlab::CurrentSettings\n"
},
{
"from": "human",
"value": "module Gitlab\n module CurrentSettings\n def current_application_settings\n key = :current_application_settings\n\n RequestStore.store[key] ||= begin\... | ruby | chosen |
[
{
"from": "system",
"value": "Replace \"\t\" with \" \".\n\n\nFormer-commit-id: 30f050c36d9525b581a9fa91f0c41d983e5ba88d"
},
{
"from": "human",
"value": "class Drink < ActiveRecord::Base\n\n validates_presence_of :name, :bottle_size, :price\n\n has_attached_file :logo, :styles => { :thumb => ... | ruby | chosen |
[
{
"from": "system",
"value": "Add subtotal, shipping_cost and total_cost methods to Order model\n"
},
{
"from": "human",
"value": "class Order < ActiveRecord::Base\n has_many :order_items\n belongs_to :user\n belongs_to :address\n belongs_to :shipping_method\n enum status: [:new_order, :p... | ruby | chosen |
[
{
"from": "system",
"value": "Add mass-assignment protection to Quote\n"
},
{
"from": "human",
"value": "class Quote < ActiveRecord::Base\n has_many :lines, dependent: :destroy, autosave: true\n has_many :people, through: :lines, uniq: true\n \n default_scope order('created_at DESC').include... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper http route block\n"
},
{
"from": "human",
"value": "module Lita\n module Handlers\n class Keepalive < Handler\n config :url, required: true, type: String\n\n http.get '/ping', :ping\n\n def initialize(*args)\n super\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Use indifferent access in log sanitizer when indexing config.\n"
},
{
"from": "human",
"value": "module Departure\n module LogSanitizers\n class PasswordSanitizer\n PASSWORD_REPLACEMENT = '[filtered_password]'\n\n def initialize(config)\n @confi... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[BUGFIX] Assume request IDs can be UUIDs\"\n\nThis reverts commit 72d91b2962e08d2886903964b69f2b3ed0bc70d0.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'state_machine'\n\nmodule Punchblock\n class CommandNode < RayoNode\n\n attribute :... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Dropzone to DirectUpload via activestorage\n"
},
{
"from": "human",
"value": "module Tessa\n class RackUploadProxy\n\n def call(env)\n params = env['rack.request.form_hash']\n upload = Tessa::Upload.create({\n name: params[\"name\"],\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add ascii logo on boot from command\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# rubocop:disable Layout/HeredocIndentation, Rails/Output\nputs <<-'ASC'\n ____ _\n| _ \\ ___ _ __ __ _| |_ ____ _ _ __ ___\n| |_) / _ \\ '_... | ruby | chosen |
[
{
"from": "system",
"value": "Add date and time calculating functions\n"
},
{
"from": "human",
"value": "require 'prawn'\n\nmodule Mortalical\n module Calendar\n def self.generate\n Prawn::Document.generate(\"hello.pdf\") do |pdf|\n pdf.font_families.update(\"LeagueGothic\" => {\... | ruby | chosen |
[
{
"from": "human",
"value": "Add smoke test for Supplier Totals by Distributor report\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\nRSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::SupplierTotalsByDistributorReport do\n let!(:distributor) { create(:distributor_enterpri... | ruby | chosen |
[
{
"from": "human",
"value": "Build specs for config_hash (to appease coveralls)\n\nSigned-off-by: Josep M. Blanquer <843d9a062ab1c6792ebebca5589f22ce86ac85ce@gmail.com>"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire File.expand_path(File.dirname(__FILE__) + '/../spec_helpe... | ruby | chosen |
[
{
"from": "system",
"value": "Set the tests to run against Rails 2.2.2, as Rails 2.3 is currently unsupported\n"
},
{
"from": "human",
"value": "# Specifies gem version of Rails to use when vendor/rails is not present\nold_verbose, $VERBOSE = $VERBOSE, nil\nRAILS_GEM_VERSION = '>= 2.1.0' unless ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test pulsar recipe for `deploy` and `deploy:pending`\n"
},
{
"from": "human",
"value": "namespace :dummy do\n\n task :my_sleep do\n sleep 10\n end\n\n task :my_sleep_unkillable do\n trap('SIGTERM') do\n puts 'Received SIGTERM, ignoring...'\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Change formatting in php73 inspec test\n"
},
{
"from": "human",
"value": "%w(mod_php73\n php73-devel\n php73-fpm\n php73-gd\n pear1).each do |pkg|\n describe package(pkg) do\n it { should be_installed }\n end\nend\n\ndescribe yum.repo 'ius' do\n it { s... | ruby | chosen |
[
{
"from": "system",
"value": "Update summary / description in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-down-for-everyone\"\n spec.version = \"0.0.1\"\n spec.authors = [\"Jordan Killpack\"]\n spec.email = [\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong variable used in publish channel"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass PushUpdateWorker\n include Sidekiq::Worker\n\n def perform(timeline, account_id, status_id)\n account = Account.find(account_id)\n status = St... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations to the Supporter model"
},
{
"from": "human",
"value": "class Supporter < ActiveRecord::Base\nend\n"
},
{
"from": "gpt",
"value": "class Supporter < ActiveRecord::Base\n validates :email, uniqueness: true, presence: true\n validates :fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add atom and rss to list of reserved words.\n"
},
{
"from": "human",
"value": "ActsAsTaggableOn::Tag.class_eval do\n extend FriendlyId\n\n friendly_id :name,\n use: :slugged,\n slug_column: :slug,\n reserved_words: ['create',... | ruby | chosen |
[
{
"from": "system",
"value": "Add derived fields to CSV download.\n"
},
{
"from": "human",
"value": "require 'csv'\ninclude ApplicationHelper\n\nclass SwarmResultsFormatter\n attr_reader :raw_results, :swarm\n\n def initialize(swarm,raw_result_set)\n @swarm = swarm\n @raw_results = raw_r... | ruby | chosen |
[
{
"from": "system",
"value": "Disable backtrace tests for now\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'support/editor'\n\nRSpec.feature \"A backtrace is shown for certain errors\", type: :feature, js: true do\n before do\n visit '/'\n editor.set(code)\n within... | ruby | chosen |
[
{
"from": "system",
"value": "Test using project id and token that match VCR cassettes\n\nWithout this running `rspec spec` results in\n\n Failures:\n\n 1) DeployAndDeliver::Project constructor loads a project\n Failure/Error: deliverer = DeployAndDeliver::Project.new(Configuration)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure that people from other churches aren't listed.\n"
},
{
"from": "human",
"value": "require 'dsl_helper'\n\ndescribe 'people module' do\n it 'is forbidden to view index without authentication' do\n Dsl.people.navigate_to_index expect: :forbidden... | ruby | chosen |
[
{
"from": "system",
"value": "Improve coverage loader to always show coverage level\n\n * Enables us to increase as needed\n"
},
{
"from": "human",
"value": "MINIMUM_COVERAGE = 76\n\nif ENV['COVERAGE'] != 'off'\n require 'simplecov'\n require 'simplecov-rcov'\n require 'coveralls'\n Coverall... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for loaf configuration\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nRSpec.describe Loaf::Configuration do\n it \"allows to set and read attributes\" do\n config = Loaf::Configuration.new\n\n config.crumb_length = 4\n\n expect(config.cru... | ruby | chosen |
[
{
"from": "human",
"value": "Add example from README to examples\n"
},
{
"from": "gpt",
"value": "require 'galago/router'\nrequire 'rack/lobster'\n\nrouter = Galago::Router.new do\n get '/foo', to: ->(env) { [200, {}, ['foo']] }\n post '/bar/:bar', to: ->(env) { [200, {}, ['bar']] ... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'addloginitem' execute resource to Flux\n"
},
{
"from": "human",
"value": "remote_file \"#{Chef::Config[:file_cache_path]}/Flux.zip\" do\n source node[\"flux_download_uri\"]\n checksum node[\"flux_download_checksum\"]\n mode \"0644\"\n not_if { File.exists?(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug: lowercase channel name\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\n$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FILE__)\nrequire \"syoboi_calendar\"\n\nargs = Slop.parse :help => true do\n on :u, :user=, \"Username on SyoboiCalendar\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update the description of the gem\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'thrift/amqp/ruby/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove some lines that break the app.\"\n\nThis reverts commit 9aaac4ba7c8c3705059213bc06921193a367da63.\n"
},
{
"from": "human",
"value": "require './tubemp.rb'\n\nrun Sinatra::Application\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pry as a runtime 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 'less_secure_random/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Correct location of refresh command\n"
},
{
"from": "human",
"value": "module Elasticsearch\n # Driver for specific index\n class Index\n include Adamantium::Flat, Composition.new(:connection, :name)\n include Exist\n\n # Refresh index\n #\n # @api ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the homepage to the gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/vim-flavor/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Kana Natsuno']\n gem.email = ['dev@whil... | ruby | chosen |
[
{
"from": "system",
"value": "Add si_identifier and si_identifier_type to Contact resource\n\nThe Moneybird gem kept warning me about:\r\n```\r\nW, [2019-11-04T13:02:33.800623 #24299] WARN -- : Moneybird::Resource::Contact does not have an `si_identifier' attribute\r\nW, [2019-11-04T13:02:33.800687 #24299]... | ruby | chosen |
[
{
"from": "system",
"value": "Fix not being able to specify the tracks from STDIN\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'ruby-progressbar'\nrequire 'spotify_to_mp3/grooveshark/track'\n\nmodule SpotifyToMp3\n class Grooveshark\n def initialize(client)\n @client =... | ruby | chosen |
[
{
"from": "system",
"value": "Add a remove_queue method to support removing outputs\n"
},
{
"from": "human",
"value": "require \"logstash/namespace\"\nrequire \"logstash/logging\"\n\nclass LogStash::MultiQueue\n public\n def initialize(*queues)\n @logger = LogStash::Logger.new(STDOUT)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add FileOpenUtil module to DRY up File.open calls\n"
},
{
"from": "gpt",
"value": "module FileOpenUtil\n # Opens and reads the passed in file. Thanks to the following article\n # for explaining how to define a method on the included singleton class:\n # https://6f... | ruby | chosen |
[
{
"from": "system",
"value": "Call find_by_id instead of find so invalid sessions don't throw an error.\n"
},
{
"from": "human",
"value": "require \"monban/strategies/password_strategy\"\n\nWarden::Manager.serialize_into_session do |user|\n user.id\nend\n\nWarden::Manager.serialize_from_session... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the gemspec to point to the right rubyforge project\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"transporter-campfire\"\n s.version = \"0.1\"\n s.date = \"2009-08-10\"\n\n s.description = \"Deliver messages to your Camp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop warning about Ambiguous regexp literal.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'helper'\n\nclass TestAddressCHFR < Test::Unit::TestCase\n def test_ch_fr_canton\n assert_match /\\A[- a-zàâäèéêëîïôœùûüÿç]+\\z/i, FFaker::Address... | ruby | chosen |
[
{
"from": "system",
"value": "Add license info to the gemspec."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"validates_timeliness/version\"\n\nGem::Specification.new do |s|\n s.name = \"validates_timeliness\"\n s.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Fix case in Url tag\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nxml.instruct!\nxml.OpenSearchDescription 'xmlns' => 'http://a9.com/-/spec/opensearch/1.1/',\n 'xmlns:moz' => 'http://www.mozilla.org/2006/browser/search/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove segments from mulitpart redirects\n\nPublisher currently allows segment redirects within its' GUI. For our\ntemporary task to export multipart redirects to router-data we will be\nremoving all segment redirects and only redirect to the top of the page.\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Add output before running spec:parts\n"
},
{
"from": "human",
"value": "require 'rspec/parts'\n\nif defined?(RSpec)\n namespace :spec do\n desc 'Run part M of N specs'\n RSpec::Core::RakeTask.new(:part, :part, :groups) do |task, task_args|\n config = Rsp... | ruby | chosen |
[
{
"from": "system",
"value": "Increase the length of the ticket code\n"
},
{
"from": "human",
"value": "class Helpdesk < Sinatra::Base\n #Creates an alphanumeric code for identifying the trouble ticket\n def generate_code()\n @params[:code] = Array.new(5){rand(36).to_s(36)}.join.downcase\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix index name to Rails default to ensure idempotency\n\nSee https://gitlab.com/gitlab-com/infrastructure/issues/3822\n"
},
{
"from": "human",
"value": "class AddSectionNameIdIndexOnCiBuildTraceSections < ActiveRecord::Migration\n include Gitlab::Database::Migratio... | ruby | chosen |
[
{
"from": "system",
"value": "Update MongoChef version to 3.1.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'mongochef' do\n version '3.0.7'\n sha256 'ba29d788f619ab11157a5a379a6aca03b523b9e697f7956c8af25dbd20b0d1cb'\n\n url \"https://cdn.3t.io/mongochef/mac/#{version}/MongoChef.dmg\"\n n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix column type mismatch in ActiveStorage migration\n"
},
{
"from": "human",
"value": "# This migration comes from active_storage (originally 20191206030411)\nclass CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]\n def change\n create_table :act... | ruby | chosen |
[
{
"from": "human",
"value": "Add Cask for Sickbeard version 13.05.25\n"
},
{
"from": "gpt",
"value": "class Sickbeard < Cask\n url 'http://sickbeard.lad1337.de/download.php?f=SickBeard-OSX-master-13.05.25.dmg'\n homepage 'http://sickbeard.lad1337.de/'\n version '13.05.25'\n sha1 '830fafa7838... | ruby | chosen |
[
{
"from": "system",
"value": "Fix small setup item so that tests pass.\n\ngit-svn-id: b46a55edd163d01e6c678d43094a9b8c8fe8b18e@6639 da5c320b-a5ec-0310-b7f9-e4d854caa1e2\n"
},
{
"from": "human",
"value": "class RequestValidationController < ApplicationController\n \n @@redirect_for_bad_reques... | ruby | chosen |
[
{
"from": "system",
"value": "Update example and include sidekiq/instana\n"
},
{
"from": "human",
"value": "# This is a helper initializer to boot a local instrumented Sidekiq stack\n# for development and testing.\n#\n# export BUNDLE_GEMFILE=/path/to/ruby-sensor/gemfiles/libraries.gemfile\n# bun... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary include from RemoveBacklogListsFromBoards migration\n"
},
{
"from": "human",
"value": "class RemoveBacklogListsFromBoards < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n execute <<-SQL... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix old migration not working with scoring refactor [ci skip]\"\n\nThis reverts commit 1abba3b638d87f6ebf848ed0b3c94a7f3230975d.\n"
},
{
"from": "human",
"value": "class AddPlacementsToLeagueRosters < ActiveRecord::Migration[5.2]\n def change\n add_colu... | ruby | chosen |
[
{
"from": "system",
"value": "Add railties gem to runtime dependency\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'metro_ui_css/rails/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Intellij IDEA EAP to build 141.1531.2\n\nSigned-off-by: Koichi Shiraishi <41a18128582fec5418c0a92661f7d4b13d21d912@gmail.com>\n"
},
{
"from": "human",
"value": "cask :v1 => 'intellij-idea-eap' do\n version '141.1383.1'\n sha256 '3d0eed3d919cc15568e6b2a9ec3... | ruby | chosen |
[
{
"from": "system",
"value": "Update plex media player to 1.0.2.70\n"
},
{
"from": "human",
"value": "cask :v1 => 'plex-media-player' do\n version '1.0.1.42-56cc6ef9'\n sha256 'b5eb64a5d4668252fe26d3e4dba612b2ebd60197d42d9d8782273969c22be598'\n\n url \"https://downloads.plex.tv/plexmediaplaye... | ruby | chosen |
[
{
"from": "system",
"value": "Set specific versions for faraday and faraday_middleware.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cardgate/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Update to allow for testing with all rspec versions 3 and above.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version'\n\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Allow all 1.x.y versions of Nokogiri\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/xmldsig/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"benoist\"]\n gem.email = [\"benoist.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove :only restriction on Admin::TopicsController as there's no action in this controller that doesn't need it\n"
},
{
"from": "human",
"value": "module Forem\n module Admin\n class TopicsController < BaseController\n before_filter :find_topic, :only => [... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.