conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix link to profile page of team member" }, { "from": "human", "value": "module TeamHelper\n def team_photo_tag photo, name, factlink_profile\n html = link_to \"https://factlink.com/#{factlink_profile}\", title: \"#{name}'s #{I18n.t(:app_name)} Profile\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Update podspec version to 0.3.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Watches\"\n s.version = \"0.3\"\n s.summary = \"A Simple Stopwatches written in Swift help you easily measure the execution time of function, bl...
ruby
chosen
[ { "from": "system", "value": "Store data in JSON blob\n" }, { "from": "human", "value": "require 'github_api'\n\nclass PullRequest\n\n States = [\n \"passed\",\n \"waiting\",\n \"blocked\"\n ]\n \n def self.update_all_from_github!\n github.pull_requests.list.each do |pr|\n u...
ruby
chosen
[ { "from": "system", "value": "Add begin/ensure block since we are returning." }, { "from": "human", "value": "# Keep this file meanwhile https://github.com/rack/rack/pull/313 is not released\nmodule ActionDispatch\n class BodyProxy\n def initialize(body, &block)\n @body, @block, @closed...
ruby
chosen
[ { "from": "system", "value": "Allow additional attribute for the rte field." }, { "from": "human", "value": "require \"formalist/element\"\nrequire \"formalist/elements\"\nrequire \"formalist/types\"\n\nmodule Formalist\n class Elements\n class RichTextArea < Field\n attribute :box_size...
ruby
chosen
[ { "from": "system", "value": "Add requires_arc flag to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'GroundControl'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'Remote configuration for iOS.'\n s.homepage = 'https://github.com/mattt/GroundCon...
ruby
chosen
[ { "from": "system", "value": "Fix issue with cherokee in certain locales\n\nOn my server, the locale was slightly different and the downcase was\nmessing things up.\n" }, { "from": "human", "value": "module BibleRef\n module Languages\n class Base\n def books\n fail NotImplemente...
ruby
chosen
[ { "from": "system", "value": "Remove version limitation on sidekiq\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/sidekiq-status/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Evgeniy Tsvigun']\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Add required ruby version to the gemspec\n" }, { "from": "human", "value": "# encoding: utf-8\n\n$: << File.expand_path('../lib', __FILE__)\nrequire 'i18n/version'\n\nGem::Specification.new do |s|\n s.name = \"i18n\"\n s.version = I18n::VERSION\n s.a...
ruby
chosen
[ { "from": "system", "value": "Add Session method for token creation\n" }, { "from": "human", "value": "module Ldash\n # Discord user\n class User\n attr_accessor :username, :id, :discriminator, :avatar\n\n # server ID => [role IDs]\n attr_accessor :roles\n\n attr_accessor :game, :s...
ruby
chosen
[ { "from": "system", "value": "Change to be specific about dev dependencies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'finite_machine/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warnings in VmActions::RightSize\n" }, { "from": "human", "value": "module Mixins\n module Actions\n module VmActions\n module RightSize\n def vm_right_size\n assert_privileges(params[:pressed])\n # check to see if comin...
ruby
chosen
[ { "from": "system", "value": "Add autoload path for rails 3\n" }, { "from": "human", "value": "module Outpost\n module Secretary\n class Engine < ::Rails::Engine\n end\n end\nend\n" }, { "from": "gpt", "value": "module Outpost\n module Secretary\n class Engine < ::Rails::...
ruby
chosen
[ { "from": "system", "value": "Make an enumerable for aws entries\n" }, { "from": "human", "value": "require 'aws/s3'\n\nclass S3GalleryApi\n def initialize(options = {:gallery_bucket => 'storage.photos.spstapleton.com'})\n @gallery_bucket = 'storage.photos.spstapleton.com'\n\n @thumbnail_...
ruby
chosen
[ { "from": "system", "value": "Fix checking for service started status on Debian\n\n`service SERVICE_NAME status` should return a 0 exit code when running, or non-zero when not running. Piping into grep swallows this, and serves no apparent purpose. This results in services *always* appearing running as long...
ruby
chosen
[ { "from": "system", "value": "Change the console binding to the correct view binding\n" }, { "from": "human", "value": "module WebConsole\n module ViewHelpers\n def console\n @should_render = true if @should_render.nil?\n\n if @should_render\n @console_session = WebConsole::...
ruby
chosen
[ { "from": "system", "value": "Add pry gem for 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 'ikku/version'\n\nGem::Specification.new do |spec|\n spec.name = \"...
ruby
chosen
[ { "from": "system", "value": "Fix authentication bug when token is empty\n" }, { "from": "human", "value": "module Api\n module V1\n class ApiApplicationController < ApplicationController\n respond_to :json\n before_action :authenticate_token!\n\n def a...
ruby
chosen
[ { "from": "system", "value": "Make the \"test\" stage the default\n" }, { "from": "human", "value": "require 'config'\napp_env = ENV['AWS_ENV'] || 'development'\nConfig.load_and_set_settings(\n Config.setting_files('config', app_env)\n)\n\nrequire_relative 'aws/aws_helpers'\nrequire_relative 'a...
ruby
chosen
[ { "from": "system", "value": "Tweak another example to check all paths.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Sprockets setup\" do\n let(:env) do\n Sprockets::Environment.new do |assets|\n assets.append_path fixture_root\n assets.append_path 'javasc...
ruby
chosen
[ { "from": "system", "value": "Add ccache-swig as an executable\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rubyswig/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Brian Wong\"]\n gem.email = [\"bdwong.n...
ruby
chosen
[ { "from": "system", "value": "Fix bad merge of sapi\n\n\nFormer-commit-id: 09615e6e525b81d244771f3e0cce31d731cfa6fe [formerly 07b2280091ce2dc69748756780cbfa33d4e81f40] [formerly 3d95da274aabf5c6098c0edf0e639b738d8d7c84 [formerly 3421654b91a899d39c9795c620b85bbc66671499 [formerly 90ea9cb816c6be3b3837778a4ce8...
ruby
chosen
[ { "from": "system", "value": "Add dependency on AR 4.x\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'j7w1/version'\n\nGem::Specification.new do |spec|\n spec.name = \"j7w...
ruby
chosen
[ { "from": "system", "value": "Add guard-rspec as development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sloc/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Fix typo to make TestFromHash work.\n" }, { "from": "human", "value": "require 'helpers_for_test'\nrequire 'json'\n\nclass TestFromHash < TestCase\n def setup\n @data_dir = File.dirname(__FILE__) + '/data'\n hash_data = JSON.parse(File.read( @data_dir + '/tes...
ruby
chosen
[ { "from": "system", "value": "Fix test to allow subclass of Pango::Coverage to be found\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire File.expand_path(\"../test_helper.rb\", File.dirname(__FILE__))\n\ndescribe Pango::Font do\n before do\n ctx = Gdk.pango_context...
ruby
chosen
[ { "from": "system", "value": "Update bourbon dependency to allow compatibility with administrate gem\n" }, { "from": "human", "value": "# coding: utf-8\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire 'spina/template/version'\n\nGem::Specification.new do |spec|\n spec.name = ...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec, is MIT\n\nFixes https://github.com/peterc/whatlanguage/issues/19" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'whatlan...
ruby
chosen
[ { "from": "human", "value": "Revert \"Removed the temporary script to update slugs on staging.\"\n\nThis reverts commit d6bbd8d0d3ceb800825efff6e8196709ff266488. I've made a change to the slug generation (to ignore apostrophes) so want to re-generate the slugs on staging.\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Add 4.7.2 Add it Up Challenge\n" }, { "from": "human", "value": "# Add it up!\n\n# Complete each step below according to the challenge directions and\n# include it in this file. Also make sure everything that isn't code\n# is commented in the file.\n\n# I worked on ...
ruby
chosen
[ { "from": "system", "value": "Add rspec version; use single quoted strings\n\nin the 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 'everything/version'\n\nGem::Specification...
ruby
chosen
[ { "from": "system", "value": "Add facebook_login.js to asset pipeline precompile\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :produ...
ruby
chosen
[ { "from": "system", "value": "Set default timezone as UTC and EST\n" }, { "from": "human", "value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require(*Rails.groups...
ruby
chosen
[ { "from": "system", "value": "Add signature authentication to webhook\n" }, { "from": "human", "value": "class Api::WebhooksController < Api::ApplicationController\n def github_callback\n event_name = request.headers.fetch('X-GitHub-Event')\n payload = JSON.parse(request.body.read)\n a...
ruby
chosen
[ { "from": "system", "value": "Order job instance logs returned by XHR\n" }, { "from": "human", "value": "class Kuroko2::LogsController < Kuroko2::ApplicationController\n def index\n @definition = Kuroko2::JobDefinition.find(logs_params[:job_definition_id])\n @instance = Kuroko2::JobInst...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to include Rake\n" }, { "from": "human", "value": "$:.unshift('lib')\nrequire 'sherlock/version'\n\nGem::Specification.new do |s|\n s.author = \"René Föhring\"\n s.email = 'rf@bamaru.de'\n s.homepage = \"http://github.com/rrrene/sherlock\"\n\n s.n...
ruby
chosen
[ { "from": "system", "value": "Fix pod spec source tag\n\nThere are other methods of specifying the location of source code\ninstead of tags, but you should really be using tags to mark your code\ncommit for your spec. If you are not the owner of the repository you\nare creating a spec for, file an issue wit...
ruby
chosen
[ { "from": "system", "value": "Allow for bundler 1.6.9 which is what comes with Ruby 2.0.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sudokusolver'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "human", "value": "Add a script to list all SSH keys on an appliance\n" }, { "from": "gpt", "value": "require 'octokit'\n\nOctokit.configure do |c|\n c.api_endpoint = 'http(s)://HOSTNAME/api/v3'\n c.login = 'USERNAME'\n c.password = 'PASSWORD'\nend\n\nOctokit.auto_paginate = true\n\...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary instance var from controller\n" }, { "from": "human", "value": "class TaxonomiesController < ApplicationController\n def show\n taxon_content_id = params[:content_id]\n @taxonomy = Taxonomy::ExpandedTaxonomy.new(taxon_content_id).build\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix infinite loop bug in helper method\n" }, { "from": "human", "value": "module QuickJumpTargetsHelper\n def default_quickjump_targets\n targets = find_last_active_contents(:limit => 8, :type => Page).map(&:holder).compact.uniq\n targets.map do |record|\n ...
ruby
chosen
[ { "from": "system", "value": "Add a test for a longer string" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'bwt'\n\ndescribe BWT do\n describe '#encode' do\n it 'encodes the empty string' do\n expect(subject.encode('')).to eq('$')\n end\n\n it \"encodes 'hi'\" do...
ruby
chosen
[ { "from": "system", "value": "Allow the stories to get access to RSpec expectations.\n" }, { "from": "human", "value": "$: << File.join(File.dirname(__FILE__), \"..\", \"..\", \"lib\")\nrequire 'solitaire_cipher'\n" }, { "from": "gpt", "value": "$: << File.join(File.dirname(__FILE__)...
ruby
chosen
[ { "from": "system", "value": "Fix: Increase aruba timeout for Jruby on CI\n" }, { "from": "human", "value": "require \"aruba\"\nrequire \"aruba/cucumber\"\nrequire \"aruba/in_process\"\nrequire \"aruba/spawn_process\"\n\nrequire \"guard/aruba_adapter\"\n\nBefore(\"@spawn\") do\n aruba.config.co...
ruby
chosen
[ { "from": "system", "value": "Use Selenium for all tests.\n" }, { "from": "human", "value": "\nrequire 'fileutils'\nrequire 'capybara'\nrequire 'capybara/cucumber'\nrequire 'capybara/dsl'\nrequire 'capybara/webkit'\nrequire 'capybara-screenshot'\nrequire 'capybara-screenshot/cucumber'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Fix rename_column to use the correct column name\n" }, { "from": "human", "value": "class DropRequirementsTable < ActiveRecord::Migration\n def self.up\n add_column :dependencies, :version_id, :integer\n rename_column :dependencies, :name, :requirements\n\...
ruby
chosen
[ { "from": "system", "value": "Use should > in GC specs\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"GC.stat\" do\n it \"supports access by key\" do\n keys = [:heap_free_slots, :total_allocated_objects, :count]\n keys.each do |key|\n GC.stat(ke...
ruby
chosen
[ { "from": "system", "value": "Update Omnioutliner to version 4.3\n\nThis commit updates the version and sha256 stanzas\n" }, { "from": "human", "value": "cask :v1 => 'omnioutliner' do\n version '4.2.3'\n sha256 '023ee03e68a1e9ee64dd6f6548ab6164e0a6ad82c205de5c4c02c56da40d019c'\n\n url \"http:...
ruby
chosen
[ { "from": "system", "value": "Update PhpStorm EAP to 145.61.14" }, { "from": "human", "value": "cask 'phpstorm-eap' do\n version '144.3168'\n sha256 '5b9a0b1584badbf155c627a2ff6c8c9dfcad3e907e4b127c41fc1ed3a9d41bec'\n\n url \"https://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg\"...
ruby
chosen
[ { "from": "system", "value": "Change redirect url after deleting an avatar\n" }, { "from": "human", "value": "# encoding: utf-8\n#--\n# Copyright (C) 2013 Gitorious AS\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General...
ruby
chosen
[ { "from": "system", "value": "Change unicorn port (for development)\n" }, { "from": "human", "value": "worker_processes 1\npreload_app true\nlisten \"127.0.0.1:8080\"\n" }, { "from": "gpt", "value": "worker_processes 1\npreload_app true\nlisten \"127.0.0.1:8081\"\n" } ]
ruby
chosen
[ { "from": "human", "value": "[skip] Add spec for evenAndOddHeaders tag (2m)\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe OpenXml::Docx::Elements::EvenAndOddHeaders do\n include ElementTestMacros\n\n it_should_use tag: :evenAndOddHeaders, name: \"even_and_odd_headers\"\n...
ruby
chosen
[ { "from": "system", "value": "Add associations to Conversation model, as yet untested\n" }, { "from": "human", "value": "class Conversation < ApplicationRecord\n\nend\n" }, { "from": "gpt", "value": "class Conversation < ApplicationRecord\n belongs_to :sender, class_name: 'User', fo...
ruby
chosen
[ { "from": "system", "value": "Fix for Admin 'show' for news articles. Related to the pretty_date method of the associated model.\n" }, { "from": "human", "value": "class NewsArticle < ActiveRecord::Base\n MODERATION_OPTIONS = ['new', 'approved', 'rejected']\n \n validates_inclusion_of :mode...
ruby
chosen
[ { "from": "system", "value": "Whitelist custom offsite link domain\n" }, { "from": "human", "value": "class OffsiteLink < ActiveRecord::Base\n belongs_to :parent, polymorphic: true\n validates :title, :summary, :link_type, :url, presence: true, length: { maximum: 255 }\n validate :check_url_i...
ruby
chosen
[ { "from": "system", "value": "Remove of the non-downloadable entities\n" }, { "from": "human", "value": "module Attask\n module API\n class Task < Base\n\n api_model Attask::Task\n\n include Attask::Behavior::Default\n\n\n def getAllFields\n response = request(:get, cre...
ruby
chosen
[ { "from": "system", "value": "Add Revolut to the list of iDEAL issuers.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Buckaruby\n module Ideal\n ISSUERS = {\n \"ABNANL2A\" => \"ABN AMRO\",\n \"ASNBNL21\" => \"ASN Bank\",\n \"BUNQNL2A\" => \"bunq\",...
ruby
chosen
[ { "from": "system", "value": "Add newline to file (shouldn't make a difference)\n" }, { "from": "human", "value": "class String\n\t\n\t# Modified from Rails ActiveSupport::Inflector\n # Source: activesupport/lib/active_support/inflector/methods.rb, line 55\n # Documentation: http://api.rubyon...
ruby
chosen
[ { "from": "system", "value": "Add intro message bbefore sending to git\n" }, { "from": "human", "value": "require 'yaml'\nrequire_relative './linker'\nrequire_relative './homebrew'\nrequire_relative './devenv'\n\nCFG_PATH = File.realpath(File.join(File.dirname(__FILE__), '../config/'))\nYAML_CFG...
ruby
chosen
[ { "from": "system", "value": "Fix test command, must use capture instead of run\n" }, { "from": "human", "value": "#\n# There are a few requirement for theses tasks to work as intentended :\n#\n# - You must set :deploy_via, :remote_cache\n# - The cached copy was synced previously during deployme...
ruby
chosen
[ { "from": "system", "value": "Update arguments forwarding for ruby 3.0\n" }, { "from": "human", "value": "module Glipper\n module Helpers\n def helpers\n @helpers\n end\n alias_method :h, :helpers\n\n def method_missing(name, *args, &block)\n if h.respond_to?(name)\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor and add user_token and user_id for jwt and sessions support\n" }, { "from": "human", "value": "module Hanami\n module Fumikiri\n module Skip\n private\n def authenticate!\n # no-op implementation\n end\n end\n\n class Invalid...
ruby
chosen
[ { "from": "system", "value": "Add indication of whether folder is open or closed to tree export\n" }, { "from": "human", "value": "require 'psd/node'\n\nclass PSD\n module Node\n # Represents a group, or folder, in the PSD document. It can have\n # zero or more children nodes.\n class ...
ruby
chosen
[ { "from": "system", "value": "Use bytes insead of unpack\n" }, { "from": "human", "value": "require 'zlib'\n\nmodule Readthis\n class Entity\n DEFAULT_OPTIONS = {\n compress: false,\n marshal: Marshal,\n threshold: 8 * 1024\n }.freeze\n\n MAGIC_BYTES = [120, 156].free...
ruby
chosen
[ { "from": "system", "value": "Upgrade fog gem to 1.10.1\n\nRequired to support OpenStack Quantum (manual networks). Fixes #46997903\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n# Copyright (c) 2009-2013 VMware, Inc.\n# Copyright (c) 2012 Piston Cloud Computing, Inc.\nversion = F...
ruby
chosen
[ { "from": "human", "value": "Create spec examples for EmsStorageTimeline button class\n" }, { "from": "gpt", "value": "describe ApplicationHelper::Button::EmsStorageTimeline do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n let(:record) { FactoryGirl.create(:ext_management_syst...
ruby
chosen
[ { "from": "system", "value": "Change the released version tag\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'AAChartKit'\n s.version = '2.0.0'\n s.summary = 'An elegant and friendly chart library for iOS developer'\n s.homepage = 'https://gi...
ruby
chosen
[ { "from": "system", "value": "Update iOSDFULibrary to fix compilation errors on XCode 13" }, { "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 = \"react-native-nordic-dfu\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Fix needless extra restarts by picking up 000 priority symlinks.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: apache2\n# Definition:: apache_site\n#\n# Copyright 2008, OpsCode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n...
ruby
chosen
[ { "from": "system", "value": "Use `Product.find_by!` instead of `.where`\n" }, { "from": "human", "value": "class Sprangular::ProductsController < Sprangular::BaseController\n def index\n @products = product_scope\n @products = @products.where(\"spree_prices.amount IS NOT NULL\").where(\"...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning in TextualMixins::TextualFilesystems\n" }, { "from": "human", "value": "module TextualMixins::TextualFilesystems\n def textual_filesystems\n num = @record.number_of(:filesystems)\n h = {:label => _(\"Files\"), :icon => \"fa fa-file-o\", :v...
ruby
chosen
[ { "from": "system", "value": "Add new line to trigger TravisCI." }, { "from": "human", "value": "require 'httparty'\nrequire 'zoo_app/models/alligator'\n\nmodule ZooApp\n\n class AnimalServiceError < StandardError; end\n\n class AnimalServiceClient\n\n include HTTParty\n base_uri 'animal...
ruby
chosen
[ { "from": "system", "value": "Change url validation to make coveralls happy\n" }, { "from": "human", "value": "module Smartsheet\n module Test\n class UrlValidator\n def initialize(endpoint_spec, request_spec)\n @segments = endpoint_spec.url_segments\n @args = request_spec...
ruby
chosen
[ { "from": "system", "value": "Add pry as development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"fluent-plugin-midi...
ruby
chosen
[ { "from": "system", "value": "Add @since to the latest helper\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright 2018-2020, Chef Software Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under t...
ruby
chosen
[ { "from": "system", "value": "Add TOKEN env var for security\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'resque'\nrequire 'dotenv'\nrequire_relative 'upgrade'\n\nDotenv.load\n\nenable :logging\nset :bind, '0.0.0.0'\nset :port, '8080'\n\nconfig = ENV.select { |k,v| k.start_with...
ruby
chosen
[ { "from": "system", "value": "Fix Ruby 2.7 deprecation warnings\n" }, { "from": "human", "value": "require 'database_cleaner/cleaner'\n\nmodule DatabaseCleaner\n class Cleaners < Hash\n def initialize hash={}\n super.replace(hash)\n end\n\n # FIXME this method conflates creation w...
ruby
chosen
[ { "from": "system", "value": "Implement a global launcher DiscoveryMission::for\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'uri'\n\nclass DiscoveryMission\n \n def initialize(url)\n @domain = URI.parse(url)\n @domain.path = \"/\" if @domain.path == \"\"\n reset\n ...
ruby
chosen
[ { "from": "system", "value": "Check for MassAssignmentSecurity when determining whether to call attr_accessible\n\nAR 4 may require attr_accessible if the protected_attributes gem is installed" }, { "from": "human", "value": "module Sidekiq\n module Superworker\n class Subjob < ActiveRecord:...
ruby
chosen
[ { "from": "system", "value": "Disable changing the token every time\n" }, { "from": "human", "value": "DeviseTokenAuth.setup do |config|\n # By default the authorization headers will change after each request. The\n # client is responsible for keeping track of the changing tokens. Change\n # ...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement to ~> 0.50.0\n\nUpdates the requirements on [rubocop](https://github.com/bbatsov/rubocop) to permit the latest version.\n- [Release notes](https://github.com/bbatsov/rubocop/releases)\n- [Changelog](https://github.com/bbatsov/rubocop/blob/master/CHANG...
ruby
chosen
[ { "from": "system", "value": "Add log to define problem with updating milestone status.\n" }, { "from": "human", "value": "class MilestoneStatusWatcher\n\n def self.update_status\n Milestone.must_started_today.update_all(status: Milestone::STATUSES.index(:open))\n end\n\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add more content project attributes" }, { "from": "human", "value": "module Semantics\n class ContentProject\n include HTTParty\n\n attr_reader :id, :name\n\n def initialize(attributes)\n @id = attributes[\"id\"]\n @name = attributes[\"name\"]\n ...
ruby
chosen
[ { "from": "system", "value": "Change rake task to use binstub\n" }, { "from": "human", "value": "require_relative \"../../resume/output\"\nrequire_relative \"files\"\nrequire \"yaml\"\n\nmodule OneSheet\n module Generator\n module_function\n\n def run\n Resume::Output.raw_warning(\"G...
ruby
chosen
[ { "from": "system", "value": "Rename argument names in ConversionError\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire 'transpec/annotatable'\n\nmodule Transpec\n class ConversionError < StandardError\n include Annotatable\n end\n\n class ContextError < ConversionError\n d...
ruby
chosen
[ { "from": "system", "value": "Move ffi includes to the to include dir\n\nNot sure why libffi wants to install its heaaders to the lib directory\nbut we really prefer them to be in the standard include directory. Move\nthem there.\n" }, { "from": "human", "value": "#\n# Copyright 2014, Craig Trac...
ruby
chosen
[ { "from": "system", "value": "[Haml] Improve the error when haml-spec can't be loaded.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire File.dirname(__FILE__) + '/../test_helper'\n\nbegin\n require 'json'\nrescue LoadError\nend\n\nclass SpecTest < Test::Unit::TestCase\n spec_fil...
ruby
chosen
[ { "from": "system", "value": "Revert \"Added pagination for listing of all tags.\"\n\nThis reverts commit 25952b34490c54360ac24bb5553bd74b1f1d7a34.\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: products\n#\n# id :integer not null, primar...
ruby
chosen
[ { "from": "system", "value": "Reset matte channel for better rendering\n" }, { "from": "human", "value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\n\ncanvas = Magick::Image.new(260, 125)\ngc = Magick::Draw.new\ngc.fill('black')\ngc.rectangle(10,20, 250,90)\n\ngc.stroke('blue')\ngc.fill('yell...
ruby
chosen
[ { "from": "system", "value": "Set default cache expires in to 5 minutes\n" }, { "from": "human", "value": "module CrawlableJS\n class Engine < ::Rails::Engine\n gem_root = File.expand_path File.dirname(File.dirname(File.dirname(__FILE__)))\n\n config.crawlable_js = ActiveSupport::OrderedO...
ruby
chosen
[ { "from": "system", "value": "Fix broken test by change in Sass color values.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass ScssTest < ActiveSupport::TestCase\n\n should 'calculate the coordinating edgevalue for a color' do\n result = render_c...
ruby
chosen
[ { "from": "system", "value": "Handle negative __id__'s in specs for platforms that use it\n" }, { "from": "human", "value": "require \"#{File.dirname(__FILE__)}/spec_helper\"\n\ndescribe \"An unbound variable\" do\n it \"should be inspectable for debugging purposes\" do\n local do |unbound|\...
ruby
chosen
[ { "from": "system", "value": "Load the version file to get the build version\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"acts_as_keyed/version\"\n\nGem::Specification.new do |s|\n s.name = \"split_tester\"\n s.v...
ruby
chosen
[ { "from": "system", "value": "Clean up file in gem\n" }, { "from": "human", "value": "require './lib/em-midori/version'\n\nGem::Specification.new do |s|\n s.name = 'em-midori'\n s.version = Midori::VERSION\n s.required_ruby_version = '>=2.0.0'\n s.date...
ruby
chosen
[ { "from": "system", "value": "Fix so that a user doesn't have specify selectors.\n" }, { "from": "human", "value": "require_relative 'helpers/iterator'\n\nmodule Uncomtrade\n\n class Response\n\n def initialize(response)\n @response = JSON.parse(response.body)\n @iterator = Helpers...
ruby
chosen
[ { "from": "system", "value": "Reorder play types list for return to regular play\n" }, { "from": "human", "value": "CURRENT_TOP_ROW_VALUES = [200, 400].freeze\n\nPLAY_TYPES = {\n \"teen\" => \"Teen Tournament\",\n \"regular\" => \"regular play\",\n \"power\" ...
ruby
chosen
[ { "from": "system", "value": "Use total_count instead of count\n" }, { "from": "human", "value": "module Api\n class SearchController < BaseController\n before_action :authenticate_user!\n respond_to :json\n\n expose(:neurons) {\n NeuronSearch.new(\n q: params[:query]\n ...
ruby
chosen
[ { "from": "system", "value": "Add auth to punchcards controller\n" }, { "from": "human", "value": "class PunchcardsController < ApplicationController\nend\n" }, { "from": "gpt", "value": "class PunchcardsController < ApplicationController\n \n before_action :authenticate_user!\...
ruby
chosen
[ { "from": "system", "value": "CHange MAL import failure email address.\n" }, { "from": "human", "value": "require 'my_anime_list_import'\n\nclass ImportsController < ApplicationController\n before_filter :authenticate_user!\n\n def new\n hide_cover_image\n\n if params[:animelist]\n ...
ruby
chosen
[ { "from": "system", "value": "Include default values for metrics endpoint if none are supplied\n" }, { "from": "human", "value": "class MetricsController < ApplicationController\n\tinclude Layouts::ApplicationLayoutHelper\n\n# GET\n\tdef get\n\t\t#begin\n\n\t\t_start = params[:start]\n\t\t_end ...
ruby
chosen