conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix up core tests for systemd." }, { "from": "human", "value": "#\n# Copyright 2015, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy ...
ruby
chosen
[ { "from": "human", "value": "Add a tool to filter out openflow messages from stdout logs\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\ninput_file = ARGV.shift\ninput = File.open(input_file)\n\nwhile line = input.gets\n if line =~ /^c.*OF Message START/\n line = input.gets\n whil...
ruby
chosen
[ { "from": "human", "value": "Add requests specs for account suspension\n\nWe have implimented an \"emergency brake\" feature on accounts that will\nallow us to suspend the account. This will temporarily remove public\naccess to accounts to allow us to either perform some maintance or\nrespond to an incident...
ruby
chosen
[ { "from": "human", "value": "Add For Whom the Bell Tolls tokens.\n" }, { "from": "gpt", "value": "require_relative 'narrative-distance'\n\n#chunk = Chunk.new(\"sample.txt\")\n\n# This should go in a seeds file.\n%w(Moscow Guaranty-Trust-Company Missoula Paris Foyot’s Butte Billings Red-Lodge Coo...
ruby
chosen
[ { "from": "system", "value": "Update Balsamic Mockups 3.app to v3.1.7\n" }, { "from": "human", "value": "cask :v1 => 'balsamiq-mockups' do\n version '3.1.6'\n sha256 '5f6fec35f0ab2fdaea766b5139cc9ea604782eeda6ac417b606e6d309c7b89b7'\n\n # amazonaws is the official download host per the vendor...
ruby
chosen
[ { "from": "system", "value": "Fix dummy app default route to point to RailsAdmin::MainController\n" }, { "from": "human", "value": "Dummy::Application.routes.draw do\n devise_for :users\n root :to => \"rails_admin#index\"\nend\n" }, { "from": "gpt", "value": "Dummy::Application.rou...
ruby
chosen
[ { "from": "human", "value": "Add unit test for GameSetup service object\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'kenny_g/game_setup'\n\ndescribe GameSetup do\n let(:options) { { winning_score: 100, players: ['beatrix'] } }\n let(:game_setup) { described_class.new(optio...
ruby
chosen
[ { "from": "system", "value": "Update Custom RSpec Matcher for Refactored Order Class\n" }, { "from": "human", "value": "RSpec::Matchers.define :contain_nil_element do |element|\n match do |markup|\n markup =~ /<#{element} xsi:nil=\"true\"><\\/#{element}>/\n end\n\n failure_message_for_shou...
ruby
chosen
[ { "from": "human", "value": "Add basic system spec for event_groups/follow view.\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe 'visit the follow page' do\n let(:user) { users(:third_user) }\n let(:admin) { users(:admin_user) }\n let...
ruby
chosen
[ { "from": "system", "value": "Remove outdated ActiveRecord VERSION branch\n\nThe lowest supported version of ActiveRecord is v5.0.0.\n" }, { "from": "human", "value": "require_relative \"helper\"\nSingleCov.covered! file: 'lib/arsi/relation.rb'\n\ndescribe ActiveRecord::Relation do\n let(:relat...
ruby
chosen
[ { "from": "system", "value": "Test for 10. 7 to 9 are not bringing anything new to change the code\n" }, { "from": "human", "value": "require \"test/unit\"\nrequire \"shoulda\"\n\nclass FizzBuzz\n def self.fizzable?(n)\n n % 3 == 0\n end\n def self.say(n)\n return \"Fizz\" if fizzable? ...
ruby
chosen
[ { "from": "system", "value": "Simplify Onyx recipe and update to 2.7.1\n" }, { "from": "human", "value": "osx_majorver = node['platform_version'].split('.')[0,2].join()\n\nsource_url = \"http://joel.barriere.pagesperso-orange.fr/dl/#{osx_majorver}/OnyX.dmg\"\n\nsha256_hash = '94377590c4e08516c5b...
ruby
chosen
[ { "from": "system", "value": "Update minitest requirement from ~> 5.3, < 5.14 to ~> 5.3, < 5.15\n\nUpdates the requirements on [minitest](https://github.com/seattlerb/minitest) to permit the latest version.\n- [Release notes](https://github.com/seattlerb/minitest/releases)\n- [Changelog](https://github.com/...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove append_view_path from api ControllerSetup\"\n\nThis reverts commit 92aaf03a787fc37810c07a1f8605fc4f1bb73c29.\n" }, { "from": "human", "value": "require 'spree/api/responders'\n\nmodule Spree\n module Api\n module ControllerSetup\n def self.i...
ruby
chosen
[ { "from": "system", "value": "Use KILL signal instead of HUP for Windows compatibility.\n" }, { "from": "human", "value": "require \"strut/config\"\nrequire \"strut/parser\"\nrequire \"strut/report_builder\"\nrequire \"strut/report_printer\"\nrequire \"strut/slim_client\"\nrequire \"strut/versio...
ruby
chosen
[ { "from": "system", "value": "Add prawn as a dependency" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"kepler_processor/version\"\n\nGem::Specification.new do |s|\n s.name = \"kepler-processor\"\n s.version = Kep...
ruby
chosen
[ { "from": "system", "value": "Update Razer Synapse.app to v1.45\n" }, { "from": "human", "value": "cask :v1 => 'razer-synapse' do\n version '1.44'\n sha256 '63c739c78d4f537ec64b32126fc358fba4840194296e45bd7c22638af6529984'\n\n # amazonaws.com is the official download host per the vendor homep...
ruby
chosen
[ { "from": "system", "value": "Update Join Together to 7.5.0\n" }, { "from": "human", "value": "cask :v1 => 'join-together' do\n version '7.4.1'\n sha256 '86f7e31e437f7fbdbfa58db2f6e566d1f37f7eed74535ebcaa3e96eba23a4f18'\n\n url \"http://dougscripts.com/itunes/scrx/jointogether#{version.delete...
ruby
chosen
[ { "from": "system", "value": "Check form label displays in feature test\n\n- We will add to this test in the follow up PR\n\nCo-authored-by: Alex Newton <a4a07234de0a205690872ef5d9931abdf491c9ba@digital.cabinet-office.gov.uk>\nCo-authored-by: Jonathan Hallam <jonathan.hallam@digital.cabinet-office.gov.uk\n"...
ruby
chosen
[ { "from": "human", "value": "Add missing geckoboard request spec\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nRSpec.shared_examples 'a disabler of view only actions' do\n it { expect(assigns(:disable_analytics)).to be_truthy }\n it { expect(assigns(:disable_phase_banner))....
ruby
chosen
[ { "from": "system", "value": "Create private method to set a snippet and snippet params. Set skeleton for current user\n" }, { "from": "human", "value": "class SnippetsController < ApplicationController\n\n def index\n # displays all snippets based on new or popularity\n end\n\n def new\n ...
ruby
chosen
[ { "from": "system", "value": "Use one liner for authentication check\n" }, { "from": "human", "value": "class ArticlesController < ApplicationController\n before_action :force_authentication, except: [:index, :show]\n\n def index\n status = params[:status]\n force_authentication if statu...
ruby
chosen
[ { "from": "system", "value": "[Refactor] Improve new method in Contacts Controller\n" }, { "from": "human", "value": "class ContactsController < ApplicationController\n before_filter :authenticate_user!\n\n def new\n @message = Message.new\n @subject = default_subject\n user = User.fi...
ruby
chosen
[ { "from": "system", "value": "Revert to old expense create method\n" }, { "from": "human", "value": "class ExpensesController < ApplicationController\n before_action :find_user, only: [:new, :create]\n\n def index\n @expense = Expense.new\n end\n\n def new\n @expense = Expense.new\n ...
ruby
chosen
[ { "from": "system", "value": "Fix Google accounts with periods breaking signin\n" }, { "from": "human", "value": "class GoogleUser < ApplicationRecord\n belongs_to :user\n\n include AvatarSource\n\n def self.from_auth(auth, current_user)\n google_user = GoogleUser.find_or_initialize_by(goo...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate values from congress_forms_email_values\n" }, { "from": "human", "value": "module CongressMessageHelper\n def bioguide_ids(campaign, target_bioguide_ids)\n if campaign.target_bioguide_ids.present?\n campaign.target_bioguide_ids\n elsif t...
ruby
chosen
[ { "from": "system", "value": "Rename document -> section in SectionBuilder\n" }, { "from": "human", "value": "require \"securerandom\"\n\nclass SectionBuilder\n def call(manual, attrs)\n section_factory = SectionFactory.new(manual)\n document = section_factory.call(SecureRandom.uuid, [])\...
ruby
chosen
[ { "from": "system", "value": "[rubocop] C: Use casecmp instead of upcase ==.\n" }, { "from": "human", "value": "class Webmail::StoredMailPart\n attr_accessor :section\n attr_accessor :part\n\n def initialize(part, section = nil)\n self.section = section\n self.part = part\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Make links in tweets anchor tags\n" }, { "from": "human", "value": "class Tweet::HtmlPresenter\n attr_accessor :tweet\n\n def initialize(tweet)\n self.tweet = tweet\n end\n\n def self.model_name\n Tweet.model_name\n end\n\n def text\n buffer = ActiveS...
ruby
chosen
[ { "from": "system", "value": "Drop optional dependency on ActiveSupport\n" }, { "from": "human", "value": "require \"i18n\"\n\nmodule OrdinalizeFull\n I18n.load_path << Dir[File.join(__dir__, \"ordinalize_full/locales/*.yml\")]\n\n def ordinalize(in_full: false)\n if in_full\n self.ord...
ruby
chosen
[ { "from": "system", "value": "Add console output of content of logger\n" }, { "from": "human", "value": "require 'slatan/spirit'\nrequire 'logger'\n\nmodule Slatan\n ## Wrapper class of Logger\n class Buttocks\n @@use_log = Spirit.use_log\n class << self\n def init()\n if @@u...
ruby
chosen
[ { "from": "system", "value": "Fix bug in static overlaying\n" }, { "from": "human", "value": "module Teaas\n class Overlayer\n def self.overlay(original_img, overlay_img, options={})\n if options[:whitelisted_animation]\n overlay_animated_on_animated(original_img, overlay_img, op...
ruby
chosen
[ { "from": "system", "value": "Use new interface for modifying actions.\n" }, { "from": "human", "value": "require 'vagrant'\nrequire \"vagrant-vbguest/config\"\nrequire 'vagrant-vbguest/command'\nrequire 'vagrant-vbguest/middleware'\n\nvbguest = Vagrant::Action::Builder.new do\n use VagrantVbgu...
ruby
chosen
[ { "from": "system", "value": "Add example to retrieve all available payment methods\n" }, { "from": "human", "value": "methods = Mollie::Method.all\n\n# Filter by amount and currency\nmethods = Mollie::Method.all(amount: { value: '100.00', currency: 'EUR' })\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Fix bug error_code = '0'\n" }, { "from": "human", "value": "require 'b2b_center_api/etp_error'\n\nmodule B2bCenterApi\n module WebService\n class Response\n attr_reader :body, :ret, :status, :result\n\n def initialize(response)\n @body = respons...
ruby
chosen
[ { "from": "system", "value": "Fix previous state bug (part 3: simple end detection)\n" }, { "from": "human", "value": "require_relative '../abstract_container/structured_and_oo/end_block'\n\nmodule Languages\n\n module Ruby\n\n class EndBlockRuby < Languages::EndBlock\n\n public\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use reverse_each instead of reverse.find\n\nSaves an Array allocation, and since the block already has a `return`\nstatement, `#each` works just as well as `#find`.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule RuboCop\n module Cop\n # Common fu...
ruby
chosen
[ { "from": "system", "value": "Remove duplication of Jar name in Jython.\n" }, { "from": "human", "value": "require 'formula'\n\nclass Jython <Formula\n url 'http://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar'\n homepage 'http://www.jython.org'\n md5 '2ee97...
ruby
chosen
[ { "from": "system", "value": "Add json to list of dependencies\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef_zero/version'\n\nGem::Specification.new do |s|\n s.name = 'chef-zero'\n s.version = ChefZero::VERSION\n s.platform = Gem::Platform::RUBY...
ruby
chosen
[ { "from": "system", "value": "Fix uninitialized constant Timeout (NameError)\n" }, { "from": "human", "value": "require 'json'\n\nmodule Frontkick\n # ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html\n class TimeoutLocal < ::Timeout::Error; end\n class Locked < StandardEr...
ruby
chosen
[ { "from": "system", "value": "Fix Nexmo::Signature for compatibility with ruby-jwt v2\n\nCurrently raising NoMethodError: undefined method `secure_compare' because\nthe secure_compare method has been moved into a JWT::SecurityUtils module.\n" }, { "from": "human", "value": "require 'digest/md5'\...
ruby
chosen
[ { "from": "system", "value": "Fix variable name for defaulting appid from environment\n" }, { "from": "human", "value": "module ScormCloud\n\tclass CLI\n\t\tdef self.start\n\t\t\tcommand = ARGV.shift\n\t\t\tsecret = ENV['SCORM-CLOUD-APPID']\n\t\t\tsecret = ENV['SCORM-CLOUD-SECRET']\n\t\t\topts =...
ruby
chosen
[ { "from": "human", "value": "Add a rake task to setup DATABASE_URL for ClearDB\n\nThere currently is no other way to inherit environment\nvariables from parent apps on heroku\n" }, { "from": "gpt", "value": "namespace :db do\n desc 'setup DATABASE_URL from CLEARDB_DATABASE_URL in .env'\n task ...
ruby
chosen
[ { "from": "system", "value": "Document some of the insanity\n" }, { "from": "human", "value": "%w(base add delete follow list set update user version).each do |filename|\n require File.join(File.expand_path(\"../subcommands/#{filename}\", __FILE__))\nend\n\nmodule Twat\n class Subcommand\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add method to fetch ncodes from realpath\n" }, { "from": "human", "value": "module Yomou\n\n class Bookshelf\n\n def initialize\n @conf = Yomou::Config.new\n\n Groonga::Context.default_options = {:encoding => :utf8}\n Groonga::Database.open(File.e...
ruby
chosen
[ { "from": "system", "value": "Revert \"Try to clean up dependencies\"\n\nThis reverts commit 869f468c148dd4cb4d198eba8b56c2caa566fd4c.\n\nConflicts:\n\n\tlicense_finder.gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"license_finder\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Refactor convenience methods to use a network_for method.\n" }, { "from": "human", "value": "module DropletKit\n class Droplet < BaseModel\n [:id, :name, :memory, :vcpus, :disk, :locked, :created_at,\n :status, :backup_ids, :snapshot_ids, :action_ids, :feat...
ruby
chosen
[ { "from": "system", "value": "Update gnatsd version used in tests\n\nSigned-off-by: Nader Ziada <61306b0d4f20cfca7d1222440ff271187de40866@pivotal.io>\n" }, { "from": "human", "value": "require 'common/retryable'\nrequire_relative './artifact'\n\nmodule Bosh::Dev\n class GnatsdManager\n VERSI...
ruby
chosen
[ { "from": "human", "value": "Add a spec file to allow seeing the magical emoji!\n" }, { "from": "gpt", "value": "describe 'my amazing tests' do\n # generate many hearts!\n 50.times do |i|\n it \"must #{i}\" do\n 100.should == 100\n end\n end\n\n # generate some poops!\n 2.times d...
ruby
chosen
[ { "from": "system", "value": "Fix issue with phantom JS loading assets\n\nphantomjs defaults to using SSLv3, which has now been disabled\neverywhere. The protocol used can be changed with an option:\n\n--ssl-protocol= Sets the SSL protocol\n(supported protocols: 'SSLv3' (default), 'SSLv2', 'TLSv1', 'any')\n...
ruby
chosen
[ { "from": "human", "value": "Create migration to allow null emails\n\nOmniauth authentication providers do not always return a user's email\nin the info hash sent back through the callback. Providers like Twitter\nkeep that information private/hidden. User records need to be able to\nbe saved without an ema...
ruby
chosen
[ { "from": "system", "value": "Upgrade GOG.com Galaxy Client to v1.0.5.11\n" }, { "from": "human", "value": "cask :v1 => 'gog-galaxy' do\n version '1.0.2.939'\n sha256 '2c46d7aafe862bc0b2aa6b4bc95490683f8ec80f96feffb7c6f7918e2203e4e7'\n\n url \"http://cdn.gog.com/open/galaxy/client/installers/...
ruby
chosen
[ { "from": "system", "value": "Allow C-optimizations for even more C parser speed\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire \"mkmf\"\n\n$CFLAGS << \" -ggdb -O0 -Wextra -DDEBUG_H\" # only for development\n\nshould_build = true\nshould_build &&= have_header \"ruby.h\"\nshoul...
ruby
chosen
[ { "from": "system", "value": "Adjust URL in gemspec and add metadata URLs\n\nRubyGems.org has recently added the capability to have extra metadata\nURLs shown on the gem page. These are handy for people who are new to a\ngem or need to report an issue.\n" }, { "from": "human", "value": "require ...
ruby
chosen
[ { "from": "system", "value": "Copy AFNetworking in the Podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Artsy+Authentication\"\n s.version = \"1.0.0\"\n s.summary = \"Authentication for Artsy Services.\"\n s.description = <<-DESC\n...
ruby
chosen
[ { "from": "system", "value": "Update tracker_api for bug fix\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pivo/version'\n\nGem::Specification.new do |spec|\n spec.name =...
ruby
chosen
[ { "from": "human", "value": "Add a formula for the Jed editor.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass Jed <Formula\n url 'ftp://space.mit.edu/pub/davis/jed/v0.99/jed-0.99-19.tar.bz2'\n h...
ruby
chosen
[ { "from": "system", "value": "Make sure that only the people that are supposed\nto edit and destroy proposals do so\n" }, { "from": "human", "value": "require_dependency \"cfp/application_controller\"\n\nmodule Cfp\n class ProposalsController < ApplicationController\n before_filter :load_pro...
ruby
chosen
[ { "from": "system", "value": "Fix rendering load profile as JSON\n" }, { "from": "human", "value": "class LoadProfilesController < ResourceController\n RESOURCE_ACTIONS = %i(show edit update destroy)\n\n before_filter :fetch_load_profile, only: RESOURCE_ACTIONS\n before_filter :authorize_gene...
ruby
chosen
[ { "from": "system", "value": "Allow project presentation title updates\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n" }, { "from": "human", "value": "class PresentationsController < OrganizationController\n skip_before_filter :auth_required, :only => [:...
ruby
chosen
[ { "from": "system", "value": "Add TODO in normal relationships controller\n" }, { "from": "human", "value": "class RelationshipsController < ApplicationController\n before_filter :authenticate_user!\n\n #TODO: Use ajax?\n #TODO: Add conditional to make sure a contact cannot be requestd twice\...
ruby
chosen
[ { "from": "system", "value": "Add minimum ruby version to spec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"webpack/rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Add spec for post_page_title for reshares\n" }, { "from": "human", "value": "# Copyright (c) 2010-2011, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\ndescribe PostsHelper, :ty...
ruby
chosen
[ { "from": "system", "value": "Return correct error status for invalid access\n" }, { "from": "human", "value": "module Drive\n class ApplicationController < ::ApplicationController\n # ActionController::Base\n\n private\n\n def ensure_admin\n render_json_error(current_user) unless...
ruby
chosen
[ { "from": "system", "value": "Fix md5 on MySQL Connector (C)\n" }, { "from": "human", "value": "require 'formula'\n\nclass MysqlConnectorC <Formula\n @homepage='http://dev.mysql.com/downloads/connector/c/6.0.html'\n @url='http://mysql.llarian.net/Downloads/Connector-C/mysql-connector-c-6.0.2.t...
ruby
chosen
[ { "from": "system", "value": "Fix broken tasks based on ambiguous name\n\nmodule Admin\n CreateOrderService\nend\n\nIn test ::CreateOrderService is used sometimes instead of ::Admin::CreateOrderService\n(e.g. run all tests)\n" }, { "from": "human", "value": "module Admin\n class OrdersControll...
ruby
chosen
[ { "from": "system", "value": "Add default value for dict[entry]\n" }, { "from": "human", "value": "module Api\n module V1\n class DictsController < ApplicationController\n def show\n require \"rugby-dict\"\n input = params[:entry]\n dict = RugbyDict::Dict.from_yaml\...
ruby
chosen
[ { "from": "system", "value": "Test to ensure DVLA campaign page exists" }, { "from": "human", "value": "require_relative \"../test_helper\"\n\nclass CampaignControllerTest < ActionController::TestCase\n\n should \"set slimmer format of campaign\" do\n get :workplace_pensions\n assert_equa...
ruby
chosen
[ { "from": "human", "value": "Create Rectangle class and two objects of it\n" }, { "from": "gpt", "value": "class Rectangle\n def initialize(length = 0,breath = 0)\n @length = length\n @breath = breath\n end\n\n def area()\n return @length*@breath\n end\n\n def...
ruby
chosen
[ { "from": "system", "value": "Use %r for regexp matching more than 1 '/' char\n" }, { "from": "human", "value": "module Pages\n class Article < SitePrism::Page\n set_url '/articles{/id}'\n set_url_matcher /\\/articles\\/\\w+/\n end\nend\n" }, { "from": "gpt", "value": "module...
ruby
chosen
[ { "from": "system", "value": "Update podspec for upcoming version 1.2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MendeleySDK\"\n s.version = \"1.1\"\n s.summary = \"Objective-C client for the Mendeley Open API.\"\n s.homepage = \"https://github...
ruby
chosen
[ { "from": "system", "value": "Update pod description (drop deprecated “Open” API)\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MendeleySDK'\n s.version = '2.0'\n s.summary = 'Objective-C client for the Mendeley Open API.'\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add closing quote to version number in podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftLoader\"\n s.version = \"0.2.3\n s.summary = \"A simple and beautiful activity indicator\"\n s.description =...
ruby
chosen
[ { "from": "system", "value": "Raise version in podspec to 0.1.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'UIFontComplete'\n s.version = '0.1.0'\n s.summary = 'Make working with UIFont faster and less error-prone'\n \n s.description ...
ruby
chosen
[ { "from": "system", "value": "Fix order on rss feed\n" }, { "from": "human", "value": "class WelcomeController < ApplicationController\n\n respond_to :html, :xml, :builder\n\n # GET /\n # GET /feed.atom\n def index\n @postings = Posting.readable( current_user ? current_user.roles_mask...
ruby
chosen
[ { "from": "system", "value": "Update spec to support authorization.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'global_features' do\n include PavlovSupport\n\n let(:current_user) { create :user }\n\n it 'initial state is empty' do\n as(current_user) do |pavlov|\n ...
ruby
chosen
[ { "from": "human", "value": "Add migration to remove broken profile suggestions\n" }, { "from": "gpt", "value": "class RemoveBrokenProfileSuggestions < ActiveRecord::Migration\n def up\n execute(\"DELETE FROM profile_suggestions WHERE suggestion_id NOT IN (SELECT id from profiles)\")\n end\...
ruby
chosen
[ { "from": "human", "value": "Move asset location update job to core where it belongs\n" }, { "from": "gpt", "value": "#------------------------------------------------------------------------------\n#\n# AssetLocationUpdateJob\n#\n# Updates an assets location\n#\n#-------------------------------...
ruby
chosen
[ { "from": "human", "value": "Create CompatibilityTest to ensure that new versions of gem will decrypt data stored by old versions of gem\n\nTest ensures that values stored by previous versions of the gem will\nroundtrip and decrypt correctly in this and future versions. This is important\nfor data stored in...
ruby
chosen
[ { "from": "system", "value": "Use symbol instead of String for smtp config value\n" }, { "from": "human", "value": "module HerokuBackupOrchestrator\n class EmailErrorReporter\n def initialize\n smtp_options = {\n :address => 'smtp.sendgrid.net',\n :port =>...
ruby
chosen
[ { "from": "system", "value": "Remove test code & fix pagination\n" }, { "from": "human", "value": "require_dependency 'repositories_controller'\n\nclass RepositoryIssuesController < RepositoriesController\n\n def issues\n per_page = params[:per_page].to_i\n per_page = 20 if per_page < 1\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove Rails 2.1 handling code from noosfero HTTP caching code\"\n\nThis reverts commit 0fcf86d44896774ec82af0ea41ac6c61a95a3485.\n" }, { "from": "human", "value": "module NoosferoHttpCaching\n\n def self.included(c)\n c.send(:after_filter, :noosfero_se...
ruby
chosen
[ { "from": "system", "value": "Make store credits a has many association on types\n" }, { "from": "human", "value": "module Spree\n class StoreCreditType < ActiveRecord::Base\n DEFAULT_TYPE_NAME = 'Promotional'\n has_one :store_credit, class_name: 'Spree::StoreCredit'\n end\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Update variants with count on-hand, to keep direct queries happy" }, { "from": "human", "value": "module Spree\n Variant.class_eval do\n include ActiveModel::Validations\n\n validates :sku, 'spree_fishbowl/sku_in_fishbowl' => true, :if => \"sku.present?\"\n\n...
ruby
chosen
[ { "from": "system", "value": "Add path methods for extending a sprockets environment manually\n" }, { "from": "human", "value": "require \"scss_helpers/version\"\n\nmodule ScssHelpers\n # Your code goes here...\nend\n\nrequire 'scss_helpers/engine' if defined?(Rails)\n" }, { "from": "gp...
ruby
chosen
[ { "from": "system", "value": "Mark base event as abstract (doc)\n" }, { "from": "human", "value": "module CartoGearsApi\n module Events\n class BaseEvent\n end\n end\nend\n" }, { "from": "gpt", "value": "module CartoGearsApi\n module Events\n # @abstract All events must s...
ruby
chosen
[ { "from": "human", "value": "Test existing Imminence API functionality.\n" }, { "from": "gpt", "value": "require \"test_helper\"\nrequire \"gds_api/imminence\"\n\nclass ImminenceApiTest < MiniTest::Unit::TestCase\n\n ROOT = \"https://imminence.test.alphagov.co.uk\"\n\n def api_client\n GdsA...
ruby
chosen
[ { "from": "system", "value": "Fix failing test for PiwikPlugins hook\n" }, { "from": "human", "value": "require File.expand_path('../helper', __FILE__)\n\nclass PiwikPluginsTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_push\n svc = ...
ruby
chosen
[ { "from": "system", "value": "Call properly `t` method in error_and_exit\n" }, { "from": "human", "value": "module Vagrant\n module Util\n def self.included(base)\n base.extend Vagrant::Util\n end\n\n def wrap_output\n puts \"==================================================...
ruby
chosen
[ { "from": "human", "value": "Add twitter streaming api and hipchat message api script\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'bundler'\nrequire 'em-twitter'\nrequire 'json'\nrequire 'hipchat'\n\nBundler.require\n\ntrack_keywords = ENV['TWITTER_TRACK_KEYWORDS']\n\noptions = ...
ruby
chosen
[ { "from": "system", "value": "Add stub for Date in addition to DateTime (some of us used Date instead of DateTime for measuring days_since_last_activity)" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe SalesEngine::Customer, customer: true do\n context \"extensions\" do\n\n ...
ruby
chosen
[ { "from": "human", "value": "Disable xml and json parsers per security advisory\n" }, { "from": "gpt", "value": "# Per https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/ZOdH5GH5jCU\nActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)\nActionDispatch::ParamsPars...
ruby
chosen
[ { "from": "system", "value": "Add .pch file to iOS podspec\n\n- fixes missing `FRLocalizedString` definition regression in 1.5.1 when integrating using CocoaPods\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'F53FeedbackKit'\n s.version = '1.5.1'...
ruby
chosen
[ { "from": "human", "value": "Add simple test for smoothie module\n\nSigned-off-by: Aki Saarinen <278bc57fbbff6b7b38435aea0f9d37e3d879167e@akisaarinen.fi>\n" }, { "from": "gpt", "value": "require File.dirname(__FILE__) + '/test_helper.rb'\nrequire 'modules/module_smoothie.rb'\n\nclass TestModule_...
ruby
chosen
[ { "from": "system", "value": "Core: Print out loaded settings file path on bot start\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nBundler.require(:default)\n\nrequire './lib/bot/core'\n\n$shutdown = false\n$restart = false\n\n# Loads .rb patches intended to be ...
ruby
chosen
[ { "from": "system", "value": "Add refernece to location in schools migration\n" }, { "from": "human", "value": "class CreateSchools < ActiveRecord::Migration\n def change\n create_table :schools do |t|\n \tt.string :dbn\n t.string :school\n t.integer :total_enrollment\n t.f...
ruby
chosen
[ { "from": "human", "value": "Add test for new controller for listing schemas\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe DatasetFileSchemasController, type: :controller do\n describe 'index' do\n it \"returns http success\" do\n get 'index'\n expect(response)...
ruby
chosen
[ { "from": "human", "value": "Add specs for repo processor\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nRSpec.describe PullRequestMonitor::RepoProcessor do\n describe \".process\" do\n it \"pulls from upstream master\" do\n repo = instance_spy(\"CommitMonitorRepo\")\n ...
ruby
chosen
[ { "from": "human", "value": "Test file for prime number has been created\n" }, { "from": "gpt", "value": "require \"test/unit\"\nrequire \"./prime\"\n\n\n\nclass Testprime < Test::Unit::TestCase\n\n\ndef check_prime_no\n assert_equal(\"True\", Prime.check_prime(7))\n assert_equal(\"True\",Pr...
ruby
chosen
[ { "from": "system", "value": "Change handle to support both true and false\n" }, { "from": "human", "value": "actions :create, :delete\n\nattribute :type, :kind_of => String, :equal_to => %w[status metric]\nattribute :command, :kind_of => String, :required => true\nattribute :subscribers, :kind_...
ruby
chosen