conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add message to customer lead factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n sequence(:lead_email) { |count| \"lead#{count}@example.com\" }\n\n factory :customer_lead do\n email { FactoryGirl.generate(:lead_email) }\n name \"Almighty Custo...
ruby
chosen
[ { "from": "human", "value": "[spec] Add script to create GitHub fixtures.\n" }, { "from": "gpt", "value": "require File.expand_path('../../../../app/models/github', __FILE__)\nrequire 'yaml'\n\nmodule Pod\n module TrunkApp\n class GitHub\n alias_method :_perform_request, :perform_reques...
ruby
chosen
[ { "from": "system", "value": "Reorder classpath/bin args in for runsingletest\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\nrequire_relative './buildJavaProject.rb'\n\nputs \"Running test... dont forget to set $CLASSPATH!\"\nsystem \"java -cp ./bin:$CLASSPATH:turborunner.jar brlyman.Turb...
ruby
chosen
[ { "from": "system", "value": "Remove todo from 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 'seeme/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Load aws credentials from environment variables by default\n" }, { "from": "human", "value": "require 'aws-sdk'\n\nunless Capistrano::Configuration.respond_to?(:instance)\n abort 'capistrano/ec2tag requires Capistrano >= 2'\nend\n\nmodule Capistrano\n class Config...
ruby
chosen
[ { "from": "system", "value": "Install node_modules after deploy:updated and deploy:reverted\n" }, { "from": "human", "value": "load File.expand_path('../tasks/nodejs.rake', __FILE__)\n\nbefore \"deploy:create_symlink\", \"nodejs:install_packages\"\n" }, { "from": "gpt", "value": "loa...
ruby
chosen
[ { "from": "system", "value": "Add TODO for extending Elementary::Future\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'concurrent'\n\nmodule Elementary\n class Future < Concurrent::Future\n end\nend\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'conc...
ruby
chosen
[ { "from": "system", "value": "Fix issue with backtrace empty backtrace locations\n" }, { "from": "human", "value": "module Gabrake\n class Collector\n URL = 'http://www.google-analytics.com/collect'\n\n def self.event_for(exception, context)\n event = Event.new(exception)\n\n un...
ruby
chosen
[ { "from": "system", "value": "Use faraday status as code\n" }, { "from": "human", "value": "module Postnord\n class Response\n def initialize(data)\n @data = data\n @code = data.code\n @status = data.msg\n end\n\n def code\n @data.code\n end\n\n def status\n ...
ruby
chosen
[ { "from": "system", "value": "Remove loading customization from Hash type attributes\n" }, { "from": "human", "value": "require 'sfn'\n\nmodule Sfn\n class Config\n # Update command configuration\n class Update < Validate\n\n attribute(\n :apply_stack, String,\n :multip...
ruby
chosen
[ { "from": "system", "value": "Allow gem to be used with mongoid 5\n\nI did a quick audit and it seems that the monkey patches are still\ncompatible with [mongoid@5.1.3](https://github.com/mongodb/mongoid/tree/v5.1.3).\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Fix Multiple Database SQLite Bug\n" }, { "from": "human", "value": "module Wherex\n module ActiveRecord\n def self.extended base\n base.class_eval do\n class << self\n alias_method_chain :establish_connection, :wherex\n end\n end...
ruby
chosen
[ { "from": "system", "value": "Add MIT license to the gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"health_inspector/version\"\n\n# Allow to pass an arbitrary chef version. Useful for testing for example.\nchef_vers...
ruby
chosen
[ { "from": "system", "value": "Check for memalign, posix_memalign and _aligned_malloc functions.\n" }, { "from": "human", "value": "require 'mkmf'\n\ncreate_makefile(\"memory_buffer/memory_buffer\");\n" }, { "from": "gpt", "value": "require 'mkmf'\n\nhave_func(\"memalign\")\nhave_func...
ruby
chosen
[ { "from": "human", "value": "Add a spec for Postmark::Json.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Postmark::Json do\n let(:json_dump) { \"{\\\"foo\\\":\\\"bar\\\",\\\"bar\\\":\\\"foo\\\"}\" }\n let(:data) { {\"foo\" => \"bar\", \"bar\" => \"foo\"} }\n\n context \"...
ruby
chosen
[ { "from": "system", "value": "Refactor with rubocop: gsub => delete\n" }, { "from": "human", "value": "module Comable\n module Admin\n module NavigationsHelper\n def linkable_type_options\n Comable::NavigationItem.linkable_params_lists.map { |attr| attr.slice(:name, :type).values...
ruby
chosen
[ { "from": "system", "value": "Fix rails 2 formtastic generator" }, { "from": "human", "value": "# encoding: utf-8\n\nclass FormtasticGenerator < Rails::Generator::Base\n\n def manifest\n record do |m|\n m.directory File.join('config', 'initializers')\n m.template 'formtastic.rb', ...
ruby
chosen
[ { "from": "system", "value": "Include gem bump in dev dependencies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'lightstep/tracer/version'\n\nGem::Specification.new do |spec|\n sp...
ruby
chosen
[ { "from": "human", "value": "Add missing file for optparse\n" }, { "from": "gpt", "value": "require 'optparse'\n\nclass OptionParser::AC < OptionParser\n private\n\n def _check_ac_args(name, block)\n unless /\\A\\w[-\\w]*\\z/ =~ name\n raise ArgumentError, name\n end\n unless blo...
ruby
chosen
[ { "from": "system", "value": "Add check to prevent error in case provisioner runs multiple times for CentOS guest.\n" }, { "from": "human", "value": "require_relative 'helpers'\n\nmodule VagrantPlugins\n module CaCertificates\n module Cap\n module Redhat\n # Capability for config...
ruby
chosen
[ { "from": "system", "value": "Add mime types for attachable file types\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Add new mime types for use in respond_to blocks:\n# Mime::Type.register \"text/richtext\", :rtf\n# Mime::Type.register_alias ...
ruby
chosen
[ { "from": "system", "value": "Check if constant is initialized (won’t be in the tests so far).\n" }, { "from": "human", "value": "require_relative 'active_record_extension'\nrequire_relative 'action_view_extension'\nrequire 'rails'\n\nmodule Collate\n class Engine < ::Rails::Engine\n\n isola...
ruby
chosen
[ { "from": "system", "value": "Use mouseup event for select2 fields, not click\n\nOne day I will understand JavaScript. Or it will be superseded by a much better language with easier debugging abilities. What a funny idea.\n" }, { "from": "human", "value": "module CapybaraExt\n def page!\n sa...
ruby
chosen
[ { "from": "system", "value": "Stop generator from running in production (necessary for Heroku)\n\nSigned-off-by: Francesc Esplugas <29df577256a046afced759d9a5c8d13bedb7a3de@intraducibles.com>" }, { "from": "human", "value": "require 'typus'\n\nif Typus.testing?\n Typus::Configuration.options[:c...
ruby
chosen
[ { "from": "system", "value": "Add missing association in BudgetLineFeedback validation test\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass GobiertoBudgets::BudgetLineFeedbackTest < ActiveSupport::TestCase\n def budget_line_feedback\n @budget_line_feedback ||= GobiertoBud...
ruby
chosen
[ { "from": "system", "value": "Put the system command for the Lib Notify - Linux Users\n" }, { "from": "human", "value": "module InfinityTest\n module Notifications\n class LibNotify\n \n end\n end\nend" }, { "from": "gpt", "value": "module InfinityTest\n module Not...
ruby
chosen
[ { "from": "human", "value": "Add S3 config file (without specific info)\n" }, { "from": "gpt", "value": "CarrierWave.configure do |config|\n config.fog_credentials = {\n :provider => 'AWS', # required\n :aws_access_key_id => 'xxx', ...
ruby
chosen
[ { "from": "system", "value": "Use only the directory as template name rather then the full path\n" }, { "from": "human", "value": "require \"#{Rails.root}/lib/hedra-latex.rb\"\n\nlatex_template_path = CONFIG[Rails.env.to_sym][\"latex_template_path\"] << \"*\"\nLATEX_TEMPLATES = Dir.glob(latex_te...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warnings on Rails 6\n" }, { "from": "human", "value": "require 'csv_shaper_template'\n\n# CsvShaperHandler\n# Template handler for Rails\nclass CsvShaperHandler\n cattr_accessor :default_format\n self.default_format = Mime[:csv]\n\n # Expected `ca...
ruby
chosen
[ { "from": "system", "value": "Update images link to openaustralia.org.au\n" }, { "from": "human", "value": "require 'mechanize'\n\nmodule DataLoader\n class People\n\n def self.member_to_person\n @member_to_person ||= load_people\n end\n\n # Try to load any people images that are ...
ruby
chosen
[ { "from": "system", "value": "Return only response status for quiet option.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule GithubCLI\n # This is the main entry point for formatting output.\n # It delegates to other objects like Formatter::Table\n # to perform actual rendering....
ruby
chosen
[ { "from": "system", "value": "Allow all versions of rails 4\n\n[Finishes #66467934]Fixes #191\n" }, { "from": "human", "value": "module Jasmine\n module Dependencies\n\n class << self\n def rails3?\n safe_gem_check(\"rails\", \"~> 3\") && running_rails3?\n end\n\n def r...
ruby
chosen
[ { "from": "system", "value": "Remove hacks in lib test tasks\n" }, { "from": "human", "value": "\ndesc \"Run all lib tests except MiqDisk tests\"\ntask :test do\n ARGV.clear # HACK: rake/runtest inspects ARGV, which is different when run\n # from the miq directory\n require '...
ruby
chosen
[ { "from": "system", "value": "Fix to the api - assmebly.\n" }, { "from": "human", "value": "module Megam\n class API\n # GET /nodes\n def get_assemblies\n @options = {:path => '/assemblies',:body => \"\"}.merge(@options)\n\n request(\n :expects => 200,\n :method ...
ruby
chosen
[ { "from": "system", "value": "Add support for in memory PNG output\n" }, { "from": "human", "value": "module Mapnik\n class Map\n include Mapnik::FFI\n\n attr_accessor :width, :height, :ptr\n\n def initialize(width, height)\n @width = width\n @height = height\n ptr = map...
ruby
chosen
[ { "from": "system", "value": "Refactor to a named method, for sanity\n" }, { "from": "human", "value": "require 'English'\n\nmodule GitTracker\n module Branch\n def self.story_number\n current[/#?(?<number>\\d+)/, :number]\n end\n\n def self.current\n branch_path = `git symbo...
ruby
chosen
[ { "from": "system", "value": "Replace += with << for string concatenation\n" }, { "from": "human", "value": "module Gon\n module Helpers\n def self.included base\n base.send(:include, InstanceMethods)\n end\n\n module InstanceMethods\n def include_gon(options = {})\n i...
ruby
chosen
[ { "from": "system", "value": "Set XML header to utf-8\n\nThis PR sets the correct header for RSS feeds with UTF8 characters.\r\n\r\n```\r\n$ curl http://localhost:4000/feed.xml -I\r\nHTTP/1.1 200 OK\r\nEtag: 64af8c-2356-552805aa\r\nContent-Type: text/xml; charset=utf-8\r\nContent-Length: 9046\r\nLast-Modifi...
ruby
chosen
[ { "from": "system", "value": "Refresh parser require fixed in physical infra manager.\n" }, { "from": "human", "value": "class ManageIQ::Providers::Lenovo::PhysicalInfraManager < ManageIQ::Providers::InfraManager\n include ManageIQ::Providers::Lenovo::ManagerMixin\n\n require_nested :Refresher...
ruby
chosen
[ { "from": "system", "value": "Change attribute to have symbolic name" }, { "from": "human", "value": "class GoogleClientSettings\n\n attr_reader client_id, client_secret, user_email\n\n def initialize(client_id, client_secret, user_email)\n @client_id = client_id\n @client_secret = clien...
ruby
chosen
[ { "from": "system", "value": "Use rake instead of git to fix a fatal error\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'optimus_prime/version'\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Use <b>, <i> and <span style=\"color: ...\">\n" }, { "from": "human", "value": "require 'quill/builder/base'\nrequire 'json'\n\nmodule Quill::Builder\n class HTML < Base\n def initialize(text)\n @text = text\n end\n\n def convert\n json = JSON.pa...
ruby
chosen
[ { "from": "system", "value": "Add the bibliography to the menu\n" }, { "from": "human", "value": "module ApplicationHelper\n def head\n hoptoad_javascript_notifier\n end\n\n def main_navigation(menu)\n if ENV[\"APP_NAME\"] == \"vowessly\"\n menu.item \"Canterbury\", \"/by_province/...
ruby
chosen
[ { "from": "system", "value": "Use not deprecated method to check if a field contains errors.\n" }, { "from": "human", "value": "module InvestmentsHelper\n\n def investment_image_full_url(investment, version)\n URI(request.url) + investment.image.url(version)\n end\n\n def investment_image_...
ruby
chosen
[ { "from": "system", "value": "Update Distiller hook to use HttpPost as parent class\n" }, { "from": "human", "value": "class Service::Distiller < Service\n self.title = \"Distiller\"\n url \"https://distiller.io\"\n logo_url \"https://www.distiller.io/favicon.ico\"\n\n maintained_by :github ...
ruby
chosen
[ { "from": "system", "value": "Correct sending domain for emails.\n" }, { "from": "human", "value": "class ApplicationMailer < ActionMailer::Base\n default from: 'membership@sheffieldviking.org.uk'\n layout 'mailer'\nend\n\n" }, { "from": "gpt", "value": "class ApplicationMailer < A...
ruby
chosen
[ { "from": "system", "value": "Order threads by latest message.\n" }, { "from": "human", "value": "class ThreadList\n def self.recent_from_groups(groups, limit)\n MessageThread.where(group_id: groups).order_by_latest_message.limit(limit)\n end\n\n def self.recent_public_from_groups(groups, ...
ruby
chosen
[ { "from": "system", "value": "Fix \"undefined local method\" bug\n" }, { "from": "human", "value": "require \"optparse\"\nrequire \"rubycritic\"\nrequire \"rubycritic/reporters/main\"\n\nmodule Rubycritic\n\n class Cli\n STATUS_SUCCESS = 0\n\n def initialize(argv)\n @argv = argv\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Need to be more specific to handle LoadError\"\n\nThis reverts commit aae87bd01adb8d49d881e34e2d2512e6f3f6d755.\n" }, { "from": "human", "value": "begin\n require 'fog/compute/models/brightbox/server'\n require 'fog/compute/models/aws/server'\n require '...
ruby
chosen
[ { "from": "system", "value": "Fix teardown! to support parallel_tests\n" }, { "from": "human", "value": "require_relative 'analyzer'\nrequire_relative 'dependencies_table'\n\nrequire_relative 'utils'\n\nmodule DeltaTest\n class Generator\n\n attr_reader *%i[\n current_spec_file\n t...
ruby
chosen
[ { "from": "system", "value": "Replace pipe with normalized character. URI parse fails on a pipe, so fix before parsing\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n" }, { "from": "human", "value": "require 'uri'\nrequire 'cgi'\n\nclass UrlNormalizer\n def self....
ruby
chosen
[ { "from": "system", "value": "Make two more methods public\n" }, { "from": "human", "value": "require 'kramdown'\nrequire 'forwardable'\n\nmodule Everything\n class Blog\n class Post\n extend Forwardable\n\n def initialize(post_name)\n @post_name = post_name\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Replace case statement with a hash look-up for Type builder.\n" }, { "from": "human", "value": "require 'gir_ffi/builder_helper'\nrequire 'gir_ffi/builder/type/base'\nrequire 'gir_ffi/builder/type/callback'\nrequire 'gir_ffi/builder/type/enum'\nrequire 'gir_ffi/buil...
ruby
chosen
[ { "from": "system", "value": "Replace eigenclass method with `singleton_class`\n" }, { "from": "human", "value": "module Sprig\n module Harvest\n class Record\n attr_reader :record, :model\n attr_writer :sprig_id\n\n def initialize(record, model)\n @record = record\n ...
ruby
chosen
[ { "from": "system", "value": "Fix build for ruby 2.0\n\n[#59349950]\n\nSigned-off-by: Stephan Hagemann <f965a4a1b587c4e3c1892642aed563e43902502b@pivotallabs.com>\n" }, { "from": "human", "value": "require 'digest/sha1'\nrequire 'openssl'\n\nmodule Encryption\n class Symmetric\n AES_BLOCKSIZE...
ruby
chosen
[ { "from": "system", "value": "Update rubocop-govuk requirement from = 4.4.0 to = 4.5.0\n\nUpdates the requirements on [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) to permit the latest version.\n- [Release notes](https://github.com/alphagov/rubocop-govuk/releases)\n- [Changelog](https://github....
ruby
chosen
[ { "from": "system", "value": "feat: Update to latest version of set file\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\nmodule SETUrls\n\n # The URL's to download the customer data.\n DATA = [];\n # this is the current version\n VERSION = 14;\n\n\n (0..9).each do |termination|\n D...
ruby
chosen
[ { "from": "system", "value": "Fix version in gemspec to match released version.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'queue_classic'\n s.email = 'ryan@heroku.com'\n s.version = '1.0.0.rc1'\n s.date = '2011-08-22'\n s.des...
ruby
chosen
[ { "from": "human", "value": "Add tests for postgis module\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'postgres::postgis', :type => :class do\n let(:facts) { { :lsbdistcodename => 'precise' } }\n it { should contain_package(\"postgresql-9.1-postgis\"...
ruby
chosen
[ { "from": "system", "value": "Add assets to config.assets.precompile in before_configuration hook\n" }, { "from": "human", "value": "require 'ransack_ui/view_helpers'\nrequire 'ransack_ui/controller_helpers'\n\nmodule RansackUI\n module Rails\n class Engine < ::Rails::Engine\n initializ...
ruby
chosen
[ { "from": "system", "value": "Refactor and fix body text nil issue\n" }, { "from": "human", "value": "require \"base64\"\n\nmodule RuleIo\n class DeliveryMethod < Base\n attr_reader :mailer\n\n def initialize(_)\n end\n\n def settings\n { :return_response => false }\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Fix veritas integration specs for \"finding one object\"" }, { "from": "human", "value": "require 'spec_helper_integration'\n\ndescribe 'Finding One Object' do\n include_context 'Models and Mappers'\n\n before(:all) do\n setup_db\n\n insert_user 1, 'John', ...
ruby
chosen
[ { "from": "system", "value": "Use decorated page to find localized url with link_to_locale\n" }, { "from": "human", "value": "# encoding: UTF-8\nmodule Georgia\n module InternationalizationHelper\n\n LOCALES_HASH = {en: \"English\", fr: \"Français\"}\n\n def locale_name(locale)\n ret...
ruby
chosen
[ { "from": "system", "value": "Create ASt::Attachment records for ASt::Blobs in content\n" }, { "from": "human", "value": "module ActiveText\n module Attribute\n extend ActiveSupport::Concern\n\n class_methods do\n def active_text_attribute(attribute_name)\n serialize(attribute...
ruby
chosen
[ { "from": "system", "value": "Clean up the rack integration test\n" }, { "from": "human", "value": "require 'spec_helper'\n\nCapybara.app = RackApp\n\nRSpec.describe(HelloReflector, type: :feature) do\n context 'Basic app validation' do\n it 'functions as a basic app' do\n visit '/'\n ...
ruby
chosen
[ { "from": "system", "value": "Use scp to install the module\n\nThis gets around SSL issues on Solaris10.\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\nUNSUPPORTED_PLATFORMS = [ 'windows', 'Darwin' ]\n\nunless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'\n # This...
ruby
chosen
[ { "from": "system", "value": "Remove hiera creation (now done by Beaker auto)\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\nunless ENV['RS_PROVISION'] == 'no'\n hosts.each do |host|\n if host.is_pe?\n install_pe\n else\n install_puppet\n on host, \"mkdir -p #...
ruby
chosen
[ { "from": "system", "value": "Convert specs to RSpec 3.6.0 syntax with Transpec\n\nThis conversion is done by Transpec 3.3.0 with the following command:\n transpec\n\n* 1 conversion\n from: failure_message_for_should { }\n to: failure_message { }\n\nFor more details: https://github.com/yujinakaya...
ruby
chosen
[ { "from": "system", "value": "Fix test failure by accessing Content-Type header directly.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Projects::RepositoriesController do\n let(:project) { create(:project) }\n\n describe \"GET archive\" do\n context 'as a guest' do...
ruby
chosen
[ { "from": "human", "value": "Add feature test to view secondary content page\n" }, { "from": "gpt", "value": "require \"rails_helper\"\n\nRSpec.feature \"Managing secondary content for step by step pages\" do\n include CommonFeatureSteps\n include StepNavSteps\n\n before do\n given_I_am_a_...
ruby
chosen
[ { "from": "system", "value": "Add authorization to methods in campaigns controller\n" }, { "from": "human", "value": "class CampaignsController < ApplicationController\n expose(:campaigns)\n expose(:campaign, attributes: :campaign_params)\n respond_to :html, :json, :xml\n before_action :auth...
ruby
chosen
[ { "from": "system", "value": "Add production bucket. Re-deploy to Heroku to fix bug\n" }, { "from": "human", "value": "class DocumentsController < ApplicationController\n\n def new\n @user = User.find(params[:user_id])\n end\n\n def create\n @user = current_user\n @document = @user.d...
ruby
chosen
[ { "from": "system", "value": "Remove redundant action in marketing controller\n\nWas accidentally left over from a previous iteration.\n" }, { "from": "human", "value": "class MarketingController < ApplicationController\n layout 'marketing'\n\n def book_an_appointment\n end\n\n def footer?\n...
ruby
chosen
[ { "from": "system", "value": "Rework ScoresController to accept either Assessment or Analyses\n" }, { "from": "human", "value": "class V1::ScoresController < ApplicationController\n before_action :authenticate_user!\n after_action :flush_assessment_cache, only: [:create]\n\n def create\n ...
ruby
chosen
[ { "from": "system", "value": "Replace aws sdk dependency with aws-sdk-v1\n\nThis update allows users to install version 1 and version 2 in the same\napplication.\n\nSee the following for more info:\n\nhttp://ruby.awsblog.com/post/TxFKSK2QJE6RPZ/Upcoming-Stable-Release-of-A\nWS-SDK-for-Ruby-Version-2\n" },...
ruby
chosen
[ { "from": "system", "value": "Fix discrepencies between markdown rendered in app and email\n\nWe were sometimes running into issues where the markdown is\nrenered perfectly fine in the app UI but sending the email would\ndisplay parts of the markdown un-rendered.\n\nFor example, instead of showing a rendere...
ruby
chosen
[ { "from": "system", "value": "Use Dry::Logic::Predicate.build for utilizing specialized interface\n" }, { "from": "human", "value": "require 'dry/logic/rule_compiler'\nrequire 'dry/logic/predicates'\nrequire 'dry/logic/rule/predicate'\n\nmodule Dry\n module Types\n # @param [Hash] options\n ...
ruby
chosen
[ { "from": "system", "value": "Add comment? to idea policy\n" }, { "from": "human", "value": "class IdeaPolicy < ApplicationPolicy\n def new?\n record.campaign.member?(user)\n end\n\n def create?\n new?\n end\n\n def update?\n record.user == user || record.campaign.game_master?(user...
ruby
chosen
[ { "from": "system", "value": "Fix process return status to display proper growl image\n" }, { "from": "human", "value": "require 'open3'\n\nmodule Guard\n class Cucumber\n module Runner\n class << self\n include Open3\n\n def run(paths, options = {})\n message = o...
ruby
chosen
[ { "from": "system", "value": "Make sure that FormatLoader is in GoCart namespace\n" }, { "from": "human", "value": "module FormatLoader\n def self.load_formats(formats)\n formats.each do |format|\n file_count = 0\n Dir.glob(File.expand_path(format)) do |format_file|\n requir...
ruby
chosen
[ { "from": "system", "value": "Add SPASS special SZS handling.\n" }, { "from": "human", "value": "module Hets\n module Prove\n class SZSParser\n attr_reader :prover, :output\n\n def initialize(prover, output)\n @prover = prover\n @output = output\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Add test for category model\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass CategoryTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\...
ruby
chosen
[ { "from": "system", "value": "Add methods for music master library to PlaylistControl\n" }, { "from": "human", "value": "module PlaylistControl\n def self.playlist\n @temp_playlist || default_playlist\n end\n\n def self.set_playlist\n loop do\n playlist = HighLine.new.ask('Enter na...
ruby
chosen
[ { "from": "system", "value": "Convert to String from Array\n" }, { "from": "human", "value": "module RidgepoleRake\n module Option\n extend self\n\n def non_value_key?(key)\n non_value_keys.include?(key.to_s)\n end\n\n def add_hyphens_if_needed(key)\n case key.to_s\n ...
ruby
chosen
[ { "from": "system", "value": "Add YARD docs for ViewDSL\n" }, { "from": "human", "value": "module ROM\n class Relation\n class ViewDSL\n attr_reader :name\n\n attr_reader :relation_block\n\n attr_reader :new_schema\n\n def initialize(name, schema, &block)\n @name =...
ruby
chosen
[ { "from": "system", "value": "Update Batch class to pass new test. Add attr_accessors and new_from_xml method. Numeric values are converted using to_i but no date conversions yet. Test is passing.\n" }, { "from": "human", "value": "module SalesforceBulk\n class Batch\n \n attr_accessor :c...
ruby
chosen
[ { "from": "human", "value": "Add collectd recipe for Docker workers\n" }, { "from": "gpt", "value": "include_recipe \"collectd\"\n\ncollectd_plugin \"load\"\n\ncollectd_plugin \"memory\"\n\ncollectd_plugin \"interface\" do\n options :interface => \"lo\", :ignore_selected => true\nend\n\ncollect...
ruby
chosen
[ { "from": "system", "value": "Remove useless assignment '=> e'. Thanks, Code Climate!\n" }, { "from": "human", "value": "module Svgeez\n module Commands\n class Watch < Command\n class << self\n def init_with_program(p)\n p.command(:watch) do |c|\n c.descripti...
ruby
chosen
[ { "from": "system", "value": "Add enqueued submission count to sidekiq stats\n\nThe rake task that retrieves sidekiq stats now reports the number of ET\nclaims that have not been successfully submitted to Jadu\n" }, { "from": "human", "value": "require 'sidekiq/api'\n\ndesc 'report basic sidekiq...
ruby
chosen
[ { "from": "system", "value": "rubybundle: Use absolute paths for preparing MSYS installation.\n\nFixes install issue on i686.\n" }, { "from": "human", "value": "# Use the cache of our main MSYS2 environment for package install\ncachedir = File.join(Build.msys2_installation.msys_path, \"/var/cach...
ruby
chosen
[ { "from": "system", "value": "Update spec to help figure out why the spec is failing on travis\n\n[#114012649](https://www.pivotaltracker.com/story/show/114012649)\n" }, { "from": "human", "value": "require 'open3'\n\ndescribe 'postgres_ctl.erb' do\n context 'running postgres_db_backup.sh' do\n...
ruby
chosen
[ { "from": "system", "value": "Add rbenv and ruby_build to Rails runlist\n" }, { "from": "human", "value": "name 'rails'\ndescription 'This role configures a Rails stack using Unicorn'\ndefault_attributes(:bluepill => {:bin => \"/usr/local/bin/bluepill\"})\nrun_list \"recipe[apt]\", \"recipe[buil...
ruby
chosen
[ { "from": "human", "value": "Add display_aspect_ratio to existing MasterFile\n" }, { "from": "gpt", "value": "class AddDisplayAspectRatioToMasterFile < ActiveRecord::Migration\n def up\n MasterFile.find_each({},{batch_size:5}) do |masterfile|\n if ! masterfile.display_aspect_ratio && ma...
ruby
chosen
[ { "from": "human", "value": "Test POST in Textile Sandbox.\n\n* Add integration test file\nwith new class ObserverControllerSupplementalTest\nwith new test method #test_post_textile.\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\n# Tests which supplement controller/observer_controll...
ruby
chosen
[ { "from": "system", "value": "Prepare the gem to realease to the rubygems.org\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"semantic_navigation/version\"\n\nGem::Specification.new do |s|\n s.name = \"semantic_navig...
ruby
chosen
[ { "from": "system", "value": "Add a basic credits section\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'rptman'\n spec.version = `git describe`.strip.split('-').first\n spec.authors = ['Peter Donald']\n spec.email = [\"pet...
ruby
chosen
[ { "from": "human", "value": "Define concern to include associations with people via charge to models\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule GobiertoPeople\n module BelongsToPersonWithCharge\n\n extend ActiveSupport::Concern\n\n class_methods do\n def...
ruby
chosen
[ { "from": "system", "value": "Revert \"added specific_page_vue helper and deprecate page_specific_vue\"\n\nThis reverts commit 07d53275c8c067a5b04ff455ed810b2919391436.\n" }, { "from": "human", "value": "module SyntaxHelper\n def specific_page_vue\n return \" #{controller_name} #{action_name...
ruby
chosen
[ { "from": "human", "value": "Add lost or stolen passports worldwide service\n\nhttps://www.pivotaltracker.com/story/show/54270310\n" }, { "from": "gpt", "value": "if lost_and_stolen_passports = WorldwideService.where(name: 'Lost or Stolen Passports').first\n puts \"Service #{lost_and_stolen_pas...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.6.1.1 to 0.7.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.6.1.1'\n s.description...
ruby
chosen