conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "TEST: Add tests for new auth tokens\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass AuthTokenTest < ActiveSupport::TestCase\n def test_token_is_unique\n # Create a token...\n user = FactoryBot.create(:user)\n token = user.generate_authenti... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests that keep_files plays well with backgrounding\n\nOne of the reasons why we've split Attacher#destroy_attached and\nAttacher#destroy is so that we can skip the background job when\nkeep_files plugin is loaded. So we ought to add a test for that.\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs now that aonly superadmin can refresh an audit\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\nfeature \"Refreshing audit data\", type: :feature, js: true do\n scenario \"Manually requesting to refresh audit... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for tar writer.\n"
},
{
"from": "gpt",
"value": "describe Metacrunch::TarWriter do\n\n let(:regular_tar_file) { \"/tmp/metacrunch_spec_regular_file.tar\" }\n let(:compressed_tar_file) { \"/tmp/metacrunch_spec_regular_file.tar.gz\" }\n\n before do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Stories endpoint to API v2 format\n"
},
{
"from": "human",
"value": "module DesignerNews\n class Stories\n include HTTParty\n\n base_uri 'http://www.designernews.co/api/v2'\n default_params :client_id => ENV['DESIGNER_NEWS_CLIENT_ID']\n format :j... | ruby | chosen |
[
{
"from": "system",
"value": "Add auto-submitted header to the blacklist\n"
},
{
"from": "human",
"value": "module Autoreply\n class Scanner::Headers::ByExistance < Scanner::Headers::Base\n KNOWN_HEADERS = %w(\n list-help\n list-unsubscribe\n list-subscribe\n list-owner\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rename from ignore -> discard\n"
},
{
"from": "human",
"value": "module Bugsnag::Middleware\n ##\n # Determines if the exception should be ignored based on the configured\n # `discard_classes`\n class DiscardErrorClass\n ##\n # @param middleware [#call] Th... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for Scaler middleware\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/helper'\n\nclass ScalerMiddlewareTest < Test::Unit::TestCase\n def test_default_factor_set_to_one\n receiver = flexmock\n m = Tracksperanto::Middleware::Scaler.n... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake task for new sync method\n"
},
{
"from": "human",
"value": "# This is a temporary rake task that should be deleted\n# once it has been run in all environments.\n\nrequire 'active_record'\n\nnamespace :temp do\n desc \"calculates elapsed_seconds for all ... | ruby | chosen |
[
{
"from": "system",
"value": "Put dirlist in the right place\n\nI fixed this last night, and then somehow committed the wrong version. Don't watch the Oscars while doing Homebrew."
},
{
"from": "human",
"value": "require 'formula'\n\nclass Automake < Formula\n homepage 'http://www.gnu.org/softw... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade dependency on AFNetworking 3.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AFCSVParserResponseSerializer\"\n s.version = File.read('VERSION')\n s.summary = \"AFNetworking Extension for the CSV format.... | ruby | chosen |
[
{
"from": "system",
"value": "Make MerrittPackager extend abstract Sword::Packager\n"
},
{
"from": "human",
"value": "require 'stash_engine'\nrequire 'stash_datacite'\nrequire 'stash_datacite/resource_file_generation'\n\nmodule StashDatacite\n # Creates a {Package} for submission to Merritt\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Complete box handler spec coverage\n\nDial coverage up to 11.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\nrequire 'minitest/autorun'\nrequire \"matrix\"\n\ndescribe \"sudokuru_unit_box_handler\" do\n\n it \"should replace non erroneous box values with bl... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration tests for index groups.\n"
},
{
"from": "gpt",
"value": "require \"integration_test_helper\"\nrequire \"rest-client\"\nrequire \"cgi\"\n\nclass ElasticsearchIndexGroupTest < IntegrationTest\n\n def setup\n @group_name = \"rummager_test\"\n stub... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Rails test sessions to generate valid URIs\n\nIt appears that `ActionDispatch::Testing::Integration#build_full_uri`\n(in ActionPack 4.2.1 and possibly earlier) requires requested paths to\ninclude leading slashes (which they probably should have done anyway).\nWithout val... | ruby | chosen |
[
{
"from": "system",
"value": "Handle times when instance method is not defined.\n"
},
{
"from": "human",
"value": "require \"ruby-with/version\"\n\nmodule With\n \n def with context, start_set_hash={}, &block\n context.instance_eval do\n def set(hash)\n hash.map {|k,v| self.__se... | ruby | chosen |
[
{
"from": "system",
"value": "Add void return to docs\n"
},
{
"from": "human",
"value": "require 'redis'\nrequire 'pathname'\n\nrequire 'wolverine/version'\nrequire 'wolverine/configuration'\nrequire 'wolverine/script'\nrequire 'wolverine/path_component'\nrequire 'wolverine/lua_error'\n\nmodule ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for mingw32 and single quotes.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'headless_html_editor/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for require_route presenter config\n"
},
{
"from": "gpt",
"value": "require_relative '../spec_helper'\nrequire 'core/config'\nrequire 'presenter/config/presenter'\n\ndescribe 'configuration' do\n it 'registers presenter config' do\n expect(Pakyow::Config... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for ViMediaManager.\n"
},
{
"from": "human",
"value": "cask 'vimediamanager' do\n version '0.7a14c'\n sha256 '2fb3dc8b5d2c5ab40a34e18c0860da98d1b92bac673f8a134bfca82cf013714a'\n\n url \"http://mariusth.channelwood.org/vimediamanager/files... | ruby | chosen |
[
{
"from": "system",
"value": "Expire remember_token cookie after 2 weeks\n\nDefault expiration time is one year, which is too long.\nhttps://github.com/thoughtbot/clearance/blob/5d29439ee4340738eacc8d5cd8bfbbb10a576f38/lib/clearance/configuration.rb#L25\n"
},
{
"from": "human",
"value": "Clearan... | ruby | chosen |
[
{
"from": "system",
"value": "Add a find method to find mailbox by id\n"
},
{
"from": "human",
"value": "Mailboxer.setup do |config|\n config.uses_emails = false\n config.search_enabled = false\n config.search_engine = :solr\n config.subject_max_length = 255\n config.body_max_length = 32000... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade IntelliJ IDEA CE EAP to 144.2608.2\n"
},
{
"from": "human",
"value": "cask 'intellij-idea-ce-eap' do\n version '143.1183.10'\n sha256 '8f9597e732ed7e169d21026c73e5da4ac841fcf44f1c98250bb44fd317169753'\n\n url \"https://download.jetbrains.com/idea/ideaIC-#... | ruby | chosen |
[
{
"from": "system",
"value": "Bring in Trollop for CLI utility.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rbpod/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some basic tests for the email changed notification\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass EmailChangedTest < ActionMailer::TestCase\n def setup\n setup_mailer\n Devise.mailer = 'Devise::Mailer'\n Devise.mailer_sender = 'test@ex... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to include README.md\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'yardstick/version'\n\nGem::Specification.new do |gem|\n gem.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add environment default currency for profile currencies\n"
},
{
"from": "human",
"value": "require_dependency 'enterprise'\n\nclass Enterprise\n\n has_many :enterprise_currencies, :class_name => 'CurrencyPlugin::EnterpriseCurrency',\n :include => :currency, :ord... | ruby | chosen |
[
{
"from": "system",
"value": "Add warden test helpers to api spec helpers\n"
},
{
"from": "human",
"value": "require 'rack/test'\nrequire 'json_spec'\nrequire 'spec_helper'\nrequire 'url_helper'\nrequire 'api/base'\n\nmodule RackHelper\n include Rack::Test::Methods\n\n def app\n API::Base\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix trait: :with_short_name in Event factory.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nFactoryBot.define do\n factory :event do\n # Samoa causes Capybara to throw ambiguous match errors, so remove it before picking\n\n home_time_zon... | ruby | chosen |
[
{
"from": "human",
"value": "Support method to ensure that a record reflects what is in the database.\n"
},
{
"from": "gpt",
"value": "def should_be_unchanged(*records)\n records.flatten.each do |record|\n comparison = Mingo.collection.find_one(:_id => record['_id'])\n\n comparison.keys.s... | ruby | chosen |
[
{
"from": "system",
"value": "Test with another user for unicorn deployment\n"
},
{
"from": "human",
"value": "# Set your full path to application.\napp_path = \"/home/rails/current\"\n\n# Set unicorn options\nworker_processes 3\npreload_app true\ntimeout 180\nlisten \"127.0.0.1:8080\"\n\n# Spaw... | ruby | chosen |
[
{
"from": "system",
"value": "Add auto_updates flag to Ripit\n"
},
{
"from": "human",
"value": "cask 'ripit' do\n version '1.6.8'\n sha256 '2631ccd1baea182af28eb319626dd77b0a6fbf36c6df9dde8a1dbe787d94b104'\n\n url 'https://files.thelittleappfactory.com/ripit/RipIt.zip'\n appcast 'https://fil... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bundle exec for Travis\n"
},
{
"from": "human",
"value": "task :integration do\n Dir.chdir(\"test_rails_4_app\") do\n if ENV[\"TRAVIS\"]\n sh \"MUTE_PROGRESS_BAR=true ERROR_VERBOSITY=0 bundle exec rake active_mocker:build\"\n sh \"bundle exec r... | ruby | chosen |
[
{
"from": "human",
"value": "Move gravatar url compose to separate service\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "gpt",
"value": "class GravatarService\n def execute(email, size = nil)\n if gravatar_config.enabled && email.... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite test so it also works with firefox.\n"
},
{
"from": "human",
"value": "# feature tests for css\n# revision: $Revision$\n\n$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED\nrequire 'unittests/setup'\n\nclass TC_CSS < Test::Unit:... | ruby | chosen |
[
{
"from": "system",
"value": "Set a macOS deployment target\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint NAME.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# To learn more about a Podspec see http://guides.cocoapods.org... | ruby | chosen |
[
{
"from": "system",
"value": "Use mocha/setup in place of deprecated mocha\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire File.expand_path(\"../../../lib/test/enumerable_assertions\", __FILE__)\nrequire \"active_support/core_ext/object/blank\"\nrequire \"active_support/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded test for the Supermarket URL\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Berkshelf::API::Config do\n describe \"ClassMethods\" do\n describe \"::default_path\" do\n it \"returns a String\" do\n expect(describe... | ruby | chosen |
[
{
"from": "system",
"value": "Improve summary in the podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AHKNavigationController\"\n s.version = \"0.1.1\"\n s.summary = \"A UINavigationController replacement allowing interactive pop gesture when the na... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations for matching given courses to labhasgroup\n"
},
{
"from": "human",
"value": "class LabHasGroup < ActiveRecord::Base\n belongs_to :lab\n belongs_to :lab_group\n belongs_to :repository\n has_many :submissions\n has_one :assistant_registered_to_giv... | ruby | chosen |
[
{
"from": "system",
"value": "Fix facet key deletion if API path sets collection\n\nWasn't updated when project renamed to collection\n"
},
{
"from": "human",
"value": "module Orchid::Facets\n\n # alter app/models/facets.rb to customize your application's facets\n @facet_info = {}\n\n # retri... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the instance variable scoping and use\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'uri'\nrequire 'nokogiri'\n\nmodule EnvatoOptimiser\n class Item\n attr_reader :uri,\n :response,\n :document\n\n\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure Package yields opts"
},
{
"from": "human",
"value": "module Hydrant\n module Batch\n class Package\n attr_reader :dir, :manifest\n\n def self.locate(root)\n Hydrant::Batch::Manifest.locate(root).collect { |f| p = self.new(f); p.complet... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken mongoid and active record configuration\n"
},
{
"from": "human",
"value": "require 'oauth2/provider'\n\nmodule OAuth2::Provider::Rails\n autoload :ControllerAuthentication, 'oauth2/provider/rails/controller_authentication'\n autoload :AuthorizationCodes... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded attr_reader in Identity class\n\nThere's a method with that name.\n"
},
{
"from": "human",
"value": "module StackMaster\n class Identity\n def running_in_allowed_account?(allowed_accounts)\n allowed_accounts.nil? || allowed_accounts.empty? |... | ruby | chosen |
[
{
"from": "system",
"value": "Remove db:migrate task from production.\n"
},
{
"from": "human",
"value": "# Cleanup unused rake tasks\nRake::TaskManager.class_eval do\n def remove_task(task_name)\n @tasks.delete(task_name.to_s)\n end\nend\n\n%w(\n test test:single test:uncommitted test:rece... | ruby | chosen |
[
{
"from": "system",
"value": "Allow comma delimitation in OPTS and space delimitation in FILES\n"
},
{
"from": "human",
"value": "require 'rake'\nrequire 'rake/tasklib'\n\nmodule YARD\n module Rake\n \n class YardocTask < ::Rake::TaskLib\n attr_accessor :name\n attr_accessor :op... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for DIRECTV GenieGO.\n"
},
{
"from": "human",
"value": "cask 'geniego' do\n version :latest\n sha256 :no_check\n\n url 'http://directv.vo.llnwd.net/e4/nomad/MACOS-client.dmg'\n name 'DIRECTV GenieGO'\n homepage 'http://www.directv.com/t... | ruby | chosen |
[
{
"from": "system",
"value": "Call clear_active_connections from fiber callback in AR example\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"bundler\"\nBundler.setup(:default, :example)\n\nrequire 'cramp'\nrequire 'active_record'\n\nActiveRecord::Base.establish_connection(:ad... | ruby | chosen |
[
{
"from": "human",
"value": "Add tag functionality to render socials\n"
},
{
"from": "gpt",
"value": "module Jekyll\n class SocialIcons < Liquid::Tag\n def initialize(_, args, _)\n super\n @args = OptionParser.parse(args)\n end\n\n def render(context)\n site = context.re... | ruby | chosen |
[
{
"from": "human",
"value": "Create the hash_eky validators definition\n"
},
{
"from": "gpt",
"value": "module MSFL\n module Validators\n module Definitions\n module HashKey\n def hash_key\n { in: [operators, fields]}\n end\n\n # Operators still needing par... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails.root instead of RAILS_ROOT"
},
{
"from": "human",
"value": "task :load_reference_data => :environment do\n ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])\n Dir[\"#{RAILS_ROOT}/app/models/reference_data/**/*.rb\"].each ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify package name of mysql-devel was wrong\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe 'rails_part::setup' do\n let(:chef_run) do\n ChefSpec::Runner.new(\n cookbook_path: ['site-cookbooks', 'cookbooks'],\n platfor... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless version in PHPUnit\n"
},
{
"from": "human",
"value": "require 'formula'\nrequire File.expand_path(\"../../Requirements/php-meta-requirement\", __FILE__)\nrequire File.expand_path(\"../../Requirements/phar-requirement\", __FILE__)\n\nclass Phpunit < Fo... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod version -> 2.1.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.1.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Create user through GUI instead of using FactoryGirl because that way wasn't working\n"
},
{
"from": "human",
"value": "module LoginHelper\n def ensure_logged_out\n if page.has_link? 'LOGOUT'\n click_link 'LOGOUT'\n end\n end\nend\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Use pool_link to link the SiteConnector pool to the PoolManager\n"
},
{
"from": "human",
"value": "module Berkshelf::API\n module CacheBuilder\n # @author Jamie Winsor <reset@riotgames.com>\n class Opscode < CacheBuilder::Base\n\n\n # @param [Hash] optio... | ruby | chosen |
[
{
"from": "system",
"value": "Use regex with implicit size validation\n"
},
{
"from": "human",
"value": "require 'luhn_checksum'\n\nclass CreditCardSanitizer\n\n NUMBERS_WITH_LINE_NOISE = /(\n \\d # starts with a number\n [\\d|\\W]+ # number or non-word character\n \\d # en... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fixed an issue where OAuth was not encoding the entire body on non application/x-www-form-urlencoded POST requests.\"\n\nThis reverts commit e911e2d904641f8149443879ef0d71ef9825e9b5.\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule Faraday\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add predicate methods for complete/archived feed\n"
},
{
"from": "human",
"value": "require 'rss/atom'\nrequire \"rss/atom/feed_history/version\"\n\nmodule RSS\n module Atom\n module FeedHistory\n PREFIX = 'fh'\n URI = 'http://purl.org/syndication/hist... | ruby | chosen |
[
{
"from": "human",
"value": "Test for fundamental API deserialization errors\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n\nrequire 'net/http'\nrequire 'spec_helper'\n\nRSpec.feature \"JSON argument deserialization\", type: :request do\n let(:evaluate_json_uri) { URI.join(Capybara.app_host... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated sass gem in favour of sassc\n\nhttps://github.com/sass/ruby-sass#ruby-sass-has-reached-end-of-life"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'effective_datatables/versio... | ruby | chosen |
[
{
"from": "system",
"value": "Determine path tar writes to, cd into that dir\n"
},
{
"from": "human",
"value": "namespace :docs do\n LATEX_TAR = \"install-tl-unx.tar.gz\"\n\n desc \"Install pandocs (package for all text formatting)\"\n task :pandoc do\n pkgs = %w{ haskell-platform }\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify spec helper even further and use scan so that we can evaluate all snippets in a file.\n"
},
{
"from": "human",
"value": "Dir[ARGV[1] || 'algorithms/**/*.md'].each do |filename|\n matcher = File.read(filename).match(/~~~\\n(require 'rspec'\\n.+?)\\n~~~/m)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Build D-Bus without X dependency.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass DBus <Formula\n url 'http://dbus.freedesktop.org/releases/dbus/dbus-1.2.16.tar.gz'\n homepage 'http://www.freedesktop.org/wiki/Software/dbus'\n md5 'c7a47b851ebe02f672... | ruby | chosen |
[
{
"from": "system",
"value": "Validate the length of fields in Offsite Links\n\nRather than letting the database raise an error (now that we have a MySQL\nversion which doesn't silently truncate), let's validate it in the model and\nshow the user a helpful validation message, not a 5xx error page.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Split gem into -java and normal versions, so JRuby doesn't attempt to build native ext it will never use.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{atomic}\n s.version = \"0.0.6\"\n s.authors = [\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for backtrace_filter\n"
},
{
"from": "gpt",
"value": "require 'cucumber/formatter/backtrace_filter'\n\nmodule Cucumber\n module Formatter\n describe BacktraceFilter do\n context '#exception' do\n before do\n trace = %w(a b\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary operations from one of the tests\n"
},
{
"from": "human",
"value": "$LOAD_PATH.reject! { |path| path.include?('TextMate') }\nrequire 'test/unit'\nrequire 'rubygems'\nrequire 'active_support'\nrequire 'mocha'\nrequire 'shoulda'\nrequire 'active_rec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order of js includes\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require\n\nassets {\n js :application, ['/js/generic.js', '/js/rainbow.min.js', '/js/shell.js']\n css :application, ['/css/github.css', '/css/fss.css']\n}\n\nget '/' do\n erb :... | ruby | chosen |
[
{
"from": "system",
"value": "Update PHPUnit documentation (5.7, 4.8)\n"
},
{
"from": "human",
"value": "module Docs\n class Phpunit < UrlScraper\n self.name = 'PHPUnit'\n self.type = 'phpunit'\n self.root_path = 'index.html'\n self.links = {\n home: 'https://phpunit.de/',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update test as -webkit-flex is no longer prefixed\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"rack\"\nrequire_relative \"../lib/roger_autoprefixer/middleware\"\n\nmodule RogerAutoprefixer\n class MiddlewareTest < ::Test::Unit::TestCase\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use more explicit Registry self.method definitions"
},
{
"from": "human",
"value": "module Restforce\n\n module DB\n\n # Restforce::DB::Registry is responsible for keeping track of all mappings\n # established in the system.\n class Registry\n\n class... | ruby | chosen |
[
{
"from": "system",
"value": "Add the publish class method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule UsesThis\n module Api\n # A class that models a static API endpoint.\n class Endpoint\n def initialize(output_path, items, type, pagination = false)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make generated code follow the current style guide\n\nSince these migrations are generated, we want them to follow the current\nstyle guide. So when opening a PR, there will be no violations reported\nfrom [Hound].\n\n[Hound]: https://houndci.com\n"
},
{
"from": "human"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in test name.\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'helper')\n\nclass TestErrors < MiniTest::Unit::TestCase\n include Nestling\n\n def test_superclass\n assert_equal Collection.superclass, Array\n end\n\n def t... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for edit order\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature \"Order::OrderItems\", type: :feature do\n\n feature '注文の確認' do\n scenario '注文者は自分の注文を確認できる' do\n lunchbox = create(:lunchbox)\n order = create(:order)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix class name in spec to match existing class.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe OmniAuth::Strategies::DigitalOcean do\n subject do\n OmniAuth::Strategies::DigitalOcean.new({})\n end\n\n context \"client options\" do\n it... | ruby | chosen |
[
{
"from": "system",
"value": "Update show game pairings feature test\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe \"show tournament round pairings\" do\n context \"Any vistor to the website\" do\n\n let(:tournament) { create :tournament }\n let(:round) { c... | ruby | chosen |
[
{
"from": "system",
"value": "Add test case for bare DeckShuffled object\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe DeckShuffled, type: :model do\n context \"as a new event\" do\n subject(:event) { DeckShuffled.new }\n\n it \"should have no associated game... | ruby | chosen |
[
{
"from": "system",
"value": "Add a newline between the respond_to block and the instance variables\n"
},
{
"from": "human",
"value": " class SitemapController < ApplicationController\n\n def index\n @static_pages = static_pages\n @courses = Course.all\n respond_to do |format|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Use the signleton contenful service insteado f instansiating a new one.\n"
},
{
"from": "human",
"value": "class SitemapController < ApplicationController\n def index\n @articles = ContentService.new.list_articles.sort { |a, b| b.created_at <=> a.created_at... | ruby | chosen |
[
{
"from": "system",
"value": "Remove time from caching-wasn't working\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n\n caches_action :index, expires_in: 1.minutes\n \n def index\n render\"landing_page\" if !current_user\n end\nend"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Update license reference in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"OmniBase\"\n s.version = \"0.1.0\"\n s.summary = \"The core Omni open source framework.\"\n s.homepage = \"https://gith... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up variant images association\n\nThe \"has_many :images\" was broken since it didn't specify the class name, and I couldn't figure out why these were defined this way anyway.\nConsolidating \"images_for_variant\" and \"images\" into a single normal association. Will make... | ruby | chosen |
[
{
"from": "system",
"value": "Rename applied_schedule_exceptions link to applied_exceptions.\n"
},
{
"from": "human",
"value": "require 'roar/json/json_api'\n\nclass EventRepresenter < Roar::Decorator\n include Roar::JSON::JSONAPI\n type :events\n\n property :id, render_nil: true\n property ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Dwarf Fortress to 0.40.12\n"
},
{
"from": "human",
"value": "class DwarfFortress < Cask\n version '0.40.01'\n sha256 'c4f729f094790671b1fde995c02c5d547d652d87790785b13a6cdc9f35dec6be'\n\n url 'http://www.bay12games.com/dwarves/df_40_01_osx.tar.bz2'\n home... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra error information to migration helper\n"
},
{
"from": "human",
"value": "module Carto\n module Db\n module MigrationHelper\n LOCK_TIMEOUT_MS = 1000\n MAX_RETRIES = 3\n WAIT_BETWEEN_RETRIES_S = 2\n\n def migration(up_block, down_bloc... | ruby | chosen |
[
{
"from": "system",
"value": "Convert date string to Date object\n"
},
{
"from": "human",
"value": "require 'csv'\n\nmodule Minty\n module Objects\n class Transaction\n\n def self.build(transaction_csv)\n transactions = []\n csv = CSV.parse(transaction_csv, { headers: :fir... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a couple issues parsing Gecko user agents.\n"
},
{
"from": "human",
"value": "class UserAgent\n module Browsers\n class Gecko < Base\n def self.extend?(agent)\n agent.application && agent.application.product == \"Mozilla\"\n end\n\n Gec... | ruby | chosen |
[
{
"from": "system",
"value": "Use TagList class to tag_list method\n"
},
{
"from": "human",
"value": "module Taggable\n extend ActiveSupport::Concern\n\n class TagList < Array\n cattr_accessor :delimiter\n @@delimiter = ','\n\n def initialize(list)\n list = list.is_a?(Array) ? li... | ruby | chosen |
[
{
"from": "system",
"value": "Change tired code to be broke not\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'haml'\nrequire 'sinatra'\nrequire 'redis'\n\nredis = Redis.new(:url => ENV[\"REDIS_URL\"])\n\nconfigure do\n set :views, File.join(File.dirnam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with older versions of Ruby and URI.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire \"spec_helper\"\n\ndescribe Bundler::Fetcher::CompactIndex do\n let(:downloader) { double(:downloader) }\n let(:remote) { double(:remote,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failling spec due to the elasticsearch formula update\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"elasticsearch::package\" do\n let(:facts) { default_test_facts }\n\n it do\n should contain_homebrew__formula(\"elasticsearch\")\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for the auditable plugin\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\n\ndescribe \"Auditable sequel plugin\" do\n let(:model_with_plugin) { create :section_note, content: \"first content\" }\n\n describe \"Model hooks\" do\n it \"creates a... | ruby | chosen |
[
{
"from": "human",
"value": "Add first song from Lesson 9\n"
},
{
"from": "gpt",
"value": "# Lesson 9 - More Chords: D, E, A and B Flat\n# Rhythm - Left Note/Right Chord (Hit the Road, Jack)\nuse_synth :piano\n\nplay :D3\nsleep 0.5\nplay chord(:D4, :minor)\nsleep 0.5\n\nplay :C3\nsleep 0.5\nplay... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify determining the executable and get the name for docs right\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'comrad'\n s.version = '0.0.3'\n s.date = Date.today.to_s\n s.platform = Gem::Platform::RUBY\n s.ex... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependencies to gemspec\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'polymorphic_identity/version'\n\nGem::Specification.new do |s|\n s.name = \"polymorphic_identity\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Change code so it is case insensitive\n"
},
{
"from": "human",
"value": "require \"pig_latin/version\"\n\nmodule PigLatin\n # Your code goes here...\n def self.cut_front(word)\n if /\\A[aeiou]/.match(word) != nil\n return \"w\"\n elsif /\\Ay/.match(word... | ruby | chosen |
[
{
"from": "system",
"value": "Add set_flash_message(type) for automatic translation of flash messages.\n\nBased on: https://github.com/rails/rails/issues/473\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n before_filter :set_auth... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.