conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix the scale of chrome://tracing time\n" }, { "from": "human", "value": "prof_stack = []\nrecord = []\nstart = 0\n\n$<.each do |line|\n toks = line.split\n next if toks[0] != 'TRACE' || toks.size != 4\n\n _, name, time, pc = *toks\n time = time.to_f\n\n if nam...
ruby
chosen
[ { "from": "system", "value": "Make the rails version in the gemspec more restrictive\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"transam_funding/version\"\n\n# Describe your gem and declare its dependencies:\nGem:...
ruby
chosen
[ { "from": "human", "value": "Add new function to validate array of IP addresses\n" }, { "from": "gpt", "value": "# == Function: validate_ip_address_array\n#\n# Validates an array of IP addresses, raising a ParseError should one or more\n# addresses fail. Validates both v4 and v6 IP addresses.\n#...
ruby
chosen
[ { "from": "system", "value": "Add support for solidus 2\n" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'solidus_sale_pricing'\n s.version = '2.0.0.alpha'\n s.summary = 'Sale pricing for Solid...
ruby
chosen
[ { "from": "system", "value": "Add missing @see tag for yardoc.\n" }, { "from": "human", "value": "module GitHub\n class Client\n\n # Methods for the Feeds API, which looks pretty much useless.\n #\n # http://developer.github.com/v3/activity/feeds/\n module Feeds\n\n # List feed...
ruby
chosen
[ { "from": "system", "value": "Delete conditional and replace with recursive method call\n" }, { "from": "human", "value": "module JsonTestData\n class JsonSchema\n attr_accessor :schema\n\n def initialize(schema)\n @schema = JSON.parse(schema, symbolize_names: true)\n end\n\n d...
ruby
chosen
[ { "from": "human", "value": "Remove organization data retrievable from ARES\n" }, { "from": "gpt", "value": "PREFIX rov: <http://www.w3.org/ns/regorg#>\nPREFIX schema: <http://schema.org/>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\n\nDELETE {\n ?organization ?p ?o .\n ?o ?addre...
ruby
chosen
[ { "from": "system", "value": "Disable test/unit autorun on modern test/unit versions\n\nCloses #404.\n" }, { "from": "human", "value": "# Why: http://groups.google.com/group/cukes/browse_thread/thread/5682d41436e235d7\nbegin\n require 'minitest/unit'\n # Don't attempt to monkeypatch if the req...
ruby
chosen
[ { "from": "system", "value": "Correct test to expect new name for shim file.\n" }, { "from": "human", "value": "require \"./lib/newline_hw/chrome_manifest\"\n\ndescribe NewlineHw::ChromeManifest do\n subject(:manifest) { NewlineHw::ChromeManifest.generate }\n it \"generates a chrome manifest t...
ruby
chosen
[ { "from": "system", "value": "Remove supports() call from chef recipe, because it is identical to defaults\n" }, { "from": "human", "value": "#\n# Cookbook Name:: practicingruby\n# Recipe:: god\n#\n# Installs, configures, and starts God\n#\n\n# Install Ruby first\ninclude_recipe \"practicingruby...
ruby
chosen
[ { "from": "system", "value": "Make JobLogger spec more reliable\n\nThis will hopefully fix our bild. I believe that the underlying issue is\nthat the logger's test double gets leaked into other examples, as RSpec\ntells when running `spec/jobs/` specs.\n\n```\n5) SubscriptionPlacementJob performing the job ...
ruby
chosen
[ { "from": "system", "value": "11106: Fix sentry spec now that it's disabled for specs\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\nrequire \"json\"\n\ndescribe SentryJob do\n it \"gets created automatically\" do\n expect(Delayed::Job.count).to...
ruby
chosen
[ { "from": "human", "value": "Add Resque RSpec custom matchers specs\n\n - Add spec for have_job_queued custom matcher\n - Assert a job has been queued\n - Require and use RSpec version constant to test multiple versions\n of RSpec against have_job_queued\n" }, { "from": "gpt", "value...
ruby
chosen
[ { "from": "system", "value": "Add Ruby dependency to gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'scientificprotocols/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "system", "value": "Use single line for condition\n" }, { "from": "human", "value": "#\n# == SearchesController\n#\nclass SearchesController < ApplicationController\n before_action :search_module_enabled?\n\n # GET /rechercher\n # GET /rechercher.json\n def index\n if params[:te...
ruby
chosen
[ { "from": "system", "value": "Use correct block variable for license in gemspec\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$:.unshift(lib) unless $:.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = 'fauxhai'\n spec.version = '2....
ruby
chosen
[ { "from": "system", "value": "Add symbol in save physical server method\n\nadd a :asset_details child key in save_physical_server_inventory\n" }, { "from": "human", "value": "#\n# Calling order for EmsPhysicalInfra:\n# - ems\n# - physical_servers\n#\n\nmodule EmsRefresh::SaveInventoryPhysicalI...
ruby
chosen
[ { "from": "system", "value": "Update rake to version 13.0.0" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ripcord/version'\n\nGem::Specification.new do |spec|\n spec.name =...
ruby
chosen
[ { "from": "system", "value": "Add doc dir in gem\n\n" }, { "from": "human", "value": "require 'rubygems'\r\nspec = Gem::Specification.new do |s|\r\n\ts.name = \"rmodbus\"\r\n\ts.version = \"0.2.1\"\r\n\ts.author = 'A.Timin, J. Sanders'\r\n\ts.platform = Gem::Platform::RUBY\r\n\ts.summary = \"RM...
ruby
chosen
[ { "from": "system", "value": "Split BaseRelationMappersFinalizer into smaller methods" }, { "from": "human", "value": "module DataMapper\n class Finalizer\n\n class BaseRelationMappersFinalizer < self\n\n # @api private\n def run\n finalize_mappers\n finalize_relation...
ruby
chosen
[ { "from": "system", "value": "Update to have explicit afnetworking dependency\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"HNDAppUpdateManager\"\n s.version = \"0.0.1\"\n s.summary = \"HNDAppUpdateManager\"\n s.homepage = \"\"\n ...
ruby
chosen
[ { "from": "system", "value": "Switch culebre to use cloudflare DNS\n" }, { "from": "human", "value": "name \"unizar\"\ndescription \"Role applied to all servers at University of Zaragoza\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :osluz => { :status => :administrator }\n ...
ruby
chosen
[ { "from": "system", "value": "Move DMG linking into ruby_block\n\n- resolves #5\n" }, { "from": "human", "value": "include_recipe 'sprout-android::sdk'\ninclude_recipe 'homebrew'\n\nhaxm_pkg = node['sprout']['android']['haxm']['package_name']\nhaxm_dmg_path = node['sprout']['android']['haxm...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Add some docs to Chrome::Profile\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@13146 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n module Chrome\n\n #\n # @private\n ...
ruby
chosen
[ { "from": "system", "value": "Use knockout-rb, not knockout, so as to avoid repo naming collision with main knockout project\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'polished/...
ruby
chosen
[ { "from": "system", "value": "Drop support for Ruby < 2.4\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rom/sql/version'\n\nGem::Specification.new do |spec|\n spec.name = 'rom-sql'\n spe...
ruby
chosen
[ { "from": "human", "value": "Add integration test for PostgreSQL\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe \"practicingruby::_postgresql\" do\n let(:postgresql_version) { \"9.1\" }\n\n it \"installs PostgreSQL server\" do\n expect(package \"postgresql-#{postgresql...
ruby
chosen
[ { "from": "human", "value": "Add tests for Bridge resource on Linux\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nproperty[:os] = nil\nset :os, :family => 'linux'\n\ndescribe get_command(:check_bridge_exists, 'br0') do\n it { should eq \"ip link show br0\" }\nend\n\ndescribe get_com...
ruby
chosen
[ { "from": "system", "value": "Update link in spec to fix broken test\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe PlotsHelper, type: :helper do\n describe '#link_to_featured_plant' do\n let(:plot) { create(:plot, id: 1) }\n let(:current_user) { build(:user, ...
ruby
chosen
[ { "from": "human", "value": "Add an example of mixin\nBy including a module in a class we can add behaviors without\nusing an inheritance relation.\nWe can add features regardless of his others properties.\n" }, { "from": "gpt", "value": "#!/bin/env ruby\n\n# A ruby module is a collection of fun...
ruby
chosen
[ { "from": "system", "value": "Add back before_filter on widgets so you must be logged in\n" }, { "from": "human", "value": "class WidgetsController < ApplicationController\n #before_filter :authenticate\n before_filter :find_widget, only: [:show]\n\n def new\n @widget = Widget.new\n end\n...
ruby
chosen
[ { "from": "system", "value": "Add homepage URL to gemspec" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tekido/version'\n\nGem::Specification.new do |spec|\n spec.name = \"...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 0.76.0 to ~> 0.77.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r...
ruby
chosen
[ { "from": "system", "value": "2343: Delete file upload after job processing\n" }, { "from": "human", "value": "class UserImportOperationJob < OperationJob\n def perform(operation, current_mission, path)\n # load the current mission's settings into configatron\n Setting.load_for_mission(cu...
ruby
chosen
[ { "from": "system", "value": "Add test enviroment to bundler setup on tests\n\nThis made possible to run individual tests with something like:\n\nruby -Itest/ test/test_spinning_cursor.rb -v -n \"/allow you to change the banner/\"\n\nNecessary to faster repeating individual tests.\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Add a LED class for bombs and elapsed time display\n\n" }, { "from": "human", "value": "module Minesweeper\n # Renderer for the game\n class Renderer\n include Constants\n\n COLON = 10\n\n def initialize(game)\n @game = game\n end\n\n def draw(...
ruby
chosen
[ { "from": "system", "value": "Use an ISO 8601 date instead of distance.\n\nFixes #7\n" }, { "from": "human", "value": "module RefineryPagesControllerDecorator\n include ActionView::Helpers::NumberHelper\n include ActionView::Helpers::DateHelper\n include ProjectHelper\n\n def home\n expir...
ruby
chosen
[ { "from": "system", "value": "Switch template dsl to use the correct method for user permissions (owner)" }, { "from": "human", "value": "define :disk_monitor, :template => \"alert.sh.erb\", :bin_path => \"/usr/local/bin\" do\n application = Hash.new(\"\").tap do |a|\n a[:alert_level] = para...
ruby
chosen
[ { "from": "human", "value": "Add spec test for textual_ipv4\n" }, { "from": "gpt", "value": "describe PhysicalServerHelper::TextualSummary do\n it \"#textual_ipv4\" do\n network = FactoryGirl.build(:network, :ipaddress => \"192.168.1.1\")\n guest_device = FactoryGirl.build(:guest_device, ...
ruby
chosen
[ { "from": "system", "value": "Comment explaining why we're accessing School." }, { "from": "human", "value": "# Include hook code here\nrequire File.join(File.dirname(__FILE__), '/lib/rites_portal.rb')\nrequire File.join(File.dirname(__FILE__), '/lib/sds_connect.rb')\n\nRitesPortal::School\nRite...
ruby
chosen
[ { "from": "system", "value": "Upgrade Opera Developer.app to v30.0.1812.0\n" }, { "from": "human", "value": "cask :v1 => 'opera-developer' do\n version '29.0.1795.14'\n sha256 'ce0e8ecdac8c1fda65369acc5d9539faad529e0970c4a6de0c5ed832e29d34e0'\n\n url \"http://get.geo.opera.com/pub/opera-devel...
ruby
chosen
[ { "from": "system", "value": "FIX for integration specs based on example preso change\n" }, { "from": "human", "value": "require_relative 'spec_helper'\n\ndescribe \"Loading the Example Presentation\", :integration => true do\n\n subject do\n Parade::Parsers::PresentationDirectoryParser.pars...
ruby
chosen
[ { "from": "human", "value": "Revert \"Remove haproxy system test\"\n\nThis reverts commit 25e6748fcabfd35ea2f98702a94f460a284afe74.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nrequire 'httparty'\n\nRSpec.describe \"haproxy\" do\n [0, 1].each do |job_index|\n context \"when the ...
ruby
chosen
[ { "from": "system", "value": "Add computer guessing for calling shots.\n" }, { "from": "human", "value": "require './player'\n\nclass HumanPlayer < Player\n def initialize(name = \"Dave\")\n @name = name\n @grid = Grid.new()\n @ships = []\n end\n\n def place_ships(array_of_ship_lengt...
ruby
chosen
[ { "from": "system", "value": "Add a task to open the coverage report\n" }, { "from": "human", "value": "require 'rspec/core/rake_task'\n\nRSpec::Core::RakeTask.new('spec')\n" }, { "from": "gpt", "value": "require 'rspec/core/rake_task'\n\nRSpec::Core::RakeTask.new(:spec)\n\nnamespace...
ruby
chosen
[ { "from": "system", "value": "Add tests for table creation, table drops\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Rake\n module TableTask\n\n describe Db do\n\n test_table = \"test\"\n\n it \"finds a table when it exists\" do\n if !Db.table_exists?(t...
ruby
chosen
[ { "from": "system", "value": "Make sure new work button is present\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire_relative '../page_root.rb'\n\nclass CatalinkerClient < PageRoot\n def ontology_ns\n \"http://192.168.50.12:8005/ontology#\"\n end\n\n def visit\n ...
ruby
chosen
[ { "from": "system", "value": "Fix Flickrie::Collection still using will_paginate, even though it isn't explicitly set\n" }, { "from": "human", "value": "if Flickrie.pagination == :will_paginate\n require 'will_paginate/collection'\nend\n\nmodule Flickrie\n # You can think of this as a richer A...
ruby
chosen
[ { "from": "system", "value": "Add spec test to test for failure\n" }, { "from": "human", "value": "require 'spec_helper'\ndescribe 'apt::params', :type => :class do\n let(:facts) { { :lsbdistid => 'Debian' } }\n let (:title) { 'my_package' }\n\n it { should contain_apt__params }\n\n # There ...
ruby
chosen
[ { "from": "human", "value": "Add basic tests for nexus::params\n\nSigned-off-by: Andrew Grimberg <1f872228929e751eea07667e68fbb1655199bd12@linuxfoundation.org>\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'nexus::params', :type => :class do\n\n context 'with default params...
ruby
chosen
[ { "from": "system", "value": "[iOS] Update podspec swift version to match SwiftAudio submodule. Cleanup quotes and other formatting.\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 ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary lets from comment model test\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Comment, type: :model do\n let(:question) { create(:question) }\n let(:user) {create(:user, username: 'Tyaasdfasdf', email: 'ty@example.com'...
ruby
chosen
[ { "from": "system", "value": "Define sign_in_path in ApplicationController for dummy application\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\nend\n" }, { "from": "gpt", "value": "class ApplicationController < ActionC...
ruby
chosen
[ { "from": "system", "value": "Add gem summary and description\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tltool/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update signup POST route to redirect to homepage\n" }, { "from": "human", "value": "get '/signin' do\n erb :'auth/signin'\nend\n\npost '/signin' do\n puts params\n redirect '/'\nend\n\npost '/signup' do\n puts 'create new user'\n redirect '/signin'\nend\n\nget ...
ruby
chosen
[ { "from": "system", "value": "Fix previous commit. GitHub web interface is not nice for editing.\n" }, { "from": "human", "value": "module Moonshine\n module Memcached\n\n # Define options for this plugin via the <tt>configure</tt> method\n # in your application manifest:\n # \n ...
ruby
chosen
[ { "from": "system", "value": "Make both the staging and production environments use the production gateway and cert. Temp solution for TN, something gets set in the actual project using `notify_user` dictate which gateway it wants to use per environment.\n" }, { "from": "human", "value": "class ...
ruby
chosen
[ { "from": "system", "value": "Add MD5 id to Event Set\n" }, { "from": "human", "value": "module SqlProbe\n module EventSetWriter\n module_function\n\n # Helper to write out raw events to an output location\n def write_to_file_system(name:, start_time:, events:, output_base_path:, durat...
ruby
chosen
[ { "from": "system", "value": "Remove legacy admin edit code from working group edit page\n" }, { "from": "human", "value": "class WorkingGroup::BaseForm < ::Form\n attribute :working_group, :model, primary: true, new_records: true\n\n attribute :name, :string\n attribute :description, :string...
ruby
chosen
[ { "from": "system", "value": "Add story teaser to output when listing the featured stories.\n" }, { "from": "human", "value": "class NprTodaysNews::CLI\n\n def initialize\n puts \"Please type 'list' to list feature stories or 'exit' to quit.\"\n\n scraper = NprTodaysNews::Scraper.new\n ...
ruby
chosen
[ { "from": "system", "value": "Fix compatability with Faraday 0.16.x by setting up multipart support like\nv1.x\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ncase Faraday::VERSION\nwhen /\\A0\\./\n require 'faraday/upload_io'\nwhen /\\A1\\.[0-8]\\./\n # Faraday 1.x version...
ruby
chosen
[ { "from": "system", "value": "Load people.xml part of memxml2db.pl\n" }, { "from": "human", "value": "require 'nokogiri'\n\n# TODO: Put this in configuration\nXML_DATA_DIRECTORY='/home/henare/tmp/openaustralia/pwdata/members'\n\nnamespace :application do\n desc 'memxml2db.pl'\n task reload_mem...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Logic Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'logic' do\n version '1.1.34'\n sha256 'a30...
ruby
chosen
[ { "from": "system", "value": "Add RightToLeft to tvOS target\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Cosmos\"\n s.version = \"8.0.0\"\n s.license = { :type => \"MIT\" }\n s.homepage = \"https://github.com/marketplacer/Cosmos\"\n s.summary =...
ruby
chosen
[ { "from": "system", "value": "Use double-quotes on all lines\n" }, { "from": "human", "value": "require 'formula'\n\nclass P0f < Formula\n homepage 'http://lcamtuf.coredump.cx/p0f3/'\n url 'http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.07b.tgz'\n sha1 'ae2c4fbcddf2a5ced33abd81992405b93207e7c...
ruby
chosen
[ { "from": "system", "value": "Update spec for new resource url\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'charles' do\n\n it { should contain_class('charles') }\n it { should contain_package('Charles').with_provider('appdmg_eula_charles') }\n it { should contain_pac...
ruby
chosen
[ { "from": "system", "value": "Create a DeletedCandidate for the merged candidate\n" }, { "from": "human", "value": "require_relative \"../models\"\n\ndef show_candidate(id)\n c = Candidate.get(id)\n \n template = \"%6s\\t%50s\\t%20s\\t%3s\"\n \n puts template % [ c.id, c.forenames, c.surnam...
ruby
chosen
[ { "from": "system", "value": "Add transaction id to bill payment credit card\n" }, { "from": "human", "value": "module QbwcRequests\n module BillPaymentCreditCard\n module V07\n class Query < QbwcRequests::Base\n field :max_returned\n field :modified_date_range_filter\n ...
ruby
chosen
[ { "from": "system", "value": "Use 401 for bad authentication, use 403 for lack of permission" }, { "from": "human", "value": "class ApiError < ActiveRecord::Base\n INVALID_ARGUMENT = 11\n INVALID_RANGE = 12\n INVALID_USERNAME_OR_PASSWORD = 17\n INVALID_API_TOKEN ...
ruby
chosen
[ { "from": "system", "value": "Update Podspec to Swift 4.2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Loggie'\n s.version = '1.0.1'\n s.summary = 'In-app network logging library.'\n s.homepage = 'https://github.com/infinum/iOS-Log...
ruby
chosen
[ { "from": "system", "value": "Update Fluentd to v0.10.49 with latest change\n" }, { "from": "human", "value": "name \"fluentd\"\ndefault_version 'a3068ff3f73525c72694465a5f42bcae6bf90104'\n\ndependency \"ruby\"\n#dependency \"bundler\"\n\nalways_build true\n\nsource :git => 'https://github.com/f...
ruby
chosen
[ { "from": "system", "value": "Fix a bundle install dependencies\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = \"traducto\"\n gem.description = \"Rails helpers collection to simplify the localization code.\"\n gem.summary = \"Rails helpers collectio...
ruby
chosen
[ { "from": "system", "value": "Fix serializable type for namespaced models\n" }, { "from": "human", "value": "module Jsonapi\n class SerializableGenerator < ::Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n # TODO(beauby): Implement generator-level...
ruby
chosen
[ { "from": "system", "value": "Make debian update certificate action idempotent.\n" }, { "from": "human", "value": "module VagrantPlugins\n module CaCertificates\n module Cap\n module Debian\n # Capability for configuring the certificate bundle on Debian.\n module UpdateCer...
ruby
chosen
[ { "from": "system", "value": "Remove some maven examples that we no longer care about\n" }, { "from": "human", "value": "WORKSPACE_DIR = File.expand_path(File.dirname(__FILE__) + '/..')\n\nDOWNSTREAM_PROJECTS=%w(arez-dom arez-promise arez-spytools)\n\n# Project -> [Branch1, Branch2, ...]\nDOWNST...
ruby
chosen
[ { "from": "system", "value": "Fix tool tip when tagging Ansible Credential from its summary page\n" }, { "from": "human", "value": "class ApplicationHelper::Toolbar::AnsibleCredentialCenter < ApplicationHelper::Toolbar::Basic\n button_group('ansible_repository', [\n select(\n :ansible_c...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to add specific gem version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rulers/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Add capybara spec for delete links\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'the moderation system', type: :feature do\n\n before(:each) do\n FactoryGirl.create(:ip_cache, ip_address: '1.2.3.4')\n end\n\n let(:user) do\n Factory...
ruby
chosen
[ { "from": "human", "value": "Add spec for backend helper\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'backend_for(:type) returns correct backend object' do\n it 'backend_for(:exec) returns SpecInfra::Backend::Exec' do\n expect(backend_for(:exec)).to be_an_instance_of S...
ruby
chosen
[ { "from": "system", "value": "Add contexts for service specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Cadooz::BusinessOrderService do\n\nend" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Cadooz::BusinessOrderService do\n\n describe \"in...
ruby
chosen
[ { "from": "system", "value": "Order of gff3 attribute fields does not matter.\n" }, { "from": "human", "value": "RSpec::Matchers.define :have_same_fields do |expected|\n match do |actual|\n attributes_to_hash(actual) == attributes_to_hash(expected)\n end\n diffable\nend\n\n\ndef attributes...
ruby
chosen
[ { "from": "system", "value": "Fix typo in deprecation warning" }, { "from": "human", "value": "require 'action_view/record_identifier'\n\nmodule ActionController\n module RecordIdentifier\n MESSAGE = 'method will no longer be included by default in controllers since Rails 4.1. ' +\n ...
ruby
chosen
[ { "from": "system", "value": "Use spy instead of mock\n" }, { "from": "human", "value": "describe BirthdayBot do\n let(:bot) { BirthdayBot.new }\n\n describe \"#perform\" do\n context \"When birthday of someone\" do\n before do\n Timecop.freeze(\"2016-06-12\")\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Set osfamily fact in spec test\n" }, { "from": "human", "value": "require 'spec_helper'\ndescribe 'goaudit' do\n context 'with default values for all parameters' do\n it { should contain_class('goaudit') }\n end\nend\n" }, { "from": "gpt", "value": ...
ruby
chosen
[ { "from": "system", "value": "Update pod spec to 0.1.7\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SSPPullToRefresh'\n s.version = '0.1.6'\n s.summary = 'General classes for \"Pull-To-Refresh\" concept customisation'\n\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Fix breadcrumbs to indicate which one we're on\n" }, { "from": "human", "value": "module FormsHelper\n # rubocop:disable Metrics/MethodLength\n def breadcrumbs\n content_tag(:ol, class: 'breadcrumb') do\n wizard_steps.collect do |every_step|\n class...
ruby
chosen
[ { "from": "system", "value": "Make order status updateable from admin interface.\n" }, { "from": "human", "value": "class OrderRequest < ActiveRecord::Base\n belongs_to :order\n belongs_to :order_status\n belongs_to :external_system\n attr_accessible :external_copyright_charge, :external_cur...
ruby
chosen
[ { "from": "system", "value": "Fix bug with nil user.\n" }, { "from": "human", "value": "PostPolicy = Struct.new(:user, :post) do\n\n def update?\n user.admin? or post.user == user\n end\n\n def destroy?\n user.admin?\n end\nend\n" }, { "from": "gpt", "value": "PostPolicy = ...
ruby
chosen
[ { "from": "system", "value": "Add validation for uid uniqness [GIOT-29]\n" }, { "from": "human", "value": "class UserIdentity < ActiveRecord::Base\n belongs_to :user\n validates :provider, uniqueness: { scope: :user_id }\nend\n" }, { "from": "gpt", "value": "class UserIdentity < Ac...
ruby
chosen
[ { "from": "system", "value": "Allow only category_id and loc_json to be set by mass assignment.\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: user_locations\n#\n# id :integer not null, primary key\n# user_id :integer not null\n# cate...
ruby
chosen
[ { "from": "system", "value": "Set `--web-security=no` flag when creating a user\n" }, { "from": "human", "value": "module Banquo\n def self.create_user(options)\n cmd = `casperjs #{File.dirname(__FILE__)}/script/create-user.js #{BASE_URL} #{options[:email]} #{options[:password]}`\n cmd =~...
ruby
chosen
[ { "from": "system", "value": "Fix checkout_to_order migration to include Checkout model\n" }, { "from": "human", "value": "class MigrateCheckoutToOrders < ActiveRecord::Migration\n def self.up\n Order.find_each do |order|\n checkout = update_order(order)\n checkout.destroy if check...
ruby
chosen
[ { "from": "system", "value": "Remove whitespaces adjacent to newline. Actually pass all tests" }, { "from": "human", "value": "module AttributeNormalizer\n module Normalizers\n module WhitespaceNormalizer\n def self.normalize(value, options = {})\n value.is_a?(String) ? value.gsu...
ruby
chosen
[ { "from": "system", "value": "Set info log level when none is provided\n" }, { "from": "human", "value": "module Nanobox\n class Stderr\n\n def initialize(opts)\n @log_level = level_to_int(opts[:log_level])\n end\n\n def level_to_int(level)\n levels = {}\n levels['trace'...
ruby
chosen
[ { "from": "system", "value": "Create not alter table honorific_prefixes in the so called migration.\n" }, { "from": "human", "value": "class CreateHonorificPrefixesTable < ActiveRecord::Migration\n def up\n change_table \"honorific_prefixes\" do |t|\n t.integer \"sex\"\n t.string ...
ruby
chosen
[ { "from": "system", "value": "Remove versions of dependent gems in development\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ydf/version'\n\nGem::Specification.new do |spec|\n spe...
ruby
chosen
[ { "from": "system", "value": "Fix behavior of Decimal to return 0 for nil / empty string (via @soveran).\n" }, { "from": "human", "value": "require \"bigdecimal\"\nrequire \"date\"\nrequire \"json\"\nrequire \"time\"\n\nmodule Ohm\n module DataTypes\n module Type\n Integer = lambda { ...
ruby
chosen
[ { "from": "system", "value": "Include properties when parsing as well\n" }, { "from": "human", "value": "require 'pogoplug/hash_initializer'\n\nmodule PogoPlug\n class File\n attr_accessor :name, :id, :type, :size, :mimetype, :parent_id, :properties, :origin, :raw\n\n module Type\n F...
ruby
chosen
[ { "from": "human", "value": "Add system test for filter_record_transformer\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n" }, { "from": "gpt", "value": "require \"application_system_test_case\"\n\nclass FilterRecordTransformerTest < ApplicationSystemT...
ruby
chosen
[ { "from": "system", "value": "Fix version contraint for centos 7 apache modules\n" }, { "from": "human", "value": "\ndefault['icinga2']['apache_modules'] = value_for_platform(\n %w(centos redhat fedora) => { '>= 7' => %w(default mod_wsgi mod_php5 mod_cgi mod_ssl mod_rewrite),\n ...
ruby
chosen