conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use v2.6 of the Facebook Graph API.\n\nWe'd been using v2.0, which is getting shut down in a few months. We'll\nsee whether this helps.\n" }, { "from": "human", "value": "OmniAuth.config.logger = Rails.logger\nRails.application.config.middleware.use OmniAuth::Builde...
ruby
chosen
[ { "from": "system", "value": "Update OnePassword cask to latest version.\n" }, { "from": "human", "value": "class OnePassword < Cask\n url 'https://d13itkw33a7sus.cloudfront.net/dist/1P/mac/1Password-3.8.17.zip'\n homepage 'https://agilebits.com/onepassword'\n version '3.8.17'\nend\n" }, ...
ruby
chosen
[ { "from": "human", "value": "Add rake task to migrate investment's internal comments to thread\n" }, { "from": "gpt", "value": "namespace :investments do\n namespace :internal_comments do\n desc \"Migrate internal_comments textarea to a first comment on internal thread\"\n task migrate_to...
ruby
chosen
[ { "from": "system", "value": "Add a status column to blog comments.\n" }, { "from": "human", "value": "class CreateBlogComments < ActiveRecord::Migration\n def change\n create_table :blog_comments do |t|\n t.integer :blog_entry_id, :null => false, :on_delete => :cascade\n t.string ...
ruby
chosen
[ { "from": "system", "value": "Move (no decision taken) to tooltip\n" }, { "from": "human", "value": "class CreateSrgHistories < ActiveRecord::Migration\n def up\n create_table :srg_histories do |t|\n t.string :name\n t.string :tooltip\n\n t.timestamps\n end\n\n add_colum...
ruby
chosen
[ { "from": "system", "value": "Set proper error level for setnry raven\n" }, { "from": "human", "value": "module Aws\n module Xray\n class DefaultErrorHandler\n # @param [IO] io\n def initialize(io)\n @io = io\n end\n\n # @param [Exception] error\n # @param [St...
ruby
chosen
[ { "from": "system", "value": "Fix typo with cookies and session data\n" }, { "from": "human", "value": "module EventuallyTracker\n class Base\n\n def initialize(logger, buffer, configuration)\n @logger = logger\n @configuration = configuration\n @buffer = buff...
ruby
chosen
[ { "from": "system", "value": "Use present, not not nil\n" }, { "from": "human", "value": "module Concerns\n module Versioned\n extend ActiveSupport::Concern\n \n included do\n versioned :except => [ :current_login_at, :current_login_ip, :last_login_at, :last_login_ip, :login_count...
ruby
chosen
[ { "from": "system", "value": "LevelDB: Add each_key and \"multi\" methods\n" }, { "from": "human", "value": "require 'leveldb'\n\nmodule Moneta\n module Adapters\n # LevelDB backend\n # @api public\n class LevelDB\n include Defaults\n include HashAdapter\n include Increm...
ruby
chosen
[ { "from": "system", "value": "Remove Pry from our production code\n" }, { "from": "human", "value": "require 'mongoid'\nrequire 'pry'\n\nmodule Mongoid::Finders::FindBy\n extend ActiveSupport::Concern\n VERSION = 0.1\n\n included do\n class << self\n def method_missing(meth, *args)\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"only way to fix test for time being\"\n\nThis reverts commit d77e7a92430dda4730680ca39e5a036865cbf186.\n" }, { "from": "human", "value": "class VolunteerPolicy < ApplicationPolicy\n class Scope < ApplicationScope\n def resolve\n return all if super...
ruby
chosen
[ { "from": "system", "value": "Load the postgresql adapter extensions when ActiveRecord is available.\n" }, { "from": "human", "value": "when_library_loaded('ActiveSupport', :version_file => 'active_support/version') do\n require 'rails2_ruby2/i18n_patch'\n require 'rails2_ruby2/compressed_memc...
ruby
chosen
[ { "from": "system", "value": "Add dummy call method in actions\n" }, { "from": "human", "value": "module Ruboty\n module Fizzbuzz\n module Actions\n class Fizzbuzz < Ruboty::Actions::Base\n\n end\n end\n end\nend\n" }, { "from": "gpt", "value": "module Ruboty\n mod...
ruby
chosen
[ { "from": "system", "value": "Fix broken environment variable in tanker config file\n" }, { "from": "human", "value": "module TankerArticleDefaults\n def self.included(base)\n base.send(:include, ::Tanker)\n\n index = ENV['SEARCHIFY_API_INDEX']\n \n base.tankit index, :as => 'Articl...
ruby
chosen
[ { "from": "system", "value": "Change API Councillors Query To Multiple Criteria\n" }, { "from": "human", "value": "class Api::CouncillorsController < ApiController\n def index\n \t@councillors = if @@query.empty?\n \t\tCouncillor.all\n \telse\n\t\t\tCouncillor.where(\"lower(first_name) LIKE ...
ruby
chosen
[ { "from": "human", "value": "Add script for generating training modules from wiki pages\n\nThis code can be used manually to take a wiki page of new training module content, and generate the slide and module .yml files for it.\n" }, { "from": "gpt", "value": "# Take wikitext for a training modul...
ruby
chosen
[ { "from": "human", "value": "Add admin menu feature spec\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nmodule Refinery\n describe \"menu\", type: :feature do\n refinery_login\n\n before do\n visit Refinery::Core.backend_path\n end\n\n describe \"sidebar\" do\n ...
ruby
chosen
[ { "from": "human", "value": "Add migration to fix nil order values on existing editions\n" }, { "from": "gpt", "value": "class FixPartOrdering < Mongoid::Migration\n def self.up\n count = 0\n\n Edition.skip_callback(:save, :before, :check_for_archived_artefact)\n\n Edition.all.each do ...
ruby
chosen
[ { "from": "system", "value": "Use middleware to release the database connection after each request\n\nWithout this, Active Record's pool of database connections gets exhausted\nafter a certain number of requests.\n" }, { "from": "human", "value": "require './boot'\nrequire 'rack/static'\n\nuse R...
ruby
chosen
[ { "from": "system", "value": "Add a redirect for the \"index\" link in the YARD docs.\n" }, { "from": "human", "value": "require \"rubygems\"\n\nif ENV[\"HEROKU\"].nil? || ENV[\"HEROKU\"] == 'false'\n require \"middleman\"\n run Middleman.server\nelse\n require \"rack/rewrite\"\n\n use Rack:...
ruby
chosen
[ { "from": "system", "value": "Increase Unicorn memory limits to 300-350\n\nUsing this limit on GitLab.com it appears we're able to reduce response\ntimings by about 620 milliseconds compared to the previous limit.\n\nSee gitlab-org/gitlab-ce!2421 for more information.\n" }, { "from": "human", "v...
ruby
chosen
[ { "from": "system", "value": "Remove bad spec potentially changing the global process group\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\n# TODO: put these in the right files.\ndescribe \"Process.setpgrp and Process.getpgrp\" do\n platform_is_n...
ruby
chosen
[ { "from": "system", "value": "Update Codekit to version 2.0.3 (16895)\n" }, { "from": "human", "value": "class Codekit < Cask\n url 'http://incident57.com/codekit/files/codekit-16877.zip'\n homepage 'http://incident57.com/codekit/'\n version '2.0.2 (16877)'\n sha256 '633a6baf3062a4e59951b025...
ruby
chosen
[ { "from": "system", "value": "Update to bug fix release 1.1.2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SMCalloutView\"\n s.version = \"1.1.1\"\n s.summary = \"A lightweight callout view class for iOS mimicking UICalloutView.\"\n s.description = ...
ruby
chosen
[ { "from": "system", "value": "Add support for TeamCity report formatter\n\nRubyMine uses the TeamCity reporter formatter and requires\nthe execution result of the example.\n" }, { "from": "human", "value": "module Flowaker\n module RSpec\n def self.included(base)\n base.instance_eval do...
ruby
chosen
[ { "from": "system", "value": "Add xpath targeting the intro paragraph.\n" }, { "from": "human", "value": "require 'html_processor/base'\nrequire 'html_processor/node_contents'\nrequire 'html_processor/node_remover'\nrequire 'html_processor/node_replacer'\nrequire 'html_processor/table_wrapper'\n...
ruby
chosen
[ { "from": "human", "value": "Add unit test for new behavior\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'the \"docker_run_flags\" parser function' do\n let :scope do\n node = Puppet::Node.new('localhost')\n compiler = Puppet::Parser::Compiler.new(node)\n scop...
ruby
chosen
[ { "from": "system", "value": "Support device_only and device_not options\n" }, { "from": "human", "value": "require \"karabiner/dsl/item\"\nrequire \"karabiner/xml_tree\"\n\nclass Karabiner::Item\n include Karabiner::XmlTree\n include Karabiner::DSL::Item\n\n AVAILABLE_OPTIONS = %i[\n not\...
ruby
chosen
[ { "from": "system", "value": "Revert \"Removed dynamically generated `api` class method in favor a simple `alias_method` call\"\n\nThis reverts commit 27579ec85be9c2eeee2b460a873d87d27d49c3ba.\n" }, { "from": "human", "value": "class Frenetic\n class Resource\n\n attr_reader :links\n\n de...
ruby
chosen
[ { "from": "system", "value": "Move Application module out of Rails module.\n" }, { "from": "human", "value": "module Orchestrate\n\n=begin rdoc\n\n ==== orchestrate-rails\n\n Ruby gem <tt>orchestrate-rails</tt> provides an ActiveRecord-style interface\n to map rails models to Orchestrate.io D...
ruby
chosen
[ { "from": "system", "value": "fix(gql): Fix production server not running due to config of dev gem\n" }, { "from": "human", "value": "# config/initializers/graphql_playground.rb\n# All config options have a default that should work out of the box\nGraphqlPlayground::Rails.configure do |config|\n...
ruby
chosen
[ { "from": "system", "value": "Switch from deprecated class Fixnum to Integer\n" }, { "from": "human", "value": "module WillPaginateSemanticUi\n module GenericRenderer\n GAP = \"&hellip;\"\n\n def to_html\n list_items = pagination.map do |item|\n item.class == Fixnum ? page_num...
ruby
chosen
[ { "from": "system", "value": "Change RSS feed to only include 1 item\n" }, { "from": "human", "value": "xml.instruct!\nxml.feed \"xmlns\" => \"http://www.w3.org/2005/Atom\" do\n site_url = \"http://daysinukraine.com/\"\n xml.title \"Nathan and Katelin Day\"\n xml.subtitle \"A blog about our w...
ruby
chosen
[ { "from": "human", "value": "Add a helper method to get server with id.\n" }, { "from": "gpt", "value": "RSpec.configure do |config|\n\n ### This helper is required because servers.get(id) does not work\n def get_server(connection = nil, id)\n connection ||= compute_connection\n connecti...
ruby
chosen
[ { "from": "system", "value": "Create specs for url and child_url.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'compo'\n\ndescribe Compo::Parentless do\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'compo'\n\ndescribe Compo::Parentless do\n...
ruby
chosen
[ { "from": "system", "value": "Test structure for new files.\n" }, { "from": "human", "value": "# Test::Alloy\r\nObject.const_set(\"Test\", Class.new).const_set(\"Alloy\", Class.new)\r\n\r\n# Test::Alloy::Core\r\nTest::Alloy.const_set(\"Core\", Class.new)\r\n\r\n# Test::Alloy::Core::Size\r\nTest:...
ruby
chosen
[ { "from": "system", "value": "Fix up rspec error caused by recipe ingredients default_scope.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe RecipeIngredient, type: :model do\n before do\n @ingredient1 = Ingredient.create!(name: 'Duck Eggs', photo_path: 'ingred...
ruby
chosen
[ { "from": "system", "value": "Update rom dep 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 'rom/yesql/version'\n\nGem::Specification.new do |spec|\n spec.name =...
ruby
chosen
[ { "from": "system", "value": "Update pod spec to 1.0.3" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'CDZQRScanningViewController'\n s.version = '1.0.2'\n s.summary = 'Easy QR code scanning on iOS 7.'\n s.homepage = 'https://github.com/cdzombak/CDZQRS...
ruby
chosen
[ { "from": "system", "value": "Update Unicorn template with new config for Heroku\n\n* I recently ran into an issue after deploying to Heroku where\n `Rails.application.config.database_configuration[Rails.env]` was\n evaluating to `nil` in the staging environment. Updating\n config/unicorn.rb to the lates...
ruby
chosen
[ { "from": "system", "value": "Upgrade version number to 1.3\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'ancestry'\n s.description = 'Organise ActiveRecord model into a tree structure'\n s.summary = 'Ancestry allows the records of a ActiveRecord mode...
ruby
chosen
[ { "from": "system", "value": "Increase memory_limit for PHP from 512M to 1G.\n" }, { "from": "human", "value": "default[:phpbuild] = {\n :git => {\n :repository => \"git://github.com/loicfrering/php-build.git\",\n :revision => \"f1cb2948629c1bbd812920f932f15395ab5d18e2\"\n },\n :phpun...
ruby
chosen
[ { "from": "system", "value": "Upgrade Time Out.app to v2.0.1\n\nTime Out 2.0.1 is out for Yosemite or newer.\n" }, { "from": "human", "value": "cask 'time-out' do\n if MacOS.release <= :snow_leopard\n version '1.6.5'\n sha256 '2ceec8d8938af0acf32af601337c129087bb3b8c132c1f18e6eb3581788b8a...
ruby
chosen
[ { "from": "system", "value": "Use old enough chef-vault to support Ruby < 2.4\n" }, { "from": "human", "value": "Vagrant.configure(2) do |config|\n # install the Debian-provided Chef package\n config.vm.provision \"shell\", inline: <<-SHELL\n sudo apt-get -qq update\n sudo DEBIAN_FRONT...
ruby
chosen
[ { "from": "human", "value": "Add basic feature test for checklists\n\nThis adds a feature test for the current implementation of the\nchecklists.\n\nThis application currently uses Cucumber for feature tests. We've\ndecided not to use cucumber, and use the preferred rspec-feature style.\nIt is much more rea...
ruby
chosen
[ { "from": "system", "value": "Improve documentation on ruby hello world example\n" }, { "from": "human", "value": "# De igual manera que en Python, Ruby no tiene una función predeterminada\n# como punto de entrada. Por lo tanto comparamos si la variable mágica\n# __FILE__ es igual al programa en...
ruby
chosen
[ { "from": "system", "value": "Convert a Static Attribute into an Input\n" }, { "from": "human", "value": "name 'about_me'\nmaintainer 'YOUR_COMPANY_NAME'\nmaintainer_email 'YOUR_EMAIL'\nlicense 'All rights reserved'\ndescription 'Installs/Configures about_me'\nlon...
ruby
chosen
[ { "from": "system", "value": "Save yourself a line of code" }, { "from": "human", "value": "module Rack\n class DoNotTrack\n DEFAULT_DNT_BIT = 0\n\n def initialize(app, dnt_bit = nil)\n @app = app\n @dnt_bit = dnt_bit\n end\n\n def call(env)\n env['HTTP_DNT'] = @dnt_b...
ruby
chosen
[ { "from": "system", "value": "Make sure Gtk gir data is loaded before getting its infos.\n" }, { "from": "human", "value": "require File.expand_path('test_helper.rb', File.dirname(__FILE__))\n\nmodule GirFFI\n class IRepositoryTest < MiniTest::Spec\n context \"An IRepository object\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Change api origin to https\n" }, { "from": "human", "value": "require 'smugsyncv2/version'\nrequire 'faraday_middleware'\nrequire 'faraday'\nrequire 'simple_oauth'\nrequire 'deepopenstruct'\nrequire 'oauth'\nrequire 'json'\nrequire 'pp'\nrequire_relative './smugsync...
ruby
chosen
[ { "from": "system", "value": "Add encoding comment for emacs\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 've'\n s.version = '0.0.3'\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Kim Ahlström\"]\n s.email = [\"kim.ahlstrom@gmail.c...
ruby
chosen
[ { "from": "system", "value": "Watch OS deployment target to meet RxSwift\n\nSigned-off-by: Ryne Cheow <81ee06e819213c74a61ccd141a06617e0bd7ee99@gmail.com>\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RxAlamofire\"\n\n s.version = \"5.0.0\"\n s.license = \"MIT\"\n s.su...
ruby
chosen
[ { "from": "system", "value": "Update podspec to release 0.8.0.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"WNGLogger\"\n s.version = \"0.7.0\"\n s.summary = \"WNGLogger is an iOS client library to record and log metric data to Weblog-NG.\"\n\n s.d...
ruby
chosen
[ { "from": "system", "value": "Build GTG::Simulator memos in a single loop\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"strscan\"\n\nmodule ActionDispatch\n module Journey # :nodoc:\n module GTG # :nodoc:\n class MatchData # :nodoc:\n attr_reader :...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning in Paperclip\n\nFixes deprecation warnings in Paperclip::UrlGenerator#escape_url\n\nOn a side note: we shouldn't be using Paperclip at all, and should migrate to ActiveStorage.\n" }, { "from": "human", "value": "Paperclip::Attachment.default_...
ruby
chosen
[ { "from": "system", "value": "Fix SHA for Firefox Developer Edition\n" }, { "from": "human", "value": "class Firefoxdeveloperedition < Cask\n version '35.0a2'\n sha256 '9d5d504229aa30c96f528713df098cb6436df33fdb329243ccbb0a68b5cba4d5'\n\n url \"https://ftp.mozilla.org/pub/mozilla.org/firefox/...
ruby
chosen
[ { "from": "human", "value": "Move scenario title and description to metadata\n" }, { "from": "gpt", "value": "class RemoveScenarioTitleAndDescription < ActiveRecord::Migration[7.0]\n def up\n scenarios = Scenario\n .where.not(title: nil).and(Scenario.where.not(title: 'API'))\n .or(...
ruby
chosen
[ { "from": "system", "value": "Set Capybara driver to default.\n" }, { "from": "human", "value": "require 'kameleon'\nrequire 'capybara/dsl'\nrequire 'capybara/rspec/matchers'\n\nDir[\"#{File.expand_path(\"../\", __FILE__)}/support/**/*.rb\"].each { |f| require f }\n\nrequire 'sample_rack_app/hey...
ruby
chosen
[ { "from": "system", "value": "Add color for RSpec output\n" }, { "from": "human", "value": "require \"bundler/setup\"\nrequire 'rack/iiif'\n\nDir['./spec/support/**/*.rb'].each { |f| require f }\n\nRSpec.configure do |config|\n config.filter_run :focus => true\n config.run_all_when_everything_...
ruby
chosen
[ { "from": "human", "value": "Add RSpec helper (and contains_duplicates matcher)\n" }, { "from": "gpt", "value": "# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.\n# Require this file using `...
ruby
chosen
[ { "from": "system", "value": "Stop showing coverage for spec files\n" }, { "from": "human", "value": "require 'fileutils'\nrequire 'rubygems'\nbegin\n require \"simplecov\"\n require \"codeclimate-test-reporter\"\n SimpleCov.start do\n formatter SimpleCov::Formatter::MultiFormatter.new([\n...
ruby
chosen
[ { "from": "system", "value": "Enable English by default when running specs\n" }, { "from": "human", "value": "require 'rubygems'\ngem 'rspec'\nrequire 'spec'\n\n$:.unshift(File.dirname(__FILE__) + '/../lib')\nrequire 'cucumber'\nrequire 'cucumber/treetop_parser/feature_en'\n\n# Prevent CLI's exi...
ruby
chosen
[ { "from": "system", "value": "Fix for RSpec 3 - this option doesn't exist\n" }, { "from": "human", "value": "require 'adhearsion'\nrequire 'adhearsion/reporter'\nrequire 'socket'\n\nENV['AHN_ENV'] = 'production'\n\nRSpec.configure do |config|\n config.color_enabled = true\n config.tty = true\n...
ruby
chosen
[ { "from": "system", "value": "Fix rspec code climate reporter\n" }, { "from": "human", "value": "require 'bundler/setup'\nBundler.setup\n\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../../test/app/config/environment.rb\", __FILE__)\nrequire 'tienda'\n\n# Factory Girl\nrequire 'fa...
ruby
chosen
[ { "from": "system", "value": "Add @chunks to Diff object\n" }, { "from": "human", "value": "class Diff\n include Reloadable\n\n attr_accessor :chunks\n\n def initialize\n end\n\n def inspect\n self.chunks.join(\"\\n\")\n end\n\n\n class Chunk\n attr_accessor :src, :dst, :lines\n ...
ruby
chosen
[ { "from": "system", "value": "Correct spec to detect flash message bug\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe \"Authentication\" do\n\n subject { page }\n\n describe \"signin page\" do\n before { visit signin_path }\n\n it { should have_content('Sign in')}\...
ruby
chosen
[ { "from": "system", "value": "Use the correct Windows names for OpenSSL.\n" }, { "from": "human", "value": "require 'mkmf'\n\ndir_config(\"puma_http11\")\n\n$defs.push \"-Wno-deprecated-declarations\"\n\nif %w'ssl ssleay'.find {|ssl| have_library(ssl, 'SSL_CTX_new')} and\n %w'crypto libeay'.fin...
ruby
chosen
[ { "from": "system", "value": "Remove explicit require_paths as it's the default\n\nBy default, RubyGems will define `require_paths` to be `lib` [0] so we\ncan drop this from the gemspec.\n\n[0]: http://guides.rubygems.org/specification-reference/#require_paths=\n" }, { "from": "human", "value": ...
ruby
chosen
[ { "from": "system", "value": "Handle errors from remote URLs\n" }, { "from": "human", "value": "require 'thread'\nrequire 'open-uri'\n\nclass Http\n @@mutex = Mutex.new\n @@busy = false\n\n\n class << self\n include Processing::Proxy\n\n def mutex\n @@mutex\n end\n\n def get(...
ruby
chosen
[ { "from": "system", "value": "Use Rack-ified HTTP header default.\n" }, { "from": "human", "value": "require 'bcrypt'\nrequire 'rack'\n\nmodule Visa\n mattr_accessor :encryption_cost, :request_header, :timeout\nend\n\nVisa.encryption_cost = 10\nVisa.request_header = 'Authentication'\nVisa.time...
ruby
chosen
[ { "from": "system", "value": "Update Formula to version 4.2.0\n" }, { "from": "human", "value": "class Bartycrouch < Formula\n desc \"Incrementally update/translate your Strings files\"\n homepage \"https://github.com/Flinesoft/BartyCrouch\"\n url \"https://github.com/Flinesoft/BartyCrouch.gi...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect use of template resource\n" }, { "from": "human", "value": "#\n# Cookbook Name:: fossology\n# Recipe:: config\n#\n# Copyright (C) 2014, Hewlett-Packard Development Company, L.P.\n#\n# All rights reserved - Do Not Redistribute\n#\n\n# FOSSology configur...
ruby
chosen
[ { "from": "system", "value": "Add rake to gemspec, change railties to rails\n" }, { "from": "human", "value": "# encoding: utf-8\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'wisp/version'\n\nGem::Specification.new do |s|\n s.name = 'ruby-wisp'\n s.version = Wisp::VE...
ruby
chosen
[ { "from": "system", "value": "Update podspec to use semver tags\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ts.name = 'RNCryptor'\n\ts.version = '5.0.3'\n\ts.summary = 'Cross-language AES Encryptor/Decryptor data format.'\n\ts.authors = {'Rob Napier' => 'robnapier@gmail.com'}\n\ts....
ruby
chosen
[ { "from": "system", "value": "[1.0.3] Fix bug with missing components in string\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SUPSemVer\"\n s.version = \"1.0.2\"\n s.summary = \"Easy-to-use Semantic Version comparison framework\"\n s.description = <<...
ruby
chosen
[ { "from": "system", "value": "Replace \" with ' quotes\n" }, { "from": "human", "value": "name \"collectd\"\nmaintainer \"Noan Kantrowitz\"\nmaintainer_email \"nkantrowitz@crypticstudios.com\"\nlicense \"Apache 2.0\"\ndescription \"Install and configure the collec...
ruby
chosen
[ { "from": "system", "value": "Split account databag handling into a separate recipe\n" }, { "from": "human", "value": "name \"sys\"\nmaintainer \"GSI HPC department\"\nmaintainer_email \"hpc@gsi.de\"\nlicense \"Apache 2.0\"\ndescription \"System Software configura...
ruby
chosen
[ { "from": "system", "value": "Use curl instead of github_api\n\nBecause github_api's upload doesn't work... :<\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nif ARGV.size < 1\n puts \"Usage: #{$0} USER FILE ...\"\n puts \" e.g.: #{$0} kou mroonga-1.10.tar.gz ...\"\n exit false\nend...
ruby
chosen
[ { "from": "system", "value": "Use better escaping of Strings when defining methods.\n" }, { "from": "human", "value": "require 'dm-predefined/exceptions/unknown_resource'\n\nmodule DataMapper\n module Predefined\n ##\n # fired when your plugin gets included into Resource\n #\n def s...
ruby
chosen
[ { "from": "system", "value": "Refactor define methods into their own methods\n" }, { "from": "human", "value": "module MethodFound\n class Interceptor < Module\n def initialize(regex, &intercept_block)\n define_method :method_missing do |method_name, *arguments, &method_block|\n ...
ruby
chosen
[ { "from": "system", "value": "Add Unit test validation User\n" }, { "from": "human", "value": "class AddEmailUniquenessIndex < ActiveRecord::Migration\n def change\n end\nend\n" }, { "from": "gpt", "value": "class AddEmailUniquenessIndex < ActiveRecord::Migration\n def change\n ...
ruby
chosen
[ { "from": "system", "value": "Change alias with field name\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# :reek:UtilityFunction\n\nmodule RubyRabbitmqJanus\n module Models\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n #\n # Store instance information f...
ruby
chosen
[ { "from": "system", "value": "Use system method rather than ticks for shell out\n\n* Seems to be a little more clear and doens't require string\n interpolation for arguments\n" }, { "from": "human", "value": "module Snapme\n class ImagesnapCommand\n def call(filename)\n `#{command_name...
ruby
chosen
[ { "from": "system", "value": "Add retries for the initial MySQL connection.\n" }, { "from": "human", "value": "require 'pathname'\nrequire 'mysql2'\nrequire 'dotenv'\n\n$LOAD_PATH << File.expand_path(\"../lib\", __FILE__)\n\nrequire \"p1_meter_reader\"\nrequire \"output/database_writer\"\nrequir...
ruby
chosen
[ { "from": "system", "value": "Update Prometheus metrics capture to keep path cardinality down and stop a metrics explosion\n" }, { "from": "human", "value": "# This file is used by Rack-based servers to start the application.\n\nrequire_relative 'config/environment'\n\nrequire 'rack'\nrequire 'p...
ruby
chosen
[ { "from": "system", "value": "Set paging to false for Admin::RetailersController\n" }, { "from": "human", "value": "module Refinery\n module Retailers\n module Admin\n class RetailersController < ::Refinery::AdminController\n crudify :'refinery/retailers/retailer',\n ...
ruby
chosen
[ { "from": "system", "value": "Stop using deprecated payment create\n\nSolidus now expects us to use a PaymentCreate class instead of assigning\nthe source attributes via magic.\n" }, { "from": "human", "value": "class SolidusPaypalBraintree::CheckoutsController < Spree::CheckoutController\n PER...
ruby
chosen
[ { "from": "system", "value": "Add an `algorithm: concurrently` to our scores partial index\n\nFixes CNVS-35193\n\nTest plan:\n* specs pass\n\nChange-Id: I1a9ca04c8b1f9c82f3b9a9769611da3df79e4205\nReviewed-on: https://gerrit.instructure.com/103040\nTested-by: Jenkins\nReviewed-by: Cody Cutrer <c4fe2b1d90ef8f...
ruby
chosen
[ { "from": "system", "value": "Test stabilization: Unjoined threads lead to stuck test suite.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Sessions::Backend::ActivityStream do\n context 'when async processes affect associated objects / DB records (#2066)' do\n l...
ruby
chosen
[ { "from": "system", "value": "Remove \"created_at\" spec because its no longer in the presenter nor is it actually used\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe RedeterminationPresenter do\n \n let(:rd) { FactoryGirl.create :redetermination, fees: 1452...
ruby
chosen
[ { "from": "human", "value": "Set up of engToNum -> english words returning integers\n" }, { "from": "gpt", "value": "\n\n\n\n\ndef engToNum word\n\n\t# need to make sure it is a string in the array\n\tif word \n\nintNum - ''\n\nonesWords = {'one' => 1 , 'two' => 2, 'three' => 3, 'four' => 4, 'fi...
ruby
chosen
[ { "from": "system", "value": "Add page--404 class to body_classes when rendering page not found\n" }, { "from": "human", "value": "class PagesController < ForestController\n before_action :set_page, only: [:show]\n\n def show\n unless @page\n if Rails.configuration.consider_all_request...
ruby
chosen
[ { "from": "system", "value": "Add new user's id to session\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def new\n @user = User.new\n end\n\n def create\n user = User.new(user_params)\n\n if user.save\n flash[:notice] = \"Welcome, #{user.name...
ruby
chosen
[ { "from": "system", "value": "Add enitiy id to people network when trust is established\n" }, { "from": "human", "value": "class PeopleNetwork < ActiveRecord::Base\n belongs_to :person\n belongs_to :trusted_person, :class_name => \"Person\"\n\n scope :involves_as_trusted_person, lambda { |per...
ruby
chosen
[ { "from": "system", "value": "Add module that identifies cats using Google vision\n" }, { "from": "human", "value": "module GoogleVisionHelper\n require 'googleauth'\n require 'google/apis/vision_v1'\n\n vision = Google::Apis::VisionV1::VisionService.new\n\n scopes = ['https://www.googleapi...
ruby
chosen
[ { "from": "system", "value": "Add staff users to the docker group\n" }, { "from": "human", "value": "define :admin_user, shell: '/bin/bash' do\n name = params[:name]\n home_dir = \"/home/#{name}\"\n\n user name do\n comment params[:full_name]\n supports :manage_home => true\n shell p...
ruby
chosen
[ { "from": "system", "value": "Add dependency on Chef::Resource.identity_attr when run chefspec\n" }, { "from": "human", "value": "# Added by ChefSpec\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\n\nRSpec.configure do |config|\n pattern_root = File.expand_path('../../../', File.dirname(__FI...
ruby
chosen
[ { "from": "system", "value": "Fix bug in Instance model\n" }, { "from": "human", "value": "class Instance < ActiveRecord::Base\n class << self\n def default\n result = first\n raise 'Unknown instance. Did you run rake db:seed?' unless result\n result\n end\n\n # Finds th...
ruby
chosen
[ { "from": "system", "value": "Add test for lack of arguments.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Github::GitData::References, '#delete' do\n let(:user) { 'peter-murach' }\n let(:repo) { 'github' }\n let(:ref) { \"heads/master\" }\n let(:...
ruby
chosen
[ { "from": "system", "value": "Use nice labware destruction name\n" }, { "from": "human", "value": "class AddDestroyLabware < ActiveRecord::Migration\n def self.up\n ActiveRecord::Base.transaction do\n instrument = Instrument.create ({:name => \"Destroying instrument\", :barcode => \"des...
ruby
chosen