conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Upgrade CLion EAP.app to build 141.351.4\n" }, { "from": "human", "value": "cask :v1 => 'clion-eap' do\n version '141.102.4'\n sha256 '63227a0613d0406087b045b9eb17fadcc9affaed9707e2adcce7d0c0d37ae2a0'\n\n url \"http://download.jetbrains.com/cpp/CLion-#{version}.d...
ruby
chosen
[ { "from": "system", "value": "Rename application link to 'Scala IDE'\n\nThis is useful to install the Scala IDE together with other Eclipse installations." }, { "from": "human", "value": "class ScalaIde < Cask\n url 'http://downloads.typesafe.com/scalaide-pack/3.0.2.vfinal-210-20131028/scala-SD...
ruby
chosen
[ { "from": "system", "value": "Remove remaining calls to authenticate\n" }, { "from": "human", "value": "module Twitter\n class Client\n module FriendsAndFollowers\n # TODO: Optional merge user into options if user is nil\n def friend_ids(*args)\n authenticate\n option...
ruby
chosen
[ { "from": "system", "value": "Add GitHub page as homepage\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/factory_inspector/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"David Kennedy\"]\n gem.email = [\"d...
ruby
chosen
[ { "from": "system", "value": "Improve validity checking for coordinate inputs\n" }, { "from": "human", "value": "class Commute < ApplicationRecord\n belongs_to :user\n validates :user_id, presence: true\n default_scope -> { order(starttime: :desc) }\n \n def startcommute(lat, lon)\n if u...
ruby
chosen
[ { "from": "system", "value": "Add scope methods to Species\n\nAdded `freshwater`, `saltwater` and `all` to the Species model.\n" }, { "from": "human", "value": "class Species\n FILE_PATH = Rails.root.join('config', 'data', 'species.yml')\n\n include ActiveModel::Validations\n include ActiveMo...
ruby
chosen
[ { "from": "system", "value": "Fix bug in podspec file\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'OMPromises'\n s.version = '0.2.0'\n s.summary = 'Promises for iOS & Mac OS X'\n s.homepage = 'http://github.com/b52/OMPromises'\n s.license = ...
ruby
chosen
[ { "from": "system", "value": "Set default locales and load paths\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 :production.\nBundler....
ruby
chosen
[ { "from": "system", "value": "Use US Eastern Time as default time zone\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 :production.\nBu...
ruby
chosen
[ { "from": "system", "value": "Reduce retention time to 12 hours\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 :production.\nBundler.r...
ruby
chosen
[ { "from": "system", "value": "Remove flag to not initialize on precompile.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\nBundler.require *Rails.groups(:assets) if defined?(Bundler)\n\nmodule TravisCi\n class Application < Rails::Applica...
ruby
chosen
[ { "from": "system", "value": "Fix web-font (heroku)\nheroku upload test-5 (Firefox)\nRails 4\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\n# require \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"...
ruby
chosen
[ { "from": "system", "value": "UPDATE podspec, removing some warnings from pod spec lint" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"S2MToolbox\"\n s.version = \"0.0.1\"\n s.summary = \"iOS Categories\"\n s.homepage = \"https://github.com/sinnersch...
ruby
chosen
[ { "from": "system", "value": "Correct typo in systemd integration tests" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\n\ndescribe 'required files for upstart init style' do\n describe 'environment file' do\n let :env_file do\n file '/etc/sysconfig/kafka'\...
ruby
chosen
[ { "from": "system", "value": "Add homebrew formula for mtr\n" }, { "from": "human", "value": "#\n# Author:: Mike Moate (<chef@mikemoate.co.uk>)\n# Cookbook Name:: mac_bootstrap\n# Attributes:: default\n#\n\ndefault['homebrew']['formulas'] = [\n 'git',\n 'packer'\n]\n\ndefault['homebrew']['cask...
ruby
chosen
[ { "from": "system", "value": "Fix to_fusion call in Fusionable Courier\n" }, { "from": "human", "value": "module Couriers\n class Fusionable\n class InvalidFusionTableError < Exception; end \n \n extend Resque::Plugins::HerokuAutoscaler\n \n @queue = 'couriers'\n \n class << ...
ruby
chosen
[ { "from": "system", "value": "Update podspec for local fork\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TSMessages\"\n s.version = \"0.9.9\"\n s.summary = \"Easy to use and customizable messages/notifications for iOS à la Tweetbot.\"\n s.description...
ruby
chosen
[ { "from": "system", "value": "Fix email template demo page" }, { "from": "human", "value": "class PagesController < ApplicationController\n skip_authorization_check\n skip_before_action :authenticate_user!\n\n # Preview html email template\n def email\n tpl = (params[:layout] || 'hero').t...
ruby
chosen
[ { "from": "system", "value": "Check admin permissions to create terms via API\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GobiertoAdmin\n module GobiertoCommon\n module Api\n class TermsController < ::GobiertoAdmin::Api::BaseController\n include ::G...
ruby
chosen
[ { "from": "system", "value": "Add single_quad definition for the Service model\n" }, { "from": "human", "value": "class ServiceDecorator < MiqDecorator\n def self.fonticon\n 'pficon pficon-service'\n end\n\n def fileicon\n try(:picture) ? \"/pictures/#{picture.basename}\" : \"100/servic...
ruby
chosen
[ { "from": "system", "value": "Switch source url to Github\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"PHYExtendedAppDelegate\"\n s.version = \"0.1.0\"\n s.summary = \"Taming UIApplication delegates.\"\n s.homepage = \"http://rall...
ruby
chosen
[ { "from": "system", "value": "Update to DM 1.0.0 compat.\n" }, { "from": "human", "value": "class Merb::Authentication\n module Mixins\n module SaltedUser\n module DMClassMethods\n def self.extended(base)\n base.class_eval do\n\n property :crypted_password, St...
ruby
chosen
[ { "from": "system", "value": "Fix generated config file on Chef 11.14.\n\nThe config file generated looks like this on Chef 11.14 and\nremote_syslog2 can't understand it:\n\n files: !ruby/array:Chef::Node::ImmutableArray\n - /foo/bar\n exclude_files: !ruby/array:Chef::Node::ImmutableArray []\n e...
ruby
chosen
[ { "from": "human", "value": "Add User controller spec file\n\n- Add User controller spec file\n" }, { "from": "gpt", "value": "require File.expand_path('../../spec_helper', __FILE__)\ndescribe UsersController do\n fixtures :users\n fixtures :roles\n\n before(:each) do\n generate_default_pr...
ruby
chosen
[ { "from": "system", "value": "Add test that would have caught the CSRF error with survey_notification updates\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe 'Survey notifications', type: :feature, js: true do\n let(:course) { create(:cours...
ruby
chosen
[ { "from": "system", "value": "Add algorithm for sold per week and month\n" }, { "from": "human", "value": "class Product < ApplicationRecord\n has_many :order_products\n has_many :orders, through: :order_products\n has_many :category_products\n has_many :categories, through: :category_produc...
ruby
chosen
[ { "from": "system", "value": "Remove commented out markets setter method" }, { "from": "human", "value": "class Startup < ActiveRecord::Base\n belongs_to :user\n # has_and_belongs_to_many :markets\n # Alias for acts_as_taggable_on :tags\n acts_as_ordered_taggable\n acts_as_ordered_taggable_...
ruby
chosen
[ { "from": "system", "value": "Update pod spec deployment target to ios 11.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ns.name = 'SwiftyReceiptValidator'\ns.version = '5.0.0'\ns.license = 'MIT'\ns.summary = 'A swift helper for in app purchase receipt validation.'\n\ns.homepage = '...
ruby
chosen
[ { "from": "system", "value": "Change war uri to bintray. Chef have some probleme with github's redirect.\n" }, { "from": "human", "value": "# -*- mode: ruby; coding: utf-8; -*-\n#\n# Cookbook Name:: seyren\n#\n# Author:: Olivier Bazoud (<olivier.bazoud@gmail.com>)\n# Copyright 2014, Olivier Bazo...
ruby
chosen
[ { "from": "system", "value": "Make all skeleton tests pass to test travis-ci integration\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TssTest < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::Tss::VERSION\n end\n\n def test_it_does_something_usefu...
ruby
chosen
[ { "from": "system", "value": "Use systemctl instead of /etc/init.d/td-agent\n\nBecause td-agent3 supports systemd.\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n" }, { "from": "human", "value": "class Fluentd\n class Agent\n class TdAgent\n m...
ruby
chosen
[ { "from": "system", "value": "Use hexdigest so we get the checksum when we use S3\n" }, { "from": "human", "value": "module JaduXml\n class FilePresenter < XmlPresenter\n property :filename, as: \"Filename\", exec_context: :decorator\n property :checksum, as: \"Checksum\", exec_context: :...
ruby
chosen
[ { "from": "system", "value": "Return metadata for user links in V1 API\n" }, { "from": "human", "value": "module Api\n module V1\n class UserSerializer < ActiveModel::Serializer\n include ApplicationHelper\n\n attributes :id, :first_name, :last_name, :about_me, :tagline, :full_name...
ruby
chosen
[ { "from": "system", "value": "Add currencies GBP and USD.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Buckaruby\n module Currency\n EURO = \"EUR\"\n end\nend\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule Buckaruby\n modu...
ruby
chosen
[ { "from": "human", "value": "Fix shoulda-matchers in Rails 5\n\nBackports a fix for https://github.com/thoughtbot/shoulda-matchers/issues/913.\nThis can be removed once new shoulda-matchers version is released.\n" }, { "from": "gpt", "value": "# monkey patch which fixes serialization matcher in ...
ruby
chosen
[ { "from": "system", "value": "Revert \"add the options for packages to remove file or folders in their install scripts\"\n" }, { "from": "human", "value": "module Kosmos\n module PackageDsl\n def merge_directory(from, opts = {})\n destination = opts[:into] || '.'\n\n FileUtils.cp_r...
ruby
chosen
[ { "from": "system", "value": "Disable error_highlight when testing did_you_mean\n\nFixes #160\n" }, { "from": "human", "value": "require_relative './helper'\n\nclass VerboseFormatterTest < Test::Unit::TestCase\n def setup\n require_relative File.join(DidYouMean::TestHelper.root, 'verbose')\n...
ruby
chosen
[ { "from": "system", "value": "Refactor campaign helper organisation methods\n\nPreviously the organisation_attr method was doing 2 things -\n• checking the publication has organisation details\n• accessing a value from those details\n\nRefactored to only do the checking, as we want to use the attributes\nin...
ruby
chosen
[ { "from": "system", "value": "Add scope to search product categories by environment\n" }, { "from": "human", "value": "class ProductCategory < Category\n # FIXME: do not allow category with products or inputs to be destroyed\n has_many :products\n has_many :inputs\n\n attr_accessible :name, ...
ruby
chosen
[ { "from": "system", "value": "Fix params for extracted attributes\n" }, { "from": "human", "value": "module Archetype\n module Resourceful\n module Parameters\n extend ActiveSupport::Concern\n \n included do\n define_method \"#{resource_instance_name}_params\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Configure timezone so times show in Pacific time by default\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, ...
ruby
chosen
[ { "from": "system", "value": "Add source ~/.codelation.bash to ~/.bash_profile\n" }, { "from": "human", "value": "require \"thor\"\n\nmodule Codelation\n class Cli < Thor\n private\n\n # Install dot files and load them into ~/.bash_profile\n def install_dot_files\n copy_file \"dot_f...
ruby
chosen
[ { "from": "system", "value": "Revert \"silence warnings while loading rails gems\"\n\nThis reverts commit 171ea5edcd8ca5374deb809690f86f61caeba8d9.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n# Silence warnings while loading Rails gems, since we're using R...
ruby
chosen
[ { "from": "system", "value": "Add base.js to assets:precompile list.\n\nbase.js was not being precompiled in production, which broke\npages that relied on its presence.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems l...
ruby
chosen
[ { "from": "system", "value": "Raise error if variable MWL_DIR is not set.\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 :production.\...
ruby
chosen
[ { "from": "system", "value": "Fix bug with devise and mongoid current_user, user_signed_in ... works :)" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.action_dispatch.cookies_serializer = :json\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add after Twitter login logic\n" }, { "from": "human", "value": "Dir.glob('./app/**/*.rb').each { |file| require file }\n\nmodule CherryTomato\n class Application < Sinatra::Base\n use AssetLoader\n\n get '/' do\n erb :timer\n end\n\n # Twitter aut...
ruby
chosen
[ { "from": "system", "value": "Add 200 ok healthcheck test\n" }, { "from": "human", "value": "RSpec.describe \"/healthcheck\" do\n it \"returns database connection status\" do\n get \"/healthcheck\"\n json = JSON.parse(response.body)\n\n expect(json[\"checks\"]).to include(\"database_co...
ruby
chosen
[ { "from": "system", "value": "Raise an informative error when Podfile specifies xcodeproj to an invalid path\n" }, { "from": "human", "value": "require File.expand_path('../../spec_helper', __FILE__)\n\ndescribe \"Pod::Command::Install\" do\n it \"should include instructions on how to reference...
ruby
chosen
[ { "from": "system", "value": "Fix drop down menu authentication\n\n" }, { "from": "human", "value": "require 'active_resource'\n\nclass User < ActiveResource::Base\n extend ActiveModel::Naming\n self.site = Rails.configuration.account_ip\n self.prefix = \"/api/\"\n attr_writer :committees\n\...
ruby
chosen
[ { "from": "system", "value": "Fix some shit...delete post issues. Add associaiton\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n\tbefore_save :set_permission\n\thas_one :recent_post, class_name: \"Space\", foreign_key: \"poster_id\"\n\thas_one :recent_claim, class_name: \"S...
ruby
chosen
[ { "from": "system", "value": "Add bounce rate fix to Google UA settings\n" }, { "from": "human", "value": "module Analytical\n module Modules\n class GoogleUniversal\n include Analytical::Modules::Base\n\n def initialize(options={})\n super\n @tracking_command_locatio...
ruby
chosen
[ { "from": "system", "value": "Change RSpec/InstanceVariable to only check specs\n\nFixes #115\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module RSpec\n # When you have to assign a variable instead of using an instance\n # varia...
ruby
chosen
[ { "from": "system", "value": "Remove dalli store from global config\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 :production.\nBundl...
ruby
chosen
[ { "from": "system", "value": "Include ActiveUMSExtension to Relation for Kaminari extension\n" }, { "from": "human", "value": "module Kaminari\n module ActiveUMS\n module ActiveUMSExtension\n include Kaminari::ConfigurationMethods\n\n def self.included(base)\n base.define_si...
ruby
chosen
[ { "from": "system", "value": "Complete index action in courses controller\n" }, { "from": "human", "value": "class CoursesController < ApplicationController\n def index\n end\n\n def new\n\n end\n\n def create\n \t@course = Course.new(course_params)\n\n \tif @course.save\n \t\tredirect_t...
ruby
chosen
[ { "from": "system", "value": "Update Rake from 10.0 to 12.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 'btc_ticker/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add Rails 4 specific warning\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"rails_4_session_flash_backport/version\"\n\ncase Rails.version.to_i\nwhen 2\n require 'rails_4_session_flash_backport/rails2/flash_hash'\n require 'rails_4_session_flash_b...
ruby
chosen
[ { "from": "system", "value": "Make photo height and width required\n\nto match the requirements of the model\n" }, { "from": "human", "value": "module Trogdir\n module V1\n class PhotosAPI < Grape::API\n resource :photos do\n before do\n @person = Person.find_by(uuid: pa...
ruby
chosen
[ { "from": "system", "value": "Fix expectation in a zlib spec\n" }, { "from": "human", "value": "require File.expand_path('../../../../spec_helper', __FILE__)\nrequire 'stringio'\nrequire 'zlib'\n\ndescribe \"GzipWriter#write\" do\n before :each do\n @data = '12345abcde'\n @zip = [31, 139,...
ruby
chosen
[ { "from": "system", "value": "Add fallback OAuth ID and secret\n\nThis commit adds a fallback OAuth ID and secret. This will allow the signon-munging script for development to configure signon for this app locally." }, { "from": "human", "value": "GDS::SSO.config do |config|\n config.user_model...
ruby
chosen
[ { "from": "human", "value": "Add test for the Live Migrate button class\n" }, { "from": "gpt", "value": "describe ApplicationHelper::Button::InstanceMigrate do\n describe '#disabled?' do\n it \"when the live migrate action is available then the button is not disabled\" do\n view_context...
ruby
chosen
[ { "from": "system", "value": "Fix specs for older rubies\n" }, { "from": "human", "value": "require 'rom/support/deprecations'\nrequire 'tempfile'\n\nRSpec.describe ROM::Deprecations do\n let(:log_file) do\n Tempfile.new\n end\n\n before do\n ROM::Deprecations.set_logger!(log_file)\n e...
ruby
chosen
[ { "from": "system", "value": "Configure devise methods in application controller\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_fo...
ruby
chosen
[ { "from": "system", "value": "Add locale handling to the controller\n\nThis will parse the \"locale\" parameter, and append to any local URLs.\n\nUse it like: http://localhost:3000/?locale=es\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSR...
ruby
chosen
[ { "from": "system", "value": "Fix host name bug in URL for blog comments\n" }, { "from": "human", "value": "module SemiStatic\n class CommentMailer < ActionMailer::Base\n def comment_notification(comment)\n subject = \"New comment added to blog by #{comment.email}: #{comment.name}\"\n ...
ruby
chosen
[ { "from": "system", "value": "Remove Klarna warning message from Shipments\n\nAs the information that is displayed in shipments will not affect\nKlarana's security information it is safe to modify it." }, { "from": "human", "value": "Deface::Override.new(\n virtual_path: \"spree/admin/orders/ed...
ruby
chosen
[ { "from": "system", "value": "Add has_many :feed_schedule_imports to FeedImport serializer\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: feed_imports\n#\n# id :integer not null, primary key\n# feed_id :integer\n# success ...
ruby
chosen
[ { "from": "system", "value": "Update specs to the latest platform versions\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'yum-erlang_solutions::default' do\n context 'centos-7' do\n let(:che...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warnings in NetworkVisibilityService\n" }, { "from": "human", "value": "class NetworkVisibilityService\n def determine_visibility(sysprep_enabled, supports_pxe, supports_iso, addr_mode)\n field_names_to_hide = []\n field_names_to_edit = []\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use let instead of local variables\n" }, { "from": "human", "value": "require_relative 'spec_helper'\nrequire 'quantum_leap'\n\ndescribe Quantum do\n\n after do\n Quantum.leap_back\n end\n\n describe '.leap' do\n the_past = Time.new(1956, 9, 13, 15, 00)\n\n...
ruby
chosen
[ { "from": "system", "value": "Add other notes attributes to returned JSON\n" }, { "from": "human", "value": "json.array!(@notes) do |note|\n # json.extract! note, :id, :title, :body_text, :body_html, :created_at, :updated_at\n json.id note.id\n json.title note.title\n json.url api_v1_note_ur...
ruby
chosen
[ { "from": "human", "value": "Add a state machine for long ansible operations\n\nThis adds a Job state machine for long running async ansible operations.\n" }, { "from": "gpt", "value": "class ManageIQ::Providers::AnsibleOperationsWorkflow < Job\n def self.create_job(env_vars, extra_vars, playbo...
ruby
chosen
[ { "from": "system", "value": "Change default number of days logs hang out for now that we back them up off server." }, { "from": "human", "value": "default[:rails][:version] = false\ndefault[:rails][:environment] = \"production\"\ndefault[:rails][:max_pool_size] = 4\n\n# log rotation via...
ruby
chosen
[ { "from": "system", "value": "Exit with non-zero to signal failure.\n" }, { "from": "human", "value": "require 'rbconfig'\nrequire 'rails/script_rails_loader'\n\n# If we are inside a Rails application this method performs an exec and thus\n# the rest of this script is not run.\nRails::ScriptRail...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add new relic tracking for s3 uploads\"\n\nThis reverts commit 20e9a892ed7b75853192b5bfeaf00b49654bf47e.\n" }, { "from": "human", "value": "require 'aws-sdk'\n\nmodule Ello\n module KinesisConsumer\n class S3Processor < BaseProcessor\n\n def run!\n...
ruby
chosen
[ { "from": "system", "value": "Add ability to pass locals to activation code" }, { "from": "human", "value": "module MindBody\n module Services\n class SiteService < Service\n service 'SiteService'\n\n operation :get_sites\n operation :get_locations, :locals => false\...
ruby
chosen
[ { "from": "human", "value": "Add tests for rails runner\n\n* Refs #42007\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"isolation/abstract_unit\"\nrequire \"rails/command\"\nrequire \"rails/commands/runner/runner_command\"\n\nclass Rails::RunnerTest < ActiveSupport::...
ruby
chosen
[ { "from": "system", "value": "Create payment instead of Application\n" }, { "from": "human", "value": "module Breeze\n module PayOnline\n class PaymentForm < Breeze::ApplyOnline::ApplicationPage\n\n field_group :payment_details do\n string_field :customer_name, :label => \"My na...
ruby
chosen
[ { "from": "human", "value": "Add A Better Findeer Ranem app\n" }, { "from": "gpt", "value": "class ABetterFinderRename < Cask\n url 'http://www.publicspace.net/download/ABFRX.dmg'\n homepage 'http://www.publicspace.net/ABetterFinderRename/'\n version 'latest'\n no_checksum\n link 'A Better ...
ruby
chosen
[ { "from": "system", "value": "Update Synology Cloud Station to v3.2-3487\n" }, { "from": "human", "value": "cask :v1 => 'synology-cloud-station' do\n version '3.2-3484'\n sha256 'aa544573ca9f7d3cb6693cba2406901a8b5e241eba0ed12762346c2f31b7c0cd'\n\n url \"https://global.download.synology.com/d...
ruby
chosen
[ { "from": "human", "value": "Add acceptance test for statsd_exporter\n" }, { "from": "gpt", "value": "require 'spec_helper_acceptance'\n\ndescribe 'prometheus statsd exporter' do\n it 'statsd_exporter works idempotently with no errors' do\n pp = 'include prometheus::statsd_exporter'\n # R...
ruby
chosen
[ { "from": "human", "value": "Add basic revisioning flow spec\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'pages revisioning' do\n\n before :each do\n login_as_admin\n georgia_page = create(:georgia_page)\n visit georgia.page_path(georgia_page)\n end\n\n it 'sta...
ruby
chosen
[ { "from": "system", "value": "Move the last of the Fortitude-specific stuff back into this gem." }, { "from": "human", "value": "module Spec\n module Helpers\n module FortitudeRailsHelpers\n def rails_server_project_root\n @rails_server_project_root ||= File.expand_path(File.join...
ruby
chosen
[ { "from": "system", "value": "Add integration test for deserialization with Marshal\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\nclass Serializable\n include Memoizable\n def method; end\n memoize :method\nend\n\ndescribe 'A serializable object' do\n let(:...
ruby
chosen
[ { "from": "system", "value": "Fix --exclude argument order to work on OS X. Allow exlude_dir to be an Array\n" }, { "from": "human", "value": "namespace :copy do\n\n archive_name = \"archive.tar.gz\"\n include_dir = fetch(:include_dir) || \"*\"\n exclude_dir = fetch(:exclude_dir) || \"\"\n...
ruby
chosen
[ { "from": "system", "value": "Make `git clone` work with ssh non-urls.\n" }, { "from": "human", "value": "require \"uri\"\n\nmodule Jimsy\n class Git\n class CloneService\n SAFE_HOSTS = %w[github.com bitbucket.org].freeze\n\n def initialize(uri, code_dir)\n @uri = URI(u...
ruby
chosen
[ { "from": "system", "value": "Add preliminary error control for open-uri\n" }, { "from": "human", "value": "class ListPullRequests::User\n attr_accessor :name, :all\n\n def initialize(name)\n @name = name\n @all = []\n end\n\n def get_all\n result = create_prs(\"https://api.github.c...
ruby
chosen
[ { "from": "system", "value": "Call 'amend_all_metadata' in tag_metadata task\n\nThis was renamed in 1645f66." }, { "from": "human", "value": "require 'rummager'\n\ndesc \"Apply metadata from the json file\"\ntask :tag_metadata do\n Indexer::MetadataTagger.amend_indexes_for_file(file_path)\nend\...
ruby
chosen
[ { "from": "system", "value": "Rename dots formatter Ruby gem to be idiomatic\n" }, { "from": "human", "value": "# encoding: utf-8\nGem::Specification.new do |s|\n s.name = 'dots-formatter'\n s.version = '1.0.0'\n s.authors = [\"Matt Wynne\", \"Aslak Hellesøy\"]\n s.description...
ruby
chosen
[ { "from": "human", "value": "Add sending migration to create sendings table" }, { "from": "gpt", "value": "class CreateSendings < ActiveRecord::Migration\n def change\n create_table :sendings do |t|\n t.references :notification, index: true, foreign_key: true\n t.string :type\n ...
ruby
chosen
[ { "from": "system", "value": "Change default behaviour to not reinstall apps when starting a new feature file\n" }, { "from": "human", "value": "require 'calabash-android/management/app_installation'\n\nAfterConfiguration do |config|\n FeatureMemory.feature = nil\nend\n\nBefore do |scenario|\n ...
ruby
chosen
[ { "from": "system", "value": "Add test for errors on post to waterings\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe WateringsController do\n before(:each) do\n User.create(email: \"test@test.com\", password: \"testPassword\")\n controller.session[:user_id] = User....
ruby
chosen
[ { "from": "system", "value": "Add specs for visibility of top level methods and script binding\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"main#def\" do\n after :each do\n ...
ruby
chosen
[ { "from": "system", "value": "Choose deployment branch before git:commit_log\n" }, { "from": "human", "value": "require 'capistrano'\n\nunless Capistrano::Configuration.respond_to?(:instance)\n abort \"capistrano-nvie-git-workflow requires Capistrano v2\"\nend\n\nrequire 'cap_git_tools/tasks'\n...
ruby
chosen
[ { "from": "system", "value": "Support setting ledger id on invoice lines\n" }, { "from": "human", "value": "module Elmas\n class SalesInvoiceLine\n # An sales_invoice_line should always have a reference to an item and to an sales_invoice.\n include Elmas::Resource\n include Elmas::Shar...
ruby
chosen
[ { "from": "system", "value": "TokenClassFilter: Support for :exclud => :all.\n\ngit-svn-id: 3003a0d67ecddf9b67dc4af6cf35c502b83f6d3b@370 282260fa-4eda-c845-a9f0-6527b7353f92\n" }, { "from": "human", "value": "module CodeRay\nmodule Encoders\n \n load :filter\n \n class TokenClassFilter < Fil...
ruby
chosen
[ { "from": "system", "value": "Use constants instead of literal to ease maintenance.\n" }, { "from": "human", "value": "module ToSource\n module Proc\n class Parser19\n module Extensions\n module Result\n\n def same_as_curr_line\n same_line(curr_line)\n ...
ruby
chosen
[ { "from": "system", "value": "Use split rather than lines\n\nSigned-off-by: Jordan Conway <bb3bf96ee76b8b43aa7e5815135ed8d69362d4f1@linuxfoundation.org>\n" }, { "from": "human", "value": "Puppet::Functions.create_function(:get_opengrok_fname) do\n dispatch :get_opengrok_fname do\n param 'Str...
ruby
chosen
[ { "from": "system", "value": "Switch ERB to use keyword arguments\n\nPositional arguments were deprecated in Ruby 3.\r\nChange is backwards-compatible to Ruby 2.3.\r\n\r\nResolves #1547." }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Nanoc::Filters\n # @api private\n ...
ruby
chosen