conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add test for invalid version value\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.configure do |config|\n config.mock_with :rspec\nend\n\ndescribe Facter::Util::Fact do\n before do\n Facter.clear\n end\n\n describe 'rabbitmq_version' do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add support for multiple environments\n"
},
{
"from": "gpt",
"value": "require \"dotenv\"\nrequire \"dotenv/deployment/version\"\n\n# Load defaults\nDotenv.load '.env'\n\n# Override any existing variables if an environment-specific file exists\nenvironment = ENV['RAC... | ruby | chosen |
[
{
"from": "system",
"value": "Add multipart middleware to Faraday stack\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'faraday_middleware-multi_json'\n\nmodule HelloSign\n class Client\n API_ENDPOINT = 'https://api.hellosign.com'\n API_VERSION = '/v3'\n\n attr_reader :... | ruby | chosen |
[
{
"from": "system",
"value": "Use `RSpec.current_example` in place of `example`\n\nIn order to remove deprecation warning #34"
},
{
"from": "human",
"value": "require 'infrataster'\nrequire 'rspec'\n\ninclude Infrataster::Helpers::ResourceHelper\n\nRSpec.configure do |config|\n config.include I... | ruby | chosen |
[
{
"from": "system",
"value": "Save an extra require, expect this will fix the issue loading webmock on travis-ci\n"
},
{
"from": "human",
"value": "begin\n require 'goliath/test_helper'\n require 'pacto/server'\nrescue LoadError\n raise 'pacto/test_helper requires the goliath and pacto-server... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicated configuration attribute (is already inherited)\n"
},
{
"from": "human",
"value": "require 'sfn'\n\nmodule Sfn\n class Config\n # Update command configuration\n class Update < Validate\n\n attribute(\n :print_only, [TrueClass, Fal... | ruby | chosen |
[
{
"from": "system",
"value": "Load feature list only once when scanning multiple files"
},
{
"from": "human",
"value": "module Trufflepig\n class Search\n attr_accessor :results, :path\n\n def initialize(path)\n @results = []\n @path = path\n end\n\n def perform\n if ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependency for Beaker tests\n"
},
{
"from": "human",
"value": "require 'beaker-rspec/helpers/serverspec'\nrequire 'beaker-rspec/spec_helper'\nrequire 'beaker/puppet_install_helper'\n\nrun_puppet_install_helper\n\nSUPPORTED_PLATFORMS = ['Debian'].freeze\n... | ruby | chosen |
[
{
"from": "system",
"value": "Modify Group rule spec to include type_id\n\nWhy you made the change:\n\nI did this because Rule construction now requires the first parameter to be the\nabstract type_id of that rule.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe Togls:... | ruby | chosen |
[
{
"from": "human",
"value": "Change grants description type to text\n"
},
{
"from": "gpt",
"value": "class ChangeGrantsDescriptionType < ActiveRecord::Migration\n def up\n change_column :grants, :details, :text\n end\n\n def down\n change_column :grants, :details, :string\n end\nend\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Intellij Idea EAP to v140.2285.5\n"
},
{
"from": "human",
"value": "cask :v1 => 'intellij-idea-eap' do\n version '140.2110.5'\n sha256 '971cea43259cf517c209dd646c6c48220c97f22e35c0773b644b8c7578aea1c3'\n\n url \"http://download-cf.jetbrains.com/idea/ideaI... | ruby | chosen |
[
{
"from": "system",
"value": "Add YARD documentation for Abstract Pricer\n"
},
{
"from": "human",
"value": "module Spree\n class LineItem\n module Pricers\n class Abstract\n class VariantMissing < StandardError; end\n class CurrencyMissing < StandardError; end\n\n a... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for live_migrate called outside explorers.\n"
},
{
"from": "gpt",
"value": "describe VmController do\n before do\n stub_user(:features => :all)\n EvmSpecHelper.create_guid_miq_server_zone\n end\n\n context 'live_migrate' do\n # FIXME: need to ren... | ruby | chosen |
[
{
"from": "system",
"value": "Remove branch for rails 4.2 reloader\n\nWe are no longer testing against Rails 4.2, so we no longer need to\nbranch for the Rails 4.2 style reloader\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndescribe FactoryBotRails::Railtie do\n describe ... | ruby | chosen |
[
{
"from": "system",
"value": "Add shoulda to gemspec development dependencies\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift 'lib'\n\nrequire 'apnd/version'\n\nGem::Specification.new do |s|\n s.name = 'apnd'\n s.version = APND::Version\n s.date = Time.n... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem description, summary, and homepage for release.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'verified_double/version'\n\nGem::Sp... | ruby | chosen |
[
{
"from": "system",
"value": "Raise standard 404 not found instead of custom exception when a non-existent version is selected\n"
},
{
"from": "human",
"value": "class Page < DataMapper::Base\n class VersionNotFound < Exception; end\n \n property :name, :string\n property :slug, :string\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil so that callback won't leave false on the stack.\n"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n include DateFormat\n \n before_save :prevent_blank_content\n\n after_save :calculate_word_count\n\n belongs_to :user\n belongs_to :... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec file.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/test_declarative/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'test_declarative'\n s.version = TestDeclarative::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Extend aruba timeout in order to have plenty of time to debug.\n"
},
{
"from": "human",
"value": "require 'aruba/cucumber'\r\nrequire 'methadone/cucumber'\r\n\r\nENV['PATH'] = \"#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['... | ruby | chosen |
[
{
"from": "human",
"value": "Add a tool to split table dump from all tables dump\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire \"optparse\"\nrequire \"ostruct\"\n\noptions = OpenStruct.new\noptions.base_name = \"dump\"\noption_parser = OptionParser.new\noption_parser.on(\"--bas... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for when fastly errors are returned"
},
{
"from": "human",
"value": "module FlexCommerceApi\n module Error\n class InternalServer < Base\n def message\n body = response_env.fetch(:body, {errors: []})\n error = body[:errors].first\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new_file_full_path method on Rugged::Diff::Delta\n"
},
{
"from": "human",
"value": "module Rugged\n class Diff\n class Delta\n def new_blob\n blob(new_file)\n end\n\n def old_blob\n blob(old_file)\n end\n\n def repo\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test case for recent Carthage\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule Anticuado\n module IOS\n class CarthageTest < Minitest::Test\n\n OUTDATED_HAVE_UPDATE =<<-OUTDATED\n*** Fetching Result\n*** Fetching Himotoki\nThe followin... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper method to retrieve and sort facets\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@499438 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"L... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in Revenue Code tests\n"
},
{
"from": "human",
"value": "require_relative '../helper'\n\ndescribe ConceptQL::Operators::RevenueCode do\n it \"should produce correct results\" do\n criteria_ids(\n [:revenue_code, '100']\n ).must_equal({})\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Change roxml version requirement to ~>3.1.6\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"onix/version\"\n\nGem::Specification.new do |s|\n s.name = \"milkfarm-onix\"\n s.version = ONIX::VERSION... | ruby | chosen |
[
{
"from": "system",
"value": "Add io position to Event class\n"
},
{
"from": "human",
"value": "$:<< '../lib' << 'lib'\n\nrequire 'unified2'\n\n# Unified2 Configuration\nUnified2.configuration do\n\n # Sensor Configurations\n sensor :interface => 'en1',\n :name => 'Unified2 Example', :id =>... | ruby | chosen |
[
{
"from": "system",
"value": "Swap the renderable module for the renderer class\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'hashie'\nrequire 'tilt'\nrequire 'yaml'\n\nrequire 'dimples/frontable'\nrequire 'dimples/renderable'\n\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Add summary and description to gemspec.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"fancyengine/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Set dev dependency of bundler; to ~> 1.6\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\nrequire 'fc-reminder/version'\n\nGem::Specification.new do |spec|\n spec.name = 'fc-reminder'\n spec.version = FCReminder::VERSIO... | ruby | chosen |
[
{
"from": "system",
"value": "Fix filename in script for CSV of submitted courses\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# This can be run in the rails console to get a CSV for evaluating unsubmitted courses\n\nrequire 'csv'\n\nCSV.open(\"/home/sage/unsubmitted-#{Dat... | ruby | chosen |
[
{
"from": "system",
"value": "Set timezone for displaying (and remove comments)\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require... | ruby | chosen |
[
{
"from": "system",
"value": "Update the mongo dependency to >= 1.8\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'glimpse-mongo/version'\n\nGem::Specification.new do |gem... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec config for files and test_files\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"stripe_event/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificat... | ruby | chosen |
[
{
"from": "system",
"value": "Use right github API parameter for defining the sort field.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'rubygems'\nrequire 'octokit'\n\npage = 1\n\ncatch(:done) do\n while (repositories = Octokit.repositories('railscasts', page: page, per_page:... | ruby | chosen |
[
{
"from": "system",
"value": "Add versions to dependencies, tag 0.1.0\n"
},
{
"from": "human",
"value": "require File.join([File.dirname(__FILE__), 'lib', 'freckle_api', 'version.rb'])\n\nGem::Specification.new do |s|\n s.name = 'freckle-api'\n s.version = FreckleApi::VERSION\n s.license = 'M... | ruby | chosen |
[
{
"from": "system",
"value": "Add ActionPack 5 instrumentation support via prepend\n"
},
{
"from": "human",
"value": "module Instana\n module Instrumentation\n module ActionController\n def self.included(klass)\n klass.class_eval do\n alias_method_chain :process_action, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix file issue, thanks johncausey\n"
},
{
"from": "human",
"value": "class CSS\n\n\tdef initialize(file_name)\n\t\t@file_name = file_name\n\tend\t\n\n\tdef open_file\n\t\t@css = File.open(@file_name, \"r+\").each_line do |line|\n\t\t\tminify(line)\n\t\tend\n\tend\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Change to default halt_callback_chains_on_return_false option\n\nThis will make it easier to migrate to Rails 5.2 since this option\nhas no affect now and it gets fully removed then.\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify... | ruby | chosen |
[
{
"from": "system",
"value": "Handle booleans and nils in the sort enumerable adapter\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative '../adapter_base'\nrequire_relative '../processor_base'\n\nclass ActiveSet\n class Processor::Sort < Processor::Base\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that we have string-encoded integer value.\n\nSigned-off-by: Krzysztof Wilczynski <9bf091559fc98493329f7d619638c79e91ccf029@linux.com>\n"
},
{
"from": "human",
"value": "#\n# delete_at.rb\n#\n\nmodule Puppet::Parser::Functions\n newfunction(:delete_at, :t... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to gemspec dev dependencies for travis.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"mongo_followable/version\"\n\nGem::Specification.new do |s|\n s.name = \"mongo_followable... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check port 8080\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\n# Write integration tests with Serverspec - http://serverspec.org/\ndescribe \"drupal-solr::default\" do\n it \"does something\" do\n pending \"Replace this with meaningful... | ruby | chosen |
[
{
"from": "system",
"value": "Add more ServerSpec tests for git, bash, and ccache\n"
},
{
"from": "human",
"value": "require 'serverspec'\nrequire 'pathname'\n\ninclude Serverspec::Helper::Exec\n\n# serverspec's FreeBSD support is craptastic. We'll just make it think\n# it's executing on OS X.\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for model_base:views generator\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nrequire 'generators/model_base/views/views_generator'\n\ndescribe ModelBase::Generators::ViewsGenerator, type: :generator do\n destination File.expand_path('../../../tm... | ruby | chosen |
[
{
"from": "human",
"value": "Add repo listing command specs.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Repositories do\n let(:format) { 'table' }\n let(:user) { 'peter-murach' }\n let(:repo) { 'github_cli' }\n let(:org) ... | ruby | chosen |
[
{
"from": "system",
"value": "Update error message to reflect switch from single quotes to backticks\n\n[#159764090]\n\nSigned-off-by: Sarah Connor <df3768d6ee4349d41e20c7bd8dfa6947d0a1c2b9@pivotal.io>\n"
},
{
"from": "human",
"value": "shared_examples_for 'a redis instance' do\n describe 'redi... | ruby | chosen |
[
{
"from": "system",
"value": "Correct option for MultiJSON is :symbolize_keys not :symbolize_name\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'multi_json'\n\nmodule RedditKit\n\n # Methods for handling responses from reddit.\n module Response\n class ParseJSON < Faraday::R... | ruby | chosen |
[
{
"from": "system",
"value": "feat(react-native): Copy public_header_paths from bugsnag-cocoa podspec\n"
},
{
"from": "human",
"value": "require \"json\"\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\nPod::Spec.new do |s|\n s.name = \"BugsnagReactNative\"\n s.v... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure has_many_polymorphs gem is loaded if missing in local paths\n\ngit-svn-id: 0c007ce6f683c3a50607bc1a0b961fa833bb4e37@735 2960d7dc-a92c-0410-a2fe-c68badc242c0\n"
},
{
"from": "human",
"value": "module TaliaCore\n \n # This represents a macrocontribution.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Handle non-strings a little better?"
},
{
"from": "human",
"value": "module X\n module Editable\n module Rails\n module ViewHelpers \n def editable(object, method, options = {})\n data_url = polymorphic_path(object)\n object = ob... | ruby | chosen |
[
{
"from": "system",
"value": "Use problem.url in Slack notification service.\n"
},
{
"from": "human",
"value": "class NotificationServices::SlackService < NotificationService\n LABEL = \"slack\"\n FIELDS += [\n [:service_url, {\n placeholder: 'Slack Hook URL (https://hooks.slack.com/se... | ruby | chosen |
[
{
"from": "system",
"value": "Add compatibility layer for `brew update` revisions.\n"
},
{
"from": "human",
"value": "class Tap\n module Compat\n def initialize(user, repo)\n super\n\n return unless user == \"caskroom\"\n\n new_user = \"Homebrew\"\n new_repo = (repo == \"... | ruby | chosen |
[
{
"from": "system",
"value": "Add API version for MessageController\n"
},
{
"from": "human",
"value": "module Api\n\tmodule V1\n\t\tclass MessageController < ApplicationController\n\t\t\trespond_to :json\n\t\tend\n\tend\nend"
},
{
"from": "gpt",
"value": "require 'json'\n\nmodule Api... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Web Console button when platform is Windows\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1447100\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Button::CockpitConsole < ApplicationHelper::Button::Basic\n needs :@record\n\n def disabled?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant code and add message about (lack of) decryption capability\n"
},
{
"from": "human",
"value": "require_relative 'vdm_msg'\n\nmodule NMEAPlus\n module Message\n module AIS\n module VDMPayload\n class VDMMsg8USCGEncrypted < NMEAPlus::Me... | ruby | chosen |
[
{
"from": "human",
"value": "Add images to assets precompile list\n\nUnless you overwrite the images in your app, you will get the following error:\nError during failsafe response: Asset was not declared to be precompiled in production.\n"
},
{
"from": "gpt",
"value": "Rails.application.config.a... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec with licence info.\n"
},
{
"from": "human",
"value": "require 'rake'\n\nGem::Specification.new do |s|\n s.name = 'racket'\n s.homepage = 'https://github.com/lasso/racket'\n s.license = 'GPL3'\n s.authors... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version number in .gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n # Release Specific Information\n s.version = \"0.2.1\"\n s.date = \"2014-03-15\"\n\n # Gem Details\n s.name = \"rapido-css\"\n s.authors = [\"Raffaele Rasini\"]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add option to dump contact information to stdout\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'optparse'\nrequire 'ostruct'\nrequire 'nokogiri'\nrequire 'vcardigan'\n\ndef forward_convert in_filename\n src = File.open(in_filename)\n doc = Noko... | ruby | chosen |
[
{
"from": "system",
"value": "Add fsid=1 to allow export over tmpfs filesystem.\n"
},
{
"from": "human",
"value": "# Create base structure for NFS server\n%w( /data/storage/secondary/MCCT-SHARED-1\n /data/storage/secondary/MCCT-SHARED-2\n /data/storage/secondary/MCCT-SHARED-3\n /data/st... | ruby | chosen |
[
{
"from": "system",
"value": "Allow PG 10-13, disallow 9 and lower, warn on 14+\n"
},
{
"from": "human",
"value": "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend Module.new {\n def initialize(*args)\n super\n check_version if respond_to?(:check_version)\n end\n\n def check_... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for Fintop::Metrics JSON string parsing functions.\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'fintop/metrics'\n\nclass MetricsTest < Test::Unit::TestCase\n def test_process_ostrich_json\n json_str = %q{{\"counters\":{\"srv\\/htt... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unecessary index on ci_runner_groups.runner_id\n"
},
{
"from": "human",
"value": "class AddCiRunnerGroups < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def up\n create_table... | ruby | chosen |
[
{
"from": "system",
"value": "Set rubocop as a standard dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = 'rubocop-fatsoma'\n spec.summary = 'Fatsoma specific code style c... | ruby | chosen |
[
{
"from": "system",
"value": "Correct ndk-r8b install for build server\n"
},
{
"from": "human",
"value": "\nndk_loc = node[:settings][:ndk_loc]\n\nscript \"setup-android-ndk\" do\n interpreter \"bash\"\n user node[:settings][:user]\n cwd \"/tmp\"\n code \"\n wget http://dl.google.com/andr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependency versions for bundler and rake\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'adash/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we are passing the pointer of args to 'CapMailer.deliver_notification_email'. Otherwise, notifcation_email will see args as a double array so it will ignore any parameters."
},
{
"from": "human",
"value": "require 'rubygems' unless defined?(Rubygems)\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'Passing strings or symbols to the middleware builder' Rails 5 deprecation warning\n"
},
{
"from": "human",
"value": "module Detectify\n class Railtie < Rails::Railtie\n initializer 'detectify' do |app|\n app.config.middleware.use 'Detectify::Middleware... | ruby | chosen |
[
{
"from": "system",
"value": "Use chomp instead of chop for lines in TxRx::Telnet\n"
},
{
"from": "human",
"value": "require 'net/telnet'\nrequire 'observer'\n\nmodule Dino\n module TxRx\n class Telnet\n include Observable\n\n def initialize(host, port)\n @host, @port = host... | ruby | chosen |
[
{
"from": "system",
"value": "Disable LCS in HashDiff for faster performance\n"
},
{
"from": "human",
"value": "class HashDiffBuilder\n def initialize(presenter)\n @presenter = presenter\n end\n\n def previous_item=(previous_item)\n @previous_item = presenter ? presenter.call(previous_i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove some commented out debugging junk."
},
{
"from": "human",
"value": "require 'onliest'\n\nclass Onliest::Snowflake < Onliest\n attr_reader :worker_number, :sequence\n\n # This comes from twitter snowflake. I'm not\n # sure how they arrived at this number.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add the user attribute. D'oh\n"
},
{
"from": "human",
"value": "actions :deploy\n\nCFG_PATH = '/etc/profile.d/rails.sh'\n\nattribute :directory, kind_of: [String], name_attribute: true\nattribute :repo, kind_of: [String]\nattribute :revision, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add status_tag for newsletter_users role\n"
},
{
"from": "human",
"value": "#\n# == NewsletterUserDecorator\n#\nclass NewsletterUserDecorator < ApplicationDecorator\n include Draper::LazyHelpers\n delegate_all\nend\n"
},
{
"from": "gpt",
"value": "#\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Restore support for ruby pre-2.0 versions.\"\n\nThis reverts commit 04763e3abcacd209b5cf281be6e0cec80912ab12.\n"
},
{
"from": "human",
"value": "require 'chef/resource/lwrp_base'\n\nclass DocumentingLWRPBase < ::Chef::Resource::LWRPBase\n\n class << self\n... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor JournalEntryLineList to use Support::Sublist\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class JournalEntryLineList\n include Support::Fields\n include Namespaces::TranGeneral\n \n fields :line\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix highest PvP rating tracking.\n"
},
{
"from": "human",
"value": "module Audit\n class PvPData < Data\n def add\n @character.data['honor_level'] = @data.pvp_summary.honor_level\n @character.data['honorable_kills'] = @data.pvp_summary.honorable_kills\... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem data and HTTParty 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 'ipaddresslabs/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to options hash for 1.9 compat\n"
},
{
"from": "human",
"value": "module SwaggerYard\n class Type\n def self.from_type_list(types)\n new(types.first)\n end\n\n # Default model location path\n MODEL_PATH = '#/definitions/'.freeze\n\n attr_... | ruby | chosen |
[
{
"from": "system",
"value": "Use travel instead of freeze, and use 40.months for clarity\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Users::ConfirmationsController do\n before do\n # Tests don't pass through the router; see https://github.com/plataformatec/devise\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update feature generator to use the Capybara spec DSL\n"
},
{
"from": "human",
"value": "require \"minitest_helper\"\n\n# To be handled correctly by Capybara this spec must end with \"Feature Test\"\ndescribe \"<%= class_name %> Feature Test\" do\n it \"sanity\" do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where Paginator wasn’t returning the proper result\n\nWasn’t extracting the set from the processed result\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative './base_processor'\nrequire_relative './paginate/enumerable_adapter... | ruby | chosen |
[
{
"from": "system",
"value": "Fix view-rendering regression in 'about UKHPI'\n"
},
{
"from": "human",
"value": "# frozen-string-literal: true\n\n# Simple controller for serving documentation\nclass DocController < ApplicationController\n def index\n @view_state = LanguageState.new(UserLangua... | ruby | chosen |
[
{
"from": "system",
"value": "Set field_options to [] if not set - pepperup\n"
},
{
"from": "human",
"value": "class SurveyField < ActiveRecord::Base\n attr_accessible :question_title, :question_description, :question_weight\n belongs_to :survey_template\n has_many :field_responses, :dependen... | ruby | chosen |
[
{
"from": "system",
"value": "Add attribute tests for user model.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'... | ruby | chosen |
[
{
"from": "system",
"value": "Replace static error message with I18n text.\n"
},
{
"from": "human",
"value": "class EmailValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n unless value =~ /\\A([^@\\s]+)@((?:[-a-z0-9]+\\.)+[a-z]{2,})\\z/i\n record.erro... | ruby | chosen |
[
{
"from": "system",
"value": "Use FileUtils, not Pathname to create export dirs\n"
},
{
"from": "human",
"value": "module Export\n module Base\n private\n\n def Base.export(sql, basename)\n # remove any existing tmp file\n path = Base.tmp_path basename\n path.unlink if path... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"user: vertify method was under authentication_required\". Authentication is done via URL token and is needed for verification.\n\nThis reverts commit 96b23c01b3c4f8cd0efa57868bab9ab5a2433beb.\n"
},
{
"from": "human",
"value": "class UserController < BaseCon... | ruby | chosen |
[
{
"from": "human",
"value": "Change semester, subject_area and topic_number max lengths of topics table\n\nAllows Adelaide Uni Support\n"
},
{
"from": "gpt",
"value": "class TopicsFieldLengths < ActiveRecord::Migration\n def change\n change_column :topics, :subject_area, :string, :limit => 1... | ruby | chosen |
[
{
"from": "system",
"value": "Clear history of newly created editors\n"
},
{
"from": "human",
"value": "module Cms\n module SourceCodeHelper\n\n # Escaped JavaScript there:\n def open_in_editor sourceObj\n #p sourceObj.class\n editor_name = sourceObj.get_id.to_s\n editor_na... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out a migration that needs an old gem to work\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass CreateMedianFunction < ActiveRecord::Migration[4.2]\n def up\n ActiveMedian.create_function\n end\n\n def down\n ActiveMedian.dro... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to warn validation class.\n"
},
{
"from": "human",
"value": "module Executors\n module Configurators\n module Yaml\n class Validator < Kwalify::Validator\n EXECUTOR_RULE_NAME = \"executor\"\n\n @@schema = Kwalify::Yaml.load_file(File.jo... | ruby | chosen |
[
{
"from": "system",
"value": "Update Plex Media Server version from 0.9.9.5.411 to 0.9.9.7.429"
},
{
"from": "human",
"value": "class PlexMediaServer < Cask\n url 'http://downloads.plexapp.com/plex-media-server/0.9.9.5.411-da1d892/PlexMediaServer-0.9.9.5.411-da1d892-OSX.zip'\n homepage 'http:/... | ruby | chosen |
[
{
"from": "system",
"value": "Add another deprecation helper method."
},
{
"from": "human",
"value": "module RSpecHelpers\n def expect_deprecation_with_call_site(file, line, snippet=//)\n expect(RSpec.configuration.reporter).to receive(:deprecation) do |options|\n expect(options[:call_s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in fee calculator\n"
},
{
"from": "human",
"value": "module CatarsePagarme::FeeCalculatorConcern\n extend ActiveSupport::Concern\n\n included do\n\n def get_fee\n return nil if self.payment.payment_method.blank? # We always depend on the payment_c... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.1 to 0.1.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'clock'\n s.summary = 'Clock interface with support for dependency configuration for real and null object implem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix inflector initializer for older Rails\n\nFix #115 Fix #117\n"
},
{
"from": "human",
"value": "module EmberCLI\n class Engine < Rails::Engine\n initializer \"ember-cli-rails.view_helpers\" do\n ActionView::Base.send :include, ViewHelpers\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for Numeric before Range\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule SecureRandom\n if respond_to?(:gen_random)\n def self.gen_random(n)\n RbNaCl::Random.random_bytes(n)\n end\n else\n def self.random_bytes(n = ni... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 1.9.3 Asserter error issue\n"
},
{
"from": "human",
"value": "module Gattica\n\n # Represents a user to be authenticated by GA\n\n class Asserter\n attr_accessor :email, :pkcs12_path\n\n def initialize(email,pkcs12_path)\n @email = email\n @pkc... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.