conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add my name to gemspec."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/feedzirra/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'feedzirra'\n s.version = Feedzirra::VERSION\n\n s.authors = ['Paul ... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out http health check tests\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\ndescribe Backend::Ecs::Elb do\n let(:service) { create :web_service }\n\n describe \"#health_check_target\" do\n subject { described_class.new(service).health_che... | ruby | chosen |
[
{
"from": "system",
"value": "Add \\n to the end of lumos line return.\n"
},
{
"from": "human",
"value": "module Kernel\n def lumos(message = nil, *args)\n if message.nil? || message == :>\n lumos_divide args[0], args[1]\n else\n lumos_wrap message, args[0]\n end\n end\n\npr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the automatic engine require\n\nMSP-11412\n"
},
{
"from": "human",
"value": "\n#\n# Gems\n#\n# gems must load explicitly any gem declared in gemspec\n# @see https://github.com/bundler/bundler/issues/2018#issuecomment-6819359\n#\n#\n\nrequire 'metasploit/conce... | ruby | chosen |
[
{
"from": "system",
"value": "Test if constant is defined\n\nFor example, parsing failed because Sidekiq::Testing was not defined in\nboth, the production and development environments.\n"
},
{
"from": "human",
"value": "# The Semaphore class allows to lock resources. The processes are blocked, i... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor known tool method with normalise\n"
},
{
"from": "human",
"value": "require 'scaffolder'\n\nmodule Scaffolder::ToolIndex\n require 'scaffolder/tool'\n\n def known_tool?(type)\n Scaffolder::Tool.constants.include?(tool_name(type))\n end\n\n def tool_c... | ruby | chosen |
[
{
"from": "system",
"value": "Send is not needed to call the class method\n"
},
{
"from": "human",
"value": "module Schema\n module DataStructure\n def self.included(cls)\n cls.send :include, Schema\n cls.extend Virtual::Macro\n cls.send :virtual, :configure_dependencies\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add symbolic link for jquery-1.7.2 in assets precompile\n\nThis commit adds a missing symbolic link which maps jquery-1.7.2 to jquery-1.12.4. This is a temporary fix until such time as we update the test wrapper to reference a fingerprinted version of jquery-1.12.4, and is nece... | ruby | chosen |
[
{
"from": "system",
"value": "Make parameter meaning a bit more explicit and re-document it\n"
},
{
"from": "human",
"value": "module OneSheet\n # Module concerned with reading in ranges of lines from files\n # that will constitute the one sheet resume.\n #\n # @author Paul Fioravanti\n mod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix name of a Tool\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule DeepCover\n module Tools::RequireRelativeDir\n # Like String#scan, but return the MatchData object instead\n def scan_match_datas(source, matcher)\n source.to_e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove additional reference to SilverpopMailer\n"
},
{
"from": "human",
"value": "# Silverpop\nrequire 'net/http'\nrequire 'net/ftp'\nrequire 'uri'\nrequire 'nokogiri'\n\nrequire File.dirname(__FILE__) + '/silverpop/base'\nrequire File.dirname(__FILE__) + '/silverpo... | ruby | chosen |
[
{
"from": "system",
"value": "Implement removing latest in to_remove.\n"
},
{
"from": "human",
"value": "require \"ubuntu_unused_kernels/version\"\n\nmodule UbuntuUnusedKernels\n class << self\n def to_remove\n packages = get_installed\n return packages\n end\n\n def get_inst... | ruby | chosen |
[
{
"from": "system",
"value": "Make migration work if LDAP is disabled\n"
},
{
"from": "human",
"value": "class FixIdentities < ActiveRecord::Migration\n def up\n # Up until now, legacy 'ldap' references in the database were charitably\n # interpreted to point to the first LDAP server spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add a description to the gemspec\n"
},
{
"from": "human",
"value": "require_relative \"lib/disc/version\"\n\nGem::Specification.new do |s|\n s.name = 'disc'\n s.version = Disc::VERSION\n s.summary = 'A simple and powerful Disque j... | ruby | chosen |
[
{
"from": "system",
"value": "Fix run subscribe callbacks place\n"
},
{
"from": "human",
"value": "module FayeTracking\n class FayeExtension\n MONITORED_CHANNELS = [\n '/meta/subscribe',\n '/meta/unsubscribe',\n '/meta/disconnect'\n ]\n\n def initialize(tracker)\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sidekiq thread id of context\n"
},
{
"from": "human",
"value": "module ActiveCrew\n module Backends\n class SidekiqBackend\n include Sidekiq::Worker\n\n class << self\n def enqueue(name, invoker, context)\n Sidekiq::Client.push 'cla... | ruby | chosen |
[
{
"from": "system",
"value": "Add capability to always display updates even if they are empty - default do not include\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nmodule PaperTrailScrapbook\n # Global configuration affecting all threads.\n class Config\n include Singleton\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add magic comment and give initial string to set its encoding.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../../spec_helper', __FILE__)\nrequire 'stringio'\nrequire 'zlib'\n\ndescribe 'Zlib::GzipFile#close' do\n it 'finishes the stream and c... | ruby | chosen |
[
{
"from": "system",
"value": "Update ClubsController for Update Action\n\nUpdate the ClubsController to include the update action, as well as\nprovide some refactoring to eliminate code duplication.\n"
},
{
"from": "human",
"value": "class ClubsController < ApplicationController\n before_filter... | ruby | chosen |
[
{
"from": "system",
"value": "Edit time zone issue on sign up\n\n- Change timezone to \"Eastern Time.\"\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_record/railtie\"\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Make reordering subsections logic consistent\n\nMake reordering subsections consistent with how announcements and timeline entries are reordered.\nThe code is still in a separate method, but the logic for the reordering is the same.\n\nAlso removes the `current_positions` metho... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up formatting on games controller\n"
},
{
"from": "human",
"value": "class GamesController < ApplicationController\n # Return an error message if a game isn't specified.\n # There are too many games to return all events from all games.\n def all_games\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add return of `current_user.admin?` to `restrict_to_admin`\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n before_action :configure_permitted_parameters, if: :devise_controller?\n\n\n def get_event\n @event = Event.find... | ruby | chosen |
[
{
"from": "system",
"value": "Move Auto Login Until After User Activates\n\nMove auto login method until after the user activates because they need\nto confirm their email before login in. Also because of that change the\nredirect to the user Edit Profile.\n"
},
{
"from": "human",
"value": "clas... | ruby | chosen |
[
{
"from": "system",
"value": "Update content of look book image\n"
},
{
"from": "human",
"value": "class Spree::LookBookImage < ActiveRecord::Base\nend\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n# == Schema Information\n#\n# Table name: look_book_images\n#\n# id... | ruby | chosen |
[
{
"from": "system",
"value": "Add Colorize as a runtime dependancy for Formatter printing\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dest/version'\n\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Fix foreign_key association in Event model\n"
},
{
"from": "human",
"value": "class Event < ActiveRecord::Base\n has_many :games\n has_many :event_users\n has_many :users, through: :event_users\n belongs_to :creator, class_name: \"User\", foreign_key: :user_id\n... | ruby | chosen |
[
{
"from": "system",
"value": "Return 400 when given invalid json\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'sinatra'\nrequire_relative './garage'\n\n\nclass GarageWatch < Sinatra::Application\n before do\n content_type :json\n end\n\n get '/door/:id' do\n Garage.... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce max threads to 2.\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)\nthreads threads_count, threads_count\n\npreload_app!\n\nrackup DefaultRackup\nport ENV['PORT... | ruby | chosen |
[
{
"from": "system",
"value": "Fix activity budgets duplicate action test\n"
},
{
"from": "human",
"value": "require 'test_helper'\nmodule Backend\n class ActivityBudgetsControllerTest < ActionController::TestCase\n test_restfully_all_actions except: :show\n\n test 'show action' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "chore: Exclude arm64 for simulator builds.\n\nChange-Id: Ifdf1fb98830effb461c921ad70642c42555b1f2d\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'GoogleMapsPlatformCombine'\n s.version = '0.1.0'\n s.summary = 'Sw... | ruby | chosen |
[
{
"from": "system",
"value": "Switch repository for Chromium to have the latest version\n"
},
{
"from": "human",
"value": "class Chromium < Cask\n url 'http://downloads.sourceforge.net/project/osxportableapps/Chromium/ChromiumOSX_30.0.1599.101.dmg'\n homepage 'http://www.freesmug.org/chromium'... | ruby | chosen |
[
{
"from": "system",
"value": "Update to new v2 url\n"
},
{
"from": "human",
"value": "cask 'postgres' do\n version '9.6.1.1'\n sha256 '4924b956c30d1e3191277dcd72834dc43fc76f74c1cae5be18729af771b0da45'\n\n # github.com/PostgresApp/PostgresApp was verified as official when first introduced to t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix source, add authors, bump version.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'BDBOAuth1Manager'\n s.version = '1.5.0-so.1'\n s.license = 'MIT'\n s.summary = 'AFNetworking 2.0-compatible replacement for AFOAuth1Client.'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change Valgrind failure reason after Xcode4 tests\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Valgrind < Formula\n homepage 'http://www.valgrind.org/'\n\n url \"http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2\"\n md5 \"2c3aa122498baecc9d691... | ruby | chosen |
[
{
"from": "human",
"value": "Add adium nightly version 1.6\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'adium-nightly16' do\n version '1.6hgr5896'\n sha256 '163e5a5eb521ccb7ccf033ac17c3a9323a052c13f8da97eb296e762c96096ab4'\n\n url \"http://nightly.adium.im/adium-adium-1.6/Adium_#{version}.dm... | ruby | chosen |
[
{
"from": "system",
"value": "Remove patch for old JRuby versions\n\nJRuby 9.0.5.0 (released January 26 2016 and Ruby 2.2 compatible)\nsupports each_object(singleton_class) (#22385). Given that Rails 6\nrequires Ruby 2.5.0 or newer, we should be able to drop support for\nversions of JRuby older than 9.0.5.0... | ruby | chosen |
[
{
"from": "system",
"value": "Determine whether the application uses postgresql without trying to connect to the database\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActiveRecord\n module Postgres\n module Constraints\n class Railtie < Rails::Railtie\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set colin version on 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 'greg/version'\n\nGem::Specification.new do |spec|\n spec.name = \... | ruby | chosen |
[
{
"from": "system",
"value": "Clear prequel session after request\n\nNot doing this was causing stale data to be returned for subsequent\nrequests."
},
{
"from": "human",
"value": "require 'build_client_dataset'\n\nclass ApplicationController < ActionController::Base\n include BuildClientDatase... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper to interrogate cookie jar for notice dismissal cookie.\n"
},
{
"from": "human",
"value": "require 'core/interactors/category_navigation_reader'\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n include L... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Added connexionz client in app controller\"\n\nThis reverts commit 35f3c7368baf6512a31fb9ca069d48df8bd16f0c.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n private\n\n def connexionz\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add script rundeck delete projects for tests\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n#@author:: 'weezhard'\n#@usage:: 'Delete projects rundeck'\n#@licence:: 'GPL'\n#@version: 1.0.0\n\nrequire 'uri'\nrequire 'time'\nrequire 'rubygems'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to explain purpose of the code\n\n[#127624879]\n"
},
{
"from": "human",
"value": "module Asyncapi::Server\n class JobWorker\n\n include Sidekiq::Worker\n sidekiq_options retry: false\n MAX_RETRIES = 2\n\n def perform(job_id, retries=0)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add queue name to deploy job\n"
},
{
"from": "human",
"value": "class DeployJob\n\n def perform(params)\n @deploy = Deploy.find(params[:deploy_id])\n commands = StackCommands.new(@deploy.stack)\n\n capture commands.fetch\n capture commands.clone(@deploy... | ruby | chosen |
[
{
"from": "system",
"value": "Add --no-color option instead of --color\nSo colorful option is defaultly on.\n"
},
{
"from": "human",
"value": "module Jqr\n class Runner\n attr_reader :arguments\n\n def initialize(arguments = ARGV)\n @arguments = arguments\n end\n\n def command_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to use season_id for where statement.\n"
},
{
"from": "human",
"value": "require 'scrypt'\n\nclass Player < ActiveRecord::Base\n has_many :scores\n\n validates :name, presence: true, uniqueness: true,\n format: { with: /\\A[a-zA-Z0-9_]+\\z/ }\n validates :... | ruby | chosen |
[
{
"from": "system",
"value": "Use UrlHelper in api spec\n"
},
{
"from": "human",
"value": "require 'rack/test'\nrequire 'json_spec'\nrequire 'spec_helper'\n\nrequire 'api/base'\n\nmodule RackHelper\n include Rack::Test::Methods\n\n def app\n API::Base\n end\n\n alias_method :response, :la... | ruby | chosen |
[
{
"from": "system",
"value": "Fix url and homepage to use SSL in Haskell Platform Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'haskell-platform' do\n v... | ruby | chosen |
[
{
"from": "system",
"value": "Change bourbon and neat to runtime dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"dta_rapid\"\n spec.version = \"0.2.1\"\n spec.authors = [\"Gareth Rogers\"]\n spec.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the v0.3.2 tag as its causing Cocoapods to complain\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'WKVerticalScrollBar'\n s.version = '0.3.2'\n s.license = 'MIT'\n s.platform = :ios\n\n s.summary = 'A tradi... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to test frozen string debug generation\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\nruby_version_is \"2.3\" do\n describe \"The --enable-frozen-string-literal flag causes string literals to\" do\n\n it \"... | ruby | chosen |
[
{
"from": "system",
"value": "Add a little header for the CLI summmary.\n"
},
{
"from": "human",
"value": "require 'alfred/task_manager'\nrequire 'tasks/help_task'\n\nmodule Alfred\n class Cli\n def run(argv)\n load_tasks\n\n if argv.empty?\n print_help\n else\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Test cases for rescue => e\n"
},
{
"from": "human",
"value": "### Empty rescue clause\n#### With raise\n\n begin\n raise\n rescue\n end\n\n begin\n raise\n \"foo\"\n#>X\n rescue\n end\n\n#### Without raise\n\n begin\n :dont_r... | ruby | chosen |
[
{
"from": "system",
"value": "Save screenshot in build artifacts when integration test fails\n\n[fixes #27034517]\n"
},
{
"from": "human",
"value": "require 'capybara/rspec'\nCapybara.default_driver = :selenium\nCapybara.app_host = 'http://localhost:8080'\n\ndef current_route\n route = URI.pars... | ruby | chosen |
[
{
"from": "human",
"value": "Add ruboty test adapter and ruboty testable module\n"
},
{
"from": "gpt",
"value": "module Ruboty\n module Adapters\n class Mock < Base\n def run\n end\n end\n end\n\n module Testable\n def say(message)\n said << message\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Chore: Rollback Rails dependency to 4.0.2\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"active_model/form_object/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix user fixtures for development\n"
},
{
"from": "human",
"value": "Gitlab::Seeder.quiet do\n (2..20).each do |i|\n begin\n User.seed(:id, [{\n id: i,\n username: Faker::Internet.user_name,\n name: Faker::Name.name,\n email: Fa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActiveModel API changes from 3.x to 4.x\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'active_model'\nrequire 'geojsonlint/geojson_validator'\n\nclass Feature\n include ActiveModel::Model\n include ActiveModel::Validations\n\n attr_accesso... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade image_optim dependency to 0.14.0\n\nChange-Id: Id935cbcf5597b86b068a53f3af8535891cac386b\nReviewed-on: http://gerrit.causes.com/40841\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <67fb7bfe39f841b16a1f86d3928acc56... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for payment method check\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Spree::Adyen::PaymentCheck do\n describe \".hpp_payment?\" do\n subject { payment.hpp_payment? }\n\n context \"when it is an hpp payment\" do\n let(:payme... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil if auth is not available.\n"
},
{
"from": "human",
"value": "require \"krug_forum/engine\"\n\nmodule KrugForum\n DEFAULT_CURRENT_USER = Proc.new do\n if respond_to?(:current_user)\n current_user\n else\n raise \"Cannot find :current_user ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the cop violation :cop:\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"active_support/core_ext/module/delegation\"\n\nmodule Rails\n class Application\n class RoutesReloader\n include ActiveSupport::Callbacks\n\n attr... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec controller with one test passed.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe CommentsController, :type => :controller do\n\nend\n"
},
{
"from": "gpt",
"value": "\nrequire 'rails_helper'\n\nRSpec.describe CommentsC... | ruby | chosen |
[
{
"from": "system",
"value": "Add multi subject integration spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mutant,'rspec integration' do\n\n around do |example|\n Dir.chdir(TestApp.root) do\n example.run\n end\n end\n\n let(:strategy) { Mutant::Strategy::... | ruby | chosen |
[
{
"from": "system",
"value": "Fix valid related content url helper method\n"
},
{
"from": "human",
"value": "class RelatedContentsController < ApplicationController\n VALID_URL = /#{Setting['url']}\\/.*\\/.*/\n\n skip_authorization_check\n\n respond_to :html, :js\n\n def create\n if relat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix IP history false positives"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nclass Account < ActiveRecord::Base\n module Account::FraudValidator\n extend ActiveSupport::Concern\n \n VALID_FRAUD_SCORE = 40\n VALIDATION_REASONS = [\... | ruby | chosen |
[
{
"from": "system",
"value": "Update error items helper to handle checkbox component\n\nThe error handling for this component is built slightly differently\nto the other components. Resultantly, an empty array is rendered\nas an error message for the checkbox component. This is due to there\nnot being a pre... | ruby | chosen |
[
{
"from": "system",
"value": "Set sendmail configurations only when they are present\n"
},
{
"from": "human",
"value": "class ApplicationMailer\n class << self\n def set(option)\n if option == :load_settings\n begin\n yml = YAML.load_file(File.join(Rails.root, 'config', ... | ruby | chosen |
[
{
"from": "system",
"value": "Add f-name var to mail template\n"
},
{
"from": "human",
"value": "class NewRequestMailer < BaseMandrillMailer\n def notify(request, user)\n subject = \"#{request.requester.first_name} needs a neighbor!\"\n merge_vars = {\n \"REQUEST_URL\" => \"/requests... | ruby | chosen |
[
{
"from": "system",
"value": "Check if series are returned\n"
},
{
"from": "human",
"value": "require \"the_tvdb/version\"\nrequire \"the_tvdb/gateway\"\nrequire \"the_tvdb/configuration\"\nrequire \"the_tvdb/show\"\nrequire \"the_tvdb/episode\"\n\nmodule TheTvdb\n \n def self.setup\n yield... | ruby | chosen |
[
{
"from": "system",
"value": "Fix S3 URL regexp properly.\n"
},
{
"from": "human",
"value": "module Tranz\n \n module S3\n \n class << self\n def parse_uri(url)\n if url =~ /^s3:([^\\/]+)\\/+(.+)(?:\\?(.*))?$/\n output = {}.with_indifferent_access\n output[:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix merge conflict in lang model\n"
},
{
"from": "human",
"value": "class Language <ActiveRecord::Base\n has_many :user_languages\n validates :name, presence: true\n has_many :filters, as: :filterable\n\n def self.language_names\n self.pluck(\"name\")\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests for assets loader\n"
},
{
"from": "gpt",
"value": "require 'cucumber/html_formatter/assets_loader'\n\ndescribe Cucumber::HTMLFormatter::AssetsLoader do\n let(:subject) { Cucumber::HTMLFormatter::AssetsLoader.new }\n\n before do\n allow(File).to re... | ruby | chosen |
[
{
"from": "human",
"value": "Add new podspec for RestKit dependency\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n\n s.name = 'IBMWatsonRestKit'\n s.version = '0.32.0'\n s.summary = 'Dependency for the IBM Watson SDK'\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct exception name for HTTP error\n"
},
{
"from": "human",
"value": "require 'readline'\n\nmodule Tr3llo\n class Controller\n def initialize\n end\n\n def start\n list = %w(board card help list mine move select self-assign show)\n comp = ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up packaged gem by removing unneeded files.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'more_core_extensions/version'\n\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add konacha.css to precompile list"
},
{
"from": "human",
"value": "module Konacha\n class Engine < Rails::Engine\n # Do not mess up the application's namespace.\n # http://api.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+Engine\n isolate_names... | ruby | chosen |
[
{
"from": "system",
"value": "Fix another incorrect variable name\n"
},
{
"from": "human",
"value": "require \"data_url/version\"\n\nrequire 'base64'\nrequire 'uri'\n\nmodule DataURL\n def self.parse(url)\n return nil, nil, nil if str.nil? or str.empty?\n \n scheme, content_type, encod... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"labs.json errors when calling kind_name and url\"\n\nThis reverts commit 961b6588ddaf82f7c475652a30b022fcfaa63fb0.\n"
},
{
"from": "human",
"value": "class LabSerializer < ActiveModel::Serializer\n\n # cached\n\n attributes :id,\n :name,\n #:kind_na... | ruby | chosen |
[
{
"from": "system",
"value": "Call super in inherited to avoid overiding previously defined behavior\n"
},
{
"from": "human",
"value": "require 'haml'\nrequire 'tilt/haml'\n\nmodule EndView\n class << self\n attr_writer :default_engine\n\n def default_engine\n @default_engine ||= Til... | ruby | chosen |
[
{
"from": "system",
"value": "Add Message for Display of Data and Route in Logs\n"
},
{
"from": "human",
"value": "require \"feedback_router/version\"\nrequire 'faraday'\n\nmodule FeedbackRouter\n def self.send(feedback_params, application_name)\n @base_url, @controller_route = set_up_destin... | ruby | chosen |
[
{
"from": "human",
"value": "Add a service account based helper library for publishing google calendar events.\n"
},
{
"from": "gpt",
"value": "require \"google-api-client\"\n\nclass GoogleCalendar\n\n def initialize(config, logger)\n @config = config\n @key = Google::APIClient::PKCS12.lo... | ruby | chosen |
[
{
"from": "system",
"value": "Add useless alias for postgres\n"
},
{
"from": "human",
"value": "class ScoreboardController < ApplicationController\n def index\n @yellow_jersey = Trip.group(:user).order('sum_distance_in_meter DESC').sum(:distance_in_meter)\n @polka_dot_jersey = Trip.group(... | ruby | chosen |
[
{
"from": "system",
"value": "Set 1 col as default layout\n"
},
{
"from": "human",
"value": "class StyleguideController < ApplicationController\n layout 'styleguide/documentation'\n\n def layouts\n render layout: 'styleguide/documentation_1col'\n end\n\n def pages_homepage\n render lay... | ruby | chosen |
[
{
"from": "system",
"value": "[Rake] Allow user to customize the project configuration.\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nrequire 'rake' unless defined? Rake\n\nnamespace :ib do\n desc \"Generates ib.xcodeproj and opens it in XCode\"\n task :open => :project do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix QueuedEmail NameProposal GuardClause offense\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Name Proposal Email\nclass QueuedEmail::NameProposal < QueuedEmail\n def naming\n get_object(:naming, Naming)\n end\n\n def observation\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Drop this file on the VM to start with\n\n* this makes the architect lab less awkward\n* I didn't want this on the VM because it's terrible, but the\n alternative was more terrible :(\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# This script is designed... | ruby | chosen |
[
{
"from": "system",
"value": "Update view spec now that MaterialsCollections have Projects\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"materials_collections/show\" do\n before(:each) do\n\n @admin_user = FactoryBot.generate(:admin_user)\n allow(controller).to re... | ruby | chosen |
[
{
"from": "system",
"value": "Add URI to JSON response\n"
},
{
"from": "human",
"value": "json.array!(@postcodes) do |json, postcode|\n json.postcode postcode.postcode\n json.lat postcode.lat\n json.lng postcode.lng\n json.distance postcode.distance_from(@postcode.latlng)\nend"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we don't return an array of Nil's\n"
},
{
"from": "human",
"value": "require 'google_analytics/api'\n\nclass PopularArticle\n def self.generate(articles_to_return=3)\n popular_articles = GoogleAnalytics::API.fetch_article_page_views\n collect_articl... | ruby | chosen |
[
{
"from": "system",
"value": "cucumber: Use set_environment_variable instead of set_env\n"
},
{
"from": "human",
"value": "Given /^the Reddit service returns comments for the user \"(.*?)\"$/ do |user|\n set_env 'USAIDWAT_ENV', 'cucumber'\nend\n\nGiven /^the Reddit service does not have a user ... | ruby | chosen |
[
{
"from": "system",
"value": "Create tasks to report builds and new users\n\nhttps://trello.com/c/egULEXAZ/157-add-more-reporting-tasks\n"
},
{
"from": "human",
"value": "namespace :reports do\n desc 'Prints out weekly activity, which is the number of repos that had builds during the week.'\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a migration script to be used to migrate to\nthe new job timestamps tracking on an existant\nresque-scheduler redis db.\n"
},
{
"from": "gpt",
"value": "require 'redis'\nrequire 'resque'\n\nif ARGV.size != 1\n puts \"migrate_to_timestamps_set.rb <redis-host:redi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference to version constant\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'lobster/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove include CanCan::Ability, since this should be in ::Ability now\n"
},
{
"from": "human",
"value": "require 'cancan'\n\nmodule Forem\n class Ability < ::Ability\n include CanCan::Ability\n\n def initialize(user)\n # Let other permissions run before ... | ruby | chosen |
[
{
"from": "system",
"value": "Add !br replace command. Hello -> 🅱️ello\n"
},
{
"from": "human",
"value": "class Emoji\n include Cinch::Plugin\n\n match /b (.+)/, method: :b\n match /:b: (.+)/, method: :b\n match /🅱️ (.+)/, method: :b\n match /clap (.+)/, method: :clap\n match /:clap: (.+... | ruby | chosen |
[
{
"from": "system",
"value": "Load instead of require so we can reload\n"
},
{
"from": "human",
"value": "require \"arena/version\"\nrequire_relative \"./arena/client\"\nrequire_relative \"./arena/default\"\nrequire_relative \"./arena/configurable\"\n\nmodule Arena\n class << self\n include ... | ruby | chosen |
[
{
"from": "system",
"value": "Use openjdk flavor of Java\n"
},
{
"from": "human",
"value": "default['midokura']['repo-username'] = ''\ndefault['midokura']['repo-password'] = ''\ndefault['java']['jdk_version'] = '7'\ndefault['java']['set_default'] = true\ndefault['cassandra']['cluster_name'] = 'm... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to install zlib-devel on RHEL\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: xml\n# Attributes:: default\n#\n# Copyright 2009-2015, Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.