conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add tests for existing Logging functionality\n" }, { "from": "gpt", "value": "require File.expand_path(File.join(File.dirname(__FILE__), \"test_helper\"))\n\nrequire 'onelogin/ruby-saml/logging'\n\nclass LoggingTest < Minitest::Test\n\n describe \"Logging\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add json reponse to delete.\n" }, { "from": "human", "value": "class CommentsController < ApplicationController\n before_action :set_resource, only: [:index, :new, :create]\n before_action :set_comment, only: [:edit, :update, :destroy]\n\n def index\n end\n\n d...
ruby
chosen
[ { "from": "human", "value": "Add a Messages Controller for the message resource.\n\nThe messages controller requires a user to be logged in; checks to make\nsure that the user is either a responder or a requester of a particular\nrequest before creating a new message. If the user successfully creates\na new...
ruby
chosen
[ { "from": "system", "value": "Remove tests for the Command.ignored_paths method which now lives in jekyll-watch.\n" }, { "from": "human", "value": "require 'helper'\n\nclass TestCommand < Test::Unit::TestCase\n context \"when calling .ignore_paths\" do\n context \"when source is absolute\" d...
ruby
chosen
[ { "from": "system", "value": "Allow strong parameters to be editable\n" }, { "from": "human", "value": "# controller for the dashboard\nclass ProfilesController < ApplicationController\n before_action :authenticate_user!, only: [:create, :update]\n before_action :set_profile, only: [:update]\n...
ruby
chosen
[ { "from": "system", "value": "Make sure http referrer is from Cloudsdale.\n\nSigned-off-by: Philip Vieira <3ba3974e96044dcde818e6310ed799abe10671d4@vallin.se>\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n \n layout 'front'\n \n skip_before_filter :redi...
ruby
chosen
[ { "from": "system", "value": "Disable password changes for now\n" }, { "from": "human", "value": "class SettingsController < ApplicationController\n def index\n end\n\n def password\n user = User.find_by_id(session[:user_id])\n @pass_form = ChangePasswordForm.new(user)\n\n if @pass_f...
ruby
chosen
[ { "from": "system", "value": "Add RubyGems post install message\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": "[AWS] Create the time directly in tests, avoids using a method not present in 1.8.7\n" }, { "from": "human", "value": "# encoding: utf-8\n\nShindo.tests('AWS | url', [\"aws\"]) do\n\n @expires = DateTime.parse('2013-01-01T00:00:00Z').to_time.utc.to_i\n\n @storage ...
ruby
chosen
[ { "from": "system", "value": "Refactor and clean up the code in the spec file\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe \"BtcTicker::Bitstamp::API::Ticker\" do\n context \"Given the input parameter - btc_usd\" do\n describe \"#get_json\" do\n let(:ticker) { ...
ruby
chosen
[ { "from": "system", "value": "Update spec with homepage and summary\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'traject/solrj_writer/version'\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Add test for invalid token\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe User do\n let(:user1) { FactoryGirl.build(:user_with_apns_token) }\n let(:user2) { FactoryGirl.build(:user_with_apns_token) }\n \n it \"sends a single push notificati...
ruby
chosen
[ { "from": "system", "value": "Change global methods to module methods\n" }, { "from": "human", "value": "def simple_command(v, opts = {})\n Expeditor::Command.new(opts) do\n v\n end\nend\n\ndef sleep_command(n, v, opts = {})\n Expeditor::Command.new(opts) do\n sleep n\n v\n end\nend...
ruby
chosen
[ { "from": "system", "value": "Add Zachary to the authors and change the gem homepage.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'acts_as_paranoid/version'\n\nGem::Specification....
ruby
chosen
[ { "from": "system", "value": "Add config files to default recipe" }, { "from": "human", "value": "# This is our default deployment script with database support and assumes the following\n#\n# - Capistrano Multistage\n# - RVM\n# - Passenger\n# - Passenger Standalone\n# - Bundler\n#\n# - Database ...
ruby
chosen
[ { "from": "system", "value": "Move PDF thumbnail generation to ImageMagick\n\nCloses SCI-3579\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Paperclip\n class CustomFilePreview < Processor\n def make\n libreoffice_path = ENV['LIBREOFFICE_PATH'] || 'soffice'\n...
ruby
chosen
[ { "from": "system", "value": "Use UseCase to update Project members\n" }, { "from": "human", "value": "require_dependency 'member'\n\nmodule RedmineGitHosting\n module Patches\n module MemberPatch\n\n def self.included(base)\n base.send(:include, InstanceMethods)\n base.cl...
ruby
chosen
[ { "from": "system", "value": "Move the hutch connection out of message bus initializer\n" }, { "from": "human", "value": "require \"hutch\"\n\nmodule Streamy\n module MessageBuses\n class RabbitMessageBus\n def initialize(uri:, topic_prefix: Streamy::DEFAULT_TOPIC_PREFIX)\n @topi...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect local variable reference" }, { "from": "human", "value": "module TwentyfourSevenOffice\n module Services\n class Company < Service\n wsdl \"https://api.24sevenoffice.com/CRM/Company/V001/CompanyService.asmx?WSDL\"\n\n api_operation :get_c...
ruby
chosen
[ { "from": "system", "value": "UPDATE create Curve, Point class\n" }, { "from": "human", "value": "require \"ecc/version\"\n\nmodule Ecc\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require \"ecc/version\"\n\nmodule Ecc\n \n class Curve\n \n attr_accesso...
ruby
chosen
[ { "from": "system", "value": "Update data migration to correctly republish Publications\n\nNeed to use `document_id` not `id`\n" }, { "from": "human", "value": "document_scope = Document.where(\n id: Publication.where(state: %w(draft published withdrawn)).pluck(:id)\n)\n\nlowest_document_id_for...
ruby
chosen
[ { "from": "system", "value": "Fix a problem causing exclusion of files in the built gem.\nMinor version bump.\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'swftly'\n spec.version = '0.1.4'\n spec.summary = \"swftly abstracts and aut...
ruby
chosen
[ { "from": "system", "value": "Remove unneeded spec attributes from the gemspec" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'rubygems-compile'\n s.version = '1.0.0'\n\n s.required_rubygems_version = Gem::Requirement.new '>= 1.4.2'\n s.rubygems_version ...
ruby
chosen
[ { "from": "system", "value": "Add a blank line after a guard clause\n\nTo improve the readability of the code.\n" }, { "from": "human", "value": "module ComponentHelper\n def navigation_items\n return [] unless current_user\n items = []\n\n unless content_for(:suppress_navbar_items)\n ...
ruby
chosen
[ { "from": "system", "value": "Use GET for asking for the new artefact form\n" }, { "from": "human", "value": "module NeedsHelper\n def start_work_link need\n start_work = \"http://#{Plek.current.panopticon}/artefacts/new\"\n\n form_tag start_work, :html => { :method => 'get' } do\n [...
ruby
chosen
[ { "from": "system", "value": "Fix implementation of queue name\n" }, { "from": "human", "value": "class ApplicationJob < ActiveJob::Base\n def self.aws_sqs_queue_url\n Rails.configuration.app_settings.fetch(\"#{to_s.underscore}_queue_url\") do\n Rails.configuration.app_settings.fetch(\"...
ruby
chosen
[ { "from": "system", "value": "Remove deprecation notices from codebase by using newer aruba classes\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'aruba/cucumber'\nrequire 'aruba/in_process'\nrequire 'aruba/spawn_process'\nrequire 'cucumber/cli/main'\n\nBefore('@spa...
ruby
chosen
[ { "from": "system", "value": "Clear cache which was created before\n" }, { "from": "human", "value": "Userdata.new.shared_cache = Cache.new :namespace =>\"dos_detector\", :size_mb=> 512\n\n" }, { "from": "gpt", "value": "config = {:namespace =>\"dos_detector\"}\n\nc = Cache.new confi...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to use Standalone v0.3.0.\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 = Sicuro::VERS...
ruby
chosen
[ { "from": "system", "value": "Raise error when fixture was not found.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'minitest/autorun'\nrequire 'turn'\n\nrequire File.join(File.dirname(__FILE__), '..', 'lib', 'pretty_diff')\n\nclass MiniTest::Unit::TestC...
ruby
chosen
[ { "from": "system", "value": "Fix spec to correctly wait for the thread to be waiting in the require lock\n" }, { "from": "human", "value": "ScratchPad.recorded << :con_pre\nThread.current[:in_concurrent_rb] = true\n\nif t = Thread.current[:wait_for]\n Thread.pass until t.backtrace && t.backtra...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 2.3.1.1 to 2.3.1.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.3.1.1'\n s.descri...
ruby
chosen
[ { "from": "system", "value": "Add webrick as runtime dependency\n\nWEBrick was removed as a core library in Ruby 3.0\n\nFixes #1387\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire File.expand_path('../lib/yard/version', __FILE__)\n\nGem::Specification.new do |s|\n s.na...
ruby
chosen
[ { "from": "system", "value": "Move allowed_push_host in gemspec to all other metadata.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\n\nrequire 'semian/version'\nrequire 'semian/platform'\n\nGem::Specification.new do |s|\n s.name = 'semian'\n s.vers...
ruby
chosen
[ { "from": "system", "value": "Use s.version to populate git tag in s.source.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CreateSend\"\n s.version = \"1.1.1\"\n s.summary = \"An Objective-C library for talking to the Campaig...
ruby
chosen
[ { "from": "system", "value": "Remove logging but raise errors on validation\n" }, { "from": "human", "value": "class CallDataRecord < ApplicationRecord\n DIRECTIONS = [\"inbound\", \"outbound\"]\n\n attachment :file, :content_type => [\"application/json\"]\n\n belongs_to :phone_call\n\n vali...
ruby
chosen
[ { "from": "system", "value": "Apply review suggestion from @nilsding\n\nCo-authored-by: Georg Gadinger <9e8f1a26fbf401b045347f083556ffd7c0b25a58@nilsding.org>" }, { "from": "human", "value": "module SharedMarkers\n include ActionView::Helpers::TagHelper\n\n def autolink(link, _link_type)\n ...
ruby
chosen
[ { "from": "system", "value": "Add :database key for newer AR versions\n" }, { "from": "human", "value": "require 'jdbc/sqlite3' if jruby?\n\nconfig = {\n :adapter => jruby? ? 'jdbcsqlite3' : 'sqlite3', \n :dbfile => 'test.sqlite3.db'\n# :url => 'jdbc:sqlite:test.sqlite3.db',\n# :driver => '...
ruby
chosen
[ { "from": "system", "value": "Fix dummy app for rails 3.1\n" }, { "from": "human", "value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded on\n # eve...
ruby
chosen
[ { "from": "system", "value": "Fix specs for forever alone\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Achievement::ForeverAlone do\n it_should_behave_like \"achievement\"\n let(:user) { Fabricate :user}\n\n describe \"check\" do\n it \"should call github and check ...
ruby
chosen
[ { "from": "system", "value": "Fix the tests for eip_asker\n" }, { "from": "human", "value": "describe Opsicle::QuestionAsker::EipAsker do\n let(:cli) do\n double(:cli,\n ask: 1\n )\n end\n\n let(:instance) do\n double(:instance,\n elastic_ip: \"example-hostname\",\n au...
ruby
chosen
[ { "from": "system", "value": "mirror: Handle lines that are comments\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n# Copyright 2013 Nicolas Braud-Santoni <nicolas+exherbo@braud-santoni.eu>\n# Distributed under the terms of the ISC license\n\nrequire 'resolv'\nrequire 'uri'\n\n@head = nil\n...
ruby
chosen
[ { "from": "human", "value": "Define abilities for admin, mod, user, and anonymous guests\n" }, { "from": "gpt", "value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n user ||= User.new # guest user (not logged in)\n\n can :read, :all\n can [:robots, :privacy, :te...
ruby
chosen
[ { "from": "human", "value": "Add code for analyzing assessments data dump\n\n+ Useful for asking questions about #16, #23\n" }, { "from": "gpt", "value": "require 'csv'\n\nclass AnalyzeAssessments < Struct.new(:path)\n\n def contents\n encoding_options = {\n invalid: :replace,\n un...
ruby
chosen
[ { "from": "system", "value": "Set gem summary & description.\n\nI did this for a couple of reasons. First so that I could bundle install\nwithout bundler complaining about the TODO items in the gemspec. Second, I did\nthis so that people would be able to see the description of the gem and\nunderstand what i...
ruby
chosen
[ { "from": "system", "value": "Check message content type to determine default rendered format.\n" }, { "from": "human", "value": "module LetterBomb\n class MailersController < ApplicationController\n\n def index\n @mailers = LetterBomb::Preview.previews\n end\n\n def show\n k...
ruby
chosen
[ { "from": "system", "value": "Add support back in for subdirectory requires.\n\nPoor old rails 2.x was forgotten about in fc8ce3ab7.\n\nCloses #65\n" }, { "from": "human", "value": "Rails.configuration.after_initialize { FactoryGirl.find_definitions }\n" }, { "from": "gpt", "value": ...
ruby
chosen
[ { "from": "system", "value": "Add default layout to ApplicationController\n" }, { "from": "human", "value": "module Derail::Generators\n class LayoutGenerator < Base\n source_root File.expand_path(\"../../../../templates/layout\", __FILE__)\n\n def install_haml_and_compass\n insert_i...
ruby
chosen
[ { "from": "human", "value": "Delete file action for satellites\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "gpt", "value": "require_relative 'file_action'\n\nmodule Gitlab\n module Satellite\n class DeleteFileAction < FileAction\...
ruby
chosen
[ { "from": "system", "value": "Add test for default skip value\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Magnum::Payload::Base do\n before do\n Magnum::Payload::Base.any_instance.stub(:parse!)\n end\n\n describe '#new' do\n it 'assigns raw data attribute' do\n ...
ruby
chosen
[ { "from": "system", "value": "Fix podspec to not use FileList and bump to 0.1.5\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Ashton\"\n s.version = \"0.1.2\"\n s.summary = \"Converts NSAttributedStrings between AppKit, CoreText, UIKit and HTML.\"\n s...
ruby
chosen
[ { "from": "system", "value": "Fix bug with TestResponse override outside Rails\n\nWhen loading spec_helper instead of rails_helpers,\nActionController::TestResponse is not defined.\n" }, { "from": "human", "value": "module ActionController\n module TestResponseStringOverride\n def to_s\n ...
ruby
chosen
[ { "from": "system", "value": "Fix account and environment filters\n\nThe previous iteration returned an error when specifying an account. Furthermore, when a user has access to multiple accounts with multiple environments of the same name, the environments toggle would return only return the environment for...
ruby
chosen
[ { "from": "system", "value": "Fix wrong number of arguments when trying to stub methods with rspec\n" }, { "from": "human", "value": "%w{\n version\n util\n source_parser\n markov\n randomizer\n}.each {|file|require File.join(File.dirname(__FILE__),\"literate_randomizer\", file)}\n\nmodule ...
ruby
chosen
[ { "from": "system", "value": "Add missing requirements in Response.\n\n[ci skip]\n" }, { "from": "human", "value": "module Regaliator\n class Response\n attr_reader :success\n attr_reader :data\n\n def initialize(http_response)\n @success = http_response.kind_of?(Net::HTTPSuccess)...
ruby
chosen
[ { "from": "human", "value": "Put smtp connection login in separate function\n" }, { "from": "gpt", "value": "require 'net/smtp'\n\nmodule Smitty\n def self.smtp_connect(server, port, ssl, username, password)\n begin\n smtp_server = server.nil? ? 'localhost' : server\n smtp_port = p...
ruby
chosen
[ { "from": "system", "value": "Fix typo in progress messages\n" }, { "from": "human", "value": "namespace \"static-data\" do\n\n desc \"Install all static data from db/static-data\"\n task :install => :environment do\n require \"static-data\"\n\n StaticData.static_data_classes(Rails.root)...
ruby
chosen
[ { "from": "system", "value": "Move constant creation into module\n" }, { "from": "human", "value": "require 'matrix'\n\nmodule ToyRobot\n # Direction\n module Direction\n TURN = (2 * Math::PI).freeze\n ROUND = 12\n\n def self.directions\n %i[EAST NORTH WEST SOUTH]\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug in Simple Checker and add POST support to it.\n" }, { "from": "human", "value": "require 'uri'\nrequire 'net/http'\n\nclass SimpleCheckRunner\n\n class << self\n def run_check(config, check, &block)\n uri = URI(check[:url])\n start_time = Time....
ruby
chosen
[ { "from": "system", "value": "Update collectd version to 5.4.0\n" }, { "from": "human", "value": "default[\"collectd\"][\"version\"] = \"5.1.1\"\ndefault[\"collectd\"][\"dir\"] = \"/opt/collectd\"\ndefault[\"collectd\"][\"url\"] = \"http://collectd.org/fi...
ruby
chosen
[ { "from": "system", "value": "Fix files going into gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"kpeg/version\"\n\nGem::Specification.new do |s|\n s.name = \"kpeg\"\n s.version = KPeg::VERSION\n s.pla...
ruby
chosen
[ { "from": "system", "value": "Drop sass-rails dependency, so sites can use sassc-rails or sass-rails.\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'effective_orders/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new...
ruby
chosen
[ { "from": "system", "value": "Change to load files directly\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/cursor/version'\n\nGem::Specification.new do |spec|\n spec.name = 'tty-cursor...
ruby
chosen
[ { "from": "system", "value": "Allow to set html_options in add_link call\n" }, { "from": "human", "value": "module ActiveScaffold::Config\n class Nested < Base\n self.crud_type = :read\n\n def initialize(core_config)\n @core = core_config\n self.shallow_delete = self.class.shall...
ruby
chosen
[ { "from": "human", "value": "Add the DomainRecord result type\n" }, { "from": "gpt", "value": "module Dnsimple\n module Struct\n\n class DomainRecord < Base\n # @return [Fixnum] The record ID in DNSimple.\n attr_accessor :id\n\n # @return [Fixnum] The associated domain ID.\n ...
ruby
chosen
[ { "from": "system", "value": "Modify 1.8.x compatibility fix to preserve original return type\n\nOn 1.8.x, Object#instance_variables returns an array of strings,\nwhereas it is an array of symbols on later versions. This minor\nchange preserves that it is strings on 1.8.x\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Rename a local variable which covers another\n" }, { "from": "human", "value": "require 'cgi'\n\nmodule Komonjo\n module Gateway\n # Merge history and users\n class MessagesGateway\n using HashExtensions\n attr_reader :history, :users, :emojis\n\n ...
ruby
chosen
[ { "from": "system", "value": "Apply the 80 chars per-line rule" }, { "from": "human", "value": "module Devise\n module Generators\n module OrmHelpers\n def model_contents\n<<-CONTENT\n # Include default devise modules. Others available are:\n # :token_authenticatable, :encryptable, :c...
ruby
chosen
[ { "from": "system", "value": "Reset scope before calling deleted finder\n" }, { "from": "human", "value": "module Immortal\n module SingularAssociation\n\n def with_deleted_reader(force_reload = false)\n deleted_reader('with', force_reload)\n end\n\n def only_deleted_reader(force_...
ruby
chosen
[ { "from": "system", "value": "Mark this example as pending, ack/ag isn't happy\n" }, { "from": "human", "value": "require 'i18n'\nrequire 'i18n/hygiene'\n\ndescribe I18n::Hygiene::KeyUsageChecker do\n\n describe '#used_in_codebase?' do\n it 'finds usage of fully qualified key'\n\n it 'fin...
ruby
chosen
[ { "from": "system", "value": "Add X option to `less`\n\nAllows `less` to act like `cat` if the contents fit in one screen.\n" }, { "from": "human", "value": "module Output\n class Pager\n attr_reader :pager\n\n def initialize(raw: false)\n if raw or not $stdout.isatty\n @pager...
ruby
chosen
[ { "from": "human", "value": "Add task which removes dangling comments\n" }, { "from": "gpt", "value": "desc 'Removes comments with missing targets'\ntask :fix_dangling_comments do\n [MergeRequest, MergeRequestVersion].each do |target|\n table_name = target.table_name.to_sym\n\n comments =...
ruby
chosen
[ { "from": "system", "value": "Add rspec as development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mute/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Remove dependency on raad gem.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'totem/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Upgrade Atom to version 1.0.5.\n" }, { "from": "human", "value": "cask :v1 => 'atom' do\n version '1.0.4'\n sha256 '90cd22f9e6dfbfdfaa1bc79307c3abf1cf0ef4c07da31199f6e7ced11e0add8a'\n\n # github.com is the official download host per the vendor homepage\n url \"h...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Epic Privacy Browser Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'epic' do\n version '2462'\n ...
ruby
chosen
[ { "from": "system", "value": "Add description to the gemspec file\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/gatherer-scraper/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"bigwheel\"]\n gem.email = [\...
ruby
chosen
[ { "from": "system", "value": "Refactor - 4 examples now failing\n" }, { "from": "human", "value": "class BowlingGame\n def initialize\n @total = 0\n @frames = []\n end\n\n def roll(score)\n last = @frames.last\n if last && last.size < 2 && last[0] != 10\n last << score\n e...
ruby
chosen
[ { "from": "system", "value": "Load the new table importers\n" }, { "from": "human", "value": "module Intercode::Import::Intercode1::Tables\n extend ActiveSupport::Autoload\n\n autoload :Away\n autoload :BidInfo\n autoload :Bids\n autoload :BidTimes\n autoload :Bios\n autoload :Con\n auto...
ruby
chosen
[ { "from": "system", "value": "CA-4094: Add call to reset twitter connection\n" }, { "from": "human", "value": "module Lobbyist\n module V2\n\n class SocialNetworkProfile < Lobbyist::V2::Base\n attr_accessor :id, :page_uid, :page_tab_company_id, :type, :category, :screen_name\n attr...
ruby
chosen
[ { "from": "system", "value": "Validate URIs before making requests, only catch SocketErrors.\n\nThis at least makes sure we do not mask errors (see #117).\n" }, { "from": "human", "value": "module Pod\n # Handles HTTP requests\n #\n module HTTP\n\n # Resolve potential redirects and return ...
ruby
chosen
[ { "from": "human", "value": "Add acceptance spec for match creation\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Create match' do\n background do\n @project = create(:project, state: 'online', online_date: -1.seconds.from_now)\n login\n end\n\n scenario 'generate n...
ruby
chosen
[ { "from": "system", "value": "Test for registering with email already taken\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'RegistrationForm' do\n feature 'Navigates Registration Form', js: true do\n it ' Shows the Form' do\n visit '/'\n click_on 'register'\n...
ruby
chosen
[ { "from": "system", "value": "Add method for getting group by data ref\n" }, { "from": "human", "value": "# @see https://developers.podio.com/doc/stream\nclass Podio::StreamActivityGroup < ActivePodio::Base\n\n property :kind, :string\n property :type, :string\n property :created_on, :datetim...
ruby
chosen
[ { "from": "human", "value": "Add test for HelperFile class\n" }, { "from": "gpt", "value": "RSpec.describe Rambo::RSpec::HelperFile do\n let(:template_path) {\n File.expand_path(\"lib/rspec/templates/matcher_file_template.erb\")\n }\n\n let(:file_path) {\n File.expand_path(\"spec/suppor...
ruby
chosen
[ { "from": "system", "value": "Revert a faulty bug fix\n" }, { "from": "human", "value": "module ShippingMaterials\n module Sortable\n attr_accessor :sorters\n\n # DSL method\n def sort(context=:objects, &block)\n @sorters ||= {}\n @sorters[context] = Sorter.new\n @sorter...
ruby
chosen
[ { "from": "system", "value": "Add more basic setup actions\n" }, { "from": "human", "value": "#Links files from this list to 'current' folder\nset :normal_symlinks, %w(\n config/database.yml\n tmp\n)\n\nnamespace :deploy do\n desc \"Use configs\"\n task :app_symlinks do\n normal_symli...
ruby
chosen
[ { "from": "system", "value": "Use new top-level API from userbin-ruby\n" }, { "from": "human", "value": "# After login\n#\nWarden::Manager.after_set_user :except => :fetch do |record, warden, opts|\n begin\n session = Userbin.with_context(warden.env) do\n Userbin::Session.post(\"/api/v1...
ruby
chosen
[ { "from": "system", "value": "Upgrade aws-sdk to latest in the 2.0 line\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'carrierwave/aws/version'\n\nGem::Specification.new d...
ruby
chosen
[ { "from": "system", "value": "Write a couple of methods to get paths\n" }, { "from": "human", "value": "require \"frontend_generators/version\"\n\nmodule FrontendGenerators\n class Bootstrap\n\n def root\n File.expand_path(\"../\", File.dirname(__FILE__))\n end\n\n end\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Fix a method visibility issue with `module_function`\n" }, { "from": "human", "value": "module PayPoint\n module Blue\n # Miscellaneous helper methods used in multiple places.\n module Utils\n module_function\n\n def snakecase_and_symbolize_keys(has...
ruby
chosen
[ { "from": "system", "value": "Add where to example group methods\n" }, { "from": "human", "value": "require \"rspec/parameterized/version\"\n\nmodule RSpec\n module Parameterized\n end\nend\n" }, { "from": "gpt", "value": "require \"rspec/parameterized/version\"\n\nmodule RSpec\n ...
ruby
chosen
[ { "from": "human", "value": "Add incredibly simple shiny server stack\n" }, { "from": "gpt", "value": "require 'stacks/namespace'\nrequire 'stacks/machine_def'\n\nclass Stacks::ShinyServer < Stacks::MachineDef\n def initialize(virtual_service, index)\n @virtual_service = virtual_service\n ...
ruby
chosen
[ { "from": "system", "value": "Add rake task for updating all caches and set dependencies\n" }, { "from": "human", "value": "namespace :application do\n desc 'Rebuilds the whole cache of agreement between members'\n task :update_member_distances_cache => :environment do\n MemberDistance.upda...
ruby
chosen
[ { "from": "system", "value": "Change example passwords to make it clearer what we're testing\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe AccountController do\n include HTMLCompareHelper\n fixtures :all\n\n it '#settings' do\n compare('/account/settings.php')\n end...
ruby
chosen
[ { "from": "system", "value": "Refactor arrays with splat (*)\n" }, { "from": "human", "value": "module Lighter\n class LampControl\n\n def initialize(opts = {})\n # Connect to the server and save the socket\n @sock = opts[:socket]\n end\n\n def fade(lamps, length, cols)\n ...
ruby
chosen
[ { "from": "system", "value": "Add back global Quickeebooks.logger method\n\nThis makes it possible to easily use the logger that Quickeebooks is using\noutside of Quickeebooks itself.\n" }, { "from": "human", "value": "require 'logger'\n\nmodule Quickeebooks\n module Logging\n class LogForma...
ruby
chosen
[ { "from": "system", "value": "Remove unused block capture in Configuration\n" }, { "from": "human", "value": "module Virtus\n\n class Configuration\n\n attr_accessor :coerce\n\n def initialize\n @coerce = true\n @coercer = Coercible::Coercer.new\n end\n\n def call(&block)...
ruby
chosen
[ { "from": "system", "value": "Define date diff. First step.\n" }, { "from": "human", "value": "class ContactController < ApplicationController\n def show\n @color = \"green\"\n end\nend\n" }, { "from": "gpt", "value": "class ContactController < ApplicationController\n def date_...
ruby
chosen
[ { "from": "system", "value": "Add File Upload Action for LessonsController\n\nUpdate the LessonsController to add a file upload action to handle file\nuploads.\n" }, { "from": "human", "value": "class LessonsController < ApplicationController\n before_filter :authenticate_user!\n before_filter...
ruby
chosen