conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Allow GW_ prefixed env variables to override the sudo env.\n" }, { "from": "human", "value": "module GitWit\n module Commands\n module Util\n def exec_with_sudo!(user = app_user)\n return if running_as?(user)\n Dir.chdir rails_root\n EN...
ruby
chosen
[ { "from": "system", "value": "Fix prover creation not setting display_name in time.\n" }, { "from": "human", "value": "module Hets\n module Provers\n class Importer\n ALLOWED_KEYS = %w(name display_name)\n attr_accessor :ontology_version, :io\n\n # io needs to be an instance o...
ruby
chosen
[ { "from": "system", "value": "Fix hutch broker handler errors\n" }, { "from": "human", "value": "require 'bunny'\n\nmodule Hutch\n module BrokerHandlers\n def with_authentication_error_handler\n yield\n rescue Net::HTTPServerException => ex\n logger.error \"HTTP API connection e...
ruby
chosen
[ { "from": "system", "value": "Make sure have ascending order first\n" }, { "from": "human", "value": "require 'set'\nrequire 'active_support/all'\n\nclass PasswordAndOrdinals\n def initialize password, character_ordinals\n raise(ArgumentError, \"#{character_ordinals.uniq.to_sentence} duplica...
ruby
chosen
[ { "from": "system", "value": "Whitelist If-None-Match and If-Modified-Since headers\n" }, { "from": "human", "value": "module Pliny::Middleware\n class CORS\n\n ALLOW_METHODS =\n %w( GET POST PUT PATCH DELETE OPTIONS ).freeze\n ALLOW_HEADERS =\n %w( Content-Type Accept AUTHORI...
ruby
chosen
[ { "from": "system", "value": "Revert \"Move readonly load to katla\"\n\nThis reverts commit e91916da605496b0e5a8dad4aad70cee959dc3dd.\n" }, { "from": "human", "value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n ...
ruby
chosen
[ { "from": "system", "value": "Include signature_lookup_path parameter on user path\n" }, { "from": "human", "value": "module TokyoApi\n class Krautbuster < Base\n def base_path\n 'krautbuster'\n end\n\n def full_user(session_id)\n client.get_request(\"#{normalized_base_path}f...
ruby
chosen
[ { "from": "system", "value": "Update filesystem and version mapping\n" }, { "from": "human", "value": "class Versions\n module FileHelpers\n protected\n\n # Internal: Gets the path to the library's versions\n #\n # Return a directory path\n def library_path\n @path ||= Versi...
ruby
chosen
[ { "from": "system", "value": "Create wrappers for all necessary tasks" }, { "from": "human", "value": "def rvm_path\n path = fetch(:rvm_custom_path)\n path ||= if fetch(:rvm_type) == \"system\"\n \"/usr/local/rvm\"\n else\n \"~/.rvm\"\n end\n\n path\nend\n\nmap_bins = fetch(:rvm_bins)...
ruby
chosen
[ { "from": "system", "value": "Extend `AnalysisError` to permit line/col numbers\n" }, { "from": "human", "value": "module GraphQL\n class AnalysisError < GraphQL::ExecutionError\n end\nend\n" }, { "from": "gpt", "value": "module GraphQL\n class AnalysisError < GraphQL::ExecutionEr...
ruby
chosen
[ { "from": "system", "value": "Test for rails the right way\n" }, { "from": "human", "value": "require 'http_accept_language'\nrequire 'rails/locale_detection'\n\nbegin\n ActionController::Base.include Rails::LocaleDetection \nrescue NameError\n \nend" }, { "from": "gpt", "value": "...
ruby
chosen
[ { "from": "system", "value": "Clarify that API token is being requested\n" }, { "from": "human", "value": "module TypeKitCli\n class AuthToken < Thor\n CACHE_FILE = \"#{Dir.home}/.typekit\"\n no_commands{\n def get_token\n auth_token = nil\n if File.exist?(CACHE_FILE)\n...
ruby
chosen
[ { "from": "system", "value": "Use new hash syntax in presence validation test\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule Allowing\n module Validations\n class PresenceValidationTest < Minitest::Test\n def setup\n @rule = true\n @validation = P...
ruby
chosen
[ { "from": "system", "value": "Remove provider line so this can work on Ubuntu 16.04\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook Name:: npm_lazy\n# Recipe:: server\n#\n# Copyright 2015, Tim Smith - tsmith84@gmail....
ruby
chosen
[ { "from": "system", "value": "Add Asset to list of booking reference types\n" }, { "from": "human", "value": "module BookingHelper\n def reference_types_as_collection\n types = [CreditInvoice, DebitInvoice]\n types.inject({}) do |result, type|\n result[t_model(type)] = type.base_clas...
ruby
chosen
[ { "from": "system", "value": "Update to the latest dynflow master\n" }, { "from": "human", "value": "module ForemanTasks\n class World < Dynflow::World\n def initialize\n db_config = ActiveRecord::Base.configurations[Rails.env]\n db_config['adapter'] = 'postgres' if db_c...
ruby
chosen
[ { "from": "system", "value": "Break header adding into it's own method\n\nSigned-off-by: Sam Phippen <e5a09176608998a68778e11d5021c871e8fae93c@googlemail.com>\n" }, { "from": "human", "value": "module Http\n class RequestStream\n def initialize(socket, body, headers, headerstart)\n @soc...
ruby
chosen
[ { "from": "system", "value": "Update require paths for handlers\n" }, { "from": "human", "value": "require 'json'\nrequire_relative 'credentials'\nrequire_relative 'web_socket'\nrequire_relative 'messagehandler.rb'\n\n# Communicates with MeshBlu via websocket connection.\nclass Messenger\n clas...
ruby
chosen
[ { "from": "system", "value": "Change to module from class(Syoboemon::Connector)\n" }, { "from": "human", "value": "module Syoboemon\n\tclass Connector\n\t\tURL\t\t\t= \"http://cal.syoboi.jp\"\n\t\tRSS2_PATH\t= \"/rss2.php\"\n\t\tDB_PATH\t\t= \"/db.php\"\n\t\tJSON_PATH\t= \"/json.php\"\n\n\t\tdef...
ruby
chosen
[ { "from": "system", "value": "Reformat browser matching array to constant\n\nAs well as making precedence more obvious and to create better diffs for\nadditions or reordering, the array of browsers was moved to a frozen\nconstant to reduce object allocations.\n" }, { "from": "human", "value": "r...
ruby
chosen
[ { "from": "system", "value": "Add some more db indexes to assist with query performance\n\nFixes #4338\n" }, { "from": "human", "value": "class AddMoreIndexes < ActiveRecord::Migration\n def change\n add_index :spree_payment_methods, [:id, :type]\n add_index :spree_calculators, [:id, :typ...
ruby
chosen
[ { "from": "human", "value": "Support pg 10 for Rails 4.2\n\n- https://github.com/rails/rails/issues/28780#issuecomment-354868174" }, { "from": "gpt", "value": "require 'active_record/connection_adapters/postgresql/schema_statements'\n\n#\n# Monkey-patch the refused Rails 4.2 patch at https://git...
ruby
chosen
[ { "from": "system", "value": "Allow \".yaml\" and \".yml\" filename endings for yaml\n" }, { "from": "human", "value": "require 'json'\nrequire 'yaml'\n\nmodule Rswag\n module Api\n class Middleware \n\n def initialize(app, config)\n @app = app\n @config = config\n en...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 1.3.0 to ~> 1.4.2\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/rub...
ruby
chosen
[ { "from": "system", "value": "Remove crufty column and index\n\nMSP-11926\n" }, { "from": "human", "value": "class CreateAutomaticExploitationMatches < ActiveRecord::Migration\n def change\n create_table :automatic_exploitation_matches do |t|\n t.integer :vuln_id\n t.integer :ref_i...
ruby
chosen
[ { "from": "system", "value": "Use the relative path for loading puppet_x\n\nThis is to accommodate Puppetserver that doesn't currently assist in\ndependency resolution.\n" }, { "from": "human", "value": "require 'puppet_x/unbound/validate_addrs'\n\nPuppet::Parser::Functions.newfunction(:validate...
ruby
chosen
[ { "from": "system", "value": "Create aliases for some Spy methods\n" }, { "from": "human", "value": "module TestUtils\n class Spy\n attr_accessor :return_value\n\n def initialize(return_value = nil)\n @state = {\n called: false,\n count: 0,\n with_args: []\n ...
ruby
chosen
[ { "from": "human", "value": "Add quality control rake tasks\n" }, { "from": "gpt", "value": "namespace :qc do\n desc \"Remove duplicate readings for a given user\"\n task dedupe: :environment do\n user = User.find_by email: ENV['EMAIL']\n throw 'no user with that email found' if !user\n ...
ruby
chosen
[ { "from": "system", "value": "Set default adapter to stdout adapter\n" }, { "from": "human", "value": "module Unisms\n\tclass Sms\n\t\t@default_adapter = nil\n\t\tclass << self\n\t\t\tattr_accessor :default_adapter\n\t\tend\n\n\t\tattr_accessor :adapter\n\n\t\tdef initialize(adapter = nil)\n\t\t...
ruby
chosen
[ { "from": "system", "value": "Add setters for data fields.\n" }, { "from": "human", "value": "module Zohax\n\n class Lead\n attr_accessor :data\n\n def initialize(data)\n @data = data\n end\n\n def lead_id\n @data[\"LEADID\"]\n end\n\n def lead_owner\n @data[\"L...
ruby
chosen
[ { "from": "human", "value": "Add test cases for german phone numbers\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\n# => author: lawitschka\n# => email: moritz.lawitschka@urbanvention.com\nrequire 'helper'\n\nclass TestPhoneNumberDE < Test::Unit::TestCase\n def setup\n @tester = Faker...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary calls to .present?\n" }, { "from": "human", "value": "module ::Refinery\n module Admin\n module DashboardHelper\n\n def activity_message_for(record)\n if (plugin = ::Refinery::Plugins.active.find_by_model(record.class)).present? &&...
ruby
chosen
[ { "from": "system", "value": "Add more settings in the generator\n" }, { "from": "human", "value": "require 'rails/generators/base'\n\nmodule Rack\n module DevMark\n class InstallGenerator < ::Rails::Generators::Base\n namespace 'rack:dev-mark:install'\n\n desc \"Install rack-dev-m...
ruby
chosen
[ { "from": "system", "value": "Add initial helper functions for gcdm\n" }, { "from": "human", "value": "require 'sparkle_formation'\n\nclass SparkleFormation\n module SparkleAttribute\n\n # Google specific helper implementations\n module Google\n\n\n end\n\n end\nend\n" }, { "f...
ruby
chosen
[ { "from": "human", "value": "Add migration for email normalization\n" }, { "from": "gpt", "value": "class NormalizeUsersEmail < ActiveRecord::Migration\n def up\n User.find_each do |u|\n u.update_column :email, u.send(:normalize_email)\n end\n end\n\n def down\n say \"this migra...
ruby
chosen
[ { "from": "system", "value": "Add is_admin field to users table.\n" }, { "from": "human", "value": "class AddIsAdminToUsers < ActiveRecord::Migration\n def change\n add_column :users, :is_admin, :boolean\n end\nend\n" }, { "from": "gpt", "value": "class AddIsAdminToUsers < Activ...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.16.0.1 to 0.16.0.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.16.0.1'\n s.summary = 'Common primitives for platform-specific messaging im...
ruby
chosen
[ { "from": "system", "value": "Add spec to confirm each app can have their own configuration\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe 'Multiple apps at once', :cannon_app do\n before(:each) do\n cannon_app.get('/info') do |request, response|\n response.s...
ruby
chosen
[ { "from": "system", "value": "Remove pending test for Sermons helper\n" }, { "from": "human", "value": "require 'rails_helper'\n\n# Specs in this file have access to a helper object that includes\n# the SermonsHelper. For example:\n#\n# describe SermonsHelper do\n# describe \"string concat\" d...
ruby
chosen
[ { "from": "system", "value": "Check times are translated to UTC\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe \"PagerDutyRestClient\" do\n it \"fails\" do\n fail \"hey buddy, you should probably rename this file and start spe...
ruby
chosen
[ { "from": "system", "value": "Add credit to pair partner\n" }, { "from": "human", "value": "# Factorial\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\ndef factorial(number)\n # Your code goes here\n result = 1\n counter = number\n while counter > 0\n \tresu...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec to include rake\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/metaipsum/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Kristian Freeman\"]\n gem.email = [\"kristi...
ruby
chosen
[ { "from": "system", "value": "Reset the destination_root for generator based on app_path\n" }, { "from": "human", "value": "require 'thor/group'\n\nmodule Bosh::Gen\n module Generators\n class NewReleaseGenerator < Thor::Group\n include Thor::Actions\n\n argument :name\n \n ...
ruby
chosen
[ { "from": "system", "value": "Change deployment target to lower\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"Vike\"\n s.version = \"0.1\"\n s.summary = \"A library that gives you single sign to most popular analytics, like Flurry, Mixpanel, GoogleAn...
ruby
chosen
[ { "from": "system", "value": "Add Will as an author\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sippy_cup/version\"\n\nGem::Specification.new do |s|\n s.name = \"sippy_cup\"\n s.version = SippyCup::VERSION\n...
ruby
chosen
[ { "from": "system", "value": "Set minimal ruby version to 2.3\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'transproc/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Switch to next dev cycle 1.4.5-dev\n" }, { "from": "human", "value": "# Apache 2.0 License\n#\n# Copyright (c) 2016 Sebastian Katzer, appPlant GmbH\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated ...
ruby
chosen
[ { "from": "system", "value": "Add capture groups for GH command\n" }, { "from": "human", "value": "module Lita\n module Handlers\n class Reviewme < Handler\n REDIS_LIST = \"reviewers\"\n\n route(/add (.+) to reviews/i, :add_reviewer, command: true, help: { \"add @iamvery to reviews...
ruby
chosen
[ { "from": "system", "value": "Return false when validation fails\n" }, { "from": "human", "value": "module StackMaster\n class Validator\n include Command\n\n def initialize(stack_definition)\n @stack_definition = stack_definition\n end\n\n def perform\n template_body = Te...
ruby
chosen
[ { "from": "system", "value": "Change check for tty presence.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'io/console'\n\nmodule TTY\n class Prompt\n class Reader\n class Mode\n # Initialize a Terminal\n #\n # @api public\n def initialize(i...
ruby
chosen
[ { "from": "system", "value": "Allow skipping of SSL verification with Typhoeus\n" }, { "from": "human", "value": "class Zencoder\n class HTTP < Zencoder\n class Typhoeus\n\n def self.post(url, options={})\n ::Typhoeus::Request.post(url, options)\n end\n\n def self.put(u...
ruby
chosen
[ { "from": "human", "value": "aact-611: Create ctgov schema and make it the first in ctti search path" }, { "from": "gpt", "value": "class CreateCtgovSchema < ActiveRecord::Migration\n\n def up\n execute <<-SQL\n create schema if not exists ctgov;\n alter role ctti set search_path ...
ruby
chosen
[ { "from": "system", "value": "Increase max duration for speed tests (ci is variable)\n" }, { "from": "human", "value": "require_relative 'test_base'\n\nclass BaselineSpeedTest < TestBase\n\n def self.hex_prefix\n '159'\n end\n\n # - - - - - - - - - - - - - - - - - - - - - - - - - -\n # ba...
ruby
chosen
[ { "from": "system", "value": "Allow admin to log in when review period is closed\n" }, { "from": "human", "value": "class LoginsController < ApplicationController\n skip_before_action :ensure_user\n\n def new\n @login = Login.new\n end\n\n def create\n @login = Login.new(login_params)\...
ruby
chosen
[ { "from": "system", "value": "Add some validation of input and map field names to PDF fieldnames\n" }, { "from": "human", "value": "require 'pdf_forms'\n\nmodule Calfresh\n FORM_FIELDS = { name: 'Text1 PG 1', \\\n home_address: 'Text4 PG 1', \\\n home_city: 'Text5 PG 1', \\\n home_stat...
ruby
chosen
[ { "from": "system", "value": "Add create resource for events\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n\n root 'application#index'\n\n namespace :api do\n namespace :v1 do\n resources :causes, only: [:index, :show] do\n resources :events, only: [:index...
ruby
chosen
[ { "from": "system", "value": "Use route to: instead of => syntax\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\n root to: 'application#welcome'\n\n resources :passwords,...
ruby
chosen
[ { "from": "system", "value": "Fix missing ability to support 3d party devise-modules.\n" }, { "from": "human", "value": "Spree::Core::Engine.add_routes do\n devise_for :spree_user,\n class_name: Spree::User,\n skip: [:unlocks, :sessions, :registrations, :passwords],\n ...
ruby
chosen
[ { "from": "system", "value": "Add fantasy league association to fantasy team factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :franchise do\n name \"MyString\"\n end\n sequence :email do |n|\n \"user#{n}@example.com\"\n end\n\n sequence :name do |n|\n \"na...
ruby
chosen
[ { "from": "system", "value": "Update Trailer to version 1.3.4\n\nThis commit updates the version and sha256 stanzas\n" }, { "from": "human", "value": "cask :v1 => 'trailer' do\n version '1.3.3'\n sha256 'eb8213ec3b7cc74a59c4f18a035cc20b6c4a0c494d62002e293f793164589427'\n\n url \"http://ptsoch...
ruby
chosen
[ { "from": "system", "value": "Use consistent port for forwarding check\n" }, { "from": "human", "value": "shared_examples \"provider/network/forwarded_port\" do |provider, options|\n if !options[:box]\n raise ArgumentError,\n \"box option must be specified for provider: #{provider}\"\n ...
ruby
chosen
[ { "from": "human", "value": "Migrate all publisher MHCLG docs to DLUHC\n\nA Zendesk ticket [1] has come in requesting all MHCLG documents be\nmigrated to DLUHC. This only applies to documents created in Publisher\n[2].\n\nThe normal place to do this sort of migration would be from the app\nitself, however a...
ruby
chosen
[ { "from": "system", "value": "Support イラスト:XXX author name role\n" }, { "from": "human", "value": "module Amakanize\n module Filters\n class RoleNameDeletionFilter < BaseFilter\n ROLE_NAMES = %w(\n 原作\n 原案\n 漫画\n )\n\n # @note Override\n # @param stri...
ruby
chosen
[ { "from": "human", "value": "Create folder for hackerrank drills.\n" }, { "from": "gpt", "value": "# You are given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large.\n#\n# Input Format\n# The fi...
ruby
chosen
[ { "from": "system", "value": "Declare support for tvOS 9.0 in the podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"EDSemver\"\n s.version = \"0.3.1\"\n s.summary = \"Semantic versioning for Objective-C.\"\n s.homepage = \"https://github.com/t...
ruby
chosen
[ { "from": "system", "value": "Add inline documentation for ActiveRecord uniqueness validator\n" }, { "from": "human", "value": "module Mobility\n module ActiveRecord\n class UniquenessValidator < ::ActiveRecord::Validations::UniquenessValidator\n def validate_each(record, attribute, val...
ruby
chosen
[ { "from": "system", "value": "Use `git remote --verbose` instead of `git remote get-url` because get-url is too new\n\nTravis's git doesn't have it, so others' git setups likely won't either.\r\n\r\nhttps://github.com/git/git/commit/96f78d39989d1fcf393d7bc42357467dd8cf0f15#diff-388838443870b4d1c62785151773c...
ruby
chosen
[ { "from": "system", "value": "Fix uncovered mutation in Axiom::Types::Type.new\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Axiom::Types::Type, '.new' do\n let(:undefined) { Axiom::Types::Undefined }\n\n context 'with no arguments' do\n subject { object.new }\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add title to Question object\n" }, { "from": "human", "value": "class CreateQuestions < ActiveRecord::Migration\n def change\n create_table :questions do |t|\n t.text :content, null: false\n t.integer :author_id, null: false\n\n t.timestamps\n ...
ruby
chosen
[ { "from": "system", "value": "Handle taxonomy branches with no content in TaxonomySizePresenter\n\nReturn 0 for bar_width_percentage if max_size is 0.\n" }, { "from": "human", "value": "module Taxonomy\n class TaxonomySizePresenter < SimpleDelegator\n MAXIMUM_BAR_WIDTH_PERCENTAGE = 30\n\n ...
ruby
chosen
[ { "from": "system", "value": "Test more than one file.\n" }, { "from": "human", "value": "#! /usr/bin/env ruby\n\nrequire 'rubygems'\nrequire 'json-schema'\n\n# script takes a pattern of input; for example '/home/json/*.json'\njsfiles = Dir.glob(ARGV[0])\nschema = 'csl-data.json'\n\njsfiles.each...
ruby
chosen
[ { "from": "system", "value": "Stop using intellij-idea with jetbrains-toolbox.\n" }, { "from": "human", "value": "require_relative 'base'\n\nname 'blue_medora'\n\nload\n\ndefault['macos_setup']['extra_casks'] = [\n 'firefoxdeveloperedition',\n 'intellij-idea',\n 'jd-gui', # Java decompiler\n ...
ruby
chosen
[ { "from": "system", "value": "Allow free-for-life users to create more than 5 universes" }, { "from": "human", "value": "class UniverseCoreContentAuthorizer < CoreContentAuthorizer\n def self.creatable_by? user\n user.universes.count < (user.active_billing_plans.map(&:universe_limit).max || ...
ruby
chosen
[ { "from": "human", "value": "Add job which moves club applications to spam\n" }, { "from": "gpt", "value": "class HandleSpamClubApplicationsJob < ApplicationJob\n INBOX_STAGE = '5001'.freeze\n REJECTED_STAGE = '5002'.freeze\n\n SPAM_COMMENT_MESSAGE = 'Automatically moving box to rejected and ...
ruby
chosen
[ { "from": "system", "value": "Add graphviz-py argument / variable support\n" }, { "from": "human", "value": "require_relative '../diagram_converter'\nrequire_relative '../util/cli_generator'\nrequire_relative '../util/platform'\n\nmodule Asciidoctor\n module Diagram\n # @private\n class G...
ruby
chosen
[ { "from": "system", "value": "Fix bug with the max size in byter for visualization assets service\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'carto/storage'\nrequire 'carto/assets/assets_service'\nrequire 'singleton'\n\nmodule Carto\n class VisualizationAssetsService < Asse...
ruby
chosen
[ { "from": "system", "value": "Handle unset or unknown variables better\n\n* module, class and node can now all be unset without error\n\n* Any arguments that cannot be resolved are excluded from the resulting\n message.\n" }, { "from": "human", "value": "module Puppet::Parser::Functions\n newf...
ruby
chosen
[ { "from": "system", "value": "Update email table if entry exists\n\nIf the email table in WS already has the exact email assigned to the\nexact person (per their idnumber), then we should be updating that\nrecord instead of creating a duplicate record with one as primary and\none not.\n" }, { "from"...
ruby
chosen
[ { "from": "system", "value": "Use SSL to download docker gpg key.\n\nFixed #4569\n" }, { "from": "human", "value": "module VagrantPlugins\n module DockerProvisioner\n module Cap\n module Debian\n module DockerInstall\n def self.docker_install(machine, version)\n ...
ruby
chosen
[ { "from": "system", "value": "Delete methods so the tests run green.\n\nThe errors raised at methods which were deleted anyway beacuse they\nbelong to the gwt search which is deleted soon.\n" }, { "from": "human", "value": "module Ontology::Searching\n extend ActiveSupport::Concern\n\n include...
ruby
chosen
[ { "from": "system", "value": "Fix issue with no referral\n" }, { "from": "human", "value": "Spree::OrdersController.class_eval do\n after_filter :dibs_capture_referral, only: :edit\n\n private\n def dibs_capture_referral\n if session[:dibs_referral] and session[:dibs_referral] != @curr...
ruby
chosen
[ { "from": "system", "value": "Include table name in the `accessible_by' scope to prevent conflicts\nin joins\n" }, { "from": "human", "value": "module Eaco\n module Adapters\n module ActiveRecord\n\n ##\n # Authorized collection extractor on PostgreSQL >= 9.4 and a +jsonb+\n #...
ruby
chosen
[ { "from": "system", "value": "Add common.js to asset pipeline\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\n# Add a...
ruby
chosen
[ { "from": "system", "value": "Fix Capistrano restart task (wrong base dir)\n\nRefs #640.\n" }, { "from": "human", "value": "lock \"3.4.0\"\n\nset :user, \"hacken\"\nset :application, \"hacken-in\"\nset :repo_url, \"https://github.com/hacken-in/website.git\"\nset :log_level, :info\nset :linked_di...
ruby
chosen
[ { "from": "system", "value": "Change progress updates url path\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n resources :comments\n resources :progress_updates\n resources :projects\n\n\n \n \n devise_for :users\n # For details on the DSL available within this file,...
ruby
chosen
[ { "from": "system", "value": "Set root route to base_images/index\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n scope :as => 'image_management', :module => \"image_management\" do\n resources :base_images\n resources :image_versions\n resources :target_images\n ...
ruby
chosen
[ { "from": "system", "value": "Add description to FIFO cache\n" }, { "from": "human", "value": "require_relative 'base_cache'\n\nmodule Cache\n class FIFOCache < BaseCache\n attr_accessor :size\n attr_accessor :cache\n attr_accessor :queue\n\n def initialize(size)\n super(size)\...
ruby
chosen
[ { "from": "system", "value": "Update homebrew recipe for version 0.2.3\n" }, { "from": "human", "value": "require 'formula'\n\nclass Trousseau < Formula\n homepage 'https://github.com/oleiade/trousseau'\n url 'https://github.com/oleiade/trousseau/archive/0.2.0.tar.gz'\n sha1 ''\n\n depends_o...
ruby
chosen
[ { "from": "system", "value": "Make gemspec work when not in a git repo\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib/', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'kontena/plugin/shell/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Fix Rails 4 default bundling." }, { "from": "human", "value": "module CompassRails\n unless defined?(::CompassRails::VERSION)\n VERSION = \"1.1.5\"\n end\nend\n" }, { "from": "gpt", "value": "module CompassRails\n unless defined?(::CompassRails::VE...
ruby
chosen
[ { "from": "system", "value": "Add social media url to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Overcoat'\n s.version = '1.2'\n s.license = 'MIT'\n s.summary = 'Overcoat is an AFNetworking extension that makes it extremely simple for developers to use...
ruby
chosen
[ { "from": "system", "value": "Document why the podspec is on the root of the repo" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Protobuf'\n s.version = '3.0.0'\n s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'\n s.homepage = 'https://github.com/g...
ruby
chosen
[ { "from": "system", "value": "Remove fixture cookbook dependancy on `fancy_execute`\n\nWe still test this cookbook on Chef 12.0.3 as a few slaves in our CI\ninfra are still running this older version of Chef.\n" }, { "from": "human", "value": "name 'omnibus_build'\n\ndepends 'fancy_execute' # Gi...
ruby
chosen
[ { "from": "system", "value": "Update done_callback from stabby lambda to proc.\n\nThis means it is backwards compatible with older rubies." }, { "from": "human", "value": "require 'eventmachine'\n\nmodule EventMachine\n class Test < Module\n\n class TimeoutError < RuntimeError; end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Allow array of symbols to be passed for GitHub::User.get.\n" }, { "from": "human", "value": "module GitHub\n class User < Base\n attr_accessor :login, :token\n \n def get(login)\n if login == :self\n login = self.login\n end\n return ...
ruby
chosen
[ { "from": "system", "value": "Break line before begin if used in assignment\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule KeepUp\n # Single dependency with its current locked version.\n class Dependency\n def initialize(name:, requirement_list:, locked_version:,...
ruby
chosen
[ { "from": "system", "value": "Use moneta threadsafe memory cache\n" }, { "from": "human", "value": "require 'circuitbox'\n\nmodule Hystrix\n class Circuit\n\n # `sleep_window` - seconds the circuit stays open once it has passed the error threshold\n # `volume_threshold` - number of ...
ruby
chosen
[ { "from": "human", "value": "Update change note for international driving permits page\n" }, { "from": "gpt", "value": "original_change_note = \"UK driving licence holders now need a 1969 IDP to drive in Albania, Armenia, Azerbaijan, Bahamas, Bahrain, Belarus, Bosnia and Herzegovina, Brazil, Cap...
ruby
chosen
[ { "from": "system", "value": "Simplify readability of Minitest condition" }, { "from": "human", "value": "require \"capybara-screenshot\"\n\nmodule Capybara::Screenshot::MiniTestPlugin\n def before_setup\n super\n Capybara::Screenshot.final_session_name = nil\n end\n\n def after_teardow...
ruby
chosen
[ { "from": "human", "value": "Add cask for ReadyTalk, an audio and web conferencing app.\n\nadd version, fix class name\n" }, { "from": "gpt", "value": "class Readytalk < Cask\n url 'https://core.readytalk.com/ql/bins/QuickLauncherInstall.dmg'\n homepage 'https://www.readytalk.com/'\n version ...
ruby
chosen