conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Allow patchlevels for runtime deps\n\n* bootstrap-sass was pinned at an older version with problems related to fingerprinted asset urls\n* be consistent with jquery-rails\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib',...
ruby
chosen
[ { "from": "system", "value": "Make all configuration readable only by root and the nsd user\n" }, { "from": "human", "value": "\npackage \"nsd3\"\n\n# first rebuild then restart the service\nexecute \"nsd-restart\" do\n command \"nsdc rebuild\"\n action :nothing\n notifies :restart, \"service...
ruby
chosen
[ { "from": "system", "value": "Add messages controller spec for creating messages\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MessagesController do\n let(:user) { create(:user) }\n let(:exercise) { create(:exercise) }\n\n before do\n assignment = exercise.submit_sol...
ruby
chosen
[ { "from": "system", "value": "Make the automatic reconnect test slower and more stable\n" }, { "from": "human", "value": "require \"rabbitmq/http/client\"\n\nclass GusSubscriber < ActionSubscriber::Base\n def spoke\n $messages << payload\n end\nend\n\ndescribe \"Automatically reconnect on c...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary CentOS check in Fedora tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Systemd overrides\n\n# httpd.service\n#\n# See:\n# - IMAGE-926\n# - https://smartos.org/bugview/OS-5304\n\ndescribe \"httpd service validation\" do\n #...
ruby
chosen
[ { "from": "system", "value": "Add support for in-place updates\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n# Ruby RPM Spec Updater\n#\n# Simple tool to update the rpm spec of a packaged gem\n# or ruby app.\n#\n# User should specify the location of the rpm spec to\n# manipulate. Script ta...
ruby
chosen
[ { "from": "human", "value": "Revert \"remove secret token which is not used anymore but somehow disturbing …\"\n" }, { "from": "gpt", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this ke...
ruby
chosen
[ { "from": "system", "value": "Read secret token from environment\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will becom...
ruby
chosen
[ { "from": "system", "value": "Add Ruby version to gemspec\n\nChange-Id: I70bc75d10abfedd7d602f015f2cbf45341b53c93\nReviewed-on: http://gerrit.causes.com/35582\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com>\nTested-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f3...
ruby
chosen
[ { "from": "system", "value": "Add accessor for post text\n" }, { "from": "human", "value": "class InstaScrape::InstagramPost\n attr_accessor :link, :image\n def initialize(link, image, text=nil)\n @image = image\n @link = link\n @text = text\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Install generator adds config yml to project gitignore\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'rails/generators/active_record'\nclass InstallGenerator < ActiveRecord::Generators::Base\n source_root File.expand_path('../templates',...
ruby
chosen
[ { "from": "system", "value": "Add a test that at least does passes.\n" }, { "from": "human", "value": "require \"test_helper\"\n\n# ControllerTest generated by Typus, use it to test the extended admin functionality.\nclass Admin::<%= resource %>ControllerTest < ActionController::TestCase\n\n # ...
ruby
chosen
[ { "from": "system", "value": "Fix SystemCallError error when given message with non-ascii characters\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\nrequire_relative 'shared/stat'\n\ndescribe \"File.stat\" do\n it_behaves_like :file_stat, :stat\nend\n\nplatform_is_not :...
ruby
chosen
[ { "from": "system", "value": "Reduce API call for performance improvement\n" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'date'\nrequire 'influxdb'\n\nclass Fluent::InfluxdbOutput < Fluent::BufferedOutput\n Fluent::Plugin.register_output('influxdb', self)\n\n config_param :host,...
ruby
chosen
[ { "from": "system", "value": "Add view count logic to questions\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n\n def index\n @questions = Question.all\n end\n\n def show\n @question = Question.find(params[:id])\n @comment = Comment.new\n @an...
ruby
chosen
[ { "from": "system", "value": "Remove delete route from timeslot controller\n" }, { "from": "human", "value": "class TimeslotsController < SecuredController\n def update\n timeslot = Timeslot.find_by(id: safe_params[:id])\n timeslot.student_id = current_user.id\n if timeslot.save\n ...
ruby
chosen
[ { "from": "system", "value": "FIX: Add capacity to group set serializer\n" }, { "from": "human", "value": "# Doubtfire will deprecate ActiveModelSerializer in the future.\n# Instead, write a serialize method on the model.\n\nclass GroupSetSerializer < ActiveModel::Serializer\n attributes :id, :...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"countdownlatch/version\"\n\nGem::Specification.new do |s|\n s.name = \"countdownlatch\"\n s.version ...
ruby
chosen
[ { "from": "human", "value": "Add performance test helper. It share common code between my custom, capybara/culerity/jruby based tests.\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'capybara'\nrequire 'benchmark'\n\nLOGIN='admin'\nPASSWORD='password'\n\nCapybara.default_selector =...
ruby
chosen
[ { "from": "system", "value": "Add social media url to podspec file\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DRObservableArray'\n s.version = '1.0.1'\n s.summary = 'Observable array and observable mutable array protocol with generic implementations'...
ruby
chosen
[ { "from": "system", "value": "Use utc when setting public_updated_at\n" }, { "from": "human", "value": "class AddPublicUpdatedAtToAllSpecialistDocumentEditions < Mongoid::Migration\n def self.up\n editions = SpecialistDocumentEdition.where(:document_type.in => %w(\n cma_case\n aaib...
ruby
chosen
[ { "from": "system", "value": "Use more concise, clear code, thx @cadwallion." }, { "from": "human", "value": "module Strumbar\n module Instrumentation\n module ActionController\n def self.load(options={})\n options[:rate] ||= Strumbar.default_rate\n using_mongoid = opti...
ruby
chosen
[ { "from": "human", "value": "Add feature spec for reimbursements show page\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'Promotions', type: :feature do\n stub_authorization!\n let!(:reimbursement) { create(:reimbursement) }\n\n it \"should display the reimbursements tabl...
ruby
chosen
[ { "from": "system", "value": "Update transaction fee to be 0.0001 (current transaction fee)\n" }, { "from": "human", "value": "class App < Configurable # :nodoc:\n # Settings in config/app/* take precedence over those specified here.\n config.name = Rails.application.class.parent.name\n\n con...
ruby
chosen
[ { "from": "system", "value": "Fix a helper method error\n" }, { "from": "human", "value": "module ArchivesHelper\n def archive_action_link(archive)\n if archive.s3_url.present?\n download_button(archive)\n elsif archive.transactions_left_to_explain > 0\n transactions_left_to_exp...
ruby
chosen
[ { "from": "human", "value": "Create UserInitializer to generate new users via Omniauth\n" }, { "from": "gpt", "value": "class UserInitializer\n attr_reader :authorization, :omniauth_data\n\n def initialize(omniauth_data)\n @omniauth_data = omniauth_data\n\n check_required_attributes\n e...
ruby
chosen
[ { "from": "system", "value": "Remove acceptance of XML files on uploads\n" }, { "from": "human", "value": "class FileUploader < CarrierWave::Uploader::Base\n POSSIBLE_IMG_EXTENSIONS = %w(jpg jpeg gif png)\n POSSIBLE_DOC_EXTENSIONS = %w(chm csv diff doc docx dot dxf eps gml ics kml odp ods odt ...
ruby
chosen
[ { "from": "system", "value": "Add attributes view to class generator\n" }, { "from": "human", "value": "module YARD\n module Generators\n class ClassGenerator < Base\n def sections_for(object) \n [InheritanceGenerator, MixinsGenerator, DocstringGenerator, ConstructorGenerator]\n ...
ruby
chosen
[ { "from": "system", "value": "Add environment variable to set log debug output\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire 'logger'\n\nmodule Aliyun\n module Common\n ##\n # Logging support\n # @example\n # include Logging\n # logger.info(xxx)\n ...
ruby
chosen
[ { "from": "system", "value": "Align pod version and git version tag\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"UIScreenExtension\"\n s.version = \"0.0.1\"\n s.summary = \"An extension to UIScreen that offers information about the pixel density (or...
ruby
chosen
[ { "from": "system", "value": "Undo is_only_level to false if text is written" }, { "from": "human", "value": "class Users::ReviewsController < ApplicationController\n def index\n @users = User.all.decorate\n end\n\n def edit\n @review = Review.find(params[:id]).decorate\n end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Make use of assigned scope.\n" }, { "from": "human", "value": "class Workflow::UserController < ApplicationController\n def index\n @assigned_tasks = Task.assigned.where(user_id: current_user.id)\n @completed_tasks = Task.complete.where(user_id: current_user....
ruby
chosen
[ { "from": "system", "value": "Add package name to slack post\n" }, { "from": "human", "value": "class EasypostTrackerSlackPoster\n SLACK_URL = ENV['SLACK_POST_URL'].freeze\n\n def initialize(tracker)\n @tracker = tracker\n end\n\n def post\n RestClient.post(SLACK_URL, json.to_json, {co...
ruby
chosen
[ { "from": "human", "value": "Add initialization of database locally\n" }, { "from": "gpt", "value": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementally mo...
ruby
chosen
[ { "from": "system", "value": "Rename unknown team \"Unknown\" -> \"Unknown Team\"\n" }, { "from": "human", "value": "Team.seed(:id,\n { id: Constants::Teams::UNKNOWN_ID,\n name: \"Unknown\" }\n )\n" }, { "from": "gpt", "value": "Team.seed(:id,\n ...
ruby
chosen
[ { "from": "system", "value": "Create a BusLocation for every BusAssignment\n" }, { "from": "human", "value": "class BusAssignment\n attr_accessor :BusNumber,\n :StudentNo,\n :parentfirstname,\n :parentlastname,\n :studentfirstname,\n ...
ruby
chosen
[ { "from": "system", "value": "Add new event types for labwhere events\n- Also checked that the descriptions for all the other event, role and subject types matched what's in prod, so it's safe to run the rake task\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nEVENT_TYPES = ...
ruby
chosen
[ { "from": "system", "value": "Make the object do more\n" }, { "from": "human", "value": "class Animal\n def initialize(name)\n @name = name\n end\n def speak()\n \"#{@name} says #{sound()}\"\n end\nend\n\nclass Cow < Animal\n def sound()\n \"moooo\"\n end\nend\n\nclass Horse < Ani...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec issue with Bundler\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = 'visibilityjs'\n s.version = '0.4.2'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Andrey “A.I.” Sitnik']\n s....
ruby
chosen
[ { "from": "system", "value": "Make build-essential backwards compatible for older SmartOS\n" }, { "from": "human", "value": "#\n# Cookbook Name:: build-essential\n# Recipe:: smartos\n#\n# Copyright 2008-2013, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n...
ruby
chosen
[ { "from": "system", "value": "Enable system_site_packages for faraday venv.\n\nSome dependencies are installed from apt package manager (python\ngobject). This option allow venv to use these system packages.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n#\n# Cookbook Name:: faraday...
ruby
chosen
[ { "from": "system", "value": "Set the MIT license directly.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('./lib')\n\nrequire 'dimples/version'\n\nGem::Specification.new do |s|\n s.name = 'dimples'\n s.version = Dimples::VERSION\n s.platform = Gem::Platf...
ruby
chosen
[ { "from": "system", "value": "Fix silent logger file mode\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RestGW2\n module Cache\n EXPIRES_IN = 600\n LRU_SIZE = 8192\n\n module_function\n def default logger\n @cache ||= Cache.pick(logger)\n end\n\n...
ruby
chosen
[ { "from": "human", "value": "Read MySQL passwords from encrypted data bag.\n" }, { "from": "gpt", "value": "# Customization: get passwords from encrypted data bag\nsecrets = Chef::EncryptedDataBagItem.load(\"secrets\", \"mysql\")\nif secrets && mysql_passwords = secrets[node.chef_environment] \n...
ruby
chosen
[ { "from": "system", "value": "Enable local cloning support in development too, useful for train debug sessions\n" }, { "from": "human", "value": "class Git\n attr_accessor :user, :repo\n \n def self.host\n if Rails.env.test?\n # Clone locally to speed up tests\n Rails.root + \"sp...
ruby
chosen
[ { "from": "system", "value": "Format module using new way of evaluating responses\n" }, { "from": "human", "value": "require 'tester/reporter/status_code_report'\nrequire 'tester/modules/module'\n\nclass Format < Module\n def go definition, report\n super\n\n definition.methods.each do |m...
ruby
chosen
[ { "from": "human", "value": "Add specs for Phony errors.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Phony do\n \n describe described_class::NormalizationError do\n it 'is correctly raised on normalize' do\n expect do\n described_class.normalize('000')\n ...
ruby
chosen
[ { "from": "system", "value": "Improve security check for task handlers\n" }, { "from": "human", "value": "# The task dispatcher is responsible for taking incoming messages\n# from the socket channel and dispatching them to the proper handler.\nclass Dispatcher\n\n def dispatch(channel, message)...
ruby
chosen
[ { "from": "system", "value": "Fix old API in Yao::Keypair\n" }, { "from": "human", "value": "module Yao::Resources\n class Keypair < Base\n friendly_attributes :name, :public_key, :fingerprint\n\n self.service = \"compute\"\n self.resource_name = \"os-keypair\"\n self.resour...
ruby
chosen
[ { "from": "system", "value": "Use progname hash instead of a random color for every message\n" }, { "from": "human", "value": "require 'logger'\nrequire 'colorize'\n\nmodule Logging\n @loggers = {}\n\n def logger\n @logger ||= Logging.logger_for self.class.name\n end\n\n def self.logger_f...
ruby
chosen
[ { "from": "system", "value": "Fix warnings when building gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tempodb/version\"\n\nGem::Specification.new do |s|\n s.name = \"tempodb\"\n s.version = TempoDB::VERSI...
ruby
chosen
[ { "from": "system", "value": "Remove format; refile is smart enough to append that internally when\nthe filename is stored.\n" }, { "from": "human", "value": "class UserIconCell < ::ViewModel\n\n include Refile::AttachmentHelper\n\n # this is the default\n # def show\n # render\n # end\n\...
ruby
chosen
[ { "from": "system", "value": "Handle connection errors for RabbitMQ\n" }, { "from": "human", "value": "require 'gorg_message_sender'\n\nclass LdapDaemon\n\n def initialize(message_sender: nil)\n @message_sender=message_sender || GorgMessageSender.new\n end\n\n def request_account_update(ac...
ruby
chosen
[ { "from": "system", "value": "Fix return type of Metasploit::Credential::Origin.table_name_prefix in docs\n\nMSP-9605\n" }, { "from": "human", "value": "# Namespace for `Metasploit::Credential::Core#origin`s for `Metasploit::Credential::Core`s.\nmodule Metasploit::Credential::Origin\n # The pre...
ruby
chosen
[ { "from": "system", "value": "Add default tag to default_tags configuation.\n" }, { "from": "human", "value": "require 'fileutils'\nrequire 'pathname'\nrequire 'yaml'\n\n\nmodule PhilColumns\n module Command\n class Install < Base\n\n def execute\n say \"Installing phil columns\"...
ruby
chosen
[ { "from": "human", "value": "Add script to partially generate tests from scenario files\n" }, { "from": "gpt", "value": "require 'cli'\nrequire 'json'\n\ndef replace_pattern(string, pattern, replacement)\n string.gsub!(Regexp.new(pattern), replacement)\nend\n\nconfig = CLI.new do\n argumen...
ruby
chosen
[ { "from": "system", "value": "Move token retrieval outside of initializer method\n\nI don't believe Warden guarantees the `request` method during strategy\ninitialization, so I've moved it to the `valid?` method for now. It may be\nnecessary to move it to the actual `authenticate!` call where it is definite...
ruby
chosen
[ { "from": "system", "value": "Add rake to the gemfile\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/model_presenter/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Yi Wen\"]\n gem.email = [\"hayafirst@gmai...
ruby
chosen
[ { "from": "system", "value": "Make IRC echo mimic cia.vc's format as much as possible\n" }, { "from": "human", "value": "service :irc do |data, payload|\n repository = payload['repository']['name']\n branch = payload['ref'].split('/').last\n rooms = data['room'].gsub(\",\", \" \").sp...
ruby
chosen
[ { "from": "human", "value": "Add solution for 6.5 peer and reflection\n" }, { "from": "gpt", "value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:1\n# =========================...
ruby
chosen
[ { "from": "system", "value": "Add support for Windows Vista to the .NET 4.0 cookbook (best commit EVER)\n\n\nFormer-commit-id: bb135e75ffb63ed7011d9e8b9af7e2a57c62531a [formerly 03b2c0538210490e66b376845f557b8d607d9eb1] [formerly df22da0e5760f39586739f9960fcb70edb142d63 [formerly b2c2f1b52cdb32e87bcb1f48db7...
ruby
chosen
[ { "from": "system", "value": "Handle Attributes as Parameter for API Blueprint\n\nThis let spec successfully passed.\n" }, { "from": "human", "value": "require 'rspec_api_documentation/dsl/endpoint/set_param'\n\nmodule RspecApiDocumentation\n module DSL\n module Endpoint\n class Params\...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'games_dice/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Add a test for audio file template\n" }, { "from": "human", "value": "require 'test_helper'\n\ndescribe AudioFileTemplate do\n\n let(:audio_file_template) { create(:audio_file_template) }\n\n it 'has a table defined' do\n AudioFileTemplate.table_name.must_equal...
ruby
chosen
[ { "from": "system", "value": "Maintain ActiveRecord test schema for rspec\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start 'rails'\n\nENV['RAILS_ENV'] = 'test'\n\nrequire File.expand_path('../../config/environment', __FILE__)\n\nrequire 'rspec/rails'\nrequire 'webmock/rspe...
ruby
chosen
[ { "from": "system", "value": "Add redirect to user creation\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n before_action :set_user, only: [:show, :edit, :update, :destroy]\n before_action :require_login, except: [:new, :create]\n\n def new\n @user.new\n ...
ruby
chosen
[ { "from": "human", "value": "Add JSON fixture for labels autocomplete source\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: :controller do\n include JavaScriptFixturesHel...
ruby
chosen
[ { "from": "system", "value": "Verify existence of links on settings page\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe 'static_pages/settings.html.erb', type: :view do\n before :all do\n @models = 5.times.collect { create :model }\n assign :models, @models\n\...
ruby
chosen
[ { "from": "system", "value": "Fix updated session hash var name\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + \"/../.centos/session.rb\"\n\niso = \"CentOS-6.4-x86_64-netinstall.iso\"\niso_url = \"http://mirror.yellowfiber.net/centos/6.4/isos/x86_64/#{iso}\"\n\nsession =\n ...
ruby
chosen
[ { "from": "system", "value": "Fix breakages from survey_protocols rename.\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root to: 'dashboard#show'\n\n resources :survey_protocols, only: [:new, :edit, :create]\n resources :survey_fields, only: [:create]\n\n resources :s...
ruby
chosen
[ { "from": "system", "value": "Remove route to all page.\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n\n devise_for :users, controllers: { sessions: \"users/sessions\" }\n root 'pages#index'\n\n devise_scope :user do\n get \"/users/registrations/new\" => \"users/regi...
ruby
chosen
[ { "from": "system", "value": "Use itsf backend backend_resource method.\n" }, { "from": "human", "value": "Ecm::Downloads::Backend::Engine.routes.draw do\n resources :download_categories\n resources :downloads do\n member { get :download }\n end\n\n root to: 'home#index'\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Use concord ~> 0.1.0 and parser ~> 1.3.4\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'unparser'\n s.version = '0.0.1'\n\n s.authors = ['Markus Schirp']\n s.email = 'mbj@seonic.net'\n s.summar...
ruby
chosen
[ { "from": "system", "value": "Add back 1.0.0spec to stay in sync with Cocoapods\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AshObjectiveC\"\n s.version = \"1.0.1\"\n s.summary = \"Objective-C port of Ash (ActionScript 3 entity system framework for ga...
ruby
chosen
[ { "from": "system", "value": "Add rake as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire './lib/spotify/version'\n\nGem::Specification.new do |gem|\n gem.name = 'spotify'\n gem.summary = 'Bare-bones Ruby bindings for libspotify'\n gem.d...
ruby
chosen
[ { "from": "system", "value": "Test single and multiple string routes\n" }, { "from": "human", "value": "require_relative '../test_helper'\n\nclass RepliesMailbox < ActionMailroom::Mailbox\n def process\n $processed = mail.subject\n end\nend\n\nmodule ActionMailroom\n class RouterTest < Act...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Bovada Poker App.\n" }, { "from": "human", "value": "cask 'bovada-poker' do\n version :latest\n sha256 :no_check\n\n # https://cdn3-c.imagestore.lv was verified as official when first introduced to the cask\n url 'https://cdn3-c.imag...
ruby
chosen
[ { "from": "system", "value": "Update nokogiri to ~> 1.6.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"postrank-uri/version\"\n\nGem::Specification.new do |s|\n s.name = \"postrank-uri\"\n s.version = PostRan...
ruby
chosen
[ { "from": "system", "value": "Make the gem description make a little more sense\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"email_assessor/version\"\n\nGem::Specification.new do...
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.20\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.19\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur...
ruby
chosen
[ { "from": "system", "value": "Update the version dependency for ActiveSupoprt.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'simple_date_fix/version'\n\nGem::Specificatio...
ruby
chosen
[ { "from": "system", "value": "Add a factory for the Message model.\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :group do\n primary_number { Faker::Number.number(3) }\n street_name { Faker::Address.street_name }\n city_name { Faker::Address.cit...
ruby
chosen
[ { "from": "system", "value": "Make test run for every OS/Machine.\n" }, { "from": "human", "value": "require 'mugshot'\n\nrequire 'rack/test'\nrequire 'spec/expectations'\n\nrequire 'pp'\n\nmodule CucumberWorld\n include Rack::Test::Methods\n\n def app\n Mugshot::Application.new(Mugshot::FS...
ruby
chosen
[ { "from": "human", "value": "Add ScanSnap manager for SV600\n\nI moved this from the standard casks, as we wanted to keep the separate\nversions inside homebrew-versions to help the user choose the proper software\nby the model name of their scanner (see caskroom/homebrew-cask#8938).\n" }, { "from":...
ruby
chosen
[ { "from": "human", "value": "Add Xamarin Android Player (preview)\n" }, { "from": "gpt", "value": "cask 'xamarin-android-player' do\n version '0.6.5,15.43'\n sha256 'c7b220dfbe1dc876597fcb35e55834d42066fcb41747b52c760c3f0a78943da3'\n\n # xamarin-android-player.s3.amazonaws.com was verified as...
ruby
chosen
[ { "from": "system", "value": "Update put fields on debtor subscription\n" }, { "from": "human", "value": "module Dynaccount\n class DebtorSubscription < DynaccountObject\n def self.ignore_put\n [:id, :is_active, :module_id, :time_next_charge, :vat_amount, :total_amount, :total_weight, :...
ruby
chosen
[ { "from": "system", "value": "Support all image formats provided by dimensions gem\n" }, { "from": "human", "value": "require 'dimensions'\n\nmodule MountableFileServer\n class Metadata\n attr_reader :size, :content_type, :height, :width\n\n def initialize(size:, content_type:, width: nil...
ruby
chosen
[ { "from": "system", "value": "Handle exceptions when formatting with phony.\n" }, { "from": "human", "value": "require \"rails_admin_phone_number_field/engine\"\n\nmodule RailsAdminPhoneNumberField\nend\n\nrequire 'rails_admin/config/fields'\nrequire 'rails_admin/config/fields/base'\n\nmodule Ra...
ruby
chosen
[ { "from": "system", "value": "Fix Rubocop lints in ColorKeyword linter\n\nChange-Id: I9015955323b37eb087829e01c45c80d8c8c6bb7e\nReviewed-on: http://gerrit.causes.com/36709\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94...
ruby
chosen
[ { "from": "system", "value": "Make sure to use proper osm api base uri." }, { "from": "human", "value": "require 'ostruct'\nrequire 'yaml'\nosm_config = YAML.load_file(Rails.root.join('config', 'osm.yml'))\nOpenStreetMapConfig = OpenStruct.new osm_config[Rails.env]\n\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "human", "value": "Configure the Recurly gem at initialization time\n" }, { "from": "gpt", "value": "config = YAML.load(IO.read(Rails.root.join('config', 'settings.yml')))\n\nRecurly.api_key = config['recurly']['api_key']\nRecurly.js.private_key = config['recurly']['js_priva...
ruby
chosen
[ { "from": "system", "value": "Use single quotes instead of double quotes in factories\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :<%= model.full_resource_name %> do\n<%- model.columns_for(:factory).each do |col| -%>\n <%- if col.reference -%>\n <%- if col.required? -...
ruby
chosen
[ { "from": "system", "value": "Remove copying of pom.xml and src to root of checkout and change to server directory prior to building\n" }, { "from": "human", "value": "name \"loom-server\"\ndefault_version \"develop\"\n\nsource :git => \"git://github.com/continuuity/loom.git\"\nrelative_path 'se...
ruby
chosen
[ { "from": "system", "value": "Set new baseline for benchmark metrics\n\nMake the benchmarks more closely resemble real world usage. Users don't\nsearch for \"foobar\" but rather \"f\", then \"fo\", then \"foo\" etc (unless\nthey have debouncing turned on).\n\nI have some optimizations planned to handle exac...
ruby
chosen
[ { "from": "system", "value": "Add a spec for auto_restrictions with explicit schema\n" }, { "from": "human", "value": "RSpec.describe 'Plugins / :auto_restrictions', seeds: true do\n include_context 'users and tasks'\n\n with_adapters do\n before do\n conn.add_index :tasks, :title, uni...
ruby
chosen
[ { "from": "human", "value": "Add specs for the product operations\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Shopify\n RSpec.describe ProductOperations do\n include_context 'spree_builders'\n\n subject { described_class }\n\n describe 'when creating' do\n let...
ruby
chosen
[ { "from": "system", "value": "Add more solution to problem\n" }, { "from": "human", "value": "# Shortest String\n\n# I worked on this challenge [by myself, with: ].\n\n# shortest_string is a method that takes an array of strings as its input\n# and returns the shortest string\n#\n# +list_of_word...
ruby
chosen
[ { "from": "system", "value": "Set cost of imported electricity after merit order\n\nCloses quintel/etmodel#3086\n" }, { "from": "human", "value": "module Qernel::Plugins\n module Merit\n # Implements behaviour specific to the import interconnector.\n class ImportAdapter < ProducerAdapter\...
ruby
chosen
[ { "from": "system", "value": "Use s instead of spec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TSMessages\"\n s.version = \"0.9.4\"\n s.summary = \"Easy to use and customizable messages/notifications for iOS à la Tweetbot.\"\n s.description = <<-...
ruby
chosen
[ { "from": "system", "value": "Update mongoid config option for production\n" }, { "from": "human", "value": "module Mindapp\n module Generators\n class MongoidGenerator < Rails::Generators::Base\n desc \"Set up mongoid config\"\n def setup_mongoid\n generate \"mongoid:config...
ruby
chosen