conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add options to time entries\n" }, { "from": "human", "value": "require 'skr/db/migration_helpers'\n\nclass CreateTimeEntries < ActiveRecord::Migration\n def change\n create_skr_table :time_entries do |t|\n t.skr_reference :customer_project, sing...
ruby
chosen
[ { "from": "system", "value": "Revert migration version to 5.2\n\nKCH and Barts are still in Rails 5.2\n" }, { "from": "human", "value": "class AddDeviseLockable < ActiveRecord::Migration[6.0]\n def change\n add_column :users, :failed_attempts, :integer, default: 0, null: false\n add_colum...
ruby
chosen
[ { "from": "system", "value": "Make compatible with older versions of Chef. (before version 12)\n" }, { "from": "human", "value": "name 'aws'\nmaintainer 'Chef Software, Inc'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache 2.0'\ndescription 'LWRPs for managing AWS resources'\nlong_descript...
ruby
chosen
[ { "from": "system", "value": "Remove obsolete chef-solo-search and users dependencies\n" }, { "from": "human", "value": "name \"config-driven-helper\"\nmaintainer \"Inviqa\"\nmaintainer_email \"msimons@inviqa.com\"\nlicense \"Apache 2.0\"\ndescription \"enabl...
ruby
chosen
[ { "from": "system", "value": "Update for Docker version bump.\n" }, { "from": "human", "value": "# encoding: utf-8\nname 'octohost'\nmaintainer 'Darron Froese'\nmaintainer_email 'darron@froese.org'\nlicense 'Apache 2.0'\ndescription 'Installs/configures octohost'\...
ruby
chosen
[ { "from": "system", "value": "Use SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'bash-shellshock'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nli...
ruby
chosen
[ { "from": "system", "value": "Update Schema::DSL to work with the new constructor\n" }, { "from": "human", "value": "require 'rom/sql/schema/inferrer'\nrequire 'rom/sql/schema/associations_dsl'\n\nmodule ROM\n module SQL\n class Schema < ROM::Schema\n class DSL < ROM::Schema::DSL\n ...
ruby
chosen
[ { "from": "system", "value": "Correct the defautl enw server class reference\n" }, { "from": "human", "value": "require 'stacks/namespace'\nrequire 'stacks/machine_def'\n\nclass Stacks::NameServer < Stacks::MachineDef\n\n attr_reader :environment, :virtual_service\n\n def initialize(virtual_se...
ruby
chosen
[ { "from": "system", "value": "Add need ID to workplace pensions campaign\n" }, { "from": "human", "value": "require 'registerable_campaign'\n\nnamespace :panopticon do\n desc \"Register campaign pages with panopticon\"\n task :register => :environment do\n require 'gds_api/panopticon'\n ...
ruby
chosen
[ { "from": "system", "value": "Add class Expression for namespacing\n" }, { "from": "human", "value": "Dir[File.dirname(__FILE__) + '/lib/**/*.rb'].each {|file| require file }\n\nclass TernaryExpression\n def initialize(variable_terminals, depth)\n @operator = get_operator\n @operand_1 = ...
ruby
chosen
[ { "from": "system", "value": "Change arr.map to arr.each (ah, THAT'S how to do a foreach in Ruby)\n" }, { "from": "human", "value": "require 'json'\n\nmain_info = {};\n\nproj_list = Dir['/home/ethan/games/kerbal/CKAN-meta/*']\n\n# TODO once I can access docs, see if ruby would normally use a for...
ruby
chosen
[ { "from": "system", "value": "Implement initializing Node with a block\n" }, { "from": "human", "value": "# Copyright (C) 2016 Colin Fulton\n# All rights reserved.\n#\n# This software may be modified and distributed under the\n# terms of the three-clause BSD license. See LICENSE.txt\n# (located ...
ruby
chosen
[ { "from": "system", "value": "Remove rspec/mocks require from generator test.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rspec/mocks'\nrequire 'rspec/rails/mocks'\n\nrequire 'generator_spec/test_case'\nrequire 'generators/cocoon/install/install_generator'\n\ndescribe Coco...
ruby
chosen
[ { "from": "system", "value": "Update Garmin Basecamp to 4.5.1\n" }, { "from": "human", "value": "cask :v1 => 'garmin-basecamp' do\n version '4.5.0'\n sha256 '78e07cb729a6bfac2e2e86db54853f1574130c5bbf207a5ff476368f1f997eaf'\n\n url \"http://download.garmin.com/software/BaseCampforMac_#{versio...
ruby
chosen
[ { "from": "system", "value": "Add rspec to gemspec as non-development dependency\n" }, { "from": "human", "value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire File.dirname(__FILE__) + '/lib/messagemedia/versio...
ruby
chosen
[ { "from": "system", "value": "Add update method to initative controller.\n" }, { "from": "human", "value": "class InitiativesController < ApplicationController\n\n def index\n @initiatives = Initiative.all\n @initiatives_grid = InitiativesGrid.new(params[:initiatives_grid]) do |scope|\n ...
ruby
chosen
[ { "from": "system", "value": "REFACTOR : making things much faster by only getting the data we need\n" }, { "from": "human", "value": "module ActsAsBloomfilter\n\n require 'bloomfilter-rb'\n\n def self.included base\n base.extend(ClassMethods)\n end\n\n module ClassMethods\n\n def acts...
ruby
chosen
[ { "from": "human", "value": "Add integration test for invalid user signup\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass UsersSignupTest < ActionDispatch::IntegrationTest\n\n test 'invalid signup information does not create new user' do\n get signup_path\n assert_no_diffe...
ruby
chosen
[ { "from": "system", "value": "Reduce coverage to current level\n" }, { "from": "human", "value": "require 'pathname'\n\nrequire 'boot'\nrequire 'mocha/setup'\n\nunless ENV['COVERAGE'] == 'off'\n COVERAGE_THRESHOLD = 37\n require 'simplecov'\n require 'simplecov-rcov'\n require 'coveralls'\n ...
ruby
chosen
[ { "from": "system", "value": "Enforce English locale for each test\n\nSome tests set the locale to :cy without cleaning up after themselves,\nresulting in transient failures\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'simplecov-rcov'\n\nSimpleCov.start 'rails'\nSimpleCov.for...
ruby
chosen
[ { "from": "system", "value": "Update test User class to have the correct superclass\n" }, { "from": "human", "value": "unless ENV['TRAVIS']\n require 'simplecov'\n require 'simplecov-rcov'\n SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter\n SimpleCov.start\nelse\n require 'coveral...
ruby
chosen
[ { "from": "system", "value": "Use bundler to load stuff" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] ||= 'test'\n\nrequire File.expand_path('../dummy/config/environment.rb', __FILE__)\n\nrequire 'test/unit'\nrequire 'rubygems'\nrequire 'mocha'\nrequire 'active_support/core_ext'\n\nrequire...
ruby
chosen
[ { "from": "system", "value": "Use provider for event uniqueness.\n" }, { "from": "human", "value": "module EventProvider\n class Base\n include Comparable\n\n class << self\n def fetch\n raise NotImplementedError\n end\n end\n\n attr_reader :id, :title, :link, :date...
ruby
chosen
[ { "from": "system", "value": "Create YongIdentify module and prepend to Message class\n" }, { "from": "human", "value": "require 'cinch'\n\nmodule Cinch\n class Message\n\n def is_admin?\n self.user.host == $master\n end\n\n def is_op?\n ops = self.channel.ops.map { |usr| usr...
ruby
chosen
[ { "from": "system", "value": "Fix problem with resources without dates.\n" }, { "from": "human", "value": "module ResourcesHelper\n def add_custom_nav_class\n if current_page?(controller: 'resources')\n \"resources-nav\"\n end\n end\n\n def format_date(date)\n date.strftime(\"%B...
ruby
chosen
[ { "from": "system", "value": "Use implicit reference to class instead of explicit reference.\n\n" }, { "from": "human", "value": "require 'mocha/single_return_value'\n\nmodule Mocha # :nodoc:\n \n class ReturnValues # :nodoc:\n \n def self.build(*values)\n ReturnValues.new(*values.m...
ruby
chosen
[ { "from": "system", "value": "Replace @options variable in Recurrence\n" }, { "from": "human", "value": "require \"montrose/rule\"\nrequire \"montrose/chainable\"\n\nmodule Montrose\n class Recurrence\n include Chainable\n\n MONTHS = Date::MONTHNAMES\n DAYS = Date::DAYNAMES\n\n attr...
ruby
chosen
[ { "from": "system", "value": ":hocho: Remove not working self reply\n" }, { "from": "human", "value": "module Ruboty\n module Kinoco\n class Handler < Ruboty::Handlers::Base\n on(/ohayo(?<date>\\Z|\\s+.+)/, name: 'ohayo', hidden: true, description: 'show morning greet')\n on(...
ruby
chosen
[ { "from": "system", "value": "Create migrations folder if it doesn't exist.\n" }, { "from": "human", "value": "require 'active_support/inflector'\nrequire 'erb'\n\nmodule OrientdbSchemaMigrator\n class InvalidMigrationName < StandardError; end\n\n class MigrationGenerator\n\n class Migratio...
ruby
chosen
[ { "from": "system", "value": "Use of custom objects is not necessary here\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mlb/version'\n\nGem::Specification.new do |spec|\n spec.add...
ruby
chosen
[ { "from": "system", "value": "Remove `.b1` from the version number. It's 1.0.0 now." }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"EEEOperationCenter\"\n s.version = \"1.0.0.b1\"\n s.summary = \"Say 'no' to God-classes, chop them up with the o...
ruby
chosen
[ { "from": "human", "value": "Convert age in second to actual age\n" }, { "from": "gpt", "value": "def find_age_from_Sec\n puts \"Please Enter Your Age in second\"\n age = gets.chomp.to_i #Convert to integer\n calc_age = age / (60 * 60 * 24 * 365)\n puts \"Your are #{calc_age} years old\"\nen...
ruby
chosen
[ { "from": "human", "value": "Define an example of GenreInformation\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe RakutenWebService::GenreInformation do\n describe '#initialize' do\n let(:expected_params) do\n {\n \"parent\" => [],\n \"current\" => [],\...
ruby
chosen
[ { "from": "system", "value": "Move comment above method define\n" }, { "from": "human", "value": "require 'rugged'\n\nmodule Git\n module CurrentBranch\n class Local\n def initialize(options = {})\n @path = options[:path]\n @repo = ::Rugged::Repository.new(@path)\n en...
ruby
chosen
[ { "from": "system", "value": "Fix line wrap to be consistent with other gems\n" }, { "from": "human", "value": "# encoding: utf-8\n# Be sure to restart your server when you modify this file.\n\nTestApp::Application.config.session_store(\n :cookie_store, :key => '_test_app_session')\n\n# Use the...
ruby
chosen
[ { "from": "system", "value": "Add test for HDRHistrogram record corrected values\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass HDRHistogramTest < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::HDRHistogram::VERSION\n end\n\n def test_hdr\n\n en...
ruby
chosen
[ { "from": "system", "value": "Remove configure method from gem spec\n" }, { "from": "human", "value": "MRuby::Gem::Specification.new('waah-app') do |spec|\n spec.license = 'MPL 2'\n spec.author = 'furunkel'\n spec.bins = %w(waah)\n\n class << self\n def configure(conf, platform, build_de...
ruby
chosen
[ { "from": "system", "value": "NEW: Check exception is raised in test breaks not colliding\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass BreakTest < ActiveSupport::TestCase\n def test_breaks_not_colliding\n data = {\n year: 2023,\n period: 'T1',\n start_date...
ruby
chosen
[ { "from": "system", "value": "Remove failure test; non-existent engine sometimes has options\n" }, { "from": "human", "value": "Shindo.tests('AWS::RDS | db instance option requests', ['aws', 'rds']) do\n tests('success') do\n\n tests(\"#describe_orderable_db_instance_options('mysql)\").forma...
ruby
chosen
[ { "from": "system", "value": "Use `case` instead of `return if`\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Parser\n class EventDescription\n def initialize(description)\n @description = description.to_s\n end\n\n def user_name\n Parser.configuration.users[...
ruby
chosen
[ { "from": "system", "value": "Convert fixture_path to use File.dirname\n" }, { "from": "human", "value": "require 'rspec-puppet'\n\nfixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))\n\nRSpec.configure do |c|\n c.module_path = File.join(fixture_path, 'modules')\n c.mani...
ruby
chosen
[ { "from": "system", "value": "Allow for array of params used in products\n" }, { "from": "human", "value": "module Shipwire\n class ParamConverter\n attr_accessor :params\n\n def initialize(params)\n if params.is_a?(Array)\n @params = params.each_with_object([]) do |item, hsh|...
ruby
chosen
[ { "from": "system", "value": "Put source path last in cmake args\n" }, { "from": "human", "value": "require 'formula'\n\nclass Openmeeg < Formula\n homepage 'http://openmeeg.gforge.inria.fr/'\n head 'svn://scm.gforge.inria.fr/svn/openmeeg/trunk', :using => :svn\n url 'svn://scm.gforge.inria.f...
ruby
chosen
[ { "from": "system", "value": "Fix style complains by rubocop\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire 'spec_helper'\n\ndescribe Morpher::Evaluator::Transformer::Map do\n let(:object) { described_class.new(operand) }\n\n context '#intransitive' do\n let(:operand) { Mor...
ruby
chosen
[ { "from": "system", "value": "Fix account statuses cleanup settings controller for glitch-soc's theming system\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass StatusesCleanupController < ApplicationController\n layout 'admin'\n\n before_action :authenticate_user!\n b...
ruby
chosen
[ { "from": "system", "value": "Refactor komoju credit card gateway\n" }, { "from": "human", "value": "module Spree\n class Gateway::KomojuCreditCard < KomojuGateway\n def auto_capture?\n true\n end\n\n def purchase(money, source, options)\n options = change_options_to_dollar(o...
ruby
chosen
[ { "from": "system", "value": "Allow to use Alchemy CMS 3.1.0.beta1\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"alchemy/devise/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ...
ruby
chosen
[ { "from": "system", "value": "Use more specific CSS selector." }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Navigating to a task', js: true do\n context 'when the task exists and the user owns it' do\n\n let!(:circle) { submit_form(:circle_create_form).result }\n le...
ruby
chosen
[ { "from": "system", "value": "Fix down migrate on pg_search plugin\n" }, { "from": "human", "value": "class CreateIndexesForSearch < ActiveRecord::Migration\n def self.up\n searchables = %w[ article comment qualifier national_region certifier profile license scrap category ]\n klasses = s...
ruby
chosen
[ { "from": "system", "value": "Fix crash when invalid addresses are linked in HTML or Markdown toots\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'singleton'\n\nclass TagManager\n include Singleton\n include RoutingHelper\n\n def web_domain?(domain)\n domain.n...
ruby
chosen
[ { "from": "system", "value": "Revert specific changes done to general Endpoint class\n\nRevert specific changes done to general Endpoint class\n" }, { "from": "human", "value": "class Endpoint < ActiveRecord::Base\n belongs_to :resource, :polymorphic => true\n\n before_save :delete_ceilometer_...
ruby
chosen
[ { "from": "system", "value": "Update models to automatically update vote_count\n\nCreate an after_save callback on the vote model, that automatically updates the vote_count of the parent object.\n" }, { "from": "human", "value": "class Response < ActiveRecord::Base\n before_save :count_votes\n ...
ruby
chosen
[ { "from": "system", "value": "Update Android NDK to r4.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass AndroidNdk <Formula\n url 'http://dl.google.com/android/ndk/android-ndk-r3-darwin-x86.zip'...
ruby
chosen
[ { "from": "system", "value": "Use \"cd\" instead of \"Dir.chdir\"\n\n* And \"mkdir\" isntead of \"Dir.mkdir\"\n* And \"Dir[]\" instead of \"Dir.glob\"\n* Also style fixes and nitpicks\n" }, { "from": "human", "value": "require 'formula'\n\nclass GearmanPhp < Formula\n homepage 'http://pecl.php....
ruby
chosen
[ { "from": "system", "value": "Raise an error if one of the sample cannot be found\n" }, { "from": "human", "value": "require 'lims-core/actions/action'\n\nmodule Lims::LaboratoryApp\n module Laboratory\n class Sample\n class SwapSamples\n include Lims::Core::Actions::Action\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update version for flask inclusion.\n\nIssues: #10.\n" }, { "from": "human", "value": "name \"margarine\"\nmaintainer \"Hart Hoover\"\nmaintainer_email \"hart.hoover@rackspace.com\"\nlicense \"as-is\"\ndescription \"Installs and confi...
ruby
chosen
[ { "from": "system", "value": "Use SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'remote_install'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'releng@chef.io'\nlicens...
ruby
chosen
[ { "from": "system", "value": "Use the version file in the Chef cookbook\n" }, { "from": "human", "value": "name 'chef-sugar'\nmaintainer 'Seth Vargo'\nmaintainer_email 'sethvargo@gmail.com'\nlicense 'Apache 2.0'\ndescription 'Installs chef-sugar. Please see the ch...
ruby
chosen
[ { "from": "system", "value": "Update supports versions for rhel/centos.\n" }, { "from": "human", "value": "name 'nrpe-ng'\nmaintainer 'John Bellone'\nmaintainer_email 'jbellone@bloomberg.net'\nlicense 'Apache 2.0'\ndescription 'Application cookbook which installs and configures NRPE.'\nlong_desc...
ruby
chosen
[ { "from": "system", "value": "Use before_save instead of after_touch to avoid a world of nonsense\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass AudioVersion < BaseModel\n\n VALID = 'valid'.freeze\n INVALID = 'invalid'.freeze\n\n belongs_to :story, -> { with...
ruby
chosen
[ { "from": "system", "value": "Fix bug that would prevent users from being visible by default after login\n" }, { "from": "human", "value": "class Authorization < ActiveRecord::Base\n belongs_to :user\n\n def self.user_from_omniauth(auth)\n authorization = self.find_or_initialize_by(github_u...
ruby
chosen
[ { "from": "system", "value": "Modify session to expire after 15 minutes of no activity.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_store, key: '_BHCDatabase_session'\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add Pry as a development dependency.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'que/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Include the reflection for the die exercise\n" }, { "from": "human", "value": "# Die Class 1: Numeric\n\n# I worked on this challenge by myself\n\n# I spent [] hours on this challenge.\n\n# 0. Pseudocode\n\n# Input:\n# Output:\n# Steps:\n\n\n# 1. Initial Solution\n\...
ruby
chosen
[ { "from": "system", "value": "Update libffi and libiconv to the latest\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "# THIS IS NOW HAND MANAGED, JUST EDIT THE THING\n# Buildkite consume this so keep it machine-parsable.\n\noverr...
ruby
chosen
[ { "from": "system", "value": "Use the latest libxml2, libxslt, libyaml, and openssl\n\nlibxml2:\n A GIANT list of bugfixes and these CVEs:\n\nCVE-2017-9050\nCVE-2017-9049\nCVE-2017-9048\nCVE-2017-9047\nCVE-2017-8872\nCVE-2016-9318\n\nhttps://www.cvedetails.com/vulnerability-list/vendor_id-1962/product_id-3...
ruby
chosen
[ { "from": "system", "value": "Update CKEditor plugins to be precompiled\n\nThe new version of CKEditor loads the balloonpanel and balloontoolbar\nplugins. Even if we don't need them, I haven't found a way to prevent\nthem from loading, meaning we have to precompile them.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Update gem summary and description\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-lightsail/version'\nrequire 'English'\n\nGem::Specification.n...
ruby
chosen
[ { "from": "system", "value": "Change order, no content changes.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass HelperTest < ActionView::TestCase\n test 'link_to_back first time' do\n assert_equal \"<a href=\\\"javascript:history.back()\\\">Back</a>\",\n link_to_back\n...
ruby
chosen
[ { "from": "system", "value": "Remove unused accessors `left` and `right` on `DeleteStatement`\n\nUse `relation` and `wheres` instead.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Arel # :nodoc: all\n module Nodes\n class DeleteStatement < Arel::Nodes::Node\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor Sanitisable concern to use ActiveSupport class_attribute\n" }, { "from": "human", "value": "require 'peoplefinder'\n\nmodule Peoplefinder::Concerns::Sanitisable\n extend ActiveSupport::Concern\n\n included do\n class_variable_set(:@@fields_to_sanitise,...
ruby
chosen
[ { "from": "system", "value": "Add to generator cp of config/unicorn.rb default.\n" }, { "from": "human", "value": "puts \"Adding default files ...\".magenta\n\ncopy_static_file 'app/assets/stylesheets/reset.css'\ncopy_static_file 'app/views/layouts/application.html.haml'\ncopy_static_file 'Procf...
ruby
chosen
[ { "from": "system", "value": "Use event_id when not related to correlation id\n\nA `message_id` should be used only in context of correlation,\nin all other places use `event_id`.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyEventStore\n class LinkByMetadata\n\...
ruby
chosen
[ { "from": "system", "value": "Fix controller category_as_json method to pass category as param\n" }, { "from": "human", "value": "module Headlines\n class CategoriesController < ApplicationController\n skip_before_action :redirect_to_login_if_required\n\n respond_to :html, :json\n\n de...
ruby
chosen
[ { "from": "system", "value": "Support rails 5 in webhooks controller\n" }, { "from": "human", "value": "module ShopifyApp\n class WebhooksController < ApplicationController\n include ShopifyApp::WebhookVerification\n\n class ShopifyApp::MissingWebhookJobError < StandardError; end\n\n d...
ruby
chosen
[ { "from": "system", "value": "Fix issue with autoloading commmunications\n\nThis was breaking on changes in developement. Fully qualifying the names\nfixes it.\n" }, { "from": "human", "value": "require_relative \"./communications\"\n\nmodule Spree\n module Adyen\n module Presenters\n #...
ruby
chosen
[ { "from": "system", "value": "Add mongo port in raw because build fail on travis\n" }, { "from": "human", "value": "require 'mongo'\n\ninclude Mongo\n\nclass Revuelog\n attr_reader :time, :nick, :message\n\n def initialize(time, nick, message)\n @time = time\n @nick = nick\n @me...
ruby
chosen
[ { "from": "system", "value": "Fix improper indenting as per Rubocop check\n" }, { "from": "human", "value": "module Entity\n class Doc < Base\n expose :id\n expose :title\n expose :body\n expose :keywords\n expose :title_tag\n expose :meta_description\n expose :category_id\...
ruby
chosen
[ { "from": "system", "value": "Change gem version to 1.0.0\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\n# Spec reference:\n# http://docs.rubygems.org/read/chapter/20\n\nspec = Gem::Specification.new do |s|\n s.name = 'pidgin2adium'\n s.version = '0.0.1'\n # Summary is required\n s.su...
ruby
chosen
[ { "from": "system", "value": "Fix all day calendar invites\n" }, { "from": "human", "value": "class CalendarInvite\n include PrettyUrlHelper\n include FormattedDateHelper\n\n def initialize(outcome = Outcome.new)\n @calendar = build_calendar(outcome)\n end\n\n def to_ical\n @calendar&...
ruby
chosen
[ { "from": "system", "value": "Stop looking at historial STAR data on every import\n\n+ According to our partners at STAR, the \"Generic SM Extract.csv\" file naming convention is the active one\n+ So that's the only one we want to be reading when it comes to the regular, nightly data import process\n" }, ...
ruby
chosen
[ { "from": "human", "value": "Introduce smoke tests for the immediate processor\n" }, { "from": "gpt", "value": "require 'test_helper'\nrequire 'sg_mailer/immediate_delivery_processor'\n\nmodule SGMailer\n class ImmediateDeliveryProcessorTest < Minitest::Test\n def setup\n SGMailer.confi...
ruby
chosen
[ { "from": "system", "value": "Remove deprecated `image` and `style` attributes when seeding the DB\n" }, { "from": "human", "value": "section \"Creating banners\" do\n Proposal.last(3).each do |proposal|\n title = Faker::Lorem.sentence(word_count = 3)\n description = Faker::Lorem.sentence...
ruby
chosen
[ { "from": "system", "value": "Disable validations when fixing command paper numbers\n\nWe have already checked the new paper number is valid,\nso there's no reason to be concerned about (other) validations.\n\nrake aborted!\nActiveRecord::RecordInvalid: Validation failed: This publication already has a file...
ruby
chosen
[ { "from": "system", "value": "Fix bug: don't update options unless explicitly given\n" }, { "from": "human", "value": "Admin::ProductsController.class_eval do\n \n protected\n \n def assign_option_values\n option_values = params[:option_values] || {}\n @object.master.option_values = op...
ruby
chosen
[ { "from": "system", "value": "Whitelist providers to avoid session data being tampered with\n" }, { "from": "human", "value": "require './lib/actions/oauth_signup_action'\n\n#\n# Handle signup or signin\n# from various oauth providers\n#\n# Heavily overlaps with Authentications controller\n#\ncl...
ruby
chosen
[ { "from": "system", "value": "[TAV-466] Add port metadata to JSON output.\n\nNeeded for Scratchpads integration. Added MIME type and size fields to the\noutput descriptions in JSON.\n" }, { "from": "human", "value": "json.partial! \"info\", :run => @run\n\njson.partial! \"inputs\", :inputs => @r...
ruby
chosen
[ { "from": "system", "value": "Include build task of chrome extension in top-level build task\n" }, { "from": "human", "value": "PROJECT_ID = 'work2d-162714'.freeze\nDOMAIN = 'code2d.net'.freeze\nREGION = 'us-east-1'.freeze\n\nTERRAFORM_VARS = \"-var domain=#{DOMAIN} -var region=#{REGION}\".freez...
ruby
chosen
[ { "from": "system", "value": "Remove dead code for parsing label response." }, { "from": "human", "value": "module ActiveMerchant #:nodoc:\n module Shipping\n\n # This is UPS specific for now; the hash is not at all generic\n # or common between carriers.\n\n class LabelResponse < Resp...
ruby
chosen
[ { "from": "system", "value": "Use %Q to avoid escaping quotes.\n" }, { "from": "human", "value": "module Ambition\n module Adapters\n module AmbitiousSphinx\n class Base\n def has_field? str\n str =~ /:/\n end\n \n def has_operator? str\n st...
ruby
chosen
[ { "from": "human", "value": "Add ReFS probe mechanism (fail if detected)\n" }, { "from": "gpt", "value": "module ReFSProbe\n FS_SIGNATURE = [0x00, 0x00, 0x00, 0x52, 0x65, 0x46, 0x53, 0x00] # ...ReFS.\n\n def self.probe(dobj)\n $log.debug \"ReFSProbe >> dobj=#{dobj}\" if $log\n return f...
ruby
chosen
[ { "from": "system", "value": "Remove window shim from ExecJS render\n\nThis can cause issues when using 3rd party libraries that do a presence\ncheck on window to determine if browser functions are available\n" }, { "from": "human", "value": "module React\n module ServerRendering\n # A bare-...
ruby
chosen
[ { "from": "system", "value": "Allow own model class to be defined\n" }, { "from": "human", "value": "module ScopedSerializer\n class CollectionSerializer < ArraySerializer\n\n def initialize(*args)\n super\n\n # Configure root element\n @options[:root] = default_root_key(@arra...
ruby
chosen
[ { "from": "system", "value": "Fix issue with cookbook templates attempting to use incorrect cookbook templates.\n" }, { "from": "human", "value": "# encoding: UTF-8\n#\n# Cookbook Name:: system\n# Provider:: profile\n#\n# Copyright 2012-2016, Chris Fordham\n#\n# Licensed under the Apache License...
ruby
chosen
[ { "from": "system", "value": "Clarify player ranking order in endpoint description\n" }, { "from": "human", "value": "module API\n module V1\n module Entities\n class Ranking < Grape::Entity\n expose :player, using: Entities::Player\n expose :rating\n end\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix email link to login\n" }, { "from": "human", "value": "class UserMailer < ApplicationMailer\n # default from: \"app51303535@heroku.com\"\n # layout 'mailer'\n\n def invite_mailer(user, tempass)\n @user = user\n @tempass = tempass\n @url = \"mikelikes...
ruby
chosen
[ { "from": "system", "value": "Change check for item existence\n" }, { "from": "human", "value": "class LockVersion < ApplicationRecord\n include Version\n belongs_to :target, polymorphic: true\n\n after_save do\n item = lock_version_target\n return unless item\n item.update_column(:l...
ruby
chosen
[ { "from": "system", "value": "Refactor the handling of arrays in where predicates\n\nSimplifies the code slightly, isolates non-nil non-range values into a\nsingle array, which will make it easier to do things like apply type\ncasting to them in the future.\n" }, { "from": "human", "value": "mod...
ruby
chosen
[ { "from": "system", "value": "Allow for absolute config paths\n" }, { "from": "human", "value": "namespace :thebes do\n\n desc \"Build the sphinx config files\"\n task :build do\n unless File.exists?(File.join(Rails.root, 'config', 'sphinx.yml'))\n raise 'No config file present, please...
ruby
chosen
[ { "from": "system", "value": "Include go executables in gem\n" }, { "from": "human", "value": "# encoding: utf-8\nGem::Specification.new do |s|\n s.name = 'cucumber-formatter-dots'\n s.version = '1.0.3'\n s.authors = [\"Matt Wynne\", \"Aslak Hellesøy\"]\n s.description = 'Dots...
ruby
chosen