conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add missing permitted attributes to zones\n" }, { "from": "human", "value": "module Spree\n module Admin\n class ZonesController < ResourceController\n before_filter :load_data, except: [:index]\n\n def new\n @zone.zone_members.build\n end\...
ruby
chosen
[ { "from": "system", "value": "Remove accidental reminant of Forem\n" }, { "from": "human", "value": "module MongoidForums\n module FormattingHelper\n # override with desired markup formatter, e.g. textile or markdown\n def as_formatted_html(text)\n if MongoidForums.formatter\n ...
ruby
chosen
[ { "from": "system", "value": "Remove bundler as a development dependency\n" }, { "from": "human", "value": "require File.expand_path(\"../.gemspec\", __FILE__)\nrequire File.expand_path(\"../lib/buffered_logger/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"buffer...
ruby
chosen
[ { "from": "system", "value": "Add a Councillor's Vote In Their Details Page\n" }, { "from": "human", "value": "class CouncillorDetailSerializer < ActiveModel::Serializer\n\tattributes :id, :first_name, :last_name, :start_date_in_office, :website, :twitter_handle, \n\t:facebook_handle, :email, :p...
ruby
chosen
[ { "from": "system", "value": "Allow dasherized_name to be specified.\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule EmberDev\n class Config\n def self.from_file(path)\n options = File.exist?(path) ? YAML.load_file(path) : {}\n\n new(options)\n end\n\n attr_access...
ruby
chosen
[ { "from": "system", "value": "Make headers asserts explicit in pagination specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Gitlab::Serializer::Pagination do\n let(:request) { spy('request') }\n let(:response) { spy('response') }\n\n before do\n allow(request)\n ...
ruby
chosen
[ { "from": "system", "value": "Rename the short, long etc methods\n\nSigned-off-by: Grant Ramsay <4ab1b2fdb7784a8f9b55e81e3261617f44fd0585@gmail.com>\n" }, { "from": "human", "value": "module Optioneer\n # This class will be instantiated for each individual option registered.\n class Option\n ...
ruby
chosen
[ { "from": "system", "value": "Allow blank names in not primary api tokens\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GobiertoCommon\n module ActsAsApiToken\n extend ActiveSupport::Concern\n\n class_methods do\n def acts_as_api_token_on(name, **opts)\n ...
ruby
chosen
[ { "from": "system", "value": "Add `id` attribute to LineItem\n" }, { "from": "human", "value": "require 'taxjar/base'\n\nmodule Taxjar\n class LineItem < Taxjar::Base\n extend ModelAttribute\n \n attribute :quantity, :integer\n attribute :product_identifier, :string\n a...
ruby
chosen
[ { "from": "system", "value": "Add the options params back since I'll be using those instead of the build locator in another branch\n" }, { "from": "human", "value": "module TeamCity\n # Defines HTTP request methods\n module Request\n # Perform an HTTP GET request\n def get(path, &block)\...
ruby
chosen
[ { "from": "human", "value": "Add outline of users_controller tests\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'rails_helper'\n\ndescribe UsersController do\n describe \"#new\" do\n it \"assigns a new user to @user\"\n it \"renders the #new template\"\n end\n\n descr...
ruby
chosen
[ { "from": "system", "value": "Update minimum required version of StalkClimber\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bean_counter/version'\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "system", "value": "Allow devs to lazy-load app with right dependency\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass FeatureToggleConstraint\n def initialize(feature_name)\n @feature = feature_name\n end\n\n def matches?(request)\n OpenFoodNetwork::F...
ruby
chosen
[ { "from": "system", "value": "Fix url generation error on hook invalid create\n" }, { "from": "human", "value": "class Projects::HooksController < Projects::ApplicationController\n # Authorize\n before_filter :authorize_admin_project!\n\n respond_to :html\n\n layout \"project_settings\"\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update Vagrant Bar to v1.16\n" }, { "from": "human", "value": "cask :v1 => 'vagrant-bar' do\n version '1.15'\n sha256 'dc4f77ad00e2751e7375eab0172323d9bd9110ced170dc4033036b530ed7fdeb'\n\n url \"https://github.com/BipSync/VagrantBar/releases/download/#{version}/V...
ruby
chosen
[ { "from": "system", "value": "Replace another instance of open with URI.open\n" }, { "from": "human", "value": "module Onebox\n module Mixins\n module WikimediaImage\n private\n\n URL_REGEX = /^https?:\\/\\/commons\\.wikimedia\\.org\\/wiki\\/(?<name>File:.+)/\n\n def wikimedia...
ruby
chosen
[ { "from": "system", "value": "Change to deployment recipe to support nginx deploy\n" }, { "from": "human", "value": "set :application, \"lincomp\"\n\nset :scm, :git\nset :repository, \"git://github.com/psy-q/stizun.git\"\nset :branch, \"master\"\nset :deploy_via, :remote_cache\n\n\nset :use_sudo...
ruby
chosen
[ { "from": "system", "value": "Prepare RestKit for its first Cocoapods release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = 'IBMWatsonRestKit'\n s.version = '0.32.0'\n s.summary = 'Dependency for the IBM Watson SDK'\n s.desc...
ruby
chosen
[ { "from": "system", "value": "Use debug message when node config already exists\n" }, { "from": "human", "value": "module KnifeSolo\n module NodeConfigCommand\n\n def self.load_deps\n require 'pathname'\n end\n\n def self.included(other)\n other.class_eval do\n # Lazy ...
ruby
chosen
[ { "from": "system", "value": "Raise error in the rake task if the credentials were not given\n" }, { "from": "human", "value": "require \"rake\"\nrequire \"paperclip/dropbox/rake\" unless defined?(Paperclip::Dropbox::Rake)\n\nnamespace :dropbox do\n desc \"Obtains your Dropbox credentials\"\n ...
ruby
chosen
[ { "from": "system", "value": "Update pod spec to link to this repo.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name\t\t= \"jot\"\n s.version\t\t= \"0.1.5\"\n s.summary\t\t= \"An easy way to add drawings and text to images\"\n s.homepage\t\t= \"https://github.com/IFTTT/jot\"\...
ruby
chosen
[ { "from": "system", "value": "Extend anonymous module instead of AssetSnack itself; also be more explicit about it to appease Travis\n" }, { "from": "human", "value": "require 'fileutils'\n\nmodule Sinatra\n module AssetSnack\n extend InstanceMethods\n\n def self.precompile!\n self.a...
ruby
chosen
[ { "from": "system", "value": "Remove non-existent initializer config option\n\n- By the looks of things, `halt_callback_chains_on_return_false` arrived\n in a Rails version prior to 5.1 (there's a separate initializer config\n for 5.1) and is now gone, [having been deprecated in\n 2017](https://github.co...
ruby
chosen
[ { "from": "system", "value": "Add missing requires to top level.\n" }, { "from": "human", "value": "require \"awsraw/version\"\nrequire \"awsraw/s3/canonicalized_resource\"\nrequire \"awsraw/s3/client\"\nrequire \"awsraw/s3/faraday_middleware\"\nrequire \"awsraw/s3/query_string_signer\"\nrequire...
ruby
chosen
[ { "from": "system", "value": "Set CF timeout to 15 minutes\n" }, { "from": "human", "value": "module Barcelona\n module Network\n class AutoScalingGroup < CloudFormation::Resource\n def self.type\n \"AWS::AutoScaling::AutoScalingGroup\"\n end\n\n def define_resource(jso...
ruby
chosen
[ { "from": "human", "value": "Add Schema File to Run Server With Seed File\n" }, { "from": "gpt", "value": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementa...
ruby
chosen
[ { "from": "system", "value": "Add migration which adds event_photo field to events table\n" }, { "from": "human", "value": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record...
ruby
chosen
[ { "from": "system", "value": "Fix Rails 6.1 deprecation warning\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass UsersController < ApplicationController\n def edit\n @user = current_user\n @vouchers = current_user.vouchers.includes(:product, :claimed_by)\n @pri...
ruby
chosen
[ { "from": "system", "value": "Create User controller edit method\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :exception\...
ruby
chosen
[ { "from": "system", "value": "Update endpoints used by WP OAuth Server 3.1.3\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class WordpressHosted < OmniAuth::Strategies::OAuth2\n # Give your strategy a name.\n option :name, 'wo...
ruby
chosen
[ { "from": "system", "value": "Change inst method to class method\n" }, { "from": "human", "value": "class CloneTicketSettings < ActiveRecord::Base\n unloadable\n\n belongs_to :project\n validates_uniqueness_of :project_id\n validates_presence_of :project_id\n\n #safe_attributes 'dst_project...
ruby
chosen
[ { "from": "system", "value": "Refactor to consolidate logic about body format\n\nReplace the few bits of code related to whether the body is a string,\nhash or array-of-hashes with a single decision (in the form of a factory\nmethod). A bit more code but hopefully (perhaps?) easier to understand.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Include Spree::UserMethods in Alchemy::User extension\n\nWithout that the Alchemy::User is no proper Spree.user_class\n" }, { "from": "human", "value": "module Alchemy\n module Solidus\n module AlchemyUserExtension\n def spree_roles\n if admin?\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug that prevented certain split_rows from showing a segment time.\n" }, { "from": "human", "value": "class EffortShowView\n attr_reader :effort, :split_rows\n\n def initialize(effort)\n @effort = effort\n @splits = effort.event.ordered_splits.to_a\n ...
ruby
chosen
[ { "from": "system", "value": "Include backtrace in error response in tests\n\nI always add the backtrace to the error response when developing a new\nfeature or debugging to enhance feedback in request specs, which can be\na bit opaque. I'm proposing that we make this a default in the test\nenvironment.\n" ...
ruby
chosen
[ { "from": "system", "value": "Fix \"ArgumentError: tried to create Proc object without a block\"\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Fog\n module Aliyun\n class Storage\n class Real\n # Get details for object\n #\n # ==== Param...
ruby
chosen
[ { "from": "system", "value": "[api] Allow especially overriden attribute setters for line items\n\nFixes #2916\n" }, { "from": "human", "value": "module Spree\n module Api\n class LineItemsController < Spree::Api::BaseController\n respond_to :json\n\n def create\n authorize!...
ruby
chosen
[ { "from": "system", "value": "Change logic on new? checks to make use of the other helpers\n" }, { "from": "human", "value": "module PatronusFati\n module DataModels\n module CommonState\n def active?\n presence.visible_since?(self.class.current_expiration_threshold)\n end\n...
ruby
chosen
[ { "from": "system", "value": "Fix index alias source maps\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Sprockets\n class SourceMapCommentProcessor\n def self.call(input)\n case input[:content_type]\n when \"application/javascript\"\n comment = \"\...
ruby
chosen
[ { "from": "system", "value": "Fix new chefstyle finding in chef-server-deploy cookbooks\n\nAs a follow up we should look at removing these cookbooks as I don't\nthink they are required anymore.\n\nSigned-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>\n" }, { "from": "human",...
ruby
chosen
[ { "from": "system", "value": "Update podspec to version 0.0.3\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NSExtensions\"\n s.version = \"0.0.2\"\n s.summary = \"A collection of useful extensions for standard Cocoa classes.\"\n s.homepage = \"htt...
ruby
chosen
[ { "from": "system", "value": "Fix login failure redirect path" }, { "from": "human", "value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n def cas\n find_user('CAS')\n end\n\n def identity\n find_user('Identity')\n end\n\n def ldap\n find_user('...
ruby
chosen
[ { "from": "system", "value": "Change after sign-in behaviour depending on sign in count\n" }, { "from": "human", "value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\t\n def github\n @user = User.from_omniauth(request.env[\"omniauth.auth\"])\n sign_in...
ruby
chosen
[ { "from": "human", "value": "Allow null in posts columns" }, { "from": "gpt", "value": "class AllowNullInPostsColumns < ActiveRecord::Migration\n def self.up\n change_column :posts, :headline, :string, :default => \"\", :null => true\n change_column :posts, :url, :string, :default => \"\"...
ruby
chosen
[ { "from": "system", "value": "Remove default to make it work with both sqlite and postgres\n\nPostgres doesn't accept array: true and default: string(\"[]\"). So,\nsimply remove the default.\n\nAnyway, the next migration changes it to a simple string column.\n" }, { "from": "human", "value": "cl...
ruby
chosen
[ { "from": "human", "value": "Add test suite for Nordea renew certificate soap\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass NordeaRenewCertRequestSoapBuilderTest < ActiveSupport::TestCase\n setup do\n @params = nordea_renew_certificate_params\n\n # Convert the keys ...
ruby
chosen
[ { "from": "system", "value": "Fix string description of Redimap::VERSION test.\n" }, { "from": "human", "value": "require 'minitest/autorun'\n\nrequire_relative '../../lib/redimap/version'\n\n\ndescribe Redimap::VERSION do\n \n subject { Redimap::VERSION }\n \n it \"uses major.minor.patch\" ...
ruby
chosen
[ { "from": "system", "value": "Update TestMonitor in case a port receives a connection during test\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.join(File.dirname(__FILE__), 'helper')\n\nclass TestMonitor\n attr_reader :listening, :closed\n\n def on_listening(addr, fd)\n ...
ruby
chosen
[ { "from": "system", "value": "Change homepage URL for better compatibility with rubygems\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 ...
ruby
chosen
[ { "from": "system", "value": "Use 0.20.1 as new default ES_VERSION\n" }, { "from": "human", "value": "require \"elasticsearch-node/version\"\nrequire 'elasticsearch-node/client_provider'\n\nmodule ElasticSearch \n module Node\n attr_accessor :version\n\n def self.root(*args)\n File.j...
ruby
chosen
[ { "from": "system", "value": "Add support to remove file or path\n" }, { "from": "human", "value": "module Kosmos\n module PackageDsl\n def merge_directory(from, opts = {})\n destination = opts[:into] || '.'\n\n FileUtils.cp_r(File.join(self.class.download_dir, from),\n File...
ruby
chosen
[ { "from": "system", "value": "Add nginx as a dependency to app-recipes-backend\n" }, { "from": "human", "value": "name 'app-recipe-backend'\nmaintainer 'WebAsCrazy.net'\nmaintainer_email 'jakub.kulak@gmail.com'\nlicense 'All rights reserved'\ndescription 'Installs...
ruby
chosen
[ { "from": "system", "value": "Fix import of TimetableSlots without room\n" }, { "from": "human", "value": "require 'interpipe/interactor'\n\nclass ConvertTTS\n include Interpipe::Interactor\n\n DB_KEYS = [:day, :duration, :first_hour, :parity]\n\n def setup\n @rooms = {}\n end\n\n def pe...
ruby
chosen
[ { "from": "system", "value": "Add spec for unteamed organizers\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ContributorsController do\n render_views\n\n describe 'GET index' do\n let!(:user) { create(:user) }\n let!(:coach) { create(:coach) }\n let!(:o...
ruby
chosen
[ { "from": "human", "value": "Add a smoke test for OptionsSerializer\n" }, { "from": "gpt", "value": "RSpec.describe Api::OptionsSerializer do\n it \"returns some default values when the class is nil\" do\n actual = described_class.serialize(nil, :settings)\n\n expected = {\n :attribu...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for Config::Proxy class\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'vagrant-proxyconf/config/proxy'\n\ndescribe VagrantPlugins::ProxyConf::Config::Proxy do\n before :each do\n # Ensure tests are not affected by environment vari...
ruby
chosen
[ { "from": "system", "value": "Update tag for wellplate and screen\n" }, { "from": "human", "value": "module Tagging\n extend ActiveSupport::Concern\n\n included do\n after_create :update_tag\n\n after_destroy :update_tag\n end\n\n def update_tag\n taggables = Array.new\n taggable...
ruby
chosen
[ { "from": "system", "value": "Set player to superadmin for now on new connections.\n" }, { "from": "human", "value": "require 'forwardable'\nrequire \"carbonmu/edge_router/interactive_connection\"\n\nmodule CarbonMU\n class TelnetConnection < InteractiveConnection\n include Celluloid::IO\n ...
ruby
chosen
[ { "from": "system", "value": "Rename the rake task to match its class\n" }, { "from": "human", "value": "require 'transition/import/hits_mappings_relations'\n\nnamespace :import do\n desc 'Refresh c14nd path relations between hits and mappings'\n task :hits_mappings => :environment do\n Tra...
ruby
chosen
[ { "from": "system", "value": "Move method formatting helpers into MethodHelper\n" }, { "from": "human", "value": "module YARD\n module Generators\n class MethodSignatureGenerator < Base\n def sections_for(object) \n [:main] if object.signature\n end\n \n protected\...
ruby
chosen
[ { "from": "system", "value": "Correct massive brain fart re: concurrency level setup.\n" }, { "from": "human", "value": "require 'pancakes/config'\n\nif ENV['REDIS_URL']\n Pancakes::Config.from_env :redis, { url: ENV['REDIS_URL'], namespace: 'nubic:pancakes' }\nend\n\nif ENV['OPS_URL']\n Panca...
ruby
chosen
[ { "from": "system", "value": "Modify AWS s3 endpoint url\n" }, { "from": "human", "value": "if Rails.env.production?\n CarrierWave.configure do |config|\n config.fog_credentials = {\n provider: 'AWS',\n aws_access_key_id: ENV['S3_ACCESS_KEY'],\n aws_secret_access_key: EN...
ruby
chosen
[ { "from": "system", "value": "Make tmp dir for restart.txt if it doesn't exist\n" }, { "from": "human", "value": "class AdminController < ApplicationController\n def index\n @user = User.find(session[:user_id])\n end\n\n def restart\n @user = User.find(session[:user_id])\n restart_tx...
ruby
chosen
[ { "from": "system", "value": "Tidy up DeejayController; bit of duplication but we will erradicate later :o\n" }, { "from": "human", "value": "require_relative 'base_controller'\n\nmodule Slowwly\n class DelayController < BaseController\n get '/delay/:delay/*' do |delay, _rest|\n set_req...
ruby
chosen
[ { "from": "system", "value": "Fix file name 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 'http_content_type/version'\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in verification string\n" }, { "from": "human", "value": "# Controller to direct to basic pages\nclass PagesController < ApplicationController\n def home\n @last_sermon = Sermon.last\n @last_newsletter = Newsletter.last\n @upcoming_events = Event....
ruby
chosen
[ { "from": "human", "value": "Add home route, user routes\n" }, { "from": "gpt", "value": "get '/' do\n erb :'index'\nend\n\nget '/users/new/?' do\n @user = User.new\n erb :'users/new'\nend\n\npost '/users/?' do\n @user = User.new(params[:user])\n\n if @user.save\n else\n @user\n erro...
ruby
chosen
[ { "from": "system", "value": "Hide filters in another couple of places\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n respond_to :html\n\n def show\n @user = User.find(params[:id])\n authorize! :read, @user\n @photographs = @user.photographs.view_fo...
ruby
chosen
[ { "from": "system", "value": "Change application name so it's not always lowercase\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass ApplicationService\n\n class << self\n\n # Returns either the name specified in dmproadmap.rb initializer or\n # the Rails applicati...
ruby
chosen
[ { "from": "human", "value": "Add generic tests for manifest validity.\n\nInitial tests that can be run against any Bosh manifest to validate some\nbasic properties. This initial pass only validates that resource names\nare unique, and that all cross-references in the manifest exist.\n\nThese are currently a...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect Git repo for the FOSS install script\n" }, { "from": "human", "value": "test_name \"Install ACL Module on Master\"\n\nstep \"Clone Git Repo\"\non master, \"git clone https://github.com/cowofevil/puppetlabs-acl.git /etc/puppet/modules/acl\"\n\nstep \"Pl...
ruby
chosen
[ { "from": "system", "value": "Use the file name as title when nothing is definied.\n" }, { "from": "human", "value": "class Attachment < ActiveRecord::Base\n # Association\n belongs_to :object, :polymorphic => true\n\n # Carrier Wave\n validates_presence_of :file\n mount_uploader :file, Att...
ruby
chosen
[ { "from": "system", "value": "Fix use of format on older systems\n" }, { "from": "human", "value": "module SuppliersPlugin::TermsHelper\n\n Terms = [:consumer, :supplier]\n TermsVariations = [:singular, :plural]\n TermsTransformations = [:capitalize]\n TermsKeys = Terms.map do |term|\n Te...
ruby
chosen
[ { "from": "system", "value": "Update the userLoginInput to default to \"false\".\n\nAlso replaces a null \"remember_me\" with the default\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Input object for a userLogin mutation\nmodule Inputs\n module User\n class Login < I...
ruby
chosen
[ { "from": "human", "value": "Add onceoff job to backfill oneboxes\n" }, { "from": "gpt", "value": "module Jobs\n\n class GrantOnebox < Jobs::Onceoff\n sidekiq_options queue: 'low'\n\n def execute_onceoff(args)\n to_award = {}\n\n Post.secured(Guardian.new)\n .select(:id...
ruby
chosen
[ { "from": "human", "value": "Add a SuckerPunch job to transition events with their notify transition\n" }, { "from": "gpt", "value": "class SendBulkTicketJob\n include SuckerPunch::Job\n\n def perform(conference, filter)\n\n case filter\n when 'accept'\n conference.events.where(stat...
ruby
chosen
[ { "from": "system", "value": "Fix typo to make puppet provisioners work again\n" }, { "from": "human", "value": "require \"vagrant\"\n\nmodule VagrantPlugins\n module Pupppet\n class Plugin < Vagrant.plugin(\"1\")\n name \"puppet\"\n description <<-DESC\n Provides support for ...
ruby
chosen
[ { "from": "system", "value": "Remove dep lock on nagios < 8.0.0 since we need to update it now\n" }, { "from": "human", "value": "name 'rdiff-backup'\nmaintainer 'Oregon State University'\nmaintainer_email 'systems@osuosl.org'\nlicense 'Apache 2.0'\ndescription 'I...
ruby
chosen
[ { "from": "system", "value": "Bump up version to 1.3.7\n" }, { "from": "human", "value": "name \"config-driven-helper\"\nmaintainer \"Inviqa\"\nmaintainer_email \"msimons@inviqa.com\"\nlicense \"Apache 2.0\"\ndescription \"enable driving cookbooks that are no...
ruby
chosen
[ { "from": "system", "value": "Remove due_date= which wasn't being used.\n" }, { "from": "human", "value": "class Borrow < ActiveRecord::Base\n include ActionView::Helpers::DateHelper\n belongs_to :user_book\n before_validation :set_borrow_date\n validates_presence_of :borrower_name, :borrowe...
ruby
chosen
[ { "from": "system", "value": "Update tests for new markup\n" }, { "from": "human", "value": "Given(/^a collection of cases exist$/) do\n stub_case_collection_api_request\nend\n\nThen(/^I can get a list of all merger inquiries$/) do\n visit finder_path('cma-cases')\n page.should have_content('...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 1.0.0.0 to 2.0.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-async_invocation'\n s.version = '1.0.0.0'\n s.summary = \"Return value for async method that is accide...
ruby
chosen
[ { "from": "system", "value": "Allow inclusion in rails 4.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'attr_sanitizable'\n s.version = '0.0.2'\n s.date = '2014-10-28'\n s.summary = 'Active Record extention to sanitize your inputs.'\n s.d...
ruby
chosen
[ { "from": "system", "value": "Allow pg 10-14+ in dev, require pg 13 in production\n" }, { "from": "human", "value": "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend Module.new {\n def initialize(*args)\n super\n check_version if respond_to?(:check_version)\n end\n\n def chec...
ruby
chosen
[ { "from": "system", "value": "Fix random build failure where active_support autoload can’t be found." }, { "from": "human", "value": "require 'active_support/hash_with_indifferent_access'\nrequire 'active_support/core_ext/module/delegation'\nrequire 'active_support/inflector'\nrequire 'active_su...
ruby
chosen
[ { "from": "human", "value": "Write a file to generate the sine.dca file\n" }, { "from": "gpt", "value": "require 'opus-ruby'\nrequire 'json'\n\nVERSION = '2.0.0'\n\n# Generate a 10-second long file, or however many seconds specified by console arguments\nduration = ARGV[0]&.to_i || 10\n\n# Gener...
ruby
chosen
[ { "from": "system", "value": "Allow to pass clock & correlation id generator\n\nUse the same defaults as in RubyEventStore::Client\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RailsEventStore\n class Client < RubyEventStore::Client\n attr_reader :request_metadat...
ruby
chosen
[ { "from": "system", "value": "Simplify activation of single feature\n" }, { "from": "human", "value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h...
ruby
chosen
[ { "from": "system", "value": "Remove tags from Ansible Playbook summary page\n" }, { "from": "human", "value": "class AnsiblePlaybookController < ApplicationController\n before_action :check_privileges\n before_action :get_session_data\n\n after_action :cleanup_action\n after_action :set_ses...
ruby
chosen
[ { "from": "system", "value": "Set site on structure page\n" }, { "from": "human", "value": "class Management::SitesController < ManagementController\n before_action :set_site_for_page\n\n # GET /management/sites\n # GET /management/sites.json\n def index\n @sites = Site.joins(:users)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix data export page error\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Settings::ExportsController < Settings::BaseController\n def show\n @export = Export.new(current_account)\n @backups = current_user.backups\n end\n\n def c...
ruby
chosen
[ { "from": "system", "value": "Add default value to not-null column (not having one is illegal in SQLite)\n" }, { "from": "human", "value": "class AddStateToSignups < ActiveRecord::Migration[5.0]\n def change\n add_column :signups, :state, :string, null: false, index: true\n end\nend\n" },...
ruby
chosen
[ { "from": "system", "value": "Add itinerary duration to serializer\n" }, { "from": "human", "value": "module Api\n module V2\n\n class ItinerarySerializer < ActiveModel::Serializer\n \n attributes :trip_type,\n :cost,\n :walk_time,\n :transit_time,\n :wa...
ruby
chosen
[ { "from": "system", "value": "Switch the render param order, add the scope method\n" }, { "from": "human", "value": "module Dimples\n module Renderable\n def render(contents, context = {})\n context[:site] ||= @site\n context.merge!(type => Hashie::Mash.new(@metadata))\n\n out...
ruby
chosen
[ { "from": "system", "value": "Use external_url_for when configuring GDS::SSO\n\nThis needs to be the external URL as it is accessed through a users\nbrowser.\n" }, { "from": "human", "value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = ENV[\"OAUTH_ID\"] || \...
ruby
chosen
[ { "from": "system", "value": "Change Need-o-tron to use Signonotron2\n" }, { "from": "human", "value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = 'abcdefgh12345678'\n config.oauth_secret = 'secret'\n config.oauth_root_url = Plek.current.find(\"authe...
ruby
chosen
[ { "from": "system", "value": "Allow for env variables set with 'export' keyword\n" }, { "from": "human", "value": "module Dotenv\n class Environment < Hash\n def initialize(filename)\n @filename = filename\n load if File.exists? @filename\n end\n\n def load\n read.each d...
ruby
chosen
[ { "from": "system", "value": "Fix method missing on redirect response.\n" }, { "from": "human", "value": "class Garelic::Middleware\n def initialize(app)\n @app = app\n Garelic::Metrics.reset!\n end\n\n def call(env)\n status, headers, response = @app.call(env)\n\n if headers[\"Co...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for the function.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Puppet::Parser::Functions.function(:firewall_multi) do\n let(:scope) { PuppetlabsSpec::PuppetInternals.scope }\n\n it 'should exist' do\n expect(Puppet::Parser::F...
ruby
chosen
[ { "from": "human", "value": "Add specs for the security group class\n" }, { "from": "gpt", "value": "require 'spec_helper.rb'\nrequire 'ec2-security-czar/security_group'\n\nmodule Ec2SecurityCzar\n describe SecurityGroup do\n let(:api) { double(\"API\", name: 'test') }\n let(:outbound_rul...
ruby
chosen