conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add order note as public\n" }, { "from": "human", "value": "module Spree\n class BpOrderNote < Brightpearl\n attr_accessor :order\n\n def initialize(order)\n super()\n @order = order\n end\n\n def save\n Nacre::API::OrderNote.create @orde...
ruby
chosen
[ { "from": "system", "value": "Remove respond_to in the metaadata\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'apparmor'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache-2.0'\ndescri...
ruby
chosen
[ { "from": "system", "value": "Update git maintainer and source info\n" }, { "from": "human", "value": "name 'drone'\nmaintainer 'Justin Campbell'\nmaintainer_email 'justin@justincampbell.me'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures Drone'\nlong_desc...
ruby
chosen
[ { "from": "system", "value": "Fix image test for new number of items\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ImageTest < ActiveSupport::TestCase\n\n fixtures :images\n\n def test_titles\n assert_equal \"The%20world!.gif\", images(:the_world).filename\n assert_eq...
ruby
chosen
[ { "from": "system", "value": "Remove old exposed secret token and use the one from CFG\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cook...
ruby
chosen
[ { "from": "system", "value": "Add ENV config for secret token" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become inv...
ruby
chosen
[ { "from": "system", "value": "Stop including the default recipe in the ssl recipe" }, { "from": "human", "value": "#\n# Cookbook:: apache2\n# Recipe:: mod_ssl\n#\n# Copyright:: 2008-2017, Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not ...
ruby
chosen
[ { "from": "system", "value": "Add missing route to api payments capture\n" }, { "from": "human", "value": "Spree::Core::Engine.routes.prepend do\n namespace :admin do\n resources :users do\n member do\n put :generate_api_key\n put :clear_api_key\n end\n end\n end\...
ruby
chosen
[ { "from": "human", "value": "Add cask for Open Office.\n" }, { "from": "gpt", "value": "class OpenOffice < Cask\n url 'http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_MacOS_x86_install_en-US.dmg/download'\n homepage 'http://www.openoff...
ruby
chosen
[ { "from": "system", "value": "Include the gemspec in the gem itself for bundling purposes.\n" }, { "from": "human", "value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'dalli/version'\n\nGem::Specification.new do |s|\n s.name = %q{dalli}\n s.v...
ruby
chosen
[ { "from": "system", "value": "Create tmp directory and its subdirectories\n\nAs the cakephp demands\n" }, { "from": "human", "value": "#\n# Cookbook Name:: fateca\n# Recipe:: default\n#\n# Copyright 2014, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\napplication \"fateca\...
ruby
chosen
[ { "from": "system", "value": "Add marvel_id field when saving\n" }, { "from": "human", "value": "class Heroe < ApplicationRecord\n validates :marvel_id, uniqueness: true\n\n def self.save_hero_data\n response_count = nil\n until response_count == 0\n character_data = marvel_api_call...
ruby
chosen
[ { "from": "system", "value": "Remove Rakefile from files to include\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/jssignals/rails/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"jssignals-rails\"\n s.version = Jssi...
ruby
chosen
[ { "from": "system", "value": "Enable running spec/core in CI set.\n" }, { "from": "human", "value": "class MSpecScript\n # An ordered list of the directories containing specs to run\n # as the CI process.\n set :ci_files, [\n 'spec/frozen/1.8/core',\n 'spec/frozen/1.8/language',\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update path to shell completions\n\nCloses #21050.\n\nSigned-off-by: Issy Long <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@issyl0.co.uk>\n" }, { "from": "human", "value": "class AwsVault < Formula\n desc \"Securely store and access AWS credentials in development envi...
ruby
chosen
[ { "from": "system", "value": "Update the hashes for Amethyst 0.9.5 again\n\nThe bundled app name was incorrect, so linking was not working correctly. Can\nconfirm that it installs correctly now.\n" }, { "from": "human", "value": "cask :v1 => 'amethyst' do\n version '0.9.5'\n sha256 '7f346ab0f2...
ruby
chosen
[ { "from": "system", "value": "Fix Dropzone app name in the zip file. It changed from 'Dropzone' to 'Dropzone 3'.\n" }, { "from": "human", "value": "class Dropzone < Cask\n version 'latest'\n sha256 :no_check\n\n url 'https://aptonic.com/dropzone3/latest'\n appcast 'https://aptonic.com/dropzo...
ruby
chosen
[ { "from": "system", "value": "Fix the download url of Smartgit\n" }, { "from": "human", "value": "cask :v1 => 'smartgit' do\n version '6.5.2'\n sha256 '3fc0fd89e1e2b7e5aec5f12b8da2ae1da1d2a84d96ce335a62d922db1640b965'\n\n url \"http://www.syntevo.com/download/smartgit/smartgit-macosx-#{versio...
ruby
chosen
[ { "from": "system", "value": "Update pod version -> 2.1.2\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.1.1\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ...
ruby
chosen
[ { "from": "system", "value": "Enhance Helpers with database-related methods.\n" }, { "from": "human", "value": "module Alf\n module Rest\n module Helpers\n include Payload::Server\n\n def alf_config\n env[Rest::RACK_CONFIG_KEY]\n end\n\n def alf_agent\n @alf...
ruby
chosen
[ { "from": "system", "value": "[CLI::List] Raise when incompatible options are passed\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Bundler\n class CLI::List\n def initialize(options)\n @options = options\n end\n\n def run\n specs = Bundler.load.sp...
ruby
chosen
[ { "from": "system", "value": "Use the AWS_DEFAULT_REGION env variable " }, { "from": "human", "value": "require 'aws-sdk'\nrequire 'uri'\n\nclass CSV2Avro\n class Storage\n attr_reader :uri\n\n def initialize(uri)\n @uri = URI(uri)\n end\n\n def read\n case uri.scheme\n ...
ruby
chosen
[ { "from": "human", "value": "Add edit Action to UpsellPagesController\n\nUpdate the UpsellPagesController to include an edit action.\n" }, { "from": "gpt", "value": "class UpsellPagesController < ApplicationController\n before_filter :authenticate_user!\n before_filter :get_club_and_upsell_pag...
ruby
chosen
[ { "from": "system", "value": "Fix a bug of GOD script.\n" }, { "from": "human", "value": "# -*- ruby -*-\n\nDIR = File.join(File.dirname(__FILE__), \"..\")\n\n# Watch `pione-webclient` command.\n#\n# @param env_name [Symbol]\n# running environment name, e.g. `:production`, `:development`.\ndef...
ruby
chosen
[ { "from": "system", "value": "Use count instead of reject!..size\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule RuboCop\n module Cop\n module Metrics\n # This cop checks if the length a method exceeds some maximum value.\n # Comment lines can optionally be ignored.\...
ruby
chosen
[ { "from": "system", "value": "Update comments to match new syntax already implemented.\n" }, { "from": "human", "value": "Synvert::Rewriter.new 'ruby', 'new_safe_navigation_operator' do\n description <<-EOF\nUse ruby new safe navigation operator.\n\n u && u.profile && u.profile.thumbnails &&...
ruby
chosen
[ { "from": "human", "value": "Add basic tests for Passenger Standalone\n" }, { "from": "gpt", "value": "source_root = File.expand_path(\"../..\", File.dirname(__FILE__))\n$LOAD_PATH.unshift(\"#{source_root}/lib\")\nrequire 'phusion_passenger'\nPhusionPassenger.locate_directories\n\nENV['PATH'] = ...
ruby
chosen
[ { "from": "system", "value": "Fix ModifierOrFileCreator to require 'file_modifier'\n\nscript/base/modifier_or_file_creator.rb\n- Fix to require 'file_modifier'.\n" }, { "from": "human", "value": "#! /bin/env ruby\n\nrequire File.dirname(__FILE__) + '/stream_editor'\nrequire File.dirname(__FILE__...
ruby
chosen
[ { "from": "system", "value": "Correct specs for active_if (use arrays)" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe ApplicationHelper do\n\n describe \"active_if\" do\n it \"when controller matches\" do\n params[:contr...
ruby
chosen
[ { "from": "system", "value": "Add a test for incorrect key.\n" }, { "from": "human", "value": "require_relative '../lib/encrypt'\nrequire 'minitest/autorun'\nrequire 'minitest/pride'\n\nusing Encrypt\n\ndescribe Encrypt do\n before do\n @encrypted = 'sekret'.encrypt('passw0rd')\n end\n\n i...
ruby
chosen
[ { "from": "system", "value": "Change offsets of cron jobs and log output\n\ncloses #456\n" }, { "from": "human", "value": "# All scheduled tasks need to run with a advisory_lock\n# To prevent two processes running them concurrently\n# User.with_advisory_lock('name', 0) { block }\n\nevery 5.minut...
ruby
chosen
[ { "from": "system", "value": "Update email address in .podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"BRJPopoverPicker\"\n s.version = \"0.1.0\"\n s.summary = \"BRJPopoverPicker presents a list inside a popover that allows the user t...
ruby
chosen
[ { "from": "system", "value": "Use official project now that macOS support has been merged\n" }, { "from": "human", "value": "class Openfortivpn < Formula\n desc \"Client for PPP+SSL Fortinet VPN tunnel services.\"\n\n homepage \"https://github.com/fretn/openfortivpn\"\n url \"https://github.c...
ruby
chosen
[ { "from": "system", "value": "Remove manual asset install: done as part of composer install\n" }, { "from": "human", "value": "set :application, \"webplates_symfony\"\nset :repo_url, \"git@github.com:webplates/symfony-standard.git\"\nset :branch, ENV[\"BRANCH\"] || \"master\"\n\n# Symfony settin...
ruby
chosen
[ { "from": "system", "value": "Update Podspec for new release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ns.name = \"CVCalendar\"\ns.version = \"1.2.6\"\ns.summary = \"A custom visual calendar for iOS 8+ written in Swift (2.0).\"\ns.homepage = \"https://github...
ruby
chosen
[ { "from": "system", "value": "Mailplane: Add suppress_move_to_applications postflight and license info\n" }, { "from": "human", "value": "cask :v1 => 'mailplane' do\n version :latest\n sha256 :no_check\n\n url 'http://update.mailplaneapp.com/mailplane_3.php'\n name 'Mailplane'\n homepage 'h...
ruby
chosen
[ { "from": "system", "value": "Use STDERR for an error message printing\n" }, { "from": "human", "value": "require \"thor\"\nrequire \"filerary/version\"\nrequire \"filerary/librarian\"\n\nmodule Filerary\n class Command < Thor\n desc \"version\", \"Show version number\"\n def version\n ...
ruby
chosen
[ { "from": "system", "value": "Use a mobile user-agent string; allows google docs among others\n" }, { "from": "human", "value": "require 'thor'\nrequire 'rest-client'\nrequire File.expand_path File.join(File.dirname(__FILE__), '..', 'html_massage')\n\n\nmodule HtmlMassager\n\n class CLI < Thor\...
ruby
chosen
[ { "from": "system", "value": "Add YARD example for public API method\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule IceNine\n\n # The default class that handles freezing objects\n class Freezer\n\n # Under 1.9 configure const_get and const_defined?\n # to not search ances...
ruby
chosen
[ { "from": "system", "value": "Upgrade Opera Developer.app to v31.0.1857.0\n" }, { "from": "human", "value": "cask :v1 => 'opera-developer' do\n version '30.0.1835.5'\n sha256 'f4a8cd8860ac2836b420b9f0456b50629759465eba91bf472a30d529815ba0fa'\n\n url \"http://get.geo.opera.com/pub/opera-develo...
ruby
chosen
[ { "from": "system", "value": "Replace ||= operator with \"variable = variable || {}\".\n" }, { "from": "human", "value": "require 'minitest/ext/spec'\n\nmodule MiniTest::Context \n\n autoload :VERSION, \"minitest/context/version\"\n\n class << self\n \n # @private\n attr_reader :list\...
ruby
chosen
[ { "from": "human", "value": "Add manual run integration test\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass ManualRunTest< ActionDispatch::IntegrationTest\n def test_running_commits_manually\n @repo = create(:repo)\n\n ManualRunner.any_instance.expects(:run_last).with(100...
ruby
chosen
[ { "from": "system", "value": "Add tests for response in CommandMatcherPlace build_with_match()\n\nNow tests that knows how to build a response with 'x', 'y' and all\nfour cardinal orientations.\n" }, { "from": "human", "value": "require './lib/toy_robot_simulator/command/matcher/place'\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Raise error when Bootstrap version is not configured\n" }, { "from": "human", "value": "module BootstrapNavbar::Helpers\n def self.included(base)\n helper_version = BootstrapNavbar.configuration.bootstrap_version[0]\n base.send :include, const_get(\"Bootstrap...
ruby
chosen
[ { "from": "system", "value": "Allow nil on numericality check fields\n" }, { "from": "human", "value": "class Meal < ActiveRecord::Base\n attr_accessible :date, :calories, :carbohydrates, :fat, :protein, :description\n\n validates_presence_of :date, :calories\n validates_numericality_of :calo...
ruby
chosen
[ { "from": "system", "value": "Convert Repo to an Entity object\n\nThis will allow it to:\n * be built up over time as we pull API data\n * be equal with other Repo objects that are more or less filled out\n\nThis means that Portfolio, a value object, breaks the rule by referencing a mutable\nobject, but sin...
ruby
chosen
[ { "from": "system", "value": "Include fille_column and bridge in externals. Comment out the :magick hash so the RMagick is an optional dependency.\n\ngit-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@579 561dde7e-7729-0410-be8e-ef83869d6c7d\n" }, { "from": "human", "value": "class User < Acti...
ruby
chosen
[ { "from": "system", "value": "Update Aria2 to 1.8.2; use GCC.\n" }, { "from": "human", "value": "require 'formula'\n\nclass Aria2 <Formula\n @url='http://downloads.sourceforge.net/project/aria2/stable/latest/aria2-1.8.0.tar.bz2'\n @homepage='http://aria2.sourceforge.net/'\n @md5='13944c95529d...
ruby
chosen
[ { "from": "system", "value": "Add require of pathname to Rugged::Diff::Delta\n" }, { "from": "human", "value": "module Rugged\n class Diff\n class Delta\n def repo\n diff.tree.repo\n end\n\n def new_file_full_path\n repo_path = Pathname.new(repo.path).parent\n ...
ruby
chosen
[ { "from": "system", "value": "Add a rake task to record the content coverage metrics\n" }, { "from": "human", "value": "namespace :metrics do\n namespace :taxonomy do\n desc \"Count all content tagged to each level in the taxonomy\"\n task count_content_per_level: :environment do\n m...
ruby
chosen
[ { "from": "system", "value": "Add before filter that raises an exception if user is unauthenticated.\n" }, { "from": "human", "value": "module TokenAuth\n module Authenticator\n extend ActiveSupport::Concern\n\n included do\n private :authenticate_entity_by_token!\n end\n\n def...
ruby
chosen
[ { "from": "system", "value": "Add missing curl braces encapsulation with only_if option.\n" }, { "from": "human", "value": "# Cookbook Name:: right_api_client\n# Recipe:: test\n#\n# Copyright 2013, Chris Fordham\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n...
ruby
chosen
[ { "from": "system", "value": "Stop the extra full stop appearing in emails:\n\n http://craig-01.vm.xeriom.net/~craig/screenies/annoying-full-stop-20110915-115319.jpg\n" }, { "from": "human", "value": "class Action\n include Mongoid::Document\n \n CREATED, REVIEW_REQUESTED, PUBLISHED, NEW_VER...
ruby
chosen
[ { "from": "system", "value": "Correct return address for twitter invite\n" }, { "from": "human", "value": "class Mailer < ActionMailer::Base\n include ActionController::UrlWriter\n default_url_options[:host] = \"localpolitics.in\"\n\n def twitter_invite(congress_person, args = {})\n recipi...
ruby
chosen
[ { "from": "system", "value": "Switch to using rake to determine gemspec files - git ls-files not well-supported on windows." }, { "from": "human", "value": "require File.expand_path('lib/rhubarb/version', File.dirname(__FILE__))\n\nGem::Specification.new do |s|\n s.name = %q{rhubarb}\n s.versi...
ruby
chosen
[ { "from": "human", "value": "Add model Message for Admin\n" }, { "from": "gpt", "value": "ActiveAdmin.register Message do\n\n# See permitted parameters documentation:\n# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters\n#\n# per...
ruby
chosen
[ { "from": "human", "value": "Add spec for sessions controller\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe SessionsController do\n before(:each) do\n @request.env[\"devise.mapping\"] = Devise.mappings[:user]\n end\n\n it \"Signs in a user\" do\n User.make!(email: '...
ruby
chosen
[ { "from": "system", "value": "Switch to using URL helper rather than hardcoded path\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Admin panel, authorization\" do\n before do\n create_page!(:root)\n end\n\n def assert_denied_access\n visit \"/context/admin\"\n ...
ruby
chosen
[ { "from": "system", "value": "Include .java files in the gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"project/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"bluepotion\"\n spec.authors ...
ruby
chosen
[ { "from": "system", "value": "Fix test failure due to test interference\n\nThe test interference is due to some users existing in the test database\nwhich were created by previous tests. The existence of users in the\ndatabase allows the 'mock' authentication strategy to succeed (which\nlogs in the first us...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.4.1 to 0.0.4.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.0.4.1'\n s.summary = 'HTTP Client for EventStore'\n s.descripti...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.3.3 to 0.3.4\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.3.3'\n s.summary = 'HTTP Client for EventStore'\n s.description = '...
ruby
chosen
[ { "from": "human", "value": "Add Kensington TrackballWorks for Mac 1.1.2\n" }, { "from": "gpt", "value": "class KensingtonTrackballWorks < Cask\n version '1.1.2'\n sha256 '02e3fed2fe01c234206d3fcf2c85f71f10aa2a3bc3d3dd6f4694ac41b725e3df'\n\n url 'http://accoblobstorageus.blob.core.windows.net...
ruby
chosen
[ { "from": "system", "value": "Fix the etcd command to include the binary name in etcd_service_manage_docker\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "module EtcdCookbook\n class EtcdServiceManagerDocker < EtcdServiceBase\n ...
ruby
chosen
[ { "from": "system", "value": "Simplify executable line in gemspec\n\n\ngit-svn-id: f394a798e8d9c38072dcc4d4f52f30e4f7567160@59 f14820b4-53c2-4c7b-be4b-41e81b371297\n" }, { "from": "human", "value": "def add_common(spec)\n spec.version = \"2.0.0\"\n spec.authors = [\"John Leach\",\"Neil Wilson\...
ruby
chosen
[ { "from": "system", "value": "Move Coveralls.io code to very top of test spec\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] ||= \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\n# For Code Coverage at coveralls.io\nrequire 'coveralls'\...
ruby
chosen
[ { "from": "system", "value": "Change gemspec info and add dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"admin_view/version\"\n\nGem::Specification.new do |s|\n s.name = \"admin_view\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Linuxbrew: keg_only :provided_by_osx only on Mac\"\n\nThis reverts commit 0b330bf2d8abcd0b914d60a81d20883e1d710d5c.\n" }, { "from": "human", "value": "# Used to track formulae that cannot be installed at the same time\nFormulaConflict = Struct.new(:name, :r...
ruby
chosen
[ { "from": "system", "value": "Update dependencies and bump version\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'powerdns_db_cli'\n s.version = '0.0.5'\n s.authors = ['henning mueller']\n s.email = ['mail@nning.io']\n\n s.summary ...
ruby
chosen
[ { "from": "system", "value": "Change to lock ruby version\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/which/version'\n\nGem::Specification.new do |spec|\n spec.name = \"tty-which\"\...
ruby
chosen
[ { "from": "system", "value": "Remove runtime dependency on rack\n\nThis gem provides rack middleware but doesn't actually rely on the\nrack gem itself.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_P...
ruby
chosen
[ { "from": "system", "value": "Prepare for 0.4.1 release with Xcode 7b5 support\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Toucan'\n s.version = '0.4.0'\n s.license = 'MIT'\n s.summary = 'Fabulous Image Processing in Swift'\n s.homepage = 'https://github.com/gavinbun...
ruby
chosen
[ { "from": "system", "value": "Install software deps before installing Jenkins\n" }, { "from": "human", "value": "node.default['jenkins']['master']['install_method'] = 'war'\nnode.default['jenkins']['master']['source'] = node['rsc_jenkins']['war_url']\nnode.default['jenkins']['master']['checksum'...
ruby
chosen
[ { "from": "system", "value": "Remove one more unused methods\n" }, { "from": "human", "value": "module Travis\n module Worker\n module Workers\n # Main worker dispatcher class that get's instantiated by Resque. Once we get rid of\n # Resque this class can take over the responsibili...
ruby
chosen
[ { "from": "system", "value": "Use P() instead of Registry.resolve\n" }, { "from": "human", "value": "class YARD::Handlers::MethodHandler < YARD::Handlers::Base\n handles TkDEF\n \n def process\n nobj = namespace\n mscope = scope\n meth = statement.tokens.to_s[/^def\\s+([\\s\\w\\:\\...
ruby
chosen
[ { "from": "system", "value": "Add index to make statistic compilation scalable\n\nThe statistic compilation for the resources did not scale. There was too\nmuch data for sort() in MongoDB. Hence, I have added the appropriate\nindex.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@g...
ruby
chosen
[ { "from": "system", "value": "Handle moderator site update failure\n\nLooks like someone revoked an access_token and it’s throwing\nexceptions, causing the task to never finish all the users.\n" }, { "from": "human", "value": "every 3.minutes do\n runner 'SmokeDetector.check_smokey_status'\nend...
ruby
chosen
[ { "from": "system", "value": "Add crons to check env\n" }, { "from": "human", "value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n# Example:\n#\n# set :outpu...
ruby
chosen
[ { "from": "system", "value": "Update user finding (by username) in admin teams members controller\n" }, { "from": "human", "value": "class Admin::Teams::MembersController < Admin::Teams::ApplicationController\n def new\n @users = User.potential_team_members(user_team)\n @users = UserDecor...
ruby
chosen
[ { "from": "system", "value": "Convert the duplication params to hash\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Course::DuplicationsController < Course::ComponentController\n before_action :authorize_duplication\n\n def show; end\n\n def create\n # When selecta...
ruby
chosen
[ { "from": "system", "value": "Fix warnings in the gemspec.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'snp/version'\n\nGem::Specification.new do |s|\n s.name = 'snp'\n s.version = Snp::VERSION\n s.platform = Gem::Platform::RUBY\n ...
ruby
chosen
[ { "from": "human", "value": "Add Helper Methods For Oauth Authentication\n" }, { "from": "gpt", "value": "SCOPES = [\n 'https://www.googleapis.com/auth/userinfo.email'\n].join(' ')\n\nraise RuntimeError, \"You must set CLIENT_ID and CLIENT_SECRET in your server environment.\" unless ENV['CLIE...
ruby
chosen
[ { "from": "system", "value": "Add `disabled?`` helper method on User for gds-sso linter\n" }, { "from": "human", "value": "class User < Sequel::Model\n include GDS::SSO::User\n\n plugin :serialization\n\n serialize_attributes :yaml, :permissions\n\n module Permissions\n SIGNIN = 'signin'\...
ruby
chosen
[ { "from": "system", "value": "Set up MemCacheStore in a test suite with TTL from docs\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule CacheConnection\n extend self\n\n # This patches AR::MemcacheStore to notify AS::Notifications upon read_multis like the rest of rails ...
ruby
chosen
[ { "from": "system", "value": "Add failing test for association bug\n" }, { "from": "human", "value": "require 'helper'\n\nclass TestRailsRelationFix< Test::Unit::TestCase\n context \"RailsRelationFix tests\" do\n setup do\n @user = User.create(:name => \"John Rambo\") \n @titanic =...
ruby
chosen
[ { "from": "system", "value": "Add clearer incorrect password language\n" }, { "from": "human", "value": "require 'rails_helper'\n\nfeature 'Signing in' do\n background do\n @user = create(:user)\n end\n\n scenario 'Signing in with correct credentials' do\n visit '/login'\n within('#n...
ruby
chosen
[ { "from": "system", "value": "Remove test for 'ldap' provider special case\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Gitlab::LDAP::Config do\n let(:config) { Gitlab::LDAP::Config.new provider }\n let(:provider) { 'ldapmain' }\n\n describe '#initalize' do\n it 're...
ruby
chosen
[ { "from": "system", "value": "Add deprecation notice for 32-bit and GCC.\n" }, { "from": "human", "value": "module Rubinius\n DEPRECATIONS = {\n # \"Description\" => \"Alternative\"\n \"Ruby 2.1 features that are incompatible with Ruby 2.2 are deprecated.\" =>\n \"Use Ruby 2.2 featur...
ruby
chosen
[ { "from": "system", "value": "Fix redirect route and change uid to user info\n" }, { "from": "human", "value": "class Auth0Controller < ApplicationController\n<<<<<<< HEAD\n<<<<<<< HEAD\n=======\n>>>>>>> Add the shell for the code that will hand the success and failure of the callback\ndef callb...
ruby
chosen
[ { "from": "human", "value": "Add methods to create and delete posts\n" }, { "from": "gpt", "value": "class ItemsController < ApplicationController\n\n def create_post\n @item = item.new\n @item.name = new_params[:name]\n @item.user_id = current_user.id\n @item.price = new_params[:pr...
ruby
chosen
[ { "from": "system", "value": "Add the method to determine the user state.\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def index\n end\n\n def show\n end\nend\n" }, { "from": "gpt", "value": "class UsersController < ApplicationController\n d...
ruby
chosen
[ { "from": "system", "value": "Use model_name to create content association\n" }, { "from": "human", "value": "module Translatable\n extend ActiveSupport::Concern\n\n included do\n validates :primary_language, format: {with: /\\A[a-z]{2}(\\z|-[A-z]{2})/}\n has_many content_association\n ...
ruby
chosen
[ { "from": "human", "value": "Add To Dict creates/adds to PersistentDictionary\n\nWhen run and given a source and dictionary, add-to-dict will open the\ndictionary(if it already exists) and add the source files words.\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby -i\nrequire_relative 'mark...
ruby
chosen
[ { "from": "system", "value": "Debug - Fix spelling mistake\n" }, { "from": "human", "value": "require 'rapgenius'\n\nclass Lyric\n include Cinch::Plugin\n\n match /(lyric) (.+)/, prefix: /^(\\.)/\n match /(help lyric)$/, method: :help, prefix: /^(\\.)/\n\n def execute(m, command, lyric, keyw...
ruby
chosen
[ { "from": "system", "value": "Add a refactoring todo and change .flatten to a flatmap\n" }, { "from": "human", "value": "class Snmpjr\n class Getter\n\n def initialize args = {}\n @target = args.fetch(:target)\n @max_oids_per_request = args.fetch(:config).max_oids_per_request\n ...
ruby
chosen
[ { "from": "human", "value": "Create Wheelie::Names, which offers all kinds of name generation from a model\n" }, { "from": "gpt", "value": "module Wheelie\n class Names\n\n attr_accessor :model\n\n def initialize(model)\n self.model = model\n end\n\n def symbol\n \":#{vari...
ruby
chosen
[ { "from": "system", "value": "Fix running timer worker to broadcast to action cable\n" }, { "from": "human", "value": "# encoding: utf-8\n# frozen_string_literal: true\n\nclass RunningTimerWorker\n include Sidekiq::Worker\n sidekiq_options queue: (ENV['TIMER_QUEUE'] || 'reckoning-timer').to_sy...
ruby
chosen
[ { "from": "human", "value": "Call the List instruction using `YubiOATH::List`\n" }, { "from": "gpt", "value": "require 'bindata'\n\nmodule YubiOATH\n class List\n def self.send(to:)\n to.transmit(Request.new.to_binary_s)\n end\n\n class Request < BinData::Record\n uint8 :cla,...
ruby
chosen
[ { "from": "system", "value": "Disable gem log runner unless production\n" }, { "from": "human", "value": "module NapaReserve\n class Initializer\n def self.run\n Napa::Logger.logger.info NapaReserve::GemDependency.log_all\n end\n end\nend\n" }, { "from": "gpt", "value": ...
ruby
chosen
[ { "from": "system", "value": "Fix the SG::Mailer bad constants refs\n" }, { "from": "human", "value": "module SGMailer\n class Job < ActiveJob::Base\n def perform(mail)\n SG.send(mail)\n end\n end\nend\n" }, { "from": "gpt", "value": "module SGMailer\n class Job < Activ...
ruby
chosen