conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add support for seed to BootstrapProperties\n" }, { "from": "human", "value": "require 'contracts'\nrequire 'java-properties'\n\nrequire_relative '../config'\n\nmodule StackatoLKG\n module HDP\n class BootstrapProperties\n include ::Contracts::Core\n i...
ruby
chosen
[ { "from": "system", "value": "Improve legibility of method name.\n" }, { "from": "human", "value": "module Memory\n module Persistence\n class AtomPersistence\n def persist(collection)\n collection.items.each_with_object([]) do |object, result|\n next if event_already_in...
ruby
chosen
[ { "from": "system", "value": "Fix highcharts error when plotting empty data values\n" }, { "from": "human", "value": "MetricFu.reporting_require { 'graphs/grapher' }\nmodule MetricFu\n class ReekGrapher < Grapher\n attr_accessor :reek_count, :labels\n\n def self.metric\n :reek\n e...
ruby
chosen
[ { "from": "system", "value": "Remove description method from SpaceBeforeBrace\n\nThe `description` method is being deprecated.\n\nWhile here, also changed from appending to the `@lints` instance\nvariable directly to using the `add_lint` helper.\n\nChange-Id: If2902858e2cd29c06759294c4d6357690aec6017\nRevie...
ruby
chosen
[ { "from": "system", "value": "Add logging to photo processing\n" }, { "from": "human", "value": "namespace :photos do\n desc 'Show pending photos'\n task :pending => :environment do\n Original.pending.each do |original|\n puts \"#{original.key} - #{original.about['last-modified']}\"\n ...
ruby
chosen
[ { "from": "human", "value": "Add missing matcher for bamboo_agent_install resource\n" }, { "from": "gpt", "value": "# -*- coding: utf-8 -*-\n#\n# Cookbook Name:: bamboo-agent\n# Library:: matchers\n#\n# Copyright 2014, Numergy\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"...
ruby
chosen
[ { "from": "system", "value": "Add chefspec matcher for rbenv install\n" }, { "from": "human", "value": "if defined?(ChefSpec)\n\n {\n rbenv_gem: [:install, :upgrade, :remove, :purge],\n rbenv_global: [:create],\n rbenv_plugin: [:install],\n rbenv_rehash: [:run],\n rbenv_ruby: [:i...
ruby
chosen
[ { "from": "system", "value": "Remove pending; this test is passing" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature \"Add contributing authors\", js: true do\n let(:author) { FactoryGirl.create :user }\n let(:paper) { author.papers.create! short_title: 'foo bar', journal: Jour...
ruby
chosen
[ { "from": "system", "value": "Remove setting of Git identity\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nRSpec.describe \"Generating a new project\" do\n before(:example) do\n remove_dummy_app\n run_arkenstone(\"--skip-bundle\")\n end\n\n it \"creates a .ruby-version f...
ruby
chosen
[ { "from": "system", "value": "Add some missing properties on Stock\n" }, { "from": "human", "value": "require \"openlogi/base_object\"\nrequire \"openlogi/enum\"\n\nmodule Openlogi\n class Stock < BaseObject\n property :available, coerce: Integer\n property :shipping, coerce: Integer\n ...
ruby
chosen
[ { "from": "system", "value": "Fix test to match how the task is actually used\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nfeature \"The server executes the prompt task\", sidekiq: :inline do\n scenario \"and all users are emailed\" do\n first_user = create(:user)\n seco...
ruby
chosen
[ { "from": "human", "value": "Add request spec for PaperTrail\n\nResolves #907\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe 'paper trail' do\n context 'when updating something' do\n let(:user) { FactoryBot.create(:user, site: site) }\n let(:request_method) { :p...
ruby
chosen
[ { "from": "system", "value": "Add Fog Region When upload\n" }, { "from": "human", "value": "CarrierWave.configure do |config|\n if Rails.env.production? and Configuration[:aws_access_key]\n config.fog_credentials = {\n provider: 'AWS',\n aws_access_key_id: Configuration[:aws_access...
ruby
chosen
[ { "from": "system", "value": "Add Price Sack Spec for Float Amounts\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Spree::Calculator::PriceSack do\n let(:calculator) do\n calculator = Spree::Calculator::PriceSack.new\n calculator.preferred_minimal_amount = 5\n cal...
ruby
chosen
[ { "from": "system", "value": "Add Request::Prepared for wrapping sanitized params\n\nThis is not yet optimal but works for now\n" }, { "from": "human", "value": "module Subway\n\n class Request\n\n include Anima.new(:raw)\n include Adamantium::Flat\n\n ROUTER_PARAMS_RACK_ENV_KEY = 'rou...
ruby
chosen
[ { "from": "system", "value": "Revert \"open heroku app after deploy\"\n\nThis reverts commit 0f1b9466d35b8bc86b83da3f799354d59ad332b1.\n" }, { "from": "human", "value": "namespace :jumpup do\n namespace :heroku do\n task :open do\n system('heroku open')\n end\n end\nend\n\nINTEGRATI...
ruby
chosen
[ { "from": "system", "value": "Increase default sidekiq pool_size to 7\n\nThe sidekiq gem is requesting a larger pool size and is crashing the dyno when that condition is not satisfied." }, { "from": "human", "value": "require 'travis/config'\nrequire 'travis/support'\n\nmodule Travis\n module L...
ruby
chosen
[ { "from": "system", "value": "Support Test::Unit distributed in ruby 1.8.3.\n\n* subversion/bindings/swig/ruby/test/run-test.rb: Pass $0 instead of false\n as the first argument of Test::Unit::AutoRunner.run when using Test::Unit\n is the one that distributed in ruby 1.8.3.\n" }, { "from": "human"...
ruby
chosen
[ { "from": "system", "value": "Comment out \"depends 'openssl', '>= 4.2.0'\"\n\nAnd replaced with \"depends 'openssl'\" The version constraint\ncauses problems with chef-solo provisioning.\n" }, { "from": "human", "value": "name 'vsftpd'\nmaintainer 'Sebastian Grewe'\nmaintai...
ruby
chosen
[ { "from": "system", "value": "Fix homepage config 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 'activegraphql/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix inspec tests for Amazon Linux\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "if os[:family] == 'redhat' && os[:release].start_with?('6') || os[:family] == 'amazon'\n\n describe command('sysctl -...
ruby
chosen
[ { "from": "system", "value": "Remove redundant addition to $LOAD_PATH\n" }, { "from": "human", "value": "$:<< File.expand_path('../../lib', __FILE__)\n\nrequire 'minitest/autorun'\nrequire 'minitest/emoji'\nrequire 'pry'\n" }, { "from": "gpt", "value": "require 'minitest/autorun'\nre...
ruby
chosen
[ { "from": "system", "value": "Add SimpleCov to the unit tests\n" }, { "from": "human", "value": "require 'rubygems'\ngem 'RedCloth', '>= 4.2.1'\n\nrequire 'jekyll'\n\nrequire 'RedCloth'\nrequire 'rdiscount'\nrequire 'kramdown'\nrequire 'redcarpet'\n\nrequire 'redgreen' if RUBY_VERSION < '1.9'\nr...
ruby
chosen
[ { "from": "system", "value": "Add required_ruby_version to gemspec and clean it up\n" }, { "from": "human", "value": "name = 'parallel_cucumber'\nrequire \"./lib/#{name}/version\"\n\nGem::Specification.new name, ParallelCucumber::VERSION do |spec|\n spec.name = 'parallel_cucumber'\n spec.autho...
ruby
chosen
[ { "from": "system", "value": "Use Rspec predicate matcher syntax\n" }, { "from": "human", "value": "require 'spec_helper'\ninclude GitStatistics\n\ndescribe Commit do\n\n let(:sha) { \"bf09a64b0e0f801d3e7fe4e002cbd1bf517340a7\" }\n let(:repo) { Utilities.get_repository }\n subject(:commit) { ...
ruby
chosen
[ { "from": "human", "value": "Add spec test for rendering form expression buttons\n\nAdd spec test for fix in https://github.com/ManageIQ/manageiq-ui-classic/pull/3033,\nfor rendering form expression buttons to display Filter tab properly, when editing\nreport in Cloud Intel -> Reports -> Reports tab.\n" }...
ruby
chosen
[ { "from": "system", "value": "Update spec helper to match current devtools conventions\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'backports'\nrequire 'backports/basic_object' unless defined?(::BasicObject)\nrequire 'devtools'\nrequire 'ice_nine'\n\nDevtools.init_spec_helper...
ruby
chosen
[ { "from": "system", "value": "Stop running specs randomly for now.\n\nRandomness is taking away from readabilty and progression.\n\nWill bring back later.\n" }, { "from": "human", "value": "# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` ...
ruby
chosen
[ { "from": "system", "value": "Add way to find loose puts/p statements in specs\n" }, { "from": "human", "value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Allow both should and expect for now\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'chunky_png'\n\nmodule PNGSuite\n \n def png_suite_file(kind, file)\n File.join(png_suite_dir(kind), file)\n end\n \n def png_suite_d...
ruby
chosen
[ { "from": "system", "value": "Revert \"Just use the simplecov Rcov formatter for now to make CI happy\"\n\nThis reverts commit 5d132621801d0b9ad35ea3702f56a2869c45f0fd.\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'simplecov-rcov'\nSimpleCov.formatter = SimpleCov::Formatter::R...
ruby
chosen
[ { "from": "system", "value": "Tweak for new dispatch system.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'spec'\nrequire 'set'\n\n$: << File.dirname(__FILE__)\n$: << File.join(File.dirname(__FILE__),'../lib')\n\n# Loads uppercut and jabber\nrequire 'uppercut'\n\n# Unloads jabb...
ruby
chosen
[ { "from": "system", "value": "Call rake db:create to create database for test\n" }, { "from": "human", "value": "require \"simplecov\"\nSimpleCov.start\n\n# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\n# Configure Rails Environment\nENV[\"DB\"] ||= 'sqlite3' # \"mysql2\"\n\nrequ...
ruby
chosen
[ { "from": "system", "value": "Clear Carrierwave upload after each test example\n" }, { "from": "human", "value": "CarrierWave.root = 'tmp/tests/uploads'\n\nRSpec.configure do |config|\n config.after(:suite) do\n FileUtils.rm_rf('tmp/tests/uploads')\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Add tests for the constructor.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Winnow::Fingerprinter do\n describe '#fingerprints' do\n it 'hashes strings to get keys' do\n # if t = k = 1, then each character will become a fingerprint\n...
ruby
chosen
[ { "from": "system", "value": "Update IntelliJ IDEA CE to EAP 15; version 142.2491.4.\n" }, { "from": "human", "value": "cask :v1 => 'intellij-idea-ce-eap' do\n version '141.1192.2'\n sha256 '18f8ecfa66e2e687cab6ddd844bde8996ecb54eb93279a8e8ce5e43a9aa6def3'\n\n url \"http://download.jetbrains....
ruby
chosen
[ { "from": "system", "value": "Check that updates do not create a new document\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ScoreUpdaterJobTest < ActiveSupport::TestCase\n setup do\n @user = User.create!\n end\n\n teardown do\n User.destroy_all\n DailyScore.destro...
ruby
chosen
[ { "from": "system", "value": "Add config for jenkins for rvm\n" }, { "from": "human", "value": "case node['platform_family']\nwhen 'debian','ubuntu'\n default['jenkins_cookbook_ci']['ruby_packages'] = ['ruby1.9.3', 'rake', 'ruby-bundler', 'libxml2-dev', 'libxslt-dev']\nwhen 'rhel'\n default[...
ruby
chosen
[ { "from": "system", "value": "Remove the mandatory field files for jobs\n" }, { "from": "human", "value": "class Vacancy < ActiveRecord::Base\n\n acts_as_indexed :fields => [:job_title, :reference, :starting_salary, :past_probation, :closing_date, :description]\n\n validates_presence_of :job_t...
ruby
chosen
[ { "from": "system", "value": "Use block to define work to be done\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'thread/pool'\n\nif ARGV.length == 0\n puts \"Usage: proto.rb <file_or_directory_name>\"\n exit 1\nend\n\noriginal_path = ARGV[0].sub(/\\/$/, '')\nif original_pat...
ruby
chosen
[ { "from": "human", "value": "Include tests from active support gem for the blank? and present? functionality and add our own test for our custom to_b string method.\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass TestCoreExtensions < Test::Unit::TestCase\n \n test \"to_b\" do\n...
ruby
chosen
[ { "from": "system", "value": "Add me to some groups.\n" }, { "from": "human", "value": "user \"nelhage\" do\n action :create\n uid 2000\n shell '/bin/bash'\n supports :manage_home => true\nend\n\ndirectory '/home/nelhage/.ssh' do\n owner 'nelhage'\n mode '0700'\nend\n\nfile '/home/nel...
ruby
chosen
[ { "from": "system", "value": "Move requiring engine out of the switch case\n" }, { "from": "human", "value": "require 'active_support/core_ext/object/inclusion'\n\nARGV << '--help' if ARGV.empty?\n\naliases = {\n \"g\" => \"generate\"\n}\n\ncommand = ARGV.shift\ncommand = aliases[command] || co...
ruby
chosen
[ { "from": "system", "value": "Drop custom show action for debit invoices.\n" }, { "from": "human", "value": "class DebitInvoicesController < AuthorizedController\n # Actions\n def show\n @attachments = resource.attachments\n\n show!\n end\n \n def new\n # Allow pre-seeding some par...
ruby
chosen
[ { "from": "system", "value": "Remove dumb actions from TasksTemplatesController. No one call them, so we do not need them.\n" }, { "from": "human", "value": "# encoding: UTF-8\nclass TaskTemplatesController < TasksController\n#this actions defined in TasksController but unused in TasksTemplatesC...
ruby
chosen
[ { "from": "system", "value": "Include :signed_on_by, :signed_off_by in HD MDM session query\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_dependency \"renalware\"\n\nmodule Renalware\n module HD\n class MDMPresenter < Renalware::MDMPresenter\n NullObject = ...
ruby
chosen
[ { "from": "system", "value": "Package version patch number is increased from 0.1.7 to 0.1.8\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'telemetry-logger'\n s.version = '0.1.7'\n s.summary = 'Logging to STDERR with coloring and levels...
ruby
chosen
[ { "from": "system", "value": "Remove comments from template file\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file\n\n# Specifies gem version of Rails to use when vendor/rails is not present\nRAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSIO...
ruby
chosen
[ { "from": "system", "value": "Fix broken role test after refactoring collection\n" }, { "from": "human", "value": "require 'test_helper'\n\n#\n# == Role model test\n#\nclass RoleTest < ActiveSupport::TestCase\n setup :initialize_test\n\n test 'should return all roles list if super_administrato...
ruby
chosen
[ { "from": "system", "value": "Refactor tests to reduce code size\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass UserTest < ActiveSupport::TestCase\n setup do\n @user = users(:george)\n end\n\n test \"User's firstname should not be empty\" do\n assert_not @user.first_n...
ruby
chosen
[ { "from": "system", "value": "Use assert ... instead of assert_equal true, ... and refute ... instead\nof assert_equal false, ...\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass RepositoryIgnoreTest < Rugged::SandboxedTestCase\n def setup\n super\n\n @repo = sandbox_in...
ruby
chosen
[ { "from": "system", "value": "Allow the user to provide their own Redis.\n\nThis allows the user to provide, for instance, a namespaced Redis.\n" }, { "from": "human", "value": "module Deferrer\n module Configuration\n\n attr_reader :redis\n attr_accessor :logger\n attr_accessor :inlin...
ruby
chosen
[ { "from": "system", "value": "Update fabricator to follow fabrication syntax." }, { "from": "human", "value": "Fabricator(:grade) do\n form :number\n mark rand(1..10)\n comment Faker::HTMLIpsum.body\n user\n classroom { |attr| Fabricate(:classroom, :owner => attr[:user])...
ruby
chosen
[ { "from": "system", "value": "Create db/migrate if it doesn't exist\n" }, { "from": "human", "value": "require \"fileutils\"\n\nnamespace :activestorage do\n desc \"Copy over the migration needed to the application\"\n task :install do\n FileUtils.mkdir_p Rails.root.join(\"storage\")\n F...
ruby
chosen
[ { "from": "system", "value": "Add rake task checking Redmine advisories.\n" }, { "from": "human", "value": "\nnamespace :redmine do\n desc 'Check redmine vulnerabilities'\n task audit: :environment do\n end\nend\n" }, { "from": "gpt", "value": "require 'redmine/version'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Apply 'BibTeX' hack after reset\n" }, { "from": "human", "value": "require 'mechanize'\n\nmodule GScholar\n module Utils\n\n class Fetcher\n def initialize\n @cache = {}\n @agent = Mechanize.new\n @agent.pluggable_parser['text/plain'] =...
ruby
chosen
[ { "from": "system", "value": "Fix for active record notifications\n" }, { "from": "human", "value": "module Notifiable\n\tmodule Notifier\n module GCM\n \t\tclass GCMBatch < Base\n \n def initialize\n @batch = {}\n end\n \n # todo should be made thread...
ruby
chosen
[ { "from": "system", "value": "Fix load error on heroku" }, { "from": "human", "value": "module Remitano\n class RemiAccounts < Remitano::Collection\n def me\n Remitano::Net.get(\"/remi_accounts/me\").execute\n end\n end\nend\n" }, { "from": "gpt", "value": "require_relat...
ruby
chosen
[ { "from": "system", "value": "Add some comments to Rip::Utilities::Location\n" }, { "from": "human", "value": "module Rip::Utilities\n class Location\n attr_reader :origin\n attr_reader :offset\n attr_reader :line\n attr_reader :column\n\n def initialize(origin, offset, line, col...
ruby
chosen
[ { "from": "system", "value": "Allow setting message with method and then exiting without args\n" }, { "from": "human", "value": "require 'sensu-plugin/cli'\n\nmodule Sensu\n module Plugin\n class Check\n class CLI < Sensu::Plugin::CLI\n\n class << self\n def check_name(n...
ruby
chosen
[ { "from": "system", "value": "Rename some methods for clarity." }, { "from": "human", "value": "require \"simplecov\"\n\nmodule SimpleCov::Formatter::CompactJSON\n\n def self.new\n ::CompactJSON::Formatter.new\n end\n\nend\n\nmodule CompactJSON\n class Formatter\n\n attr_reader :result\...
ruby
chosen
[ { "from": "system", "value": "Fix searches by numeric string.\n" }, { "from": "human", "value": "module FriendlyId\n module SequelAdapter\n\n module SimpleModel\n\n class SingleFinder\n\n include FriendlyId::Finders::Base\n include FriendlyId::Finders::Single\n\n de...
ruby
chosen
[ { "from": "system", "value": "Replace filesystem test with vagrant box list\n\nVagrant 1.5 added box version support, which changes the directory\nstructure that we were expecting. As slow as it is, we should use\nvagrant's `box list` command to test which boxes are installed, rather\nthan depending on know...
ruby
chosen
[ { "from": "system", "value": "Disable observers when cleaning data.\n\nWe don't want to trigger these. Also they were leading to timeouts on\npreview...\n" }, { "from": "human", "value": "class CleanupInvalidPathsPrefixes < Mongoid::Migration\n def self.up\n Artefact.skip_callback(:update, ...
ruby
chosen
[ { "from": "system", "value": "Add test on installed packages\n" }, { "from": "human", "value": "# # encoding: utf-8\n\n# Inspec test for recipe universe-ubuntu::default\n\n# The Inspec reference, with examples and extensive documentation, can be\n# found at https://docs.chef.io/inspec_reference....
ruby
chosen
[ { "from": "system", "value": "Fix up server HTML spec\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rack/test'\nrequire 'capybara/remote/viewer/server'\n\ndescribe Capybara::Remote::Viewer::Server do\n include Rack::Test::Methods\n\n before(:all) do\n Capybara::Remote::...
ruby
chosen
[ { "from": "system", "value": "Add delete_resource method that does queued delete of cloud volumes\n" }, { "from": "human", "value": "module Api\n class CloudVolumesController < BaseController\n end\nend\n" }, { "from": "gpt", "value": "module Api\n class CloudVolumesController < B...
ruby
chosen
[ { "from": "system", "value": "Add Faraday error message to custom error\n" }, { "from": "human", "value": "require \"active_support/notifications\"\nrequire \"excon\"\nrequire \"faraday\"\nrequire \"faraday_middleware\"\n\nmodule Payments\n module Client\n class Gateway\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Reset sql_expr in type extensions\n" }, { "from": "human", "value": "module ROM\n module SQL\n # Type-specific methods\n #\n # @api public\n module TypeExtensions\n class << self\n # Gets extensions for a type\n #\n # @param [D...
ruby
chosen
[ { "from": "human", "value": "Add Rake task to start tests\n" }, { "from": "gpt", "value": "# require 'rspec'\n# require 'rspec/core/rake_task'\n\nnamespace :redmine_jenkins do\n\n desc \"Show library version\"\n task :version do\n puts \"Redmine Jenkins #{version(\"plugins/redmine_jenkins/i...
ruby
chosen
[ { "from": "human", "value": "Add Abricotine - a markdown editor for desktop\n\nIn **Abricotine**, you can preview your document directly in the text editor rather than in a side pane.\n\n![Another screenshot](http://i.imgur.com/ZDHgo9i.jpg)\n\n* Write in markdown (or GFM) and export your documents in HTML,\...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Fluxus.\n" }, { "from": "human", "value": "cask 'fluxus' do\n version '0.17-3.rc4'\n sha256 'ee4608af10117e87a905004f2a4e3a77c1c587bb6d6d8d533e7285c2ce4d9d96'\n\n url \"http://mndl.hu/fluxus/fluxus-#{version}.mac_intel.10.5.dmg.zip\"\...
ruby
chosen
[ { "from": "system", "value": "Use KDE FTP and add needed Qt dependency for Automoc4.\n" }, { "from": "human", "value": "require 'formula'\n\nclass Automoc4 <Formula\n @url='http://ftp-stud.fht-esslingen.de/Mirrors/ftp.kde.org/pub/kde/stable/automoc4/0.9.88/automoc4-0.9.88.tar.bz2'\n @homepage=...
ruby
chosen
[ { "from": "system", "value": "Allow empty type and comment\n" }, { "from": "human", "value": "module Puppet::Parser::Functions\n newfunction(:extract_public_key, :type => :rvalue) do |args|\n key = args[0]\n match_data = /^([^\\s]+)\\s+([^\\s]+)\\s+([^\\s]+)/.match(key)\n {'type' => ma...
ruby
chosen
[ { "from": "system", "value": "Change name listen events janus\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Generators\n # Create an class for generate a initializer\n class InitializerGenerator < Rails::Generators::Base\n desc ...
ruby
chosen
[ { "from": "system", "value": "Remove reference to live.js in template\n\nFixes #603\n" }, { "from": "human", "value": "def javascripts\n super + %w(js/autocomplete.js js/live.js)\nend\n\ndef stylesheets\n super + %w(css/custom.css)\nend" }, { "from": "gpt", "value": "def javascript...
ruby
chosen
[ { "from": "system", "value": "Add fixture_table_names and fixture_class_names config settings\n" }, { "from": "human", "value": "require 'active_record/fixtures'\nrequire 'rspec/active_record/adapters'\n\nmodule RSpec\n\tmodule ActiveRecord\n\t\tmodule FixtureSupport\n\t\t\textend ::ActiveSuppo...
ruby
chosen
[ { "from": "system", "value": "Fix issue where analyzing text makes intros fail" }, { "from": "human", "value": "class TeamMembership < ActiveRecord::Base\n belongs_to :product\n belongs_to :user\n\n has_many :team_membership_interests\n has_one :news_feed_item, foreign_key: 'target_id'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Make these gems into development dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/geoip/extensions/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"geoip-extensions\"\n s.version = GeoI...
ruby
chosen
[ { "from": "system", "value": "Use arity feature of newfunction instead of manual argument check\n" }, { "from": "human", "value": "module Puppet::Parser::Functions\n newfunction(:openldap_password, :type => :rvalue, :doc => <<-EOS\n Returns the openldap password hash from the clear text pa...
ruby
chosen
[ { "from": "system", "value": "Add \"svg\" as a extension of image filenames\n\nSVG images are recognized by modern browsers and shouldn't be displayed as\ntext but as image. SVG is also a very useful format for documentation purposes.\n" }, { "from": "human", "value": "# frozen_string_literal: t...
ruby
chosen
[ { "from": "human", "value": "Add back in ResourceService implementation for spec\n" }, { "from": "gpt", "value": "require ::File.expand_path('../resource.pb', __FILE__)\n\nmodule Test\n class ResourceService\n\n # request -> Test::ResourceFindRequest\n # response -> Test::Resource\n de...
ruby
chosen
[ { "from": "system", "value": "Update config syntax in BookGridWithPersistence\n" }, { "from": "human", "value": "class BookGridWithPersistence < BookGrid\n\n override_column :author__name, :included => false\n\n def default_config\n super.merge :persistence => true\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add comment to explain why we use .map\n" }, { "from": "human", "value": "class Api::DropsController < ApplicationController\n respond_to :json\n\n def index\n if params[:latitude] && params[:longitude]\n radius = params[:radius].presence || 10\n plac...
ruby
chosen
[ { "from": "system", "value": "Use destroy instead of delete for subcomments\n" }, { "from": "human", "value": "module Backend\n module SubComments\n def self.count(parent_id:)\n SubComment.where(parent_id: parent_id.to_s).count\n end\n\n def self.index(parent_ids_in:)\n paren...
ruby
chosen
[ { "from": "system", "value": "Send file using a Paperclip.io_adapter\n\nReading a path to the file only works for documents stored locally. This\nway, the document is fetched to a tempfile. This can be sent directly\nand should work with containerised solutions such as docker and heroku\nprovided they have...
ruby
chosen
[ { "from": "system", "value": "Add spec for Mailbox.messages(reload: true)\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe MailCatcher::API::Mailbox do\n include MailboxSpecHelpers\n\n describe 'stubbed' do\n before do\n stub_mailbox\n end\n aft...
ruby
chosen
[ { "from": "system", "value": "Fix an issue related to square brackets\n" }, { "from": "human", "value": "class AnswerController < ApplicationController\n protect_from_forgery with: :null_session\n skip_before_action :verify_authenticity_token\n\n def action_allowed?\n case params[:action]\...
ruby
chosen
[ { "from": "system", "value": "Fix group context overriding group page display.\n" }, { "from": "human", "value": "class GroupsController < ApplicationController\n def show\n @group = current_group || Group.find(params[:id])\n @recent_threads = @group.threads.order(\"created_at DESC\").lim...
ruby
chosen
[ { "from": "system", "value": "Make redirect go to group page" }, { "from": "human", "value": "class TopicsController < ApplicationController\n before_action :set_topic, only: [:show, :edit, :update, :destroy]\n\n def index\n @topics = Topic.all\n end\n\n def show\n end\n\n def new\n ...
ruby
chosen
[ { "from": "system", "value": "Remove disconnect link from typeracer\n" }, { "from": "human", "value": "class ProviderDecorator < Draper::Decorator\n delegate_all\n\n def connected?\n !missing_oauth?\n end\n\n def auth_link\n \"/auth/#{provider_name}\"\n end\n\n def setup_link\n if...
ruby
chosen
[ { "from": "system", "value": "Improve retry logic in projects update tags service\n" }, { "from": "human", "value": "require 'git'\n\nmodule Services\n module Projects\n class UpdateTags < Services::Base\n check_uniqueness!\n\n def call(id_or_object)\n project = find_object(...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.0.2.6 to 0.0.2.7\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'raygun_client'\n s.version = '0.0.2.6'\n s.summary = 'Client for the Raygun API using the Obsidian HTTP clien...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.4.0.0 to 0.5.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'raygun_client'\n s.version = '0.4.0.0'\n s.summary = 'Client for the Raygun API using the Obsidian HTTP clien...
ruby
chosen
[ { "from": "system", "value": "Add a newline to appease the homebrew style gods.\n" }, { "from": "human", "value": "require 'formula'\n\nclass RubyInstall < Formula\n homepage 'https://github.com/postmodern/ruby-install#readme'\n url 'https://github.com/postmodern/ruby-install/archive/v0.1.1.ta...
ruby
chosen
[ { "from": "system", "value": "Set subtitle to elapsed time\n\nCloses #4\n" }, { "from": "human", "value": "class TimersScreen < PM::TableScreen\n title \"When did\"\n\n def on_load\n set_nav_bar_button :right, system_icon: :add, action: :add_timer\n\n start_counter\n end\n\n def table_...
ruby
chosen
[ { "from": "system", "value": "Update Ruby / Minitest documentation (5.10.1)\n" }, { "from": "human", "value": "module Docs\n class Minitest < Rdoc\n self.name = 'Ruby / Minitest'\n self.slug = 'minitest'\n self.release = '5.9.0'\n self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Minites...
ruby
chosen
[ { "from": "system", "value": "Make nice bars for the expense limits.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass Ifin24::Commands::ListLimits < Ifin24::Commands::Base\n\n def execute\n limits = @client.fetch_limits\n print_list(limits, :name, :amount, :max)\n end\n\nend...
ruby
chosen
[ { "from": "system", "value": "Add a quick hack to deal with timezone schenanigans.\n" }, { "from": "human", "value": "require_relative 'boot'\n\nrequire \"rails\"\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\nrequire \"active_record/railtie\"...
ruby
chosen
[ { "from": "system", "value": "Fix bug keeping setup mode from running.\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'boot')\n\nRAILS_GEM_VERSION = '2.1.1' unless defined? RAILS_GEM_VERSION\n\n# temporary until Rails bug fixed\nrequire 'fix_locator_bug'\n\nunless F...
ruby
chosen