conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix reset session on facebook requests\n"
},
{
"from": "human",
"value": "class FbAppPluginController < PublicController\n\n no_design_blocks\n\n def index\n end\n\n def myprofile_config\n if logged_in?\n redirect_to controller: :fb_app_plugin_myprofile,... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Keyboard Maestro to 7.0.3.\n"
},
{
"from": "human",
"value": "cask 'keyboard-maestro' do\n version '7.0.2'\n sha256 'd80b9cc8790c9b1595bfe132f47f12f54210fc3430c462d8cd668784c4f1c6c0'\n\n # stairways.com is the official download host per the vendor homepag... | ruby | chosen |
[
{
"from": "system",
"value": "Allow empty lastmod, changefreq and priority.\n\nProvide a way to pass false values to lastmod, changefreq and priority.\n\nSigned-off-by: Adam Salter <f257d94038124c89b9e3063ebb3ccaafdcb43ccb@gmail.com>"
},
{
"from": "human",
"value": "xml.instruct!\nxml.urlset \"x... | ruby | chosen |
[
{
"from": "system",
"value": "Update policy data migration to use prefix route\n\nUse a prefix redirect for the policy change. This will then match all\nthe supporting pages and redirect them.\n\nAlso remove the 'for' from the search index calls. As far as I can tell\nthe search index gets set based on the ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix remove_foreign_key failing in Rails 6\n\nIn Rails 6, this statement fails because Rails thinks the foreign\nkey does not exist for some reason. Since the remove_foreign_key\ncall is not needed because the column is removed in the subsequent\nstatement, we can remove it alto... | ruby | chosen |
[
{
"from": "system",
"value": "Set the observers before active_record.set_configs.\n\nThis will avoid the deprecation warning\n"
},
{
"from": "human",
"value": "require 'rails'\nrequire 'rails/observers/version'\n\nmodule Rails\n module Observers\n class Railtie < ::Rails::Railtie\n init... | ruby | chosen |
[
{
"from": "system",
"value": "Use reduce to compute factorials\n"
},
{
"from": "human",
"value": "<<~DOC\n Use reduce to get the sum of an array\nDOC\n\na = [1, 2, 3]\na.reduce :+ # => 6\n"
},
{
"from": "gpt",
"value": "# Use reduce to get the sum of an array\na = [1, 2, 3]\na.reduc... | ruby | chosen |
[
{
"from": "system",
"value": "Handle disconnects during response rendering\n"
},
{
"from": "human",
"value": "module Reel\n # A connection to the HTTP server\n class Connection\n attr_reader :request\n \n # Attempt to read this much data\n BUFFER_SIZE = 4096\n \n def initiali... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Compete-specific logic into domain models.\n"
},
{
"from": "human",
"value": "module Rubill\n class Customer < Base\n def self.find_by_name(name)\n record = active.detect do |d|\n d[:name] == name\n end\n\n raise NotFound unless reco... | ruby | chosen |
[
{
"from": "system",
"value": "Add callbacks to UUID setting.\n"
},
{
"from": "human",
"value": "require \"active_support/concern\"\n\nmodule WithUuid\n module Model\n\n\t extend ActiveSupport::Concern\n\n\t included do\n\n self.primary_key = :id\n\n before_validation :set_id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Support the other SCP Databases\n\nthe other SCP Databases are:\n* SCP-RU\n* SCP-KO\n* SCP-CN\n* SCP-FR\n* SCP-PL\n* SCP-ES\n* SCP-TH\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'mechanize'\n\nclass SCPArticleLoader\n def initialize(item_no, opti... | ruby | chosen |
[
{
"from": "system",
"value": "Mark the license in the gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'librarian/chef/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add join to task queries in flowmanager.\n"
},
{
"from": "human",
"value": "class FlowManagersController < ApplicationController\n before_action :authenticate_user!\n before_action :verify_admin!\n\n def show\n respond_to do |format|\n format.json do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "ADD : creation d'un controller pour les restaurateurs\n"
},
{
"from": "gpt",
"value": "class RestaurateursController < ApplicationResourcesController\n defaults :resource_class => User\n before_action :set_restaurateur, only: [:show, :edit, :update, :destroy]\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add author to dashboard index serializer\n"
},
{
"from": "human",
"value": "class Api::DashboardSerializer < ActiveModel::Serializer\n attributes :id, :title, :slug, :summary, :content, :attribution, :published,\n :user_id, :production, :preproduction, ... | ruby | chosen |
[
{
"from": "system",
"value": "Change procedure type to Haemodialysis\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nxml = builder\n\nxml.DialysisSession(\n start: session.performed_on_date,\n stop: session.performed_on_date\n) do\n\n xml.ProcedureType do\n xml.CodingSt... | ruby | chosen |
[
{
"from": "system",
"value": "Define load path to be local\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'docify'\nrequire 'sinatra'\nrequire './app/lib/highlight'\n\nVERSION = '0.3.4'\n\nconfigure do\n set :views, 'app/views'\nend\n\nconfigure :production do\n set :show_... | ruby | chosen |
[
{
"from": "system",
"value": "Add stop content alert message\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'bundler/setup'\nBundler.require\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'content_alert'\n\ndef mai... | ruby | chosen |
[
{
"from": "system",
"value": "Update cocoaPods depository to version 2.0.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\ns.name = \"XYFSnowAnimation\"\n\ns.version = \"2.0.0\"\n\ns.ios.deployment_target = '8.0'\n\ns.summary = \"A category of NSTimer for showing 3D ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[Fix] Fixed podspec format\"\n\nThis reverts commit 15b1ae77f86213914d404767e28efdeae361f11a.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'YALPullToRefresh'\n spec.version = '1.0'\n\n spec.homepage = 'https://github.com/Yalan... | ruby | chosen |
[
{
"from": "system",
"value": "Change beta version to .28"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"MercadoPagoSDK\"\n s.version = \"4.0.0.beta.24\"\n s.summary = \"MercadoPagoSDK\"\n s.homepage = \"https://www.mercadopago.com\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself to the authors\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"pg_search/version\"\n\nGem::Specification.new do |s|\n s.name = \"pg_search\"\n s.version = PgSearch::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Add email preview for order store_owner_notification mail\n"
},
{
"from": "human",
"value": "class OrderPreview < ActionMailer::Preview\n def confirm_email\n Spree::OrderMailer.confirm_email(Spree::Order.complete.first)\n end\n\n def cancel_email\n Spree::O... | ruby | chosen |
[
{
"from": "system",
"value": "Cut off prefix for uuids during display.\n"
},
{
"from": "human",
"value": "require 'grape'\n\nmodule App\n module Entities\n\n class LegislativeSessions < Grape::Entity\n expose :id\n expose :name\n expose :start_date\n expose :end_date\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to vanish broken groups\n\nWe want to vanish these working groups as they are in a broken state\nacross GOV.UK's stack, they're recorded as live & draft in\npublishing-api and content-store but do not exist in whitehall or router\nmeaning the pages are returning a ... | ruby | chosen |
[
{
"from": "system",
"value": "Add all basic Atom packages"
},
{
"from": "human",
"value": "dep 'atom.app' do\n source \"https://atom.io/download/mac\"\n provides 'Atom.app'\n version '0'\nend\n\ndep 'atom', :template => 'sym_link' do\n requires 'atom.app'\n\n # TODO: add packages to install... | ruby | chosen |
[
{
"from": "system",
"value": "Create test for unsubmitted courses\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'rails_helper'\n\ndescribe UnsubmittedCoursesController do\n render_views\n\n describe '#index' do\n it 'should list courses/programs that do not have ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle empty URLs while shortening.\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"bundler/setup\"\n\nrequire \"rest_client\"\nrequire \"json\"\n\n\nclass GoShortener\n\n def initialize\n @base_url = \"https://www.googleapis.com/urlshortener/... | ruby | chosen |
[
{
"from": "system",
"value": "Document Heading and change hash strategy.\n"
},
{
"from": "human",
"value": "module Qrb\n class Heading\n include Enumerable\n\n def initialize(attributes)\n unless attributes.is_a?(Enumerable) and \\\n attributes.all?{|a| a.is_a?(Attribute)... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for LPI file import\n"
},
{
"from": "gpt",
"value": "namespace :lpi do\n desc 'Import an LPI CSV file, attributing the import to the given user'\n task :import, [:file, :user_email] => [:environment] do |t, args|\n user = User.find_by_email!(args[:... | ruby | chosen |
[
{
"from": "system",
"value": "Build templates and validate expected results\n"
},
{
"from": "human",
"value": "describe SparkleFormation do\n\n before do\n SparkleFormation.sparkle_path = File.join(File.dirname(__FILE__), 'cloudformation')\n end\n\n describe 'Simple template' do\n\n it ... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple Phonebook data structure\n\nWe are going to be trying to search through a list of contacts (which I\nam calling a Phonebook for ease of discussion). We are going to store\nthese in some form; for now, the simplest possible answer is a hash\nmapping Names to Numbers.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update ruby_bug version to 1.9 for ARGF.rewind bug.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"ARGF.rewind\" do\n before :each do\n @file1_name = fixture __FILE__, \"file1.txt\"\n @file2_name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve documentation for Viewport methods\n\nJust adding some YARD descriptions to the return types to make this\nclass more coherent.\n\nChange-Id: I9a64961eb136fe4c4a09909fa7fc1e7b12351388\n"
},
{
"from": "human",
"value": "# A Viewport represents the height and ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for $stderr.puts, instead of Sicuro.warn.\n"
},
{
"from": "human",
"value": "describe Sicuro do\n context 'helpers' do\n Sicuro.assert('true', 'true').should == true\n\n context 'sandbox_error passed a string' do\n Sicuro.should_receive(:warn).with... | ruby | chosen |
[
{
"from": "system",
"value": "Add postfix example-attribute to HashObject spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# Test support object\ndescribe HashObject do\n\n subject { HashObject.new(hash) }\n let(:hash) do\n {\n :name => 'Steve',\n :address => {:str... | ruby | chosen |
[
{
"from": "system",
"value": "Change rspec tests to make better use of subject\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Game, type: :model do\n context \"when I create a new game\" do\n context \"with no arguments\" do\n subject(:game) { Game.new }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use single quotes unless double quotes are needed\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n it \"has a valid factory\" do\n create(:user).should be_valid\n end\n it \"is invalid without a first_name\" d... | ruby | chosen |
[
{
"from": "system",
"value": "Add ruby version 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 'nasdaq_scraper/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove thumb from Document's json methods\n"
},
{
"from": "human",
"value": "class RedactorRails::Document < RedactorRails::Asset\n mount_uploader :data, RedactorRailsDocumentUploader, :mount_on => :data_file_name\n\n def url_content\n url(:content)\n end\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Add private_ip detection for non-clouds.\n"
},
{
"from": "human",
"value": "# Cookbook Name:: sys_dns\n# Recipe:: do_set_private\n\n# Copyright RightScale, Inc. All rights reserved. All access and use subject to the\n# RightScale Terms of Service available at http:... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to change the names of already made payment methods.\n"
},
{
"from": "gpt",
"value": "class ChangeNameOfPaymentMethodTypes < ActiveRecord::Migration\n def up\n name_maps.each do |old, new|\n Spree::PaymentMethod.where(type: old).update_all(type... | ruby | chosen |
[
{
"from": "system",
"value": "Use GitHub as the gem homepage."
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'faraday/detailed_logger/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Make the ActiveModel integration use option-style arguments\n"
},
{
"from": "human",
"value": "module Marples\n module ModelActionBroadcast\n CALLBACKS = [ :save, :create, :update, :destroy, :commit ]\n\n def self.included base\n base.class_eval do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for pipeline builder that validates config\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Pipeline::Chain::Validate::Config do\n set(:project) { create(:project) }\n set(:user) { create(:user) }\n\n let(:command) do\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Make optional Thing ::look, ::body\n"
},
{
"from": "human",
"value": "class Yeah::Thing\n class << self\n attr_accessor :look, :body\n end\n\n attr_reader :game\n attr_accessor :x, :y, :look, :body\n\n def initialize(game, options)\n @game = game\n @lo... | ruby | chosen |
[
{
"from": "system",
"value": "Update for millis/seconds mistake in the persistent pricing model expiration default\n"
},
{
"from": "human",
"value": "require 'moneta'\n\nclass PersistantPricingModel\n\n\tdef initialize(model, baseDir = './data', expiration = 1000 * 60 * 60 * 24)\n\t\t@model = mo... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor string interpolation call to_s as implicit\n"
},
{
"from": "human",
"value": "class PlayCard\n attr_reader :errors\n\n def initialize(player, round, card)\n @player = player\n @round = round\n @card = card\n @errors = []\n end\n\n def cal... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to generate GpgKeySubkeys records and update signatures\n"
},
{
"from": "gpt",
"value": "# See http://doc.gitlab.com/ce/development/migration_style_guide.html\n# for more information on how to write migrations for GitLab.\n\nclass CreateGpgKeySubkeysFor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix build on xcode 11.4\n\nSee https://github.com/stripe/stripe-ios/pull/1526\n"
},
{
"from": "human",
"value": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n s.name = package['name']\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix another typo in User model\n"
},
{
"from": "human",
"value": "require 'bcrypt'\n\nclass User < ActiveRecord::Base\n\n include BCrypt\n\n has_many :decks, through :rounds\n\n validates :last_name, :first_name, :user_name, :email, presence: true\n\n def passwo... | ruby | chosen |
[
{
"from": "human",
"value": "Add associations and validations to model\n"
},
{
"from": "gpt",
"value": "class Vote < ActiveRecord::Base\n belongs_to :voter, class_name: \"User\"\n belongs_to :voteable, polymorphic: true\n\n validates :value, minimum: -1, maximum:1\n\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec summary and description\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cluster/discovery/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to remove conflicting files\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"coinbase-official\"\n s.version = \"2.1.2\"\n s.summary = \"Integrate bitcoin into your iOS application.\"\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing sync release dependency\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nregister(\"config\") do\n Headbanger::Config.new\nend\n\nregister(\"artists.sync\") do |model, **options|\n Artists::Sync.new(model, **options)\nend\n\nregister... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"fix n+1 for admin product images\"\n\nThis reverts commit 2acb334efd85c5e0467a1db64938cf28f08d8fe8.\n"
},
{
"from": "human",
"value": "module Spree\n module Admin\n class ImagesController < ResourceController\n before_action :load_data\n\n cre... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs regarding canceling policy simulation\n"
},
{
"from": "human",
"value": "describe ApplicationController do\n describe \"#assign_policies\" do\n let(:admin_user) { FactoryBot.create(:user, :role => \"super_administrator\") }\n let(:host) { Fact... | ruby | chosen |
[
{
"from": "system",
"value": "Fix problem in calculator spec\n\nI am not sure why this started failing on this branch only and not in master but this fix is correct because line_items are created with order defined already, an order.reload is enough to load them into the order\n"
},
{
"from": "human... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deleted VERSION file from gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{deep_merge}\n s.version = \"1.0.1\"\n\n s.authors = [\"Steve Midgley\"]\n s.date = %q{2011-07-28}\n s.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix documentation typo on mailer rake task.\n\nFixes #6326\n"
},
{
"from": "human",
"value": "namespace :email do\n desc 'Sends test email to specified address - Example: EMAIL=spree@example.com bundle exec rake test:email'\n task test: :environment do\n unless... | ruby | chosen |
[
{
"from": "system",
"value": "Set confirmed_at for the generated user\n"
},
{
"from": "human",
"value": "namespace :user do\n task :add, [:user, :email, :password] => :environment do |t, args|\n u = User.new({ username: args.user,\n\n password: args.password,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Install pyenv using brew instead of package;\n;\n"
},
{
"from": "human",
"value": "pythons = node['sprout']['pyenv']['pythons']\ndefault_python = node['sprout']['pyenv']['default_python']\n\npackage 'pyenv'\n\nsprout_base_bash_it_enable_feature 'plugins/pyenv... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy school year & student school year objects before seeding\n"
},
{
"from": "human",
"value": "Dir[\"#{Rails.root}/db/seeds/demo/demo_data/*.rb\"].each {|file| require file }\n\nputs \"Creating demo schools, homerooms, interventions...\"\n\nSchool.destroy_all\n... | ruby | chosen |
[
{
"from": "system",
"value": " Use a color that's closer to \"true\" sepia.\n"
},
{
"from": "human",
"value": "#!/usr/local/bin/ruby -w\nrequire 'RMagick'\n\n# Demonstrate the Image#colorize method by converting\n# a full-color image to \"sepia-tone\"\n\npolynesia = Magick::Image.read('images/Po... | ruby | chosen |
[
{
"from": "system",
"value": "Rework options to more simple unix-way\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\nrequire 'slop'\n\nopts = Slop.new({\n\t:help => true,\n\t:banner =>\t[\n\t\t'Auto-generates association.csv from column.csv when we have same colum... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up dataset edits success message code\n"
},
{
"from": "human",
"value": "class DatasetEditsController < ApplicationController\n before_action :find_dataset\n before_action :find_previous_edits\n\n def edit\n @dataset_edit = current_user.dataset_edits.new... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant render calls from controller\n"
},
{
"from": "human",
"value": "class TravelAdviceController < ApplicationController\n before_filter :set_expiry\n\n def index\n @countries = content_api.countries['results']\n @publication = OpenStruct.new(:t... | ruby | chosen |
[
{
"from": "system",
"value": "Make transaction skipping logic threadsafe\n"
},
{
"from": "human",
"value": "module TransactionSkipping\n extend ActiveSupport::Concern\n\n # Allow a transaction to be skipped. This isn't thread-safe, which doesn't matter for this application currently, but worth... | ruby | chosen |
[
{
"from": "system",
"value": "Make coffee_script detection jRuby compatible\n"
},
{
"from": "human",
"value": "begin\n require 'coffee_script'\nrescue LoadError => e\n raise e unless e.message == 'cannot load such file -- coffee_script'\nend\n\nmodule Ember\n module ES6Template\n autoload ... | ruby | chosen |
[
{
"from": "system",
"value": "Update git tag in podspec.\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n\n s.name = \"Injineer\"\n s.version = \"1.0.1\"\n s.summary = \"A dependency injection framework for Objective-C\"\n s.description = \"Injineer is simpler t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test on 1.9.x by adding magic file encoding comment\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'process_shared'\n\nmodule ProcessShared\n describe SharedMemoryIO do\n\n describe '#read' do\n def binary(s)\n (RUBY_VERSION ==... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to use 'add_runtime_dependency'\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"warden/strategies/doorkeeper\"\n\nGem::Specification.new do |s|\n s.name = \"warden-doorkeeper\"\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Exit when gem is missing.\n"
},
{
"from": "human",
"value": "module Watir\n class Browser\n class << self\n def new(browser=nil, *args)\n if browser && browser.to_sym != :ie && Watir.driver == :classic\n Watir.driver = :webdriver \n e... | ruby | chosen |
[
{
"from": "system",
"value": "Create the migrator with the test options.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../../../catissue/migration/helpers/test_case'\nrequire File.dirname(__FILE__) + '/../../helpers/test_case'\nrequire File.dirname(__FILE__) + '/see... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Inherit from namespaced ResourceController + explain why\"\nThis workaround is not needed anymore as rd_resource_controller is now removed\n\nThis reverts commit 3959c7b9f008e6653e79674a3af1f907cf90cbb9.\n"
},
{
"from": "human",
"value": "module Spree\n mo... | ruby | chosen |
[
{
"from": "human",
"value": "Make firmware unique on version and channel\n"
},
{
"from": "gpt",
"value": "class MakeFirmwareUniqueOnVersionAndChannel < ActiveRecord::Migration\n def up\n remove_index :firmwares, :version\n add_index :firmwares, [:version, :channel], unique: true\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add (no-)proxy support for subversion and some smaller fixes\n"
},
{
"from": "human",
"value": "name 'sys'\nmaintainer 'GSI HPC department'\nmaintainer_email 'hpc@gsi.de'\nlicense 'Apache 2.0'\ndescription 'System Software configurati... | ruby | chosen |
[
{
"from": "system",
"value": "Remove version constraints and depend on build-essential\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'pantry'\nmaintainer 'Joshua Timberman'\nmaintainer_email 'joshua@che... | ruby | chosen |
[
{
"from": "system",
"value": "Add column headings to git catalog ls\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# -*- encoding: us-ascii -*-\n\ndesc \"ls\", \"List the catalog file for the archive\"\noption 'archive', :aliases=>'-a', :type=>'string', :desc=>'Archive location'\ndef ls... | ruby | chosen |
[
{
"from": "system",
"value": "Add repeats to vote announcement\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'net/http'\nrequire 'uri'\n\nmodule Cinch\n module Plugins\n\n class StrawPoll\n include Cinch::Plugin\n include Cinch::Extensions::Authentication\n\n enab... | ruby | chosen |
[
{
"from": "system",
"value": "Hide protected methods from RDoc\n"
},
{
"from": "human",
"value": "module Copian\n module Collector\n class Generic\n def inspect\n \"#<#{self.class} #{@manager.host}@#{@manager.community}>\"\n end\n def initialize(ip_addr, community, vers... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for path assignment with *args\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')\n\ndescribe ::Inch::CLI::Command::List do\n before do\n Dir.chdir fixture_path(:simple)\n @command = ::Inch::... | ruby | chosen |
[
{
"from": "system",
"value": "Remove depreceations about using Model.find(instance)\n"
},
{
"from": "human",
"value": "# A time transfer between accounts.\n#\n# When an amount of time is to be transferred between two accounts, a\n# Transfer object should be created with the followinf attributes:... | ruby | chosen |
[
{
"from": "system",
"value": "Update webmock requirement from ~> 3.6.0 to ~> 3.7.0\n\nUpdates the requirements on [webmock](https://github.com/bblimke/webmock) to permit the latest version.\n- [Release notes](https://github.com/bblimke/webmock/releases)\n- [Changelog](https://github.com/bblimke/webmock/blob... | ruby | chosen |
[
{
"from": "system",
"value": "Remove and re-add training slug index\n\nThis may let us work around the index size problem.\n"
},
{
"from": "human",
"value": "class ConvertTrainingModulesToUtf8Mb4 < ActiveRecord::Migration[6.0]\n def change\n execute \"ALTER TABLE training_slides ROW_FORMAT=D... | ruby | chosen |
[
{
"from": "system",
"value": "Update Framework Search Paths to include XCTest\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"RxNimble\"\n s.version = \"0.1.0\"\n s.summary = \"Nimble extensions that making unit testing with RxSwift easier 🎉\"\n s.desc... | ruby | chosen |
[
{
"from": "system",
"value": "Add some utility gems for development.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cashmonies/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SshKeyMapping scopes - should be arrays.\n"
},
{
"from": "human",
"value": "module DropletKit\n class SSHKeyMapping\n include Kartograph::DSL\n\n kartograph do\n mapping SSHKey\n root_key singular: 'ssh_key', plural: 'ssh_keys', scopes: [:read]\... | ruby | chosen |
[
{
"from": "system",
"value": "Add error message to 401 response body\n"
},
{
"from": "human",
"value": "module G5AuthenticatableApi\n module GrapeHelpers\n def authenticate_user!\n unless warden.try(:authenticated?)\n if access_token\n validate_access_token\n else... | ruby | chosen |
[
{
"from": "system",
"value": "Store release information in a property and ensure to pass the requested release down to ReleaseManager\n"
},
{
"from": "human",
"value": "#\n# XcodeInstaller::Download (Command Class)\n#\n#\n\nmodule XcodeInstaller\n class Download\n\n def action(args, options)... | ruby | chosen |
[
{
"from": "system",
"value": "Add function to remove word from dictionary\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Dictionary\n class ArrayDictionary\n attr_reader :words\n\n def initialize(words = [])\n @words = []\n\n add_words(words)\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "ADD square title type (Tile)\n"
},
{
"from": "human",
"value": "module WindowsStore::PushNotification\n class Tile < CommonPushType\n\n def to_s\n return %Q(\n <tile>\n <visual>\n <binding template=\"TileWideText01\">\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecated access to configtimeout in Puppet >= 4\n"
},
{
"from": "human",
"value": "require 'socket'\nrequire 'timeout'\n\nmodule Puppet\n module Util\n class EsInstanceValidator\n attr_reader :instance_server\n attr_reader :instance_port\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate events to add path\n"
},
{
"from": "gpt",
"value": "class AddEventPath < ActiveRecord::Migration\n def self.up\n add_column :events, :path, :string, :limit => 255\n end\n\n def self.down\n remove_column :events, :path\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add git config settings after repository initialization\n"
},
{
"from": "human",
"value": "# Git Helper module\n#\nmodule GitHelper\n def git(path)\n raise unless block_given?\n Dir.chdir(path) do\n yield\n end\n end\n\n def git_init\n `git init`... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec; bump version to 0.2\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"spool_pool\"\n s.version = \"0.1\"\n\n s.required_ruby_version = \">= 1.9.1\"\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.re... | ruby | chosen |
[
{
"from": "system",
"value": "Use different paylods in tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Travis::Worker::Reporters::StateReporter do\n let(:connection) { HotBunnies.connect }\n let(:reporter) { described_class.new('staging-1', connection.create_channe... | ruby | chosen |
[
{
"from": "system",
"value": "Replace tab with 2 spaces"
},
{
"from": "human",
"value": "dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire File.join(dir, 'happymapper')\n\nfile_contents = File.read(dir + '/../spec/fixtures/statuses.xml')\n\nclass User\n include Hap... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec for Thread.list with thread groups\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Thread::list\" do\n it \"includes the current and ma... | ruby | chosen |
[
{
"from": "system",
"value": "Remove all failure points and update base lib naming.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2012 by Tracelytics, Inc.\n# All rights reserved.\n\nrequire 'mkmf'\n\nif RUBY_PLATFORM =~ /darwin/\n $stderr.puts \"Error: native extension disabled on OS X. T... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.