conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add a test case that demonstrates correct use of custom initial states\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass CustomInitialStateTest < Test::Unit::TestCase\n class Stateful\n include SimpleStates\n\n attr_accessor :state\n\n states ...
ruby
chosen
[ { "from": "human", "value": "Test for the defaults and dependencies of user permissions\n" }, { "from": "gpt", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass UserPermissionTest < ActiveSupport::TestCase\n\n def setup\n @me = User.make\n end\n\n def test_defaults\n ...
ruby
chosen
[ { "from": "system", "value": "Remove hide_action as it is not supported in Rails 5\n" }, { "from": "human", "value": "module HighVoltage::StaticPage\n extend ActiveSupport::Concern\n\n included do\n layout ->(_) { HighVoltage.layout }\n\n rescue_from ActionView::MissingTemplate do |excep...
ruby
chosen
[ { "from": "system", "value": "Remove fakefs dependency (it's not been using it anyways).\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'sicuro/version'\n\nGem::Specification.new do |s|\n s.name = 'sicuro'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Update little cms to 1.19\n" }, { "from": "human", "value": "require 'formula'\n\nclass LittleCms <Formula\n url 'http://www.littlecms.com/lcms-1.18a.tar.gz'\n homepage 'http://www.littlecms.com/'\n md5 'f4abfe1c57ea3f633c2e9d034e74e3e8'\n\n def install\n sys...
ruby
chosen
[ { "from": "human", "value": "Add tag for new subsection \"Dealing with HMRC\"\n\nThis adds a migration which creates a new section tag for \"Dealing with \nHMRC\", a child of the \"Money and tax\" section." }, { "from": "gpt", "value": "class AddHmrcSection < Mongoid::Migration\n TAG_ID = \"tax...
ruby
chosen
[ { "from": "system", "value": "Update non-signed-in-screenshot to include personal feed\n" }, { "from": "human", "value": "require 'acceptance_helper'\n\ndescribe \"Non signed in pages:\", type: :feature do\n include ScreenshotTest\n include Acceptance::FactHelper\n\n describe \"Profile page p...
ruby
chosen
[ { "from": "system", "value": "Handle webhooks by just removing a cached timestamp entry\n" }, { "from": "human", "value": "class ContentfulRails::WebhooksController < ActionController::Base\n if ContentfulRails.configuration.authenticate_webhooks\n http_basic_authenticate_with name: Content...
ruby
chosen
[ { "from": "system", "value": "Add 'yard' as a development dependency\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_relative 'lib/chainer/version'\n\nGem::Specification.new do |s|\n s.name = 'chainer'\n s.version = ::Chainer::VERSION\n s.date = '...
ruby
chosen
[ { "from": "system", "value": "Fix generator for activerecord migration file for Rails4\n" }, { "from": "human", "value": "require 'rails/generators/active_record/migration'\n\nclass IrwiWikiGenerator < Rails::Generators::Base\n\n include Rails::Generators::Migration\n extend ActiveRecord::Gene...
ruby
chosen
[ { "from": "system", "value": "Add length to the url field and index\n\nMySQL errors while adding the index because it likes a known length.\n\nWithin StackOverflow there is also a discussion regarding defacto max\nurl length so I set the `url` limit to the known max of 2083.\n\nhttps://stackoverflow.com/que...
ruby
chosen
[ { "from": "system", "value": "ENABLE HSTORE EXTENSION MANUALLY AS OF 2.0\n" }, { "from": "human", "value": "class AddAssociationsToVersions < ActiveRecord::Migration[5.1]\n def change\n enable_extension 'hstore'\n add_column :versions, :associations, :hstore, default: {}\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Remove where time select statement to email all instructors, current and past\n" }, { "from": "human", "value": "##\n# this controller contains methods for system-wise\n# admin functionality\nclass AdminsController < ApplicationController\n action_auth_level :show,...
ruby
chosen
[ { "from": "system", "value": "Fix so that visiting a specific cloud link will prompt login.\n" }, { "from": "human", "value": "class CloudsController < ApplicationController\n\n def show\n\n @cloud = Cloud.agnostic_fetch(params[:id_or_short_name])\n\n authorize @cloud, :show?\n\n @page...
ruby
chosen
[ { "from": "system", "value": "Add a groupauth action to the Pusher Controller to authenticate presence\nchannels based on user.\n" }, { "from": "human", "value": "class PusherController < ApplicationController\n protect_from_forgery except: :auth\n\n def auth\n puts params\n response = P...
ruby
chosen
[ { "from": "system", "value": "Update search controller to Rails 3: this line fail when user put number, at least in tests.\n" }, { "from": "human", "value": "# Search across all WorkLogs and Tasks\nclass SearchController < ApplicationController\n\n def search\n @tasks = []\n @logs = []\n\...
ruby
chosen
[ { "from": "system", "value": "Drop left-over params[:profit] definition in stocks/write_downs.\n" }, { "from": "human", "value": "class StocksController < AuthorizedController\n # States\n has_scope :by_state, :default => 'available', :only => :index\n has_scope :by_text\n\n # Actions\n def...
ruby
chosen
[ { "from": "system", "value": "Save a query in sweep creation\n\nAs pointed out in code review by @lencioni, it's slightly better to use the `project`\nassociation from the @sweep here.\n\nhttps://github.com/trotzig/diffux/commit/de0c235cd9067b48803d6dc632f117913ace8fe2#commitcomment-5291227\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add an alt attribute to the debate outcome image\n" }, { "from": "human", "value": "require 'ostruct'\n\nmodule DebateOutcomeHelper\n DEBATE_OUTCOME_URLS = %i[video_url transcript_url debate_pack_url]\n\n def debate_outcome_image(debate_outcome)\n sources = ['1...
ruby
chosen
[ { "from": "system", "value": "Add Gem.clear_paths to server minitest so pg gem is loaded correctly on first converge\n" }, { "from": "human", "value": "#\n# Copyright 2012, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except i...
ruby
chosen
[ { "from": "system", "value": "Set owners for VMs created by an orchestration stack\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1318032\n\nIntroduced new method post_provision_configure in the service class, where VMs inherit\nowner from the service.\n\n\n(transferred from ManageIQ/manageiq@9b360464ce0e56...
ruby
chosen
[ { "from": "system", "value": "Test payed user when payment is completed\n" }, { "from": "human", "value": "class PaymentController < ApplicationController\n\tprotect_from_forgery except: :payed\n\n\tdef payed\n\t\t@user = User.new\n\t\t@user.email = params[:payer_email]\n\t\t@user.name = params[...
ruby
chosen
[ { "from": "system", "value": "Fix the use of a deprecated method from simple_form\n" }, { "from": "human", "value": "# This file is part of Mconf-Web, a web application that provides access\n# to the Mconf webconferencing system. Copyright (C) 2010-2015 Mconf.\n#\n# This file is licensed under t...
ruby
chosen
[ { "from": "system", "value": "Remove conflicting ¡ from recommend mailer\n" }, { "from": "human", "value": "class RecommendOfferMailer < ActionMailer::Base\n default :from => \"noresponder@dealhunter.com\"\n\n def recommend_offer_email(user, offer, email)\n @user = user\n @offer = offer\...
ruby
chosen
[ { "from": "system", "value": "Call address instead of exchange" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'resolv'\n\nclass EmailMxValidator < ActiveModel::Validator\n def validate(user)\n return if Rails.env.test? || Rails.env.development?\n user.errors.add...
ruby
chosen
[ { "from": "system", "value": "Add lib to autoload paths\n" }, { "from": "human", "value": "module Blog\n class Engine < ::Rails::Engine\n isolate_namespace Blog\n\n initializer :append_migrations do |app|\n unless app.root.to_s.match root.to_s\n config.paths['db/migrate'].expa...
ruby
chosen
[ { "from": "system", "value": "Fix to run in heroku\n" }, { "from": "human", "value": "module Blog\n class Server\n\n ROOT = './public'\n PORT = 8000\n ADDRESS = 'localhost'\n\n attr_reader :server\n\n def initialize\n WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/htm...
ruby
chosen
[ { "from": "system", "value": "Add row index for lottery results export\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nif lottery.entrants.exists?\n ::CSV.generate do |csv|\n csv << [\"Results for #{lottery.name}\"]\n\n lottery.divisions.each do |division|\n csv <...
ruby
chosen
[ { "from": "system", "value": "Stop warning when execute `dashdog apply`\n" }, { "from": "human", "value": "require 'thor'\n\nmodule Dashdog\n class Cli < Thor\n class_option :file, aliases: '-f', desc: 'Configuration file', type: :string, default: 'Boardfile'\n class_option :color, desc: ...
ruby
chosen
[ { "from": "system", "value": "Use test double and matchers\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'ostruct'\n\ndescribe Projects::GraphsController do\n let(:project) { create(:project) }\n let(:user) { create(:user) }\n\n before do\n sign_in(user)\n project...
ruby
chosen
[ { "from": "system", "value": "Add option arg to Parser.parse\n" }, { "from": "human", "value": "require 'epub/book'\nrequire 'epub/constants'\nrequire 'epub/parser/version'\nrequire 'epub/parser/ocf'\nrequire 'epub/parser/publication'\nrequire 'epub/parser/content_document'\nrequire 'shellwords'...
ruby
chosen
[ { "from": "system", "value": "Fix some specs after we changed some stuff.\n" }, { "from": "human", "value": "# Frozen-string-literal: true\n# Copyright: 2012 - 2017 - MIT License\n# Encoding: utf-8\n\nrequire \"rspec/helper\"\ndescribe \"Plugins/Magick\" do\n let :asset do\n env.find_asset!(...
ruby
chosen
[ { "from": "system", "value": "Initialize user on each page\n" }, { "from": "human", "value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nclass ApplicationController < ActionControlle...
ruby
chosen
[ { "from": "system", "value": "Remove some dead code in application controller.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # rescue_from CanCan::AccessDenied do |exception|\n # redirect_to root_path, :alert => exception.message\n # end\n\n layo...
ruby
chosen
[ { "from": "system", "value": "Edit the redis init in a slightly less sloppy way\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class FixContainerBasedTrusty < Base\n ...
ruby
chosen
[ { "from": "system", "value": "Store assigned treatments in cookies\n" }, { "from": "human", "value": "module Rigor\n class Railtie < ::Rails::Railtie\n initializer \"rigor.load\" do\n Rigor::Rails.load!\n end\n end\n\n module Rails\n def self.load!\n Dir[::Rails.root.join('...
ruby
chosen
[ { "from": "system", "value": "Reorder version const with custom exceptions\n" }, { "from": "human", "value": "require \"konf\"\n\nclass StrictKonf < Konf\n class UnknownKeys < StandardError; end\n\n VERSION = '0.0.1'\n\n def initialize(source, root, required_keys)\n super(source, root)\n ...
ruby
chosen
[ { "from": "system", "value": "Install retardase inhibitor to work around ActionMailer weirdness\n" }, { "from": "human", "value": "# Filters added to this controller will be run for all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nc...
ruby
chosen
[ { "from": "system", "value": "Fix bug where reCaptcha form wasn't working\n" }, { "from": "human", "value": "module FormTagHelper\n def recaptcha_input_tag\n if Rails.configuration.x.enable_recaptcha\n res = \"<div class='form-group \"\n res << 'has-error' if flash[:recaptcha_error...
ruby
chosen
[ { "from": "system", "value": "Change method name in github commit job to make it more descriptive\n" }, { "from": "human", "value": "module GithubCommitsJob\n extend self\n\n def run\n Project.with_github_url.each do |project|\n update_commit_counts_for(project)\n end\n end\n\n pr...
ruby
chosen
[ { "from": "system", "value": "[FEATURE] Make local/remote shell specific to environment and target\n" }, { "from": "human", "value": "require 'fulmar/domain/service/configuration_service'\n\nmodule Fulmar\n module Domain\n module Service\n # Provides the helper methods used in the tasks...
ruby
chosen
[ { "from": "system", "value": "Refactor CashSaleItemList to use Support::Sublist\n" }, { "from": "human", "value": "module NetSuite\n module Records\n class CashSaleItemList\n include Namespaces::TranSales\n\n def initialize(attributes = {})\n case attributes[:item]\n ...
ruby
chosen
[ { "from": "system", "value": "Split report into SMS, and IVR reports\n" }, { "from": "human", "value": "require 'csv'\n\nnamespace :report do\n desc \"deliveries by day of week, and time of day\"\n task :notification_day_hour => :environment do\n daynames = ['day/hour','Sunday', 'Monday','T...
ruby
chosen
[ { "from": "system", "value": "Allow administrator to manage Newsletter\n" }, { "from": "human", "value": "#\n# == Ability Class\n#\nclass Ability\n include CanCan::Ability\n\n def initialize(user)\n user ||= User.new # visitor user (not logged in)\n\n if user.super_administrator?\n ...
ruby
chosen
[ { "from": "system", "value": "Fix prune_method_listing to work more gracefully with methods in proxy namespaces\n" }, { "from": "human", "value": "module YARD\n module Templates\n module Helpers\n module ModuleHelper\n def prune_method_listing(list, hide_attributes = true)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix order of index in Mdm::Module::Relationship spec\n\n[#50752269]\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Mdm::Module::Relationship do\n context 'associations' do\n it { should belong_to(:ancestor).class_name('Mdm::Module::Ancestor...
ruby
chosen
[ { "from": "system", "value": "Correct path for broken spec" }, { "from": "human", "value": "require 'rails_helper'\n\nmodule Renalware\n feature 'A read only user' do\n background do\n @patient = create(:patient, :with_problems, :with_meds)\n login_as_read_only\n end\n\n scen...
ruby
chosen
[ { "from": "system", "value": "Set example description for HTTP routes.\n" }, { "from": "human", "value": "module Lita\n module RSpec\n module Matchers\n # Used to complete an HTTP routing test chain.\n class HTTPRouteMatcher\n def initialize(context, http_method, path, inver...
ruby
chosen
[ { "from": "system", "value": "Update podspec to identify public headers\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MockUIAlertViewActionSheet'\n s.version = '1.0.0'\n s.summary = 'Mock classic alerts and action sheets for unit tests'\n s.description = <<-DESC\n...
ruby
chosen
[ { "from": "human", "value": "Add rake task to sort Gemfile\n" }, { "from": "gpt", "value": "namespace :sort_gemfile do\n if Rails.env.development?\n require 'ordinare'\n desc 'Sorts Gemfile A to Z'\n task :perform_sort do\n puts 'Start sort of Gemfile'\n sh 'ordinare'\n ...
ruby
chosen
[ { "from": "system", "value": "Fix issue with square pixel change." }, { "from": "human", "value": "class Snapshot < ApplicationRecord\n belongs_to :snapshot_index\n\n delegate :video, to: :snapshot_index\n\n mount_uploader :image, ImageUploader\n\n def self.processed\n where(processed: tr...
ruby
chosen
[ { "from": "system", "value": "Update session to 7 day expiry\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 1.day\n" }, { "from": "gpt", "va...
ruby
chosen
[ { "from": "system", "value": "Add figure:destroyed to event stream" }, { "from": "human", "value": "create_update_events = [\n \"comment:created\", \"comment:updated\",\n \"task:created\", \"task:updated\",\n \"paper:created\", \"paper:updated\",\n \"author:created\", \"author:updated\",\n ...
ruby
chosen
[ { "from": "system", "value": "Change response to match others\n" }, { "from": "human", "value": "name :cha2ds2\r\nrequire_helpers :get_field_as_integer, :get_field_as_sex, :get_field_as_bool\r\n\r\nexecute do\r\n\tage = get_field_as_integer :age\r\n\tsex = get_field_as_sex :sex\r\n\r\n\tcongesti...
ruby
chosen
[ { "from": "system", "value": "Remove lattes_curriculum's tests with external dependencies\n" }, { "from": "human", "value": "#!/bin/env ruby\n# encoding: utf-8\n\nrequire \"test_helper\"\n\nclass HtmlParserTest < ActiveSupport::TestCase\n\n def setup\n @parser = Html_parser.new\n end\n\n s...
ruby
chosen
[ { "from": "system", "value": "Update podspec file(Version number to 0.1.0).\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CMRefresh\"\n s.version = \"0.0.13\"\n s.summary = \"Some util refresh categories for UIScrollView and it's subclasses.\"\n s.des...
ruby
chosen
[ { "from": "system", "value": "Update to the gemspec before pushing the first version\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n\ts.name = \"bitwizard\"\n\ts.version = \"1.0.0\"\n\n\ts.authors = [ \"Alexander \\\"Ace\\\" Olofsson\" ]\n\ts.date = \"2014-04-12\"\n\ts.summary...
ruby
chosen
[ { "from": "system", "value": "Fix zone seeds to be able to re-run multiple times\n" }, { "from": "human", "value": "eu_vat = Spree::Zone.create!(name: \"EU_VAT\", description: \"Countries that make up the EU VAT zone.\", kind: 'country')\nnorth_america = Spree::Zone.create!(name: \"North America...
ruby
chosen
[ { "from": "system", "value": "Switch methadone for GLI gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/tamarillo/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"tamarillo\"\n gem.version = Tamarillo::VERSIO...
ruby
chosen
[ { "from": "system", "value": "Update tests to match the new work\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Checkout\n describe BestOfferCalculator do\n context \"Discount Quantity on the Pricing Rule\" do\n\n it \"calculates a discount price for a product if the...
ruby
chosen
[ { "from": "human", "value": "Add a spec for QueueingRabbit::Callbacks.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe QueueingRabbit::Callbacks do\n let!(:klass) { Class.new { extend QueueingRabbit::Callbacks } }\n subject { klass }\n\n context 'when a single callback is s...
ruby
chosen
[ { "from": "system", "value": "Use better match for spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe CalendarController do\n describe 'GET index' do\n let(:parameters) { { year: 2017, month: 3, format: :json } }\n let(:response_json) { JSON.parse(response.body).und...
ruby
chosen
[ { "from": "system", "value": "Add exclamation mark to one method to test subject line for which one being called\n" }, { "from": "human", "value": "class NotificationMailer < ActionMailer::Base\n default from: \"notifications@cityvoiceapp.com\"\n include NotificationsMailerHelper\n helper :no...
ruby
chosen
[ { "from": "system", "value": "Fix broken test for connection builder\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass ConnectionsBuilderTest < ActiveSupport::TestCase\n setup do\n @organization = organizations(:ets)\n @provider = ConnectionsProviders::MembershipProvider...
ruby
chosen
[ { "from": "human", "value": "Add migration to convert collations to UTF-8\n" }, { "from": "gpt", "value": "class SwitchCollationToUtf8 < ActiveRecord::Migration\n def change\n ActiveRecord::Base.connection.tables.each do |table|\n puts \"Converting #{table} to UTF-8\"\n ActiveRecor...
ruby
chosen
[ { "from": "system", "value": "[CHEF-4188] Change embedded runit inittab id\n\nIn order to not conflict with user installed runit packages, this change\nuses SV (abbreviation for chef-server or chef sv) as inittab id.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: runit\n# Recipe:: sysvi...
ruby
chosen
[ { "from": "system", "value": "Set search result order properly when using top right search box\n\nFix #5\n" }, { "from": "human", "value": "module FullTextSearch\n module Hooks\n module ControllerSearchIndex\n def index\n @full_text_search_order_target = params[:order_target].pre...
ruby
chosen
[ { "from": "system", "value": "Include build styles on the queue page\n" }, { "from": "human", "value": "module Juici::Controllers\n class BuildQueue < Base\n\n def list\n builds = $build_queue.builds.sort_by(&:priority)\n yield [:\"queue/list\", opts(:builds => builds)]\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Support different merge strategies in html\n" }, { "from": "human", "value": "# meant to be mixed into a hash\nmodule RailsComponents\n module HtmlHelpers\n def html(html_attributes_to_merge = {})\n merge(html_attributes_to_merge) { |key, v1, v2| [v1, v2].f...
ruby
chosen
[ { "from": "system", "value": "Fix postgresql integration tests on CentOS 5\n" }, { "from": "human", "value": "# encoding: UTF-8\n#\n# Author:: Xabier de Zuazo (<xabier@zuazo.org>)\n# Copyright:: Copyright (c) 2015 Onddo Labs, SL.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the ...
ruby
chosen
[ { "from": "system", "value": "Fix error class in test\n" }, { "from": "human", "value": "require \"minitest/autorun\"\nrequire_relative \"../lib/heel\"\n\nclass TestShell < Minitest::Test\n def test_open_fail_in_non_mac_os\n exception = assert_raises ShellOpenError do\n Heel::Shell.open...
ruby
chosen
[ { "from": "system", "value": "Fix spacing on challenge 4.6.6\n" }, { "from": "human", "value": "# Count Between\n\n# I worked on this challenge [by myself].\n\n# count_between is a method with three arguments:\n# 1. An array of integers\n# 2. An integer lower bound\n# 3. An integer upper b...
ruby
chosen
[ { "from": "system", "value": "Remove superfluous stubs in BLP controller\n" }, { "from": "human", "value": "require \"test_helper\"\n\ndescribe BrexitLandingPageController do\n include RummagerHelpers\n include GovukAbTesting::MinitestHelpers\n include TaxonHelpers\n\n describe \"GET show\" ...
ruby
chosen
[ { "from": "human", "value": "Add migration for new map model\n" }, { "from": "gpt", "value": "Sequel.migration do\n up do\n create_table :maps do\n primary_key :id\n String :name\n Text :center\n Integer :zoom_level\n DateTime :created_at\n DateTime :updated_at\...
ruby
chosen
[ { "from": "system", "value": "Return in ensure clause causes unexpected results\n" }, { "from": "human", "value": "require 'bundler/setup'\n\nrequire 'activejob-google_cloud_pubsub'\nrequire 'timeout'\n\nRSpec.configure do |config|\n # Enable flags like --only-failures and --next-failure\n con...
ruby
chosen
[ { "from": "system", "value": "Improve activity feed: correct hostname in dev link URLs\n\nfixes #564\n" }, { "from": "human", "value": "#encoding: UTF-8\n\nxml.instruct! :xml, :version => \"1.0\"\nxml.rss :version => \"2.0\" do\n xml.channel do\n xml.title \"Transitland Datastore Activity Fe...
ruby
chosen
[ { "from": "system", "value": "Update schedule controller test, list action was removed in 050b4025b commit.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\n\nclass ScheduleControllerTest < ActionController::TestCase\n fixtures :users, :companies, :tasks...
ruby
chosen
[ { "from": "system", "value": "Fix url escaping for geocoding\n" }, { "from": "human", "value": "module LocationsHelper\n LAT_DEG_IN_KM = 111.2 #km distance between latitude degrees\n LON_DEG_IN_KM = 55.60 #km distance between longitude degrees at lat 60\n\n def distance_between(c1, c2)\n M...
ruby
chosen
[ { "from": "system", "value": "Allow flow configs for corrupted records\n" }, { "from": "human", "value": "module Setup\n class FlowConfig\n include CenitScoped\n\n deny :all\n allow :index, :show, :edit\n\n build_in_data_type\n\n belongs_to :flow, class_name: Setup::Flow.to_s, in...
ruby
chosen
[ { "from": "system", "value": "Add a way to retrieve all transaction splits for a user\n" }, { "from": "human", "value": "class TransactionSplit < ActiveRecord::Base\n belongs_to :transaction_record\n has_many :pie_piece_transaction_splits\n has_many :pie_pieces, through: :pie_piece_transactio...
ruby
chosen
[ { "from": "system", "value": "Stop deleting updated Person image\n\nCurrently, when a `Person` has their image updated CarrierWave deletes\nthe previous image. This wasn't a problem when Whitehall rendered its\nown content but now we are publishing content via Publishing API these\nimages will still be refe...
ruby
chosen
[ { "from": "system", "value": "Add a proper description to show on the Paypal order page\n" }, { "from": "human", "value": "module Shoppe\n module Paypal\n module OrderExtensions\n \n # Create a PayPal payment and respond with the approval URL\n # Requires return_url and cancel...
ruby
chosen
[ { "from": "system", "value": "Remove accidentally added extra search block\n" }, { "from": "human", "value": "module Releaf::I18nDatabase\n class TranslationIndexBuilder < Releaf::Builders::IndexBuilder\n\n def text_search_content\n [search_only_blank_ui] + super\n end\n\n def sea...
ruby
chosen
[ { "from": "system", "value": "Remove logging output in MSCOM interface\n" }, { "from": "human", "value": "module VirtualBox\n module COM\n class MSCOMInterface < BaseInterface\n # The VirtualBox and Session interfaces, both of which are extremely\n # important in interfacing with t...
ruby
chosen
[ { "from": "system", "value": "Fix series URL in test\n" }, { "from": "human", "value": "Given(/^an series exists in the database$/) do\n options = {\n title: 'PPI Statistical Bulletin',\n slug: 'product-price-index'\n }\n @series = FactoryGirl.create :series, options\nend\n\nWhen(/^I vi...
ruby
chosen
[ { "from": "system", "value": "Add test for missing content attributes\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe RevisionContent, type: :model do\n let(:variant_one) { 'The quick brown fox jumps over the lazy dog' }\n let(:variant_two) { 'The fox is dead' }\n ...
ruby
chosen
[ { "from": "system", "value": "Add test for MW delegated visibility\n" }, { "from": "human", "value": "describe ApplicationHelper::Button::MiddlewareStandaloneServerAction do\n let(:record) { double(\"MiddlewareServer\") }\n subject(:action) { described_class.new(setup_view_context_with_sandbox...
ruby
chosen
[ { "from": "system", "value": "Fix eventmachine trap context error\n" }, { "from": "human", "value": "module PalavaMachine\n class Server\n module CoreSupport\n def ws_open_announce(ws)\n manager.announce_connection(ws)\n end\n\n def ws_message_parse(ws, message)\n ...
ruby
chosen
[ { "from": "human", "value": "Add rake task to set Redis expiraton for existing DataImport logs\n" }, { "from": "gpt", "value": "# encoding: utf-8\nnamespace :dataimport do\n namespace :log do\n desc 'Set expiration of DataImport logs to 2 days'\n task :set_expiration => :environment do\n ...
ruby
chosen
[ { "from": "system", "value": "Remove attempt to eager load InventoryUnitBuilder\n\nincludes have no effect on a .build, so this was doing nothing.\n\nThis partially reverts commit a7b3874013266b5804721f81cef83a6f1a1c42a6.\n" }, { "from": "human", "value": "module Spree\n module Stock\n class...
ruby
chosen
[ { "from": "system", "value": "Use $INPUT_RECORD_SEPARATOR instead of $/\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = 'capistrano-linked-files'\n s.vers...
ruby
chosen
[ { "from": "system", "value": "Use the Directory number as outbound CallerID\n\nWe would like users to be able to identify when they are receiving a\ndirectory call to help them distinguish it from telemarketers and other\nspam (and/or to avoid work calls during off hours). Specifying the\ndirectory number o...
ruby
chosen
[ { "from": "system", "value": "Add error messages to Project class in method put. This way the user can know if there was an error\n" }, { "from": "human", "value": "\nmodule ProjectServer \n \n # The Project_Server class represent the Project Server Component, whose \n # responsability is t...
ruby
chosen
[ { "from": "system", "value": "Fix a port assignment bug.\n\nSpotted by:\tPaulo Henrique Lopes Ribeiro (@plribeiro3000)\n" }, { "from": "human", "value": "module Fog\n module Compute\n class XenServer\n class Real\n attr_reader :host, :username\n\n def initialize(options={}...
ruby
chosen
[ { "from": "system", "value": "Set autosave: true on fragment_accessor has_one association\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule Hornet\n module Fragments\n module Attributes\n extend ActiveSupport::Concern\n\n module ClassMethods\n\n d...
ruby
chosen
[ { "from": "system", "value": "Update json_api_client gem to match the platform and OMS\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'flex_deployment_client/version'\n\nGem::Specifi...
ruby
chosen
[ { "from": "human", "value": "Copy updated_at to public_updated_at for editions\n\ncopy the existing updated_at to public_updated_at without touching the updated_at\n" }, { "from": "gpt", "value": "class AddPublicUpdatedAtToAllSpecialistDocumentEditions < Mongoid::Migration\n def self.up\n ed...
ruby
chosen
[ { "from": "system", "value": "Add validatio to repo sync\n" }, { "from": "human", "value": "#require 'etc'\n#require 'facter'\n#require 'puppet/parameter/boolean'\n#require 'puppet/property/list'\n#require 'puppet/property/ordered_list'\n#require 'puppet/property/keyvalue'\n\nPuppet::Type.newtyp...
ruby
chosen
[ { "from": "system", "value": "Add special handling for splitting strings and arrays before sending messages\n" }, { "from": "human", "value": "module Wheaties\n module Concerns\n module Messaging\n def privmsg(message, *recipients)\n broadcast(:privmsg, recipients.join(\" \"), :t...
ruby
chosen
[ { "from": "system", "value": "Remove assets from install generator\n" }, { "from": "human", "value": "module SpreeShipwire\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => false\n\n def add_...
ruby
chosen