conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix use of add_to_base when adding error\n" }, { "from": "human", "value": "module Devise\n module Models\n module Filterable\n def self.included(base)\n base.class_eval do\n validate :password_not_common\n\n def password_not_common...
ruby
chosen
[ { "from": "system", "value": "Edit help in 'search' command\n" }, { "from": "human", "value": "require 'nehm/tracks_view_command'\n\nmodule Nehm\n\n class SearchCommand < TracksViewCommand\n\n def initialize\n super\n\n add_option(:\"-t\", '-t PATH',\n 'Download tra...
ruby
chosen
[ { "from": "system", "value": "Allow to start Rakwik in dev mode by enabling RAKWIK evn var.\n" }, { "from": "human", "value": "if Rails.env.production?\n Rails.application.config.middleware.use Rakwik::Tracker, piwik_url: 'http://dev.altimos.de/piwik/piwik.php',\n ...
ruby
chosen
[ { "from": "system", "value": "Fix error in .podspec file\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n\n s.name = \"SwiftSafe\"\n s.version = \"0.1\"\n s.summary = \"Thread synchronization made easy.\"\n\n s.homepage = \"https://github.com/czechboy0/SwiftS...
ruby
chosen
[ { "from": "system", "value": "Add namespace for nip tests\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'supermodel'\nrequire \"nip_pesel_regon/integration/rails\"\n\nclass Company < SuperModel::Base\n extend ActiveModel::Validations::HelperMethods\n validates_nip_of :nip\n...
ruby
chosen
[ { "from": "system", "value": "Fix author information to use ttlab account\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ajw2/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Add minimum required ruby version as 1.9.3\n\n* This is mostly to trigger the build on travis, but the code has\n not been tested with anything below 1.9.3.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name =...
ruby
chosen
[ { "from": "system", "value": "Add a note for request.domain and request.subdomain\n" }, { "from": "human", "value": "class SitePostsController < ApplicationController\n before_action :setup_site\n layout 'site_posts'\n\n def index\n @posts = @site.posts\n end\n\n def show\n @post = @s...
ruby
chosen
[ { "from": "system", "value": "Update Podspec with new descriptions\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DeclarativeLayout'\n s.version = '0.2.0'\n s.summary = 'This library is a wrapper around UIKit/Autolayout that allows you to dec...
ruby
chosen
[ { "from": "system", "value": "Use symbols rather than strings for edition diff\n\nThis is more consistent with the contents of the editions - eg routes\nand details have symbol keys within them.\n" }, { "from": "human", "value": "module Presenters\n class EditionDiffPresenter\n def self.call...
ruby
chosen
[ { "from": "system", "value": "Add author name to notifications.\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nclass FirebaseCloudMessaging\n\n # @param [Report] report\n # @param [Array<User>] to\n def self.send_new_report_notification(to, report)\n ...
ruby
chosen
[ { "from": "system", "value": "Add tests for command-line argument validation\n\nAdd tests for the command-line validation done using the Trollop\nlibrary.\n" }, { "from": "human", "value": "require 'bsf/scraper/command'\n\ndescribe Bsf::Scraper::Command do\n\n describe '.initialize' do\n it ...
ruby
chosen
[ { "from": "system", "value": "Fix prover factory trying to create duplicate.\n" }, { "from": "human", "value": "FactoryGirl.define do\n sequence :prover_name do |n|\n \"prover-#{n}\"\n end\n\n factory :prover do\n name { 'SPASS' }\n display_name { 'SPASS Prover' }\n\n trait :with_...
ruby
chosen
[ { "from": "system", "value": "Add spec to confirm Python command exist on PATH.\n" }, { "from": "human", "value": "require \"spec_helper_#{ENV['SPEC_TARGET_BACKEND']}\"\n\ndescribe package('python-apt'), :if => os[:family] == 'debian' do\n it { should be_installed }\nend\n\ndescribe package('py...
ruby
chosen
[ { "from": "system", "value": "Change read_time method name to read_time_words. Add missing space to spec. PA-2182\n" }, { "from": "human", "value": "require \"read_time_estimator\"\nrequire 'rspec'\n\ndescribe \"ReadTimeEstimator\" do\n describe \"minutes_to_read\" do\n it \"should output an...
ruby
chosen
[ { "from": "system", "value": "Use any time zone instead of just :utc.\n" }, { "from": "human", "value": "module ActiveRecord #:nodoc:\n module Acts #:nodoc:\n module HasTimestamps\n def self.included(base) #:nodoc:\n base.extend(ClassMethods)\n end\n\n module ClassMetho...
ruby
chosen
[ { "from": "system", "value": "Raise error if `update_tags` is not overridden\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nmodule Hotdog\n module Sources\n class BaseSource\n def initialize(application)\n @application = application\n @logger = application.logge...
ruby
chosen
[ { "from": "human", "value": "Add check that runs wpscan against a Wordpress site and alerts\nwhen vulnerabilities are found\n" }, { "from": "gpt", "value": "#! /usr/bin/env ruby\n#\n# wpscan check\n#\n# DESCRIPTION:\n# Runs wpscan against a Wordpress site\n#\n# OUTPUT:\n# plain-text\n#\n# PLA...
ruby
chosen
[ { "from": "system", "value": "Support multi types in TypeValidator\n" }, { "from": "human", "value": "require \"active_model\"\n\nclass TypeValidator < ActiveModel::EachValidator\n def options\n super.merge(allow_nil: true)\n end\n\n def validate_each(record, attribute, value)\n unless ...
ruby
chosen
[ { "from": "system", "value": "Delete the generated place-holder code.\n" }, { "from": "human", "value": "require_relative \"udp2sqs_client/version\"\nrequire_relative \"udp2sqs_client/client\"\n\nmodule Udp2sqsClient\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "r...
ruby
chosen
[ { "from": "system", "value": "Use File.expand_path instead of File.absolute_path to work with Ruby 1.8.7\n" }, { "from": "human", "value": "module Refinery\n module WordPress\n class Dump\n attr_reader :doc\n\n def initialize(file_name)\n file_name = File.absolute_path(file_...
ruby
chosen
[ { "from": "system", "value": "Add documentation for dry-run mode\n" }, { "from": "human", "value": "module Wright\n @dry_run = false\n\n def self.dry_run?\n @dry_run\n end\n\n def self.dry_run\n saved_dry_run = @dry_run\n @dry_run = true\n yield\n ensure\n @dry_run = saved_dr...
ruby
chosen
[ { "from": "system", "value": "Fix typo: 'Resolv' => 'resolv'\n" }, { "from": "human", "value": "require 'Resolv'\n\nclass Chef::Recipe::Resolver\n # We can call this with ISP.vhosts\n def self.ip(hostname)\n Resolv.getaddress hostname\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Add required ruby version to gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"sms_broker/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Add devise passwords controller to auth rules.\n\nFor \"forgotten password\" action, and others?\n" }, { "from": "human", "value": "authorization do\n role :root do\n has_omnipotence\n end\n\n role :admin do\n includes :member\n has_permission_on :admin_...
ruby
chosen
[ { "from": "system", "value": "Make sure Typus::I18n.available_locales returns a Hash\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass I18nTest < ActiveSupport::TestCase\n\n test \"t\" do\n assert_equal \"Missing Translation\", Typus::I18n.t(\"Missing Translation\")\n end\...
ruby
chosen
[ { "from": "system", "value": "Fix lknovel series test case\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'minitest_helper'\nrequire 'lknovel/series'\n\ndescribe Lknovel::Series do\n\n series = Lknovel::Series.new('http://lknovel.lightnovel.cn/main/vollist/615.html')\n series.pa...
ruby
chosen
[ { "from": "system", "value": "Fix integrations tests for hypriot apt repo\n\nSigned-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe file('/etc/apt/sources.list.d/hypriot.list') do\n it { should be_file ...
ruby
chosen
[ { "from": "human", "value": "Add tests for color, which will be factored out from bitmap.\n" }, { "from": "gpt", "value": "require 'color'\n\nRSpec.describe RandomColor, \"#init\" do\n it \"initializes a rgb color with values between 0 and 255\" do\n color = RandomColor.new\n expect(color...
ruby
chosen
[ { "from": "system", "value": "Test that we ignore gibberish in base64 strings\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DataURL do\n context :parse do\n it \"should return nils if URL is nil\" do\n DataURL.parse(nil).should == [nil, nil, nil]\n end\n \n ...
ruby
chosen
[ { "from": "human", "value": "Fix field tenants.tenant_quotas of MiqExpression\n\nonly for:\n- existing reports\n- custom reports(created by of 'Tenant Quota Report')\n" }, { "from": "gpt", "value": "class FixExpressionInTenantQuotaReport < ActiveRecord::Migration[5.0]\n class MiqReport < Active...
ruby
chosen
[ { "from": "system", "value": "Use a module for ActionController extensions\n" }, { "from": "human", "value": "module ActionController\n class Base\n def caching_key(tag = nil, scope = nil)\n options = { controller: controller_name, action: action_name, id: params[:id], tag: tag }\n ...
ruby
chosen
[ { "from": "system", "value": "Fix flash messages being selected into an array\n" }, { "from": "human", "value": "module ApplicationHelper\n\n # Devise will add extra flash messages.\n # We only want to display alerts, notices and errors\n def flash\n super.select {|key, _| key.to_s.in? [\"...
ruby
chosen
[ { "from": "system", "value": "Refactor if statement to rely on better ruby methods\n" }, { "from": "human", "value": "module ApplicationHelper\n BASE_TITLE = 'Ecotone | OSU-Cascades'.freeze\n\n def full_title(page_title = '')\n page_title.empty? ? BASE_TITLE : \"#{page_title} | #{BASE_TITLE...
ruby
chosen
[ { "from": "system", "value": "Create a helper to manage header links\n\nIn the cases where we have a recognised path and are currently on it,\nshow it as active.\n" }, { "from": "human", "value": "module ApplicationHelper\nend\n" }, { "from": "gpt", "value": "module ApplicationHelper...
ruby
chosen
[ { "from": "system", "value": "Add application helper doc header." }, { "from": "human", "value": "module ApplicationHelper\n # Helper to set page title\n #\n # @param page_title {String}\n def title(page_title)\n content_for :title, page_title.to_s\n end\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Switch to lambda to avoid same mesage id\n" }, { "from": "human", "value": "class ApplicationMailer < ActionMailer::Base\n # TODO: Remove hard code domain\n default(from: Rails.application.config.action_mailer.smtp_settings[:from],\n \"Message-ID\" =>\"#{...
ruby
chosen
[ { "from": "system", "value": "Fix xml to json converting (root tag)\n" }, { "from": "human", "value": "module Converters\n class XmlJson\n attr_accessor :settings\n \n def initialize(opts = nil)\n @settings = {\n mode: 'pretty',\n }.merge(opts || {})\n end\n \n ...
ruby
chosen
[ { "from": "system", "value": "Add simplecov and update codeclimate-test-reporter.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('./lib')\n\nrequire 'dimples/version'\n\nGem::Specification.new do |s|\n s.name = 'dimples'\n s.version = Dimples::VERSION\n s.pl...
ruby
chosen
[ { "from": "system", "value": "Switch to a more liberal active support dependency.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"toy/version\"\n\nGem::Specification.new do |s|\n s.name = \"toystore\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Add process host as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'connection'\n s.version = '0.1.1'\n s.summary = 'TCP client/server connection library'\n s.description = ' '\n\n s...
ruby
chosen
[ { "from": "system", "value": "Remove gem.date from the gemspec.\n\nThis was causing errors when deploying to engine yard and heroku. I've seen many\nother repos have this same issue. Another solution could be adding require\n'date' to the gemspec, but I find setting gem.date to today's date somewhat\nuseles...
ruby
chosen
[ { "from": "system", "value": "Add tvOS deployment target to podspec\n" }, { "from": "human", "value": "require 'json'\npjson = JSON.parse(File.read('package.json'))\n\nPod::Spec.new do |s|\n\n s.name = \"RNFS\"\n s.version = pjson[\"version\"]\n s.homepage = \"https:...
ruby
chosen
[ { "from": "system", "value": "Fix test: threads being nil in ensure\n\nwhen connection_pool is not installed.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ConnectionPoolBehavior\n def test_connection_pool\n Thread.report_on_exception, original_report_on_exceptio...
ruby
chosen
[ { "from": "system", "value": "Add authors and correct homepage in 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 'stomp_parser/version'\n\nGem::Specification.new do |spec|\n ...
ruby
chosen
[ { "from": "system", "value": "Add refinery_user? method in action_controller_base\n" }, { "from": "human", "value": "require \"spree_refinery_authentication/authorisation_manager\"\n\nActionController::Base.class_eval do\n prepend_before_action :detect_spreefinery_single_sign_on!\n\n private\n...
ruby
chosen
[ { "from": "system", "value": "Use pessimistic version requirement for Rack.\n" }, { "from": "human", "value": "require './lib/rack/canonical_host/version'\n\nGem::Specification.new do |gem|\n gem.name = 'rack-canonical-host'\n gem.version = Rack::CanonicalHost::VERSION\n gem.summary = 'Rack m...
ruby
chosen
[ { "from": "system", "value": "Correct Intellij IDEA 13.0.1 SHA\n" }, { "from": "human", "value": "class IntellijIdeaCommunity < Cask\n url 'http://download-ln.jetbrains.com/idea/ideaIC-13.0.1.dmg'\n homepage 'https://www.jetbrains.com/idea/index.html'\n version '13.0.1'\n sha1 '0f280843aaa1b...
ruby
chosen
[ { "from": "system", "value": "Bump Xamarin Studio to v5.4.0.240-0\n" }, { "from": "human", "value": "class XamarinStudio < Cask\n version '5.0.1.3-0'\n sha256 '51e840a8b5e8679363290aee88af2cdadd9d99706ae346f787d07ecc27bdabe8'\n\n url \"http://download.xamarin.com/studio/Mac/XamarinStudio-#{ve...
ruby
chosen
[ { "from": "system", "value": "Change the action for nodejs chocolatey from install to upgrade\n\nThis way it will upgrade to the active LTS version even if the version is maintenance LTS\n" }, { "from": "human", "value": "#\n# Author:: Hossein Margani (hossein@margani.dev)\n# Cookbook:: nodejs\n...
ruby
chosen
[ { "from": "system", "value": "Make tests run on master.\n" }, { "from": "human", "value": "require 'rubygems'\n\nbegin\n gem \"test-unit\"\nrescue LoadError\nend\n\nbegin\n gem \"ruby-debug\"\n require 'ruby-debug'\nrescue LoadError\nend\n\nrequire 'test/unit'\nrequire 'mocha'\n\nENV[\"RAILS_...
ruby
chosen
[ { "from": "system", "value": "Fix tests by making sure Time.parse is available" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'minitest/autorun'\nrequire 'minitest/pride'\nrequire 'mocha/setup'\n\nrequire 'adyen/base'\nrequire 'adyen/matchers'\n\nrequire 'helpers/configure_adyen'\nr...
ruby
chosen
[ { "from": "system", "value": "Add flaky for video recording\n" }, { "from": "human", "value": "# encoding: utf-8\ndef self.add_to_path path\n path = File.expand_path \"../#{path}/\", __FILE__\n\n $:.unshift path unless $:.include? path\nend\n\nadd_to_path 'lib'\n\nrequire 'test_runner/version'\n...
ruby
chosen
[ { "from": "system", "value": "Fix Bundler version for Travis-CI\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sinatra/form_helpers/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Add logic for up/down vote for questions\n" }, { "from": "human", "value": "class VotesController < ApplicationController\n\n def create\n if params[:votableType] == \"Answer\"\n answer_votes\n end\n end\n\n def answer_votes\n if request.xhr?\n i...
ruby
chosen
[ { "from": "system", "value": "Fix issue with puppet_module_install, removed and using updated method from beaker core copy_module_to\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\n# Install Puppet\nunless ENV['RS_PROVISION'] == 'no'\n # This will install the latest available packa...
ruby
chosen
[ { "from": "system", "value": "Print just the Puppet version, no other warning etc\n\nFacter complains about missing environment variables which is a bit\nnoisy. Using stdout filters them out.\n" }, { "from": "human", "value": "require 'beaker-rspec'\nrequire 'beaker/puppet_install_helper'\nrequi...
ruby
chosen
[ { "from": "system", "value": "Use puppet-archive in acceptance tests\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\ninstall_puppet_agent_on hosts, {}\n\nRSpec.configure do |c|\n # Project root\n proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))\n\n # Readable...
ruby
chosen
[ { "from": "system", "value": "Update the tests for Pachube\n" }, { "from": "human", "value": "require File.expand_path('../helper', __FILE__)\n\nclass PachubeTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_require_api_key\n svc = serv...
ruby
chosen
[ { "from": "system", "value": "Fix rakefile for building gems\n" }, { "from": "human", "value": "namespace :all do\n desc 'Build gems into the pkg directory'\n task :build do\n sh 'rake build'\n\n %w{core pages}.each do |engine|\n sh \"cd #{engine}\"\n sh \"gem build constructor...
ruby
chosen
[ { "from": "system", "value": "Switch to runtime dependencies. (Do not use alias.)\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'acfs/version'\n\nGem::Specification.new do |spec|\n ...
ruby
chosen
[ { "from": "human", "value": "Add examples folder and file" }, { "from": "gpt", "value": "# Run this example: ruby examples/creature.rb\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'slothify'\n\nclass Creature\nusing Slothify\n\n SUPER_SLOW = 10\n\tattr_reader :name, :typ...
ruby
chosen
[ { "from": "human", "value": "Add test for view helper Livereload script output\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\nclass LivereloadTest < TestCase\n test \"#livereload_script has correct output\" do\n output = new_renderer.livereload_script(force: true)\n\n assert_...
ruby
chosen
[ { "from": "system", "value": "Use pessimistic version operator for thor\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bake/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Remove use that is for middleware\n" }, { "from": "human", "value": "require 'yaml'\nrequire 'action_mailer'\nrequire 'utf8-cleaner'\nuse UTF8Cleaner::Middleware\n\nrequire \"#{File.expand_path(File.dirname(__FILE__))}/file_mailer\"\n\nsettings = YAML::load_file './...
ruby
chosen
[ { "from": "system", "value": "Update using new swagger-codegen from source\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"OGCSensorThings\"\n s.version = \"2.1.2\"\n s.summary = \"Easily consume OGCSensorThings services.\"\n\n s.description = <<-DES...
ruby
chosen
[ { "from": "system", "value": "Add React dep to podspec\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 = 'ReactNativePermissions'\n s.version = package['ve...
ruby
chosen
[ { "from": "system", "value": "[ax] Fix typo in gem description" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vn_tagger/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Add index to create_at for track sent, so can remove old ones / only use\nnew ones\n" }, { "from": "gpt", "value": "class AddIndicesTrackSent < ActiveRecord::Migration\n def self.up\n add_index :track_things_sent_emails, :created_at\n end\n\n def self...
ruby
chosen
[ { "from": "system", "value": "Set deployment target to iOS 8.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'NAKPlaybackIndicatorView'\n s.version = '0.0.3'\n s.summary = 'A view that mimics the music playback indicator in the Music.app on iOS 7.'\n s....
ruby
chosen
[ { "from": "system", "value": "Add limits to gem dependency versions\n\nCapping off dependency versions at their next major version so that we\ndon't get impacted by breaking changes by surprise.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'gherkin_lint'\n ...
ruby
chosen
[ { "from": "system", "value": "Fix API docs of `ActionText::RichText` [ci skip]\n\nThis text should appear on the page\nhttps://api.rubyonrails.org/v6.0/classes/ActionText/RichText.html\n\nRelated to 86517942e469193e8624d5078d718785552c1270\n" }, { "from": "human", "value": "# frozen_string_liter...
ruby
chosen
[ { "from": "human", "value": "Add test that looks for login button\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nfeature 'login' do\n it \"should have a login button on the front page\" do\n visit '/'\n expect(page).to have_button \"Login\"\n end\n\n click_button \"Login\"\n...
ruby
chosen
[ { "from": "system", "value": "Add tests for article model\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.describe User, :type => :model do\n it \"orders by last name\" do\n lindeman = User.create!(first_name: \"Andy\", last_name: \"Lindeman\")\n chelimsky = User.crea...
ruby
chosen
[ { "from": "system", "value": "Use \"contain exactly\" instead of \"eq\"\n\nWe don't care about the order of the email addresses here.\n" }, { "from": "human", "value": "require \"rake\"\n\ndescribe \"trailmix:schedule_all_prompts\", sidekiq: :inline do\n before do\n load \"tasks/trailmix.rak...
ruby
chosen
[ { "from": "system", "value": "Fix deplication warning at notice factory\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: notices\n#\n# id :integer not null, primary key\n# title :string(255) not null\n# body :text\n# user_id ...
ruby
chosen
[ { "from": "system", "value": "Use current locale to filter category" }, { "from": "human", "value": "class Admin::InternalCategoriesController < Admin::BaseController\n\n def index\n @categories = Category.internally.without_system_resource.ordered\n end\n\n def show\n @category = Categ...
ruby
chosen
[ { "from": "system", "value": "Fix county name on reports page\n" }, { "from": "human", "value": "class ReportsController < ApplicationController\n active_tab \"reports\"\n\n require_permission :can_view_reports?\n\n def index\n @org_by_county = {}\n Organization.counties.sort_by(&:downc...
ruby
chosen
[ { "from": "system", "value": "Use stdlib Forwardable module instead of ActiveSupport delegation\n" }, { "from": "human", "value": "require \"thread\"\nrequire \"active_support/core_ext/module/delegation\"\n\nmodule ClimateControl\n class Environment\n def initialize\n @semaphore = Mutex...
ruby
chosen
[ { "from": "system", "value": "Add remote region relay for VM retirement methods\n\nThis allows us to retire VMs directly using a method call\nfrom the global region rather than having to use the ProcessTasksMixin\n" }, { "from": "human", "value": "module Vm::Operations::Lifecycle\n extend Activ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove automatic delegation of to_model.\"\n\nThis reverts commit 6d214b9972a22e8b7e2ca574fbb7ce30907a3667.\n" }, { "from": "human", "value": "module Draper::ActiveModelSupport\n module Proxies\n def self.extended(base)\n # These methods (as keys) ...
ruby
chosen
[ { "from": "system", "value": "Update Kismet brew to 2010-07-R1\n" }, { "from": "human", "value": "require 'formula'\n\nclass Kismet <Formula\n url 'http://www.kismetwireless.net/code/kismet-2010-01-R1.tar.gz'\n version '2010-01-R1'\n homepage 'http://www.kismetwireless.net'\n md5 'a6d6edcf65...
ruby
chosen
[ { "from": "system", "value": "Validate Parity against brew audit.\n\n* Not necessary to `require \"formula\"`,\n* Add a description,\n* Place `devel` above `depends_on`,\n* Remove `git` dependency as it's always available,\n* Remove `version` as Homebrew prefers to get it from the URL,\n* Remove duplicated ...
ruby
chosen
[ { "from": "system", "value": "Fix breaking Setting object after loading this plugin.\n\nWithout this patch, this plugin requires 'setting' at plugin loading,\nand after that, next loaded plugin cannot access to\nSetting.plugin_#{@plugin.id} method (NoMethodError).\n\nThis seems to be related to the thread b...
ruby
chosen
[ { "from": "system", "value": "Raise Faraday Error on request\n" }, { "from": "human", "value": "module Spree\n module API\n class Client\n module Connection\n def connection(options={})\n options = {\n :authenticate => true,\n :force_urlencoded ...
ruby
chosen
[ { "from": "system", "value": "Fix Regexp.new - show warning \"flags ignored\" when passed regexp and options\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\nrequire_relative 'shared/new'\n\ndescribe \"Regexp.new\" do\n it_behaves_like :regexp_new, :new\nend\n\ndescribe ...
ruby
chosen
[ { "from": "system", "value": "Set our mail domain to the new address\n" }, { "from": "human", "value": "# Settings specified here will take precedence over those in config/environment.rb\n\n# The production environment is meant for finished, \"live\" apps.\n# Code is not reloaded between request...
ruby
chosen
[ { "from": "system", "value": "Revert \"ensure locales are not overwritten\"\n\nbreaking now\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"i18n integrity checks\" do\n\n it 'should have an i18n key for all trust levels' do\n TrustLevel.all.each do |ts|\n ts.name....
ruby
chosen
[ { "from": "system", "value": "Update migrations (fix \"s\" bugs\"\n" }, { "from": "human", "value": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementally mo...
ruby
chosen
[ { "from": "system", "value": "Allow emoji before morning word\n\nTODO: Probably it is too much detailed change\n" }, { "from": "human", "value": "class MorningResponder\n class << self\n def responds_to?(msg)\n return true if msg =~ /^(goo+d)*.{0,1}mo+rning.*/i\n return true if msg...
ruby
chosen
[ { "from": "system", "value": "Make the version number static\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"seasoning/version\"\n\nGem::Specification.new do |s|\n s.name = \"seasoning\"\n s.version = Seasoning:...
ruby
chosen
[ { "from": "system", "value": "Add 'http-domain' back to the Jekyll config.\n\nI think I took it out because I was unable to find any uses cases in the project. I may have been using my search tool wrong.\n" }, { "from": "human", "value": "# Plugin to add environment variables to the `site` objec...
ruby
chosen
[ { "from": "system", "value": "Add unscoping to OrderDetail for items: :deleted_at\n" }, { "from": "human", "value": "class OrderDetail < ActiveRecord::Base\n belongs_to :order\n belongs_to :item\n\n validates :quantity, :value, presence: true\n\n # Unscope to include deleted items\n def ite...
ruby
chosen
[ { "from": "system", "value": "Use new hash-style access for Redis in robot config template\n" }, { "from": "human", "value": "Lita.configure do |config|\n # The name your robot will use.\n config.robot.name = \"Lita\"\n\n # The locale code for the language to use.\n # config.robot.locale = :...
ruby
chosen
[ { "from": "system", "value": "Update http_parser.rb dependency to allow latest beta\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'em-twitter/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Add tests to numeric custom field value parsing\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoCommon::CustomFieldValue\n class NumericTest < ActiveSupport::TestCase\n\n def record\n gobierto_co...
ruby
chosen
[ { "from": "system", "value": "Add YARD to MockVimBuffer, alias length to count\n\nThe YARD makes this object easier to understand. I pulled most of the\ndescriptions from\n\n http://vimdoc.sourceforge.net/htmldoc/if_ruby.html#ruby-buffer\n\nThis class is getting close to being fully featured and might make...
ruby
chosen
[ { "from": "system", "value": "Make spec 1.9-compatible due to JRuby\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Transproc::Function\" do\n describe \"#>>\" do\n it \"composes named functions\" do\n f1 = t(:symbolize_keys)\n f2 = t(:map_hash, user_name: :n...
ruby
chosen
[ { "from": "system", "value": "Remove printout from isolated environment spec.\n\nThe spec printed some unwanted text on stdout:\nInspecting 1 file\n.\n\n1 file inspected, no offences detected\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'isolated envi...
ruby
chosen
[ { "from": "human", "value": "Add spec for payment actions\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Spree\n describe Payment do\n describe \"available actions\" do\n let(:payment) { create(:payment, source: create(:credit_card)) }\n\n context \"for most gatew...
ruby
chosen