conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Move URL relativization into a processor" }, { "from": "gpt", "value": "require File.dirname(__FILE__) + '../../../resolver'\n\nmodule HtmlMockup::Release::Processors\n class UrlRelativizer < Base\n \n def initialize(options={})\n @options = {\n :u...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove explicit factories require\"\n\nThis reverts commit aeec22dc122a72da1332977efd510c2eb5004b72.\n" }, { "from": "human", "value": "require 'rspec/rails'\nrequire 'shoulda-matchers'\nrequire 'timecop'\n\n# this seems to be required for the CI to work pr...
ruby
chosen
[ { "from": "system", "value": "Make failsafe alert box async\n" }, { "from": "human", "value": "class Scheduler\n\n attr_accessor :timer\n\n def self.shared_scheduler\n Dispatch.once { @instance ||= new }\n @instance\n end\n\n def initialize\n\t\tfailsafe\n end\n\n def refresh_and_tri...
ruby
chosen
[ { "from": "system", "value": "Split out the ssh banner\n" }, { "from": "human", "value": "module Dap\nmodule Filter\n\nrequire 'digest/md5'\n\nclass FilterDecodeSSHKeyscan\n include BaseDecoder\n\n def decode(data)\n save = {}\n\n data.split(/\\n/).each do |line|\n case line.strip\...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for Interpreter::Arguments\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\nrequire \"spec_helper\"\n\ndescribe \"GraphQL::Execution::Interpreter::Arguments\" do\n class InterpreterArgsTestSchema < GraphQL::Schema\n class SearchParam...
ruby
chosen
[ { "from": "system", "value": "Fix generators on Rails master." }, { "from": "human", "value": "require 'generators/rails/scaffold_controller/scaffold_controller_generator'\n\nmodule Rails\n module Generators\n class RespondersControllerGenerator < ScaffoldControllerGenerator\n def self....
ruby
chosen
[ { "from": "system", "value": "Allow paying for ISIC by fkbooks\n" }, { "from": "human", "value": "class Api::CardsController < Api::ApiController\n before_filter :load_card\n def load_card\n @member = Member.find(params[:member_id])\n @card = @member.current_card\n\n # create a new ca...
ruby
chosen
[ { "from": "system", "value": "Add OPTIONS method to Hosts\n" }, { "from": "human", "value": "module Api\n class HostsController < BaseController\n CREDENTIALS_ATTR = \"credentials\".freeze\n AUTH_TYPE_ATTR = \"auth_type\".freeze\n DEFAULT_AUTH_TYPE = \"default\".freeze\n\n include S...
ruby
chosen
[ { "from": "system", "value": "Add redirect to correct url to CompaniesController\n" }, { "from": "human", "value": "class CompaniesController < ApplicationController\n before_action :find_user, only: :show\n helper_method :company\n\n expose :companies { Company.all }\n def index\n\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Fix full names not displaying in service dropdown\n" }, { "from": "human", "value": "class EducatorsController < ApplicationController\n\n # Authentication by default inherited from ApplicationController.\n\n def homepage\n redirect_to homepage_path_for_role(cu...
ruby
chosen
[ { "from": "system", "value": "Add New link only if necessary.\n" }, { "from": "human", "value": "module Admin::Resources::DataTypes::HasOneHelper\n\n def typus_form_has_one(field)\n setup_relationship(field)\n\n @items = Array.new\n if item = @item.send(field)\n @items << item\n ...
ruby
chosen
[ { "from": "system", "value": "Remove redundant GDS SSO initializer config\n\nThis was made redundant in [1].\n\n[1]: https://github.com/alphagov/gds-sso/pull/241\n" }, { "from": "human", "value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = ENV[\"OAUTH_ID\"] ...
ruby
chosen
[ { "from": "human", "value": "test/cli: Add tests for `kbsecret help`\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"helpers\"\n\n# Tests for KBSecret::CLI::Command::Help\nclass KBSecretCommandHelpTest < Minitest::Test\n include Helpers\n include Helpers::CLI\n\n d...
ruby
chosen
[ { "from": "system", "value": "Switch Client test to UDPAddr\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_relative '../test_helper'\nrequire_relative '../../lib/kamerling/addr'\nrequire_relative '../../lib/kamerling/client'\n\nmodule Kamerling\n describe Client do\...
ruby
chosen
[ { "from": "system", "value": "Add logout function and change error message for invalid login attempt\n" }, { "from": "human", "value": "module Api\n class SessionsController < ApplicationController\n skip_before_action :authenticate_user_from_token!\n\n # POST /user/login\n def create\...
ruby
chosen
[ { "from": "system", "value": "Bring formatting of V1::Hackbot::AuthController up to spec\n" }, { "from": "human", "value": "class V1::Hackbot::AuthController < ApplicationController\n CLIENT_ID = Rails.application.secrets.slack_client_id\n CLIENT_SECRET = Rails.application.secrets.slack_client...
ruby
chosen
[ { "from": "system", "value": "Add a 404 test for top level app\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rack_spec_helper'\nrequire 'tic_tac_toe/rack_shell'\n\ndescribe TicTacToe::RackShell do\n include Rack::Test::Methods\n\n def app\n TicTacToe::RackShell.new_shel...
ruby
chosen
[ { "from": "system", "value": "Update dependencies and add Rubocop and Phare\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sprockets_illusionist/version'\n\nGem::Specification.new d...
ruby
chosen
[ { "from": "system", "value": "Mark the Custom Button Groups with (Group)\n" }, { "from": "human", "value": "module TreeNode\n class CustomButtonSet < Node\n set_attribute(:text) do\n if @options[:type] == :sandt\n _(\"%{button_group_name} (Group)\") % {:button_group_name => @obje...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning in RetirementVisibilityService\n" }, { "from": "human", "value": "class RetirementVisibilityService\n def determine_visibility(retirement)\n fields_to_edit = []\n fields_to_hide = []\n\n if retirement > 0\n fields_to_edit += [:reti...
ruby
chosen
[ { "from": "system", "value": "Use github master branch of Oj\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'to_json/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Write a Track Sensor interface\n" }, { "from": "gpt", "value": "class TrackSensor\n def initialize(options = {})\n @device_glob = options[:device_glob] || '/dev/ttyUSB*'\n @devices = []\n @data = {}\n initialize_new_devices\n end\n\n # @return [String,...
ruby
chosen
[ { "from": "system", "value": "Remove silly broken assignment in spec\n\nThis is trying to assign the payment's source to source. Not only is\nthat the wrong thing to do (a payment is the source of a log_entry), but\nsince it's being built through the payment.log_entries association, it\nwill have no effect....
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec [ci skip]\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rabl-rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"rabl-rails\"\n s.version = RablRails::VERSION\n s.platform ...
ruby
chosen
[ { "from": "system", "value": "Test not very usefull.\nGem::Version.correct?(\"\") is true\n" }, { "from": "human", "value": "#\n# Cookbook Name:: backup\n# Recipe:: default\n#\n# Copyright 2011-2012, Cramer Development, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");...
ruby
chosen
[ { "from": "system", "value": "Use strings for mode and don't upgrade the package\n\nUpgrading packages in chef is a horrible idea\n" }, { "from": "human", "value": "#\n# Cookbook Name:: maradns\n# Recipe:: default\n#\n# Copyright 2009-2015, Chef Software, Inc.\n#\n# Licensed under the Apache Lic...
ruby
chosen
[ { "from": "system", "value": "Fix command for non-gzipped pages\n" }, { "from": "human", "value": "module ManBook\n class HtmlFormatter < Formatter\n def convert(file_name)\n # pipe through gunzip if gzipped\n if man_page_file =~ /\\.gz$/\n cmd = \"gunzip -c #{man_page_file}...
ruby
chosen
[ { "from": "system", "value": "Change API to be more flexible.\n" }, { "from": "human", "value": "module Metacrunch\n class Transformer\n require_relative \"./transformer/step\"\n require_relative \"./transformer/helper\"\n\n attr_reader :source, :target, :options\n\n\n def initializ...
ruby
chosen
[ { "from": "system", "value": "Remove order plugin from explicit precompilation list.\n\nrequire.js plugins on the asset path will be correctly picked up by the\nr.js build process, so there's no need to explicitly precompile them.\n" }, { "from": "human", "value": "require 'requirejs/rails/confi...
ruby
chosen
[ { "from": "system", "value": "Remove redundant TODO note\nMaster branch is thread safe\n" }, { "from": "human", "value": "module Sendvia\n class Base < ActiveResource::Base\n self.include_format_in_path = false\n self.primary_key = :Id\n\n REST_API_ENDPOINT = 'https://www.sendvia.co.uk...
ruby
chosen
[ { "from": "system", "value": "Fix memory leak by clearing the delegated_objects array in our finalizer\n" }, { "from": "human", "value": "require 'serializable_decorator/version'\nrequire 'delegate'\nrequire 'json' unless Object.method_defined?(:to_json)\n\nclass SerializableDecorator < Delegato...
ruby
chosen
[ { "from": "system", "value": "Use the right method for this test.\n" }, { "from": "human", "value": "Shindo.tests('Excon request methods') do\n\n with_rackup('request_methods.ru') do\n\n tests 'one-offs' do\n\n tests('Excon.get').returns('GET') do\n Excon.get('http://localhost:92...
ruby
chosen
[ { "from": "system", "value": "Update to latest server version" }, { "from": "human", "value": "namespace :image_server do\n desc 'Installs the image server if not available'\n task :install do\n require 'net/http'\n require 'uri'\n require 'open-uri'\n require 'fileutils'\n\n cl...
ruby
chosen
[ { "from": "human", "value": "Add redirects for previously 404'ing pages\n\nThese two pages return 404, but have the same content_id as similar\npages.\n\n-\n/government/world/organisations/british-trade-cultural-office-taiwan/abo\nut/recruitment is a sub page of an organisation that has been renamed\nin htt...
ruby
chosen
[ { "from": "system", "value": "Fix \"constant redefinition\" warnings when running specs\n\n* test/openssl_helper.rb:19 warning: already initialized constant OpenSSLHelper::ALGORITHMS\n* test/openssl_helper.rb:4 warning: previous definition of ALGORITHMS was here\n" }, { "from": "human", "value"...
ruby
chosen
[ { "from": "system", "value": "Update the user factory to use a sequence for the user name\n" }, { "from": "human", "value": "# User factory\nFactoryGirl.define do\n factory :user do\n username 'developer'\n email 'developer@example.com'\n firstname 'Dev'\n lastname 'Eloper'\n pas...
ruby
chosen
[ { "from": "system", "value": "Simplify spec to make more understandable.\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire 'voice_chapters'\n\ndescribe Voice_Chapters do\n\n before do\n text = \"In the beginning, God created the heavens and the earth.\n The earth...
ruby
chosen
[ { "from": "system", "value": "Add helper methods to assist with spec'ing deprecations.\n\nThe most consistently tricky part to get right is the call site,\nso that's what this helper method helps with.\n" }, { "from": "human", "value": "module RSpecHelpers\n def relative_path(path)\n RSpec::...
ruby
chosen
[ { "from": "system", "value": "Enable gettimeofday based spec on Windows\n" }, { "from": "human", "value": "#\n# This file is part of ruby-ffi.\n# For licensing, see LICENSE.SPECS\n#\n\nrequire File.expand_path(File.join(File.dirname(__FILE__), \"spec_helper\"))\n\nmodule RbxAttachFunctionSpecs\n...
ruby
chosen
[ { "from": "system", "value": "Reset RspecApiDocumentations.configurations to isolate test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe RspecApiDocumentation do\n let(:configuration_set) { stub }\n\n describe \"#configurations\" do\n before do\n RspecApiDocument...
ruby
chosen
[ { "from": "system", "value": "FIX: Use `name` instead of \"Complete (40)\"\n\nAlso move `current_member` down in order of appearance to read more like\nnewspaper articles[1].\n\n[1]: http://monami555.github.io/2016/01/13/clean-code-robert-c-martin-notes.html#4-formatting\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.3.0 to 0.0.3.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-entity_projection'\n s.version = '0.0.3.0'\n s.summary = 'Projects an event stream into an ent...
ruby
chosen
[ { "from": "system", "value": "Add test for displaying tenant name for Service Catalog Bundle\n\nAlso fix existing failing spec and make small improvements.\n" }, { "from": "human", "value": "describe \"catalog/_sandt_tree_show.html.haml\" do\n before do\n set_controller_for_view(\"catalog\")...
ruby
chosen
[ { "from": "system", "value": "Disable service outside of if.\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) 2012 Opscode, Inc.\n# Copyright:: Copyright (c) 2015 GitLab B.V.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lic...
ruby
chosen
[ { "from": "human", "value": "Clean up some old admin privileges.\n" }, { "from": "gpt", "value": "class RemoveOldAdminPrivileges < ActiveRecord::Migration\n def self.up\n change_table :admins do |t|\n %w(manage_music manage_log manage_shares manage_prayer_signups run_reports).each do |c...
ruby
chosen
[ { "from": "system", "value": "Update by key, instead of name, that is not compatible\nbetween environments (uat,nr,prod,...)\n" }, { "from": "human", "value": "class SetsVisualChecksForPico < ActiveRecord::Migration\n def self.up\n ActiveRecord::Base.transaction do\n [*InstrumentProcess...
ruby
chosen
[ { "from": "human", "value": "Support addition for time as well as comparison\n" }, { "from": "gpt", "value": "module AddActiveSupportDurationToEoTime\n def inc(t, dir = 1)\n t = t.to_i if t.kind_of?(ActiveSupport::Duration)\n super(t, dir)\n end\nend\n\nrequire 'et-orbi'\nEtOrbi::EoTime....
ruby
chosen
[ { "from": "system", "value": "Sort cites_suspensions from most recent to oldest\n" }, { "from": "human", "value": "class Admin::CitesSuspensionsController < Admin::SimpleCrudController\n before_filter :load_lib_objects, :only => [:new, :edit]\n\n def create\n create! do |success, failure|\n...
ruby
chosen
[ { "from": "system", "value": "Fix attribute type in generator" }, { "from": "human", "value": "class <%= class_name %>\n include MongoMapper::Document\n\n<% attributes.each do |attribute| -%>\n key :<%= attribute.name %>, <%= attribute.to_s.camelcase %>\n<% end -%>\n<% if options[:timestamps] ...
ruby
chosen
[ { "from": "system", "value": "Add wait time in the test" }, { "from": "human", "value": "require \"test_helper\"\n\nmodule GobiertoAdmin\n class DirtyFormsTest < ActionDispatch::IntegrationTest\n def setup\n super\n @path = edit_admin_user_path(user)\n end\n\n def admin\n ...
ruby
chosen
[ { "from": "system", "value": "Update the EnumerableAdapter for the PaginateProcessor to more consistently handle edgecases\n\nWhen asking for a page number that is outside of the meaningful range (e.g. page 10 of a collection that would only have 5 meaningful pages), should return an empty collection.\n" ...
ruby
chosen
[ { "from": "system", "value": "Improve performance by avoiding update if table position didn't change\n" }, { "from": "human", "value": "class Admin::PositionUpdaterController < Admin::ForestController\n def update\n resource = params[:resource].constantize\n\n authorize resource, :update_...
ruby
chosen
[ { "from": "system", "value": "Remove unused branch because it is not called from anywhere\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ninclude ERBh\n\nERBh.define_method(:i) do |obj|\n if obj.nil? || (obj.respond_to?(:empty?) && obj.empty?)\n @_erbout.sub!(/,\\s*\\z/, ...
ruby
chosen
[ { "from": "system", "value": "Change steps to use world\n" }, { "from": "human", "value": "Given(/^the stakeholder has \"([^\"]*)\" power\\/influence$/) do |arg|\n pending\nend\n\nAnd(/^they have \"([^\"]*)\" interest in the project$/) do |arg|\n pending\nend\n\nThen(/^the management strategy ...
ruby
chosen
[ { "from": "system", "value": "Expand CA cert test to include ca_cert property\n\nSome releases use ca_cert: instead of ca:\n\nSigned-off-by: Toby Lorne <527052641d65eef236eeef9545b2acac74c35d57@digital.cabinet-office.gov.uk>\n" }, { "from": "human", "value": "RSpec.describe \"certificates\" do\n...
ruby
chosen
[ { "from": "human", "value": "Add initial support for Elastic Load Balancer on Amazon EC2.\n" }, { "from": "gpt", "value": "class Ec2ELB < Wakame::Service::Resource\n \n def_attribute :elb_name, 'unakatsuo'\n def_attribute :require_agent, false\n def_attribute :just_unregister_when_stop, fals...
ruby
chosen
[ { "from": "system", "value": "Change the freebsd monkeypatch to assume pkgng\n\nWithout this FreeBSD package will start to trigger the deprecation\nwarnings and we'll get errors on that.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "valu...
ruby
chosen
[ { "from": "human", "value": "Add code wars - gauss needs help\n" }, { "from": "gpt", "value": "# https://www.codewars.com/kata/54df2067ecaa226eca000229/train/ruby\n# --- iteration 1 ---\ndef f(n)\n return false unless n.is_a?(Integer) && n > 0\n (n * (n + 1)) / 2\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Correct foreign table. Add ext_ref_id field.\n" }, { "from": "human", "value": "require 'sequel'\n\nSequel.migration do\n up do\n\n puts(\"Adding table project members\")\n\n create_table :project_members do\n foreign_key :repo_id, :commits, :null => fal...
ruby
chosen
[ { "from": "system", "value": "Add logic check so _:CA allele_registry_ids don't get processed in second clause\n" }, { "from": "human", "value": "require 'rbconfig'\n\nclass SetAlleleRegistryIdSingleVariant < AlleleRegistryIds\n\n def perform(variant)\n allele_registry_id = get_allele_regist...
ruby
chosen
[ { "from": "system", "value": "Update client to use renamed NetworkDiscovery\n\nhttps://github.com/ManageIQ/manageiq/pull/16994\n" }, { "from": "human", "value": "require 'manageiq/network/port'\nrequire 'ovirt'\n\nmodule ManageIQ\n module Providers\n module Redhat\n class Discovery\n ...
ruby
chosen
[ { "from": "system", "value": "Fix style to use guard clause\n" }, { "from": "human", "value": "module ActiveRecord::Turntable\n module ActiveRecordExt\n module Transactions\n # @note Override to start transaction on current shard\n def with_transaction_returning_status\n if ...
ruby
chosen
[ { "from": "system", "value": "Fix mysql2 double fk disabling\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule DatabaseFlusher\n module ActiveRecord\n class Mysql2Adapter < AbstractAdapter\n def initialize(connection)\n super\n flags = raw_connection...
ruby
chosen
[ { "from": "system", "value": "Revert \"Temporary disable the sliders\"\n\nThis reverts commit 84725507d159b2a825ef39ef23f0906ee79faeda.\n" }, { "from": "human", "value": "class GraphAssumptions\n def self.get(dataset_key = :nl, calculated = false)\n new(dataset_key, calculated).get\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Sort variables in Mustache panel by name\n" }, { "from": "human", "value": "module Rack\n module Bug\n class MustachePanel < Panel\n require \"rack/bug/panels/mustache_panel/mustache_extension\"\n\n class View < Mustache\n self.path = ::File.dir...
ruby
chosen
[ { "from": "system", "value": "Change method signature and simplify, add comments.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nmodule TTY\n class Table\n module Operation\n\n # A class responsible for shortening text.\n class Truncation\n\n def truncate(st...
ruby
chosen
[ { "from": "system", "value": "Add authentication requirement for blog/admin\n\nRequire authentication for blog/admin if it can be found, since it is up\nto the host application to define Devise. Otherwise, leave it out for\nstand-alone engine testability.\n" }, { "from": "human", "value": "modul...
ruby
chosen
[ { "from": "system", "value": "Fix error in integration test for valid signup\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass UsersSignupTest < ActionDispatch::IntegrationTest\n\n test \"invalid signup information\" do\n get signup_path\n assert_no_difference 'User.count'...
ruby
chosen
[ { "from": "system", "value": "Fix a test failure when svn is not installed\n" }, { "from": "human", "value": "require \"utils/svn\"\n\ndescribe Utils do\n describe \"#self.svn_available?\" do\n before(:each) do\n described_class.clear_svn_version_cache\n end\n\n it \"returns svn v...
ruby
chosen
[ { "from": "human", "value": "Add specs for SubmoduleStatus post-rewrite hook\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Overcommit::Hook::PostRewrite::SubmoduleStatus do\n let(:config) { Overcommit::ConfigurationLoader.default_configuration }\n let(:context) { double('...
ruby
chosen
[ { "from": "human", "value": "Add a test for InputMethod\n" }, { "from": "gpt", "value": "require_relative \"../test_helper\"\n\nclass TestInputMethod < Textbringer::TestCase\n class InvalidInputMethod < InputMethod\n end\n\n class CapitalInputMethod < InputMethod\n def handle_event(event)\...
ruby
chosen
[ { "from": "system", "value": "Switch away from PUT DELETE cause lulz HTML.\n" }, { "from": "human", "value": "require \"sinatra/base\"\nrequire \"httparty\"\nrequire \"pry\"\n\nrequire \"myhub/version\"\nrequire \"myhub/github\"\n\nmodule Myhub\n class App < Sinatra::Base\n set :logging, tru...
ruby
chosen
[ { "from": "system", "value": "Remove ActiveSupport usage in AuthorizerData\n\npresent? is a support method and we don't want to depend on active\nsupport.\n" }, { "from": "human", "value": "module GrapeTokenAuth\n class AuthorizerData\n attr_reader :uid, :client_id, :token, :expiry, :warden\...
ruby
chosen
[ { "from": "human", "value": "Add new cask for Yubico Authenticator v0.1.1\n" }, { "from": "gpt", "value": "cask :v1 => 'yubico-authenticator' do\n version '0.1.1'\n sha256 'ac181f1ff3684ba127315743ea45031bcee8142a9a6dbe0eefc31f628c2728b0'\n\n url \"https://developers.yubico.com/yubioath-deskt...
ruby
chosen
[ { "from": "system", "value": "Update gemspec test files to look under `spec/`\n" }, { "from": "human", "value": "require File.expand_path('../lib/eigenclass/version', __FILE__)\n\nGem::Specification.new do |s|\n s.author = 'Sean Huber'\n s.description = 'Eigenclasses (aka metacl...
ruby
chosen
[ { "from": "system", "value": "Update Stackato CLI to v3.2.2\n" }, { "from": "human", "value": "cask :v1 => 'stackato' do\n version '3.2.1'\n sha256 'a2f3eceac381bf018a8435b085c9ed36307e35cc9e8c077bf05aad91f095b2ae'\n\n url \"http://downloads.activestate.com/stackato/client/v#{version}/stackat...
ruby
chosen
[ { "from": "human", "value": "Return of the helpful extension compiler.\n\next_helper.rb proven to be worth of inclusion.\nIt mimics the scenario under which RubyGems install and build the\nextension used by the adapters.\n\nSafety over simplicity, clean code over clever commands, and don't\nforget DRYness.\...
ruby
chosen
[ { "from": "human", "value": "Add a test to ensure there are no models without tables\n" }, { "from": "gpt", "value": "describe \"ApplicationRecord backed models must be backed by a table\" do\n (ApplicationRecord.descendants - [MiqRegionRemote, VmdbDatabaseConnection, VmdbDatabaseLock]).each do...
ruby
chosen
[ { "from": "system", "value": "Add missing dependency on Clamp.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hoick/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix small issue with signing in to googledrive session and accessing spreadsheet\n" }, { "from": "human", "value": "require \"google_drive\"\n\nmodule Api::V1\n class SignUpUpdatesController < BaseControllerV1\n skip_before_action :verify_authenticity_token, onl...
ruby
chosen
[ { "from": "system", "value": "Use the root_object instead of @line_item.\n\nThis is the object the other views use for caching.\n" }, { "from": "human", "value": "object @line_item\ncache [I18n.locale, @line_item]\nattributes *line_item_attributes\nnode(:single_display_amount) { |li| li.single_d...
ruby
chosen
[ { "from": "system", "value": "Make it possible to set the config params on the command line\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), '../lib/acts_as_edgy')\n\nnamespace :edgy do\n desc \"Imports your site's data to your Directed Edge account.\"\n task :expor...
ruby
chosen
[ { "from": "system", "value": "Add Nikita as an author in gemspec\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nlib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dry/matcher/version'\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Use rails backtrace in tests\n" }, { "from": "human", "value": "require 'support/paths_sqlserver'\nrequire 'bundler/setup'\nBundler.require :default, :development\nrequire 'pry'\nrequire 'support/core_ext/query_cache'\nrequire 'support/minitest_sqlserver'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Add tests for CartItem model\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass CartItemTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "require 'test_helper'\n\ncl...
ruby
chosen
[ { "from": "system", "value": "Change from get to post (Twilio's default method)" }, { "from": "human", "value": "# Download the twilio-ruby library from twilio.com/docs/libraries/ruby\nrequire 'twilio-ruby'\nrequire 'sinatra'\n\nget '/sms-quickstart' do\n twiml = Twilio::TwiML::MessagingRespons...
ruby
chosen
[ { "from": "system", "value": "Remove useless require mongoid directive\n" }, { "from": "human", "value": "require 'rails_admin/config/fields/types/string'\nbegin\n require 'mongoid'\nrescue LoadError => e\n puts \"[RailsAdmin] #{e.message}\"\nend\n\nmodule RailsAdmin\n module Config\n modu...
ruby
chosen
[ { "from": "system", "value": "Handle missing keys better, and params can be symbols\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'net/http'\nconfig_file = 'config/mse_router_info.yml'\n\nunless File.file?(config_file)\n raise IOError, '[MSE] > No router configuratio...
ruby
chosen
[ { "from": "system", "value": "Fix the OGP base URL\n" }, { "from": "human", "value": "activate :sprockets do |c|\n c.expose_middleman_helpers = true\nend\n\nactivate :autoprefixer do |prefix|\n prefix.browsers = \"last 2 versions\"\nend\n\npage '/*.xml', layout: false\npage '/*.json', layout: ...
ruby
chosen
[ { "from": "system", "value": "Fix iOS version dependency in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Fountain\"\n s.version = \"1.0.2\"\n s.summary = \"An open source implementation of the Fountain screenplay formatting language.\"\n s.ho...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix cloud_files gemspec: nokogiri <1.10 for ruby <2.3\"\n\nThis reverts commit 1e9feb072d21d8032cf7366f31be697f935d1064.\n" }, { "from": "human", "value": "require './gemspec_helper'\n\nif Gem::Version.new(RUBY_VERSION) < Gem::Version.new(\"2.3.0\")\n gems...
ruby
chosen
[ { "from": "system", "value": "Add rake as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/range_sentence_parser/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Gabriel Sobrinho\"]\n gem.email ...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for memcached manifests\n\nChange-Id: I71981824c41927b8793cad8f5d221a43c35646cc\n" }, { "from": "gpt", "value": "#\n# Copyright (C) 2020 Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file ...
ruby
chosen
[ { "from": "system", "value": "Add \"homepage\" (github repo page) to 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 'vagrant-reverse-proxy/version'\n\nGem::Specification.new ...
ruby
chosen
[ { "from": "system", "value": "Sort installments by creation date by default\n" }, { "from": "human", "value": "module Spree\n module Admin\n class InstallmentsController < ResourceController\n belongs_to 'subscription', model_class: SolidusSubscriptions::Subscription\n\n skip_befor...
ruby
chosen
[ { "from": "system", "value": "Update Mini Metro to alpha 13b\n" }, { "from": "human", "value": "class MiniMetro < Cask\n url 'http://static.dinopoloclub.com/minimetro/builds/alpha12/MiniMetro-alpha12a-osx.zip'\n homepage 'http://dinopoloclub.com/minimetro/'\n version 'Alpha 12a'\n sha256 'cb...
ruby
chosen
[ { "from": "system", "value": "Fix constant value for DateTime.\n\nI've been programming less Ruby and more BDE apparently.\n" }, { "from": "human", "value": "require 'sinatra/sequel'\n\n# Setup the database connection using the environment string. This makes us agnostic\n# from a single database...
ruby
chosen
[ { "from": "system", "value": "Support pocket users without any articles\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: providers\n#\n# id :integer not null, primary key\n# beeminder_user_id :string not null\n# name :...
ruby
chosen
[ { "from": "system", "value": "Update default group cover after creation\n" }, { "from": "human", "value": "class GroupService\n def self.create(group:, actor:)\n group.creator = actor\n actor.ability.authorize! :create, group\n group.default_group_cover = DefaultGroupCover.sample if gr...
ruby
chosen
[ { "from": "system", "value": "Update podspec to version 0.2.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"WNGLogger\"\n s.version = \"0.1.0\"\n s.summary = \"WNGLogger is an iOS client library to record and log metric data to Weblog-NG.\"\n\n s.de...
ruby
chosen