conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add initial solution for 6.2; fails last rspec test currently\n" }, { "from": "human", "value": "# Die Class 2: Arbitrary Symbols\n\n\n# I worked on this challenge [by myself, with: ].\n# I spent [#] hours on this challenge.\n\n# Pseudocode\n\n# Input:\n# Output:\n#...
ruby
chosen
[ { "from": "system", "value": "Disable preloading (did not work)\n" }, { "from": "human", "value": "# Set your full path to application.\napp_path = \"/srv/satq/current\"\n\n# Set unicorn options\nworker_processes 4\npreload_app true\ntimeout 180\nlisten \"127.0.0.1:8080\"\n\n\n# Fill path to you...
ruby
chosen
[ { "from": "human", "value": "Add a Gem specification for project\n" }, { "from": "gpt", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{itest}\n s.version = '1.0'\n s.platform = Gem::Platform::RUBY\n\n s.authors ...
ruby
chosen
[ { "from": "system", "value": "Fix showing of yieldparam type/name info\n" }, { "from": "human", "value": "def init\n sections :index, [:example, :overload, [T('docstring')], :param, :option, :yields, \n :yieldparam, :yieldreturn, :return, :raises, :see, :author, :since, :version]\nend\n\ndef...
ruby
chosen
[ { "from": "system", "value": "Change to su from sudo\n" }, { "from": "human", "value": "# Create main directory for all repositories.\nrepositories = \"/home/afronski/Repositories\"\ngithub_root = \"git@github.com:afronski/%s.git\"\n\ndestination_mode = 00755\ndestination_group = \"users\"\ndest...
ruby
chosen
[ { "from": "system", "value": "Allow users with no subscriptions to create up to 5 universes\n" }, { "from": "human", "value": "class UniverseCoreContentAuthorizer < CoreContentAuthorizer\n def self.creatable_by? user\n user.universes.count < user.active_billing_plans.map(&:universe_limit).ma...
ruby
chosen
[ { "from": "system", "value": "Update test to correspond with changes to the name of the variable in Game class\n" }, { "from": "human", "value": "require 'stringio'\nrequire './lib/game.rb'\nrequire './lib/tic_tac_toe.rb'\n\ndescribe Game do\n let(:ttt){TicTacToe.new}\n let(:new_game){Game.new...
ruby
chosen
[ { "from": "system", "value": "Use text_in in Hyperloop::View specs\n" }, { "from": "human", "value": "require File.expand_path('../spec_helper', __FILE__)\n\ndescribe Hyperloop::View do\n before :each do\n @html_view = Hyperloop::View.new('spec/fixtures/simple/app/views/about.html')\n @er...
ruby
chosen
[ { "from": "human", "value": "Add code wars (7) - credit card issuer checking\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/5701e43f86306a615c001868\n# --- iteration 1 ---\ndef getIssuer(number)\n case number.to_s.length\n when 15\n return \"AMEX\" if /\\A3[47]/ === number....
ruby
chosen
[ { "from": "system", "value": "Use Octokit instead of hardcoding the auth url\n" }, { "from": "human", "value": "require 'rest-client'\n\nclass AuthController < ApplicationController\n\n def login\n if current_user\n redirect_to dashboard_url\n else\n github_auth_url = \"https://...
ruby
chosen
[ { "from": "human", "value": "Create a google calculator plugin\n" }, { "from": "gpt", "value": "require 'uri'\n\nclass GCalc\n def initialize(sender, settings); end\n \n def commands\n {\n 'gcalc' => [:calc, 1, {\n :help => 'Execute a expression using google calculator.',\n ...
ruby
chosen
[ { "from": "system", "value": "[brightbox] Make Cloud IP model's map nicer to use\n\n* API accepts a load balancer or interface ID\n* Model accepts a Server and figures out a suitable interface\n" }, { "from": "human", "value": "require 'fog/core/model'\n\nmodule Fog\n module Compute\n class ...
ruby
chosen
[ { "from": "system", "value": "Revert \"add fetch options to order_getter_by_order_id API\"\n\nThis reverts commit 7fb9e3466a1f8081abf8cc6e2eaff2de29e30212.\n" }, { "from": "human", "value": "module GlobalSign\n module OrderGetterByOrderId\n class Request < GlobalSign::Request\n def init...
ruby
chosen
[ { "from": "system", "value": "Make it work in previews\n" }, { "from": "human", "value": "module Intercode\n module Liquid\n module Tags\n # @api\n module AppComponentRenderer\n include ActionView::Helpers::TagHelper\n\n def render_react_component(context)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix duty board updating -- blank will now give an error\n" }, { "from": "human", "value": "class DutyBoardAssignmentsController < ApplicationController\n layout 'duty_board'\n\n before_filter :can_assign_duty_board_slots?\n before_action :get_slot_and_assignment,...
ruby
chosen
[ { "from": "system", "value": "Upgrade the Debian squeeze AMI to Debian 6.0.7\n\nThe new AMI does not include curl nor ca-certificates, so this also\ntests the previous commit.\n" }, { "from": "human", "value": "require 'integration_helper'\n\nclass Debian6BootstrapTest < IntegrationTest\n def u...
ruby
chosen
[ { "from": "human", "value": "Add code wars (7) - spoonerize me\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/56b8903933dbe5831e000c76\n# --- iteration 1 ---\ndef spoonerize(words)\n words = words.split(\" \")\n words[1][0], words[0][0] = words[0][0], words[1][0]\n words.join...
ruby
chosen
[ { "from": "system", "value": "Exclude non-existing metrics from Ruby 1.9 instrumentation\n" }, { "from": "human", "value": "module Trashed\n module Instruments\n class RubyGC\n def start(state, timings, gauges)\n state[:ruby_gc] = GC.stat\n end\n\n MEASUREMENTS = {\n ...
ruby
chosen
[ { "from": "system", "value": "Include request status and uri on the stats line for easy tracking\n" }, { "from": "human", "value": "module Trashed\n module RequestMeasurement\n def self.included(base)\n base.send :around_filter, :measure_resource_usage\n end\n\n protected\n d...
ruby
chosen
[ { "from": "system", "value": "Stop tearing down Safari defaults\n" }, { "from": "human", "value": "require 'json'\nrequire 'os'\nrequire 'selenium-webdriver'\nrequire 'webdriver-user-agent/browser_options'\nrequire 'webdriver-user-agent/devices'\n\nmodule Webdriver\n module UserAgent\n class...
ruby
chosen
[ { "from": "system", "value": " Upgrade Adobe Acrobat Reader DC to 2015.010.20056\n" }, { "from": "human", "value": "cask 'adobe-reader' do\n version '2015.009.20069'\n sha256 '5b04f44a94882568aebb51ab31ebbf4bc53a3791a23af7c52af5db02cddd444a'\n\n url \"http://ardownload.adobe.com/pub/adobe/rea...
ruby
chosen
[ { "from": "system", "value": "Fix AFNetworking dependency to use 1.x version and bump spec version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CIOAPIClient\"\n s.version = \"0.8.8\"\n s.summary = \"API Client for Context.IO.\"\n s.homepage = \"h...
ruby
chosen
[ { "from": "system", "value": "Resolve resource cloning in the test cookbook\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "apt_update 'update' if platform_family?('debian')\n\ninclude_recipe 'perl::default'\n\nunless platform?('w...
ruby
chosen
[ { "from": "system", "value": "Update Silverlight Cask 5.1.40728 to 5.1.41105\n\nNew version of Silverlight.dmg file also changed the .pkg from\nSilverlight.pkg to silverlight.pkg (lowercase initial).\n" }, { "from": "human", "value": "cask :v1 => 'silverlight' do\n version '5.1.40728.0'\n sha2...
ruby
chosen
[ { "from": "system", "value": "Use a hash instead of an array :face_palm:\n" }, { "from": "human", "value": "module OpenFoodNetwork\n class SubscriptionSummary\n attr_reader :shop_id, :order_count, :success_count, :issues\n\n def initialize(shop_id)\n @shop_id = shop_id\n @order_...
ruby
chosen
[ { "from": "system", "value": "Use simplecov locally, coveralls in CI." }, { "from": "human", "value": "require \"coveralls\"\nCoveralls.wear!\n\nrequire \"frenchy\"\n\nRSpec.configure do |config|\n config.expect_with :rspec do |expectations|\n # This option will default to `true` in RSpec 4....
ruby
chosen
[ { "from": "system", "value": "Fix spec helper to work on Ruby 1.9.2\n" }, { "from": "human", "value": "require \"rubygems\"\nrequire 'json'\nrequire \"rspec\"\n\n# gem install redgreen for colored test output\nbegin require \"redgreen\" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end\n\npat...
ruby
chosen
[ { "from": "system", "value": "Make sure we remove the spec log safely.\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'denv'\nrequire 'yaml'\nrequire 'rspec/core/shared_context'\nrequire 'webmock/rspec'\nrequire 'vcr'\n\nRSpec.configure do |config|\n config.example_status_p...
ruby
chosen
[ { "from": "system", "value": "Set fixture paths for unit tests\n\nThis change defines manifest_dir and module_path expicitly in unit\ntests so that modules installed under fixtures directory is properly\nloaded.\n\nCloses-Bug: #1930403\nChange-Id: I2b398861007c0ffd5f1a038c60d88c5b9490bb01\n" }, { "f...
ruby
chosen
[ { "from": "system", "value": "Update rspec config to verify partial doubles\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FILE__)\nrequire \"paper\"\n" }, { "from": "gpt", "value": "$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FILE__)...
ruby
chosen
[ { "from": "system", "value": "Add test stub method to AirPlay device simulate\n" }, { "from": "human", "value": "require 'coveralls'\nCoveralls.wear!\n\nrequire 'stringio'\nRSpec.configure do |c|\n def capture(stream)\n begin\n stream = stream.to_s\n eval \"$#{stream} = StringIO.ne...
ruby
chosen
[ { "from": "system", "value": "Specs: Initialize AppData instead of creating the yaml file manually.\n" }, { "from": "human", "value": "require 'rspec'\nrequire 'fileutils'\nrequire 'mgit'\nrequire 'stringio'\n\n# Require support files\nDir[\"#{File.absolute_path(File.dirname(__FILE__))}/support/...
ruby
chosen
[ { "from": "human", "value": "Add missing GCS support file\n" }, { "from": "gpt", "value": "require 'google/apis/storage_v1'\n\nmodule Support\n module GCS\n class FakeObject\n attr_accessor :key, :size\n def initialize(key, options = {})\n @key = key\n @size = option...
ruby
chosen
[ { "from": "system", "value": "Change podspec version to 1.1.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DeskAPIClient\"\n s.version = \"1.1.0\"\n s.summary = \"A lightweight wrapper around the Desk.com API, v2.\"\n s.license = { :type => 'BSD...
ruby
chosen
[ { "from": "system", "value": "Update tricks_decorator spec to use fixtures\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.describe TricksDecorator, type: :decorator do\n let(:game) { Game.create! }\n let(:round) { game.rounds.first }\n let(:trick) ...
ruby
chosen
[ { "from": "system", "value": "Fix restricted condition for Canlander\n" }, { "from": "human", "value": "class ConditionRestricted < ConditionFormat\n def to_s\n timify_to_s \"restricted:#{maybe_quote(@format_name)}\"\n end\n\n private\n\n def legality_ok?(legality)\n legality.start_wit...
ruby
chosen
[ { "from": "human", "value": "Add tests for the artifacts JSON controller\n" }, { "from": "gpt", "value": "require \"spec_helper\"\nrequire \"app/features-json/artifact_json_controller\"\n\ndescribe FastlaneCI::ArtifactJSONController do\n let(:app) { described_class.new }\n let(:json) { JSON.pa...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.4.0.2 to 0.4.0.3\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'log'\n s.version = '0.4.0.2'\n s.summary = 'Logging to STD IO with levels, tagging, and coloring'\n s.des...
ruby
chosen
[ { "from": "system", "value": "Remove all json endpoints that are not in the api\n" }, { "from": "human", "value": "class AuthorizedFamilyMembersController < ApplicationController\n helper_method :authorized_family_member, :authorized_family_members, :family\n\n def new; end\n\n def show; end\...
ruby
chosen
[ { "from": "system", "value": "Send address for location ad_extension always with province_name not province_code\n" }, { "from": "human", "value": "module Adstack\n class LocationExtension < AdExtension\n\n field :address, :r, :s, e: :ad_extension, h: Address\n field :geo_poin...
ruby
chosen
[ { "from": "system", "value": "Disable template digesting for Active Storage controllers\n\nError entries appear in the log when we request ActiveStorage\r\ncontrollers (`ActiveStorage::Representations::ProxyController#show`,\r\n`ActiveStorage::Blobs::ProxyController#show`).\r\n\r\nThese entries look like: \...
ruby
chosen
[ { "from": "system", "value": "Update Rails config for Redis URL to remove hardcoded port num\n" }, { "from": "human", "value": "if Rails.env.production?\n Sidekiq.configure_server do |config|\n config.redis = {\n url: \"rediss://#{Rails.configuration.redis_url}:6379\",\n network_ti...
ruby
chosen
[ { "from": "system", "value": "Add support for s3 using spreecore\n" }, { "from": "human", "value": "Spree::OptionValue.class_eval do\n\n attr_accessible :image\n\n default_scope order(\"#{quoted_table_name}.position\")\n\n has_attached_file :image,\n :styles => { :small => '40x30#',...
ruby
chosen
[ { "from": "system", "value": "Include all swift files in the CustomContent subspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"SwiftyButton\"\n s.version = \"0.2.0\"\n s.summary = \"Simple and customizable button in Swift\"\n\n s.description = <<...
ruby
chosen
[ { "from": "system", "value": "Change gui (double) for @gui with actual instance of Gui\n" }, { "from": "human", "value": "# temporary moved out of the test suite\n# https://github.com/mrhead/ruby_arena/issues/29\nrequire 'gui'\nrequire 'arena'\n\ndescribe Gui do\n before(:all) do\n @arena = ...
ruby
chosen
[ { "from": "system", "value": "Strengthen test with different nb of rows and columns\n" }, { "from": "human", "value": "require \"cases/helper\"\n\nmodule ActiveRecord\n class ResultTest < ActiveRecord::TestCase\n def result\n Result.new(['col_1', 'col_2'], [\n ['row 1 col 1', 'ro...
ruby
chosen
[ { "from": "system", "value": "Use minitest instead of test/unit.\n" }, { "from": "human", "value": "# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire 'test/unit'\nrequire 'active_support/test_case'\nrequire 'rails/all'\nrequire 'rails/generators'\nrequire 'rails/generators/...
ruby
chosen
[ { "from": "system", "value": "Make sure that the seed records are loaded before the tests run\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclass ActiveSupport::TestCase\n # Add more...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary method for empty array removing since it is already in the included module\n" }, { "from": "human", "value": "class Section < ActiveRecord::Base\n include EmptyArrayRemovable\n include IssueToColumnAndSectionConnectionCheckable\n\n belongs_to :...
ruby
chosen
[ { "from": "system", "value": "Fix feature specs where scorebook path changed\n" }, { "from": "human", "value": "require_relative '../page'\nrequire_relative './teachers'\n\nmodule Teachers\n class ScorebookPage < Page\n attr_accessor :classroom\n\n def initialize(classroom)\n @classr...
ruby
chosen
[ { "from": "human", "value": "Add data migration for enterprise fee tax amounts\n" }, { "from": "gpt", "value": "class MigrateEnterpriseFeeTaxAmounts < ActiveRecord::Migration[5.0]\n class Spree::Adjustment < ActiveRecord::Base\n belongs_to :originator, -> { with_deleted }, polymorphic: true\...
ruby
chosen
[ { "from": "system", "value": "Add platform to Gem specification\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'dismissible_blocks/version'\n\nGem::Specification.new do |s|\n s.name = 'dismissible_blocks'\n s.version = DismissibleBlocks::V...
ruby
chosen
[ { "from": "system", "value": "Index blog posts' custom teaser\n" }, { "from": "human", "value": "require 'acts_as_indexed'\n\nbegin\n Refinery::Blog::Post.class_eval do\n acts_as_indexed :fields => [:title, :body]\n end\nrescue NameError\nend\n" }, { "from": "gpt", "value": "req...
ruby
chosen
[ { "from": "system", "value": "Change gem file on gemspec\n" }, { "from": "human", "value": "SPEC = Gem::Specification.new do |s|\n s.name = 'Xirr Newton Calculator'\n s.version = '0.0.1'\n s.date = '2013-10-17'\n s.author = \"JP Colomer\"\n s.email = 'jpcolomer@g...
ruby
chosen
[ { "from": "system", "value": "Fix maximum events for Tabor\n" }, { "from": "human", "value": "module Competitions\n module Calculations\n module SelectScores\n # Select only scores with points and a participant up to +maximum_events+\n def select_scores(scores, rules)\n sele...
ruby
chosen
[ { "from": "system", "value": "Update analytics endpoint to get past ad-blockers\n" }, { "from": "human", "value": "# rubocop:disable Metrics/BlockLength\nRails.application.routes.draw do\n namespace :v1 do\n get 'ping', to: 'ping#ping'\n get 'repo/*all', constraints: { all: /.*/ }, to: 'r...
ruby
chosen
[ { "from": "system", "value": "Fix basic test method name\n" }, { "from": "human", "value": "require_relative '../test_helper'\n\nclass BasicTest < Test::Unit::TestCase\n\n TESTING_ENDPOINT = 'http://fhir.healthintersections.com.au/open'\n\n def test_client_initialization\n client = FHIR::Cl...
ruby
chosen
[ { "from": "system", "value": "Install bash completion for docker and docker-compose\n\nActual commands are installed via the cask for 'Docker for Mac'\n" }, { "from": "human", "value": "#\n# Author:: Mike Moate (<chef@mikemoate.co.uk>)\n# Cookbook Name:: mac_bootstrap\n# Attributes:: default\n#\...
ruby
chosen
[ { "from": "system", "value": "Add changes to controller in order to let mobile know if fails\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\n before_action :set_user, only: [:show, :update, :destroy]\n\n def show\n render json: @user\n end\n\n def creat...
ruby
chosen
[ { "from": "system", "value": "Use table_name instead of hardcoding." }, { "from": "human", "value": "require 'rails/generators/base'\nrequire 'rails/generators/migration'\n\nmodule RichCms\n module Generators\n class ContentGenerator < Rails::Generators::Base\n\n include Rails::Generato...
ruby
chosen
[ { "from": "human", "value": "Add tests for shipment decorator\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Spree\n describe Shipment, type: :model do\n let(:shipment){build(:shipment)}\n before do\n allow(shipment).to receive(:order).and_return(order)\n allow...
ruby
chosen
[ { "from": "system", "value": "Fix failing tests assuming localizeCurrency has no \"delimiter\"\n" }, { "from": "human", "value": "module Spree\n module MoneyHelper\n def with_currency(amount, options = {})\n Spree::Money.new(amount, {delimiter: ''}.merge(options)).to_s # Delimiter is to...
ruby
chosen
[ { "from": "system", "value": "Check resources exist before verifying their params\n\nPreviously, I was seeing the error\nundefined method `parameters' for nil:NilClass in\ncases where with_param was specified for resources\nthat did not exist in the catalog.\n\nThis patch will not check the chained params i...
ruby
chosen
[ { "from": "system", "value": "Update sha sum for Cura\n" }, { "from": "human", "value": "cask :v1 => 'cura' do\n version '15.06.01'\n sha256 'b26d759d2905fffdba37f6fbc1310d08d060a27245add2a91cfd1d1db18ef954'\n\n url \"http://software.ultimaker.com/15.06/Cura-#{version}-Darwin.dmg\"\n name 'C...
ruby
chosen
[ { "from": "system", "value": "Return strings are now utf-8\n" }, { "from": "human", "value": "require \"execjs/runtime\"\nrequire \"json\"\n\nmodule ExecJS\n class DuktapeRuntime < Runtime\n class Context < Runtime::Context\n def initialize(runtime, source = \"\")\n @ctx = Duktap...
ruby
chosen
[ { "from": "system", "value": "Raise exception if argument is empty\n" }, { "from": "human", "value": "module WeatherReporter\n module UserInput\n class Validator\n\n VALID_FLAGS = %w{-city -forecast -help}\n\n ERROR_MESSAGE = %Q{Please enter a valid flag or Enter -help for more det...
ruby
chosen
[ { "from": "system", "value": "Fix Inherited dependencie on ControlledAccess\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Zobi\n # This module help to manage control access on your collection using pundit.\n #\n module ControlledAccess\n\n def self.included base\n bas...
ruby
chosen
[ { "from": "system", "value": "Add timed item to formats list\n" }, { "from": "human", "value": "govuk_formats = Artefact::FORMATS_BY_DEFAULT_OWNING_APP\n\nArtefact::FORMATS_BY_DEFAULT_OWNING_APP = {\n 'publisher' => [\n \"course\",\n \"news\",\n \"person\"\n ],\n 'whitehall' => [] # ...
ruby
chosen
[ { "from": "system", "value": "Include govuk formats in valid list\n\nSaves making massive changes to test suites in client apps.\n" }, { "from": "human", "value": "Artefact::FORMATS_BY_DEFAULT_OWNING_APP = {\n 'publisher' => [\n \"course\",\n \"news\",\n \"person\"\n ],\n 'whitehall'...
ruby
chosen
[ { "from": "system", "value": "Move class method to instance method\n" }, { "from": "human", "value": "require_relative '../../../lib/email_validator'\n\nmodule Glengarry\n\n class EmailLead < ActiveRecord::Base\n extend Geocoder::Model::ActiveRecord\n\n attr_accessible :email\n\n valid...
ruby
chosen
[ { "from": "system", "value": "Add the correct model name ActsAsTaggable to the associattion\n" }, { "from": "human", "value": "class TagsLocaleLanguage < ActiveRecord::Base\n belongs_to :tag\n belongs_to :locale_language\nend\n" }, { "from": "gpt", "value": "class TagsLocaleLanguag...
ruby
chosen
[ { "from": "system", "value": "Fix dangling libevent cookbook rename\n" }, { "from": "human", "value": "name 'libevent'\n# maintainer 'Takeshi KOMIYA'\n# maintainer_email 'i.tkomiya@gmail.com'\nmaintainer 'Travis CI GmbH'\nmaintainer_email 'contact+travis-cookbooks-libevent@travis-ci.org'\nlicens...
ruby
chosen
[ { "from": "system", "value": "Fix browser tab title on review page.\n" }, { "from": "human", "value": "\nclass ReviewController < ApplicationController\n\n def show\n # Once you are on the review dialog/page\n # all interaction with the web server is via the\n # differ-controller.\n ...
ruby
chosen
[ { "from": "system", "value": "Use a correct auth token from header\n" }, { "from": "human", "value": "module AuthenticationHelper\n PUBLIC_ROUTES = {\n 'POST' => [\n '/api/users',\n '/api/authenticate'\n ]\n }\n\n def authenticate_user\n if api_token.blank?\n json_erro...
ruby
chosen
[ { "from": "system", "value": "Remove slug generation from interactor\n\nThe UdlModule model handles this functionality now.\n" }, { "from": "human", "value": "class CreateUdlModule\n include Interactor\n \n def call\n assessment_question = AssessmentQuestion.create\n udl_module = UdlMod...
ruby
chosen
[ { "from": "system", "value": "Apply table_name_prefix to base app record\n" }, { "from": "human", "value": "module Pwb\n class ApplicationRecord < ActiveRecord::Base\n self.abstract_class = true\n end\nend\n" }, { "from": "gpt", "value": "module Pwb\n class ApplicationRecord < ...
ruby
chosen
[ { "from": "human", "value": "Update postal_zone for Cap plugin\n" }, { "from": "gpt", "value": "# = Informations\n#\n# == License\n#\n# Ekylibre - Simple agricultural ERP\n# Copyright (C) 2008-2009 Brice Texier, Thibaud Merigon\n# Copyright (C) 2010-2012 Brice Texier\n# Copyright (C) 2012-2018 B...
ruby
chosen
[ { "from": "system", "value": "Add flexible_geolocation attribute to EffortSerializer.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass EffortSerializer < BaseSerializer\n attributes :id, :event_id, :person_id, :participant_id, :bib_number, :first_name, :last_name, :full...
ruby
chosen
[ { "from": "system", "value": "Improve use of newlines in IndexPage\n\nRemove redundant newlines, and add one at the end of the file.\n" }, { "from": "human", "value": "module Analytics\n class IndexPage\n\n attr_reader :link_changes\n\n def initialize(params = {link_types: ['taxons']})\n ...
ruby
chosen
[ { "from": "system", "value": "Increase minor version to 1.0.6" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"BluemixAppID\"\n s.version = '1.0.4'\n s.summary = \"AppID Swift SDK\"\n s.homepage = \"https://github.com/ibm-bluemix-mobile-service...
ruby
chosen
[ { "from": "system", "value": "Bring some missing pip modules into project\n\nThere were three missing pip modules: mysql-python, pysqlite, and\npython-memcached. Bring those into the omnibus python system path and\nupdate CFLAGS and LDFLAGS so they can be built.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Remove fields reader for prepare insert arg generator\n\nNo need and that means mutated state for each query run\n" }, { "from": "human", "value": "module Cassanity\n module ArgumentGenerators\n class ColumnFamilyPrepareInsert\n\n attr_reader :fields\n\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Stop installing lxc and backported kernel\"\n\nThis reverts commit 318471d00e776393744186646dc58d221d8224a6.\n" }, { "from": "human", "value": "# Cookbook Name:: travis_docker\n# Recipe:: package\n# Copyright 2011-2015, Travis CI GmbH <contact+travis-cookbo...
ruby
chosen
[ { "from": "system", "value": "Add yard support for work dsl\n" }, { "from": "human", "value": "class YardExtension < YARD::Handlers::Ruby::Base\n handles method_call(:hook)\n handles method_call(:configure)\n handles method_call(:request)\n namespace_only\n\n def process\n name = stateme...
ruby
chosen
[ { "from": "system", "value": "Add MultiJson for json decoding.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'acfs/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Upgrade DataStax DevCenter to v1.3.0\n" }, { "from": "human", "value": "cask :v1 => 'devcenter' do\n version '1.2.0'\n sha256 '39820d3a7ec66ae3011cf72bee029d4f9817490319648837cc72b59d01a870f2'\n\n url \"http://downloads.datastax.com/devcenter/DevCenter-#{version}...
ruby
chosen
[ { "from": "system", "value": "Update Filezilla.app: Snow Leopard compatible\n\n3.8.1 is a last one that works on 10.6\n" }, { "from": "human", "value": "cask :v1 => 'filezilla' do\n version '3.9.0.6'\n sha256 '9486be1f5dec41df8ef1b60893ca612e6791b8d98609c6b9e42ced977210d15b'\n\n url \"http://...
ruby
chosen
[ { "from": "system", "value": "Use Apache 2.0 licensed Go\\!\n" }, { "from": "human", "value": "default[:go][:backup_path] = \"\"\ndefault[:go][:backup_retrieval_type] = \"subversion\"\n\ndefault[:go][:agent][:server_host] = '127.0.0.1'\ndefault[:go][:agent][:auto_register] = fa...
ruby
chosen
[ { "from": "system", "value": "Add missing hash algorithm number.\n\nSigned-off-by: brian m. carlson <738bdd359be778fee9f0fc4e2934ad72f436ceda@crustytoothpaste.net>\n" }, { "from": "human", "value": "require 'base64'\nrequire 'digest'\n\nmodule SSHFP\n class Parser\n def parse(data)\n li...
ruby
chosen
[ { "from": "system", "value": "Fix empty parameter causing db exception\n" }, { "from": "human", "value": "class StatisticsController < ApplicationController\n include StatisticsHelper\n\n before_action :authorize!, only: [:show, :graphs, :user_activity, :user_activity_history, :rfc_activity,\n...
ruby
chosen
[ { "from": "system", "value": "Raise a NotImplementedError on \"abstract\" methods\n" }, { "from": "human", "value": "module Slacker\n module Adapters\n class Adapter\n attr_reader :robot\n\n # Public - iniitalizes an adapter\n #\n # robot - the robot to relay messages to\...
ruby
chosen
[ { "from": "system", "value": "Add some implementation for CapsuleObserver\n\nStill gaps though\n" }, { "from": "human", "value": "class CapsuleObserver\n \n def self.register\n SyncCapsuleData.add_observer(self)\n end\n \n # Receives data updates from CapsuleCRM\n # \n # data - hash o...
ruby
chosen
[ { "from": "system", "value": "Switch hombrew formula to use full archive\n\nI did this because before it was just using the binary and this was\npreventing me from including the man page in future versions. Also,\ndoing the binary the way I was isn't the officially supported binary\nmechanism. They intend f...
ruby
chosen
[ { "from": "system", "value": "Add a newline at the end of the podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SaltEdge-iOS\"\n s.version = \"1.0.0\"\n s.summary = \"A handful of classes to help you interact with the Salt Edge API from your iOS ap...
ruby
chosen
[ { "from": "system", "value": "Update Podspec to reflect current state of 2.0.0 compatibility\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SignalR-ObjC\"\n s.version = \"2.0.0.beta1\"\n s.summary = \"Objective-C Client for the SignalR Project works wit...
ruby
chosen
[ { "from": "system", "value": "Remove SwiftyJSON dependency from podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftJSONRPC\"\n s.version = \"0.4.1\"\n s.summary = \"Swift JSON-RPC client based on Alamofire\"\n s.homepage = ...
ruby
chosen
[ { "from": "system", "value": "Metrics: Change text of DTU link\n\nFrom 'DTU' to 'DTU Orbit'.\n" }, { "from": "human", "value": "module DtuOrbitHelper\n\n def render_link_to_dtu_orbit? document\n (document['backlink_ss'] || []).any? { |l| l.start_with? 'http://orbit.dtu.dk' }\n end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Fix app name in appsignal exceptions\n" }, { "from": "human", "value": "ENV['APPSIGNAL_APP_ENV'] = ENV['HEROKU_APP_NAME'].gsub(/screensmart-pr-?/, '') if ENV['HEROKU_APP_NAME']\nrequire File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the ge...
ruby
chosen
[ { "from": "system", "value": "Make crash dialog more robust\n" }, { "from": "human", "value": "\nDEBUG = true\n\nbegin\n require 'Qt'\n require 'fileutils'\n require 'yaml'\n require 'logger'\n require 'pathname'\n\n require_relative 'dsvlib'\n\n require_relative 'version'\n\n require_re...
ruby
chosen
[ { "from": "system", "value": "Improve version guards for Warning[] specs\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\nruby_version_is '2.7.2' do\n describe \"Warning.[]\" do\n it \"returns default values for categories :deprecated and :experimental\" do\n r...
ruby
chosen