conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix another typo with validating salary range\n" }, { "from": "human", "value": "class SalaryValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n record.errors[attribute] << (options[:message] || \"cannot be less than starting s...
ruby
chosen
[ { "from": "system", "value": "Fix rails 4.0.2 changes within translation helper.\n\nSee more at:\nhttps://github.com/rails/rails/commit/ec16ba75a5493b9da972eea08bae630eba35b62f#diff-79e8a3e6d1d2808c4f93f63b3928a5a1\n" }, { "from": "human", "value": "module Releaf\n module ApplicationHelper\n ...
ruby
chosen
[ { "from": "system", "value": "warn: Use RbConfig instead of obsolete and deprecated Config.\n" }, { "from": "human", "value": "module SS\n class Initializer\n SS::Config\n ActionView::Base.default_form_builder = SS::Helpers::FormBuilder\n ApplicationMailer.set :load_settings\n end\nen...
ruby
chosen
[ { "from": "system", "value": "Upgrade LyX to v2.0.7.1, Mac only bugfix release\n\nhttp://www.lyx.org/News\nBugfix Release for OSX Only: LyX 2.0.7.1 released.\n\nFebruary 1, 2014\n\nWe are pleased to announce the release of LyX 2.0.7.1. This is a\nbugfix release that affects Mac OSX only. Users of other oper...
ruby
chosen
[ { "from": "system", "value": "Update Unity3d to version 4.3.0\n" }, { "from": "human", "value": "class Unity3d < Cask\n url 'http://netstorage.unity3d.com/unity/unity-4.2.2.dmg'\n homepage 'http://unity3d.com/unity/'\n version '4.2.2'\n sha1 '099ea47e16ccf7954ffc59b756c345d0137c8f9c'\n inst...
ruby
chosen
[ { "from": "system", "value": "Update Sketch Beta.app to version 3.3\n" }, { "from": "human", "value": "cask :v1 => 'sketch-beta' do\n version '3.2.2'\n sha256 '275633effb38fa6e2d963efaa8a2fa9e614638fff67db89ab34acc1e7a469a8e'\n\n url 'https://rink.hockeyapp.net/api/2/apps/0172d48cceec171249a8...
ruby
chosen
[ { "from": "system", "value": "Raise on unfiltered parameters in dummy app\n\nThe new default for Rails 5 apps\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the G...
ruby
chosen
[ { "from": "system", "value": "Add SingleXLSX.open method to write XLSX file\n" }, { "from": "human", "value": "require \"single_xlsx/sheet\"\n\nmodule SingleXLSX\n module Writing\n def generate\n raise ArgumentError, \"no block given\" unless block_given?\n\n book = RubyXL::Workboo...
ruby
chosen
[ { "from": "system", "value": "Fix extract_backtraces migration, account for notices without backtrace\n" }, { "from": "human", "value": "class ExtractBacktraces < Mongoid::Migration\n def self.up\n say \"It could take long time (hours if you have many Notices)\"\n Notice.unscoped.all.each...
ruby
chosen
[ { "from": "system", "value": "Remove oj (Yajl is fine again)\n" }, { "from": "human", "value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'chefspec/version'\nGem::Specification.new do |s|\n s.name = 'chefspec'\n s.version = ChefSpec::VERSION...
ruby
chosen
[ { "from": "human", "value": "[postgres] Exclude AR test that only fails when running the whole AR test suite\n" }, { "from": "gpt", "value": "unless ENV['TEST'] == 'test/cases/associations/has_many_associations_test.rb'\n # This test only fails when running the full suite, it passes when runnin...
ruby
chosen
[ { "from": "system", "value": "Remove reference to the now done documentation.rake\n" }, { "from": "human", "value": "require 'rake'\n\n# Load Rails Rakefile extensions\n%w(\n annotations\n documentation\n framework\n log\n middleware\n misc\n routes\n statistics\n tmp\n).each do |task|\...
ruby
chosen
[ { "from": "system", "value": "[FEATURE] Add upstart for three scalable processes.\n" }, { "from": "human", "value": "\ntemplate \"/etc/init/ripple_gateway.conf\" do\n source \"ripple_gateway.conf.erb\"\n action :create\nend\n" }, { "from": "gpt", "value": "\ntemplate \"/etc/init/ri...
ruby
chosen
[ { "from": "system", "value": "Fix markup and let asset dir be set\n" }, { "from": "human", "value": "require 'erb'\nrequire_relative 'template_processor'\n\nmodule Compiler\n class LiquidProcessor < TemplateProcessor\n\n @@yield_hash = {\n page_title: \"{% if page.title %}{{ page.title ...
ruby
chosen
[ { "from": "human", "value": "Add allocation benchmark for many groups w/ 1 example.\n\nI’m not sure how to address the high number of allocations\nhere yet." }, { "from": "gpt", "value": "require_relative \"helper\"\n\nbenchmark_allocations do\n 1000.times do |i|\n RSpec.describe \"group #{i...
ruby
chosen
[ { "from": "system", "value": "Set required ruby version to 2.4\n" }, { "from": "human", "value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"dry/matcher/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"...
ruby
chosen
[ { "from": "system", "value": "Increase capybara/poltergeist timeout to 60 seconds\n\nThe default wait time of 2 seconds produced false positives on slow test runners.\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire 'capybara/rails'\nrequire 'capybara/poltergeist'\nrequire 'cap...
ruby
chosen
[ { "from": "system", "value": "Revert line being commented out\n" }, { "from": "human", "value": "module GettextI18nRails\n class HamlParser\n # singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code)\n #\n # # We need to convert text in Mustache format\n # # to a...
ruby
chosen
[ { "from": "system", "value": "Add tests for yaml content with errors\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe API::API do\n include ApiHelpers\n\n let(:user) { create(:user) }\n let(:yaml_content) do\n File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_...
ruby
chosen
[ { "from": "human", "value": "Migrate subscribable project id to the subscriptions table\n" }, { "from": "gpt", "value": "class MigrateSubscriptionsProjectId < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = true\n DOWNTIME_REASON = 'Subscriptions will not w...
ruby
chosen
[ { "from": "human", "value": "Add TextMate 2.x alpha series\n\nv2.0-alpha.9495 included in this commit\n" }, { "from": "gpt", "value": "class Textmate2 < Cask\n url 'https://github.com/textmate/textmate/releases/download/v2.0-alpha.9495/TextMate_2.0-alpha.9495.tbz'\n homepage 'http://macromates...
ruby
chosen
[ { "from": "system", "value": "Include equalizer in relation node\n" }, { "from": "human", "value": "module DataMapper\n class RelationRegistry\n\n class RelationNode < Graph::Node\n include Enumerable\n\n attr_reader :relation\n\n attr_reader :aliases\n\n def initialize(n...
ruby
chosen
[ { "from": "system", "value": "Split BaseRelationMappersFinalizer into smaller methods\n" }, { "from": "human", "value": "module DataMapper\n class Finalizer\n\n class BaseRelationMappersFinalizer < self\n\n # @api private\n def run\n finalize_mappers\n finalize_relati...
ruby
chosen
[ { "from": "system", "value": "Add zap stanza for doubleTwist\n" }, { "from": "human", "value": "cask :v1 => 'doubletwist' do\n version '3.1.2'\n sha256 '47975cc7517a6cf8c90362536a7feb53f0ff8af7d45866481d37cad2fcae4dac'\n\n url \"http://download.doubletwist.com/releases/mac/dT-#{version}-krono...
ruby
chosen
[ { "from": "system", "value": "Upgrade Android Studio.app to v0.5.9 135.1195882\n" }, { "from": "human", "value": "class AndroidStudio < Cask\n url 'http://dl.google.com/dl/android/studio/ide-zips/0.5.8/android-studio-ide-135.1155795-mac.zip'\n homepage 'https://developer.android.com/sdk/instal...
ruby
chosen
[ { "from": "human", "value": "Add formula for Electric Sheep\n\nVersion 2.7b34\n" }, { "from": "gpt", "value": "class ElectricSheep < Cask\n url 'http://electricsheep.googlecode.com/files/electricsheep-2.7b34.dmg'\n homepage 'http://www.electricsheep.org'\n version '2.7b34'\n sha1 'baeaf67988...
ruby
chosen
[ { "from": "system", "value": "Upgrade The Unarchiver Cask to use SHA256" }, { "from": "human", "value": "class TheUnarchiver < Cask\n url 'http://theunarchiver.googlecode.com/files/TheUnarchiver3.9.1.zip'\n homepage 'http://unarchiver.c3.cx/'\n version '3.9.1'\n sha1 'fc68b4b2a11560535ad055a...
ruby
chosen
[ { "from": "system", "value": "Refactor to use class instead of singleton\n" }, { "from": "human", "value": "module Inky\n module Rails\n class TemplateHandler\n class << self\n def engine_handler\n type = ::Inky.configuration.template_engine\n ActionView::Templa...
ruby
chosen
[ { "from": "system", "value": "Update ZeroXed to use the latest version.\n" }, { "from": "human", "value": "class Zeroxed < Cask\n url 'http://www.suavetech.com/cgi-bin/download.cgi?0xED.tar.bz2'\n homepage 'http://www.suavetech.com/0xed/'\n version '1.1.3'\n sha256 '56b68898c7a8c1169e9f42790...
ruby
chosen
[ { "from": "human", "value": "Add acceptance test for Wildfly 9.\n" }, { "from": "gpt", "value": "require 'spec_helper_acceptance'\n\ndescribe 'Acceptance case three. Standalone mode with Wildfly 9' do\n\n context 'Initial install Wildfly 9 and verification' do\n it 'Should apply the manifest...
ruby
chosen
[ { "from": "system", "value": "Update parser dep to ~> 2.0.0.beta4\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@schir-dso.com'\n s.summary ...
ruby
chosen
[ { "from": "system", "value": "Stop serializing nil because it is evaluated as false on deserialization\n" }, { "from": "human", "value": "require 'rails_admin/config/fields/types/text'\n\nmodule RailsAdmin\n module Config\n module Fields\n module Types\n class Serialized < RailsA...
ruby
chosen
[ { "from": "system", "value": "Add Rake task for releasing docs\n" }, { "from": "human", "value": "require 'yard'\nrequire 'yard/rake/yardoc_task'\nrequire 'cucumber/platform'\n\nYARD::Templates::Engine.register_template_path(File.expand_path(File.join(File.dirname(__FILE__), 'yard')))\nYARD::Rak...
ruby
chosen
[ { "from": "system", "value": "Remove __ prefix from generated HTML files.\n" }, { "from": "human", "value": "class JoDoc\n JO_DOC_CLI = 'jodoc'\n TEMPLATE_DIRECTORY = File.expand_path( File.join( File.dirname(__FILE__), '..', '..', 'template', 'phonegap' ) )\n \n attr_accessor :input...
ruby
chosen
[ { "from": "system", "value": "Update Vagrant Manager to 2.3.0\n" }, { "from": "human", "value": "cask :v1 => 'vagrant-manager' do\n version '2.2.1'\n sha256 'c9d63396cb322c65573a3a0c54dd700db18cff736b0f8b21a7813ac51d6ea5dd'\n\n # github.com is the official download host per the vendor homepag...
ruby
chosen
[ { "from": "system", "value": "Update podspec to include Google Plus frameworks and bundle. Hopefully.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"OvershareKit\"\n s.version = \"1.1.0\"\n s.summary = \"A soup-to-nuts sharing library for iOS.\"\n s.ho...
ruby
chosen
[ { "from": "system", "value": "Fix Mashify test to work with Faraday callback\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Restforce::Middleware::Mashify do\n let(:env) { { :body => JSON.parse(fixture('sobject/query_success_response')) } }\n subject(:middleware) {\n d...
ruby
chosen
[ { "from": "system", "value": "Include nested groups items into search results\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "human", "value": "module Search\n class GlobalService\n attr_accessor :current_user, :params\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Update deprecated line of code\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the Rails 5.0 release notes for more info on each opti...
ruby
chosen
[ { "from": "system", "value": "Update attrs for system-info 2.0.1\n" }, { "from": "human", "value": "include_attribute 'travis_build_environment'\n\ndefault['travis_system_info']['commands_file'] = '/usr/local/system_info/commands.yml'\ndefault['travis_system_info']['defaults_file'] = '/etc/defau...
ruby
chosen
[ { "from": "system", "value": "Fix migration that was changed by mistake at some point\n" }, { "from": "human", "value": "class AddConfirmableToDevise < ActiveRecord::Migration\n # Note: You can't use change, as User.update_all with fail in the down migration\n def self.up\n add_column :user...
ruby
chosen
[ { "from": "system", "value": "Comment what bug this is testing.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe User, \"manipulating a raw email\" do \n before do\n @raw_email = RawEmail.new\n end\n\n it 'putting data in comes bac...
ruby
chosen
[ { "from": "system", "value": "Remove legacy require_recipe DSL method\n\nWe've been warning on this one for YEARS and we have a Foodcritic rule\nfor it as well, which has been around since before I was at Chef.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "f...
ruby
chosen
[ { "from": "system", "value": "Update HandBrakeCLI Nightly to v6452svn\n\nHandBrakeCLI Nightly Build 6452svn [released](https://trac.handbrake.fr/changeset/6452) 2014-10-19.\n" }, { "from": "human", "value": "class HandbrakecliNightly < Cask\n version '6430svn'\n sha256 'e62a9c051a00a00bdb09a76...
ruby
chosen
[ { "from": "human", "value": "Add specs for exporting commits as diff or patch\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe CommitController do\n let(:project) { create(:project) }\n let(:user) { create(:user) }\n let(:commit) { project.last_commit_for(\"master\") }\n...
ruby
chosen
[ { "from": "human", "value": "Add cask for Serial Cloner\n\nNew cask, Serial Cloner (http://serialbasics.free.fr/Home/Home.html)\n" }, { "from": "gpt", "value": "class SerialCloner < Cask\n url 'http://serialbasics.free.fr/Serial_Cloner-Download_files/SerialCloner2-6.dmg'\n homepage 'http://ser...
ruby
chosen
[ { "from": "system", "value": "Support empty PG database too\n\nFirst check if there is a result on the migration, else there is\nnothing to do\n" }, { "from": "human", "value": "class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelper...
ruby
chosen
[ { "from": "human", "value": "Add missing group extension module\n" }, { "from": "gpt", "value": "module OmfEc\n module GroupExt\n @@methods_to_fwd = []\n\n def fwd_method_to_aliases(*m)\n @@methods_to_fwd += m.flatten\n end\n\n def method_added(m)\n if @@methods_to_fwd.del...
ruby
chosen
[ { "from": "system", "value": "Update iTerm beta to 1.0.0.20140629\n" }, { "from": "human", "value": "class Iterm2Beta < Cask\n url 'http://www.iterm2.com/downloads/beta/iTerm2-1_0_0_20140518.zip'\n homepage 'http://www.iterm2.com/'\n version '1.0.0.20140518'\n sha256 'e10a1c859714f5449a03146...
ruby
chosen
[ { "from": "system", "value": "Debug line passed to repo by accident\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Jade::Compiler do\n before :all do\n # TODO: Clean dummy sprockets cache\n end\n\n def template(source, file)\n Jade::Template.new(file){source}\n en...
ruby
chosen
[ { "from": "system", "value": "Switch to %.( like rubocop says\n" }, { "from": "human", "value": "apt_repository 'mercurial' do\n uri 'ppa:mercurial-ppa/releases'\n distribution node['lsb']['codename']\n keyserver 'hkp://ha.pool.sks-keyservers.net'\n retries 2\n retry_delay 30\nend\n\npackag...
ruby
chosen
[ { "from": "system", "value": "Update VisIt to version 2.7.1.\n" }, { "from": "human", "value": "class Visit < Cask\n url 'http://portal.nersc.gov/svn/visit/trunk/releases/2.7.0/VisIt-2.7.0-x86_64-installer.dmg'\n homepage 'https://wci.llnl.gov/codes/visit/home.html'\n version '2.7.0'\n sha1 ...
ruby
chosen
[ { "from": "system", "value": "Remove pointless use of 'private'\n" }, { "from": "human", "value": "require \"active_record/associations/through_association_scope\"\n\nmodule ActiveRecord\n # = Active Record Has One Through Association\n module Associations\n class HasOneThroughAssociation <...
ruby
chosen
[ { "from": "system", "value": "Fix Visual Studio Code not being symlinked\n" }, { "from": "human", "value": "cask :v1 => 'visual-studio-code' do\n version :latest\n sha256 :no_check\n\n url 'http://go.microsoft.com/fwlink/?LinkID=534106'\n name 'Visual Studio Code'\n homepage 'https://code.v...
ruby
chosen
[ { "from": "system", "value": "Add a \"real\" test for !dice\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Diceman, lita_handler: true do\n\n it { is_expected.to route_command(\"!dice answer one;answer two\").to(:dice!) }\n\nend\n" }, { "from": ...
ruby
chosen
[ { "from": "system", "value": "Update Goagentx to version 2.2.0\n" }, { "from": "human", "value": "class Goagentx < Cask\n url 'http://goagentx.googlecode.com/files/GoAgentX-v1.3.33.dmg'\n homepage 'https://github.com/ohdarling/GoAgentX'\n version '1.3.33'\n sha1 '6694e5380fe58cba5ace62d1bf46...
ruby
chosen
[ { "from": "system", "value": "Add link param to Transmit 4.4 cask\n\nAdd link param to Transmit 4.4 cask\n" }, { "from": "human", "value": "class Transmit < Cask\n url 'http://www.panic.com/transmit/d/Transmit%204.4.zip'\n homepage 'http://panic.com/transmit'\n version '4.4'\n sha1 'fe4c41ce...
ruby
chosen
[ { "from": "system", "value": "Upgrade Waterfox.app to version 39.0\n" }, { "from": "human", "value": "cask :v1 => 'waterfox' do\n version '38.1.0'\n sha256 '612c324154107c23063a78b2040a41e6b8909baca058d98c3bfaec944e0b4cca'\n\n # cloudfront.net is the official download host per the vendor home...
ruby
chosen
[ { "from": "system", "value": "Convert DateTime to utc time for mongo driver\n" }, { "from": "human", "value": "class DateTime\n # @api public\n def self.to_mongo(value)\n value.to_time\n end\n\n # @api public\n def self.from_mongo(value)\n value.to_datetime\n end\nend # DateTime\n" ...
ruby
chosen
[ { "from": "system", "value": "Update to latest versioning scheme\n\nAs per @NanoXD's suggestion, I've changed the version and the SHA sum to\n`latest_version` and `no_checksum`.\n" }, { "from": "human", "value": "class Apptivate < Cask\n url 'http://www.apptivateapp.com/resources/Apptivate.app....
ruby
chosen
[ { "from": "system", "value": "Update Guide for Microsoft Teams Notification Integration\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass MicrosoftTeamsService < ChatNotificationService\n def title\n 'Microsoft Teams Notification'\n end\n\n def description\n 'Rec...
ruby
chosen
[ { "from": "human", "value": "Add MenuMeters v1.9 (yujitach El Capitan port)\n\nThis is a fork of Alex Harper’s MenuMeters, by Yuji Tachikawa.\nIt adds OS X El Capitan support to the utility.\nThe fork is in development at https://github.com/yujitach/MenuMeters.\n" }, { "from": "gpt", "value": "c...
ruby
chosen
[ { "from": "system", "value": "Fix wrong description for Coverage entry (in ruby comments)\n" }, { "from": "human", "value": "module Gitlab\n module Ci\n class Config\n module Entry\n ##\n # Entry that represents a Regular Expression.\n #\n class Coverage < No...
ruby
chosen
[ { "from": "system", "value": "Fix duplicated test class names\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')\n\nclass TestZhCnLocale < Test::Unit::TestCase\n def setup\n Faker::Config.locale = 'zh-CN'\n end\n\n def teardown\n Fake...
ruby
chosen
[ { "from": "system", "value": "Fix error message saying deploy key was not added\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: runners\n#\n# id :integer not null, primary key\n# token :string(255)\n# public_key :text\n# created_at :datetime...
ruby
chosen
[ { "from": "system", "value": "Allow lax spacing of code blocks.\n" }, { "from": "human", "value": "module ApplicationHelper\n def body_class\n %|#{controller.controller_name} #{controller.controller_name}-#{controller.action_name} #{@body_class}|\n end\n\n class HTMLwithPygments < Redcarpe...
ruby
chosen
[ { "from": "system", "value": "Add legacy table support to generate anonymous users migration\n" }, { "from": "human", "value": "class GenerateAnonymousUsers < ActiveRecord::Migration\n def self.up\n User.reset_column_information\n Order.where(:user_id => nil).each do |order|\n user =...
ruby
chosen
[ { "from": "system", "value": "Reset the state of the import when shutting down.\n" }, { "from": "human", "value": "Sidekiq.configure_server do\n Supermarket::Application.load_tasks\nend\n" }, { "from": "gpt", "value": "Sidekiq.configure_server do |config|\n Supermarket::Application...
ruby
chosen
[ { "from": "system", "value": "Fix \"pessimistic dependency on ...\" warnings\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = 'spotify-to-mp3'\n gem.summary = 'Spotify to MP3'\n gem.description = 'Download MP3 files of your Spotify tracks from Grooveshark'\n ge...
ruby
chosen
[ { "from": "system", "value": "Fix thor warning to set type: :boolean, was setting `{ banner: \"\" }`\n\n```\nrequire \"rails/generators/rails/model/model_generator\"\n\nmodule Rails\n module Generators\n class ResourceGenerator < ModelGenerator # :nodoc:\n include ResourceHelpers\n\n hook_for ...
ruby
chosen
[ { "from": "human", "value": "Add Sony Homestream v1.1 cask\n" }, { "from": "gpt", "value": "class Homestream < Cask\n version '1.1'\n sha256 '193dd9fb3488dfb754057b9c216e09fe2f0528b20a95bbe9b7d5f4b0556a4e2b'\n\n url 'http://homestreamdownload.sony-europe.com/homestream-1.1-osx.tar.gz'\n home...
ruby
chosen
[ { "from": "system", "value": "Check for window.Worker when choosing Player class\n" }, { "from": "human", "value": "module AsciicastsHelper\n\n def player_script(asciicast, options = {})\n speed = (options[:speed] || 1).to_f\n benchmark = !!params[:bm]\n auto_play = options.key?(:auto_...
ruby
chosen
[ { "from": "system", "value": "Fix method name in RealtyUsage (map_translated => translated)\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule JustimmoClient::V1\n class RealtyUsage < JustimmoBase\n # @!group Attributes\n\n # @!method living?\n # @api private\n ...
ruby
chosen
[ { "from": "system", "value": "Fix broken with pass nil argument on redirect_to_finish_wizard method\n" }, { "from": "human", "value": "module Wicked::Controller::Concerns::RenderRedirect\n extend ActiveSupport::Concern\n\n\n def render_wizard(resource = nil, options = {})\n process_resource...
ruby
chosen
[ { "from": "human", "value": "Add initial specs for app/controllers/import/bitbucket_server_controller.rb\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Import::BitbucketServerController do\n let(:user) { create(:user) }\n let(:project_key) { 'test-project' }\n let(:repo_sl...
ruby
chosen
[ { "from": "system", "value": "Add user type to the info and capture anything in the raw data to be extensible\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\nrequire 'base64'\n\nmodule OmniAuth\n module Strategies\n class Clever < OmniAuth::Strategies::OAuth2\n option :nam...
ruby
chosen
[ { "from": "system", "value": "Use class_eval to add behaviour to Numeric\n\nWhen reopening classes, it's safer to use `Class.class_eval` since it forces the original class definition to be treated as the original" }, { "from": "human", "value": "class Numeric\n def respond_to?(method, include_p...
ruby
chosen
[ { "from": "system", "value": "Create the client_id/cid delegator method to BaseController through the Forwardable module.\n" }, { "from": "human", "value": "module WebsocketRails\n class DataStore\n def initialize(base_controller)\n @base = base_controller\n @data = Hash.new {|h,k|...
ruby
chosen
[ { "from": "system", "value": "Revert \"make valid_signature an ignored column\"\n\nThis reverts commit cce9afa38a8aa3f3e5a43ab952e1c022c9dd9385.\n" }, { "from": "human", "value": "class GpgSignature < ActiveRecord::Base\n include ShaAttribute\n include IgnorableColumn\n\n ignore_column :valid...
ruby
chosen
[ { "from": "system", "value": "Increase the aruba timeout for JRuby.\n\nWe've been getting intermittent aruba timeouts on JRuby." }, { "from": "human", "value": "require 'aruba/cucumber'\n\nBefore do\n @aruba_timeout_seconds = 15\nend\n\nAruba.configure do |config|\n config.before_cmd do |cmd|\...
ruby
chosen
[ { "from": "system", "value": "Update Trailer SHA for version 1.3.9\n\nThis commit updates the sha256 stanza as 1.3.9 was rebuilt.\n" }, { "from": "human", "value": "cask :v1 => 'trailer' do\n version '1.3.9'\n sha256 '4f81aee67ecb732aaeaed39190ba64ab06e67a07bef95963d207117fc6313334'\n\n url \...
ruby
chosen
[ { "from": "system", "value": "Remove git reference in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Tutorial\"\n s.summary = \"A short description of Tutorial.\"\n s.version = \"0.1\"\n s.homepage = \"https://github.com/hyp...
ruby
chosen
[ { "from": "system", "value": "Make sure the class that uses Forwardable requires it.\n" }, { "from": "human", "value": "require 'hyperclient/attributes'\nrequire 'hyperclient/link_collection'\nrequire 'hyperclient/resource_collection'\n\nmodule Hyperclient\n # Public: Represents a resource from...
ruby
chosen
[ { "from": "system", "value": "Write a spec for fancy mode logging\n" }, { "from": "human", "value": "require 'discordrb'\n\ndescribe Discordrb::Logger do\n it 'should log messages' do\n stream = spy\n logger = Discordrb::Logger.new(false, [stream])\n\n logger.error('Testing')\n\n ex...
ruby
chosen
[ { "from": "system", "value": "Python32: Update uninstall, add name stanza" }, { "from": "human", "value": "cask :v1 => 'python32' do\n version '3.2.5'\n sha256 '581abb199d40271dbb68a8de4f1e4d5a1a7ab45cae8e817a2d9532be7a26a164'\n\n url \"https://www.python.org/ftp/python/#{version}/python-#{ve...
ruby
chosen
[ { "from": "system", "value": "Change my e-mail to @rts.ch in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RTSMediaPlayer\"\n s.version = \"0.0.1\"\n s.summary = \"Shared media player for RTS mobile apps.\"\n s.homep...
ruby
chosen
[ { "from": "human", "value": "Add example user registration hook\n" }, { "from": "gpt", "value": "#!/usr/bin/ruby\n# Registers some example hooks with an omega-server\n#\n# Copyright (C) 2013 Mohammed Morsi <mo@morsi.org>\n# Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt\n\nrequi...
ruby
chosen
[ { "from": "system", "value": "Make shared db path using cap.\n" }, { "from": "human", "value": "namespace :sqlite do\n namespace :sync do\n desc \"Sync down the production sqlite database to local development sqlite\"\n task :down do\n download \"#{deploy_to}/shared/db/production.sql...
ruby
chosen
[ { "from": "system", "value": "Fix tests (remove fields from factory)\n" }, { "from": "human", "value": "require 'uuidtools'\n\nFactoryGirl.define do\n\n random = UUIDTools::UUID.timestamp_create.to_s\n\n factory :derived_visualization, class: CartoDB::Visualization::Member do\n type 'derive...
ruby
chosen
[ { "from": "system", "value": "Update paraview. Switch sha1 to sha256\n" }, { "from": "human", "value": "class ParaviewLionPython27 < Cask\n url 'http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v4.1&type=binary&os=osx&downloadFile=ParaView-4.1.0-Darwin-64bit-Lion-...
ruby
chosen
[ { "from": "system", "value": "Add a descriptive message for a possible reason this test fails." }, { "from": "human", "value": "require File.expand_path(\"../helper.rb\", __FILE__)\n\nclass TestNotifier\n def self.deliver(args={})\n end\nend\n\n# This not only allows me to test what happens\n#...
ruby
chosen
[ { "from": "system", "value": "Add rom-relation and rom-mapper deps\n" }, { "from": "human", "value": "require 'backports'\nrequire 'adamantium'\nrequire 'equalizer'\nrequire 'abstract_type'\nrequire 'concord'\n\n# Namespace module\nmodule ROM\n\n # Session namespace\n class Session\n\n # Er...
ruby
chosen
[ { "from": "system", "value": "Set csv options when looking for warnings\n" }, { "from": "human", "value": "Given(/^it is encoded as \"(.*?)\"$/) do |encoding|\n @csv = @csv.encode(encoding)\n @encoding = encoding\nend\n\nWhen(/^I ask if there are warnings$/) do\n @validator = Csvlint::Validat...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Fix thinko in the Chrome::Service spec.\n\nr11900\n" }, { "from": "human", "value": "require File.expand_path(\"../../spec_helper\", __FILE__)\n\nmodule Selenium\n module WebDriver\n module Chrome\n\n describe Service do\n let(:mock_proce...
ruby
chosen
[ { "from": "system", "value": "Use slack-api instead of slack-notifier to notify about new prop\n" }, { "from": "human", "value": "class Notifier\n class SlackNotifier < Base\n private\n\n def notify\n channel.ping notification.to_s\n end\n\n def channel\n @channel ||= ::Sl...
ruby
chosen
[ { "from": "human", "value": "Add test group init should generate uniq id\n" }, { "from": "gpt", "value": "require 'test_helper'\nrequire 'omf_ec/group'\n\ndescribe OmfEc::Group do\n describe \"when initialised\" do\n it \"must be generate unique id if :unique option is on\" do\n OmfEc::...
ruby
chosen
[ { "from": "system", "value": "Upgrade Android Studio to 0.8.9\n\nthe version 0.8.9 comes from http://tools.android.com/download/studio/canary/0-8-9 and offical doesn't include the build number in version\nthe homepage url also changed to a more accurate place\n" }, { "from": "human", "value": "c...
ruby
chosen
[ { "from": "system", "value": "Add multiple push_routes as a test to rspec.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'openvpn::server' do\n let(:chef_run) do\n ChefSpec::SoloRunner.new(step_into: ['openvpn_conf']) do |node|\n node.set['openvpn']['push_options'...
ruby
chosen
[ { "from": "system", "value": "Add a method to obtain profile data as a LightProfile\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# This module contains classes to allow connections to bots without a connection to the gateway socket, i. e. bots\n# that only use the REST par...
ruby
chosen
[ { "from": "system", "value": ":anchor: Create a method to generate a webhook URL from ID and token\n" }, { "from": "human", "value": "module Discordrb::Webhooks\n # A client for a particular webhook added to a Discord channel.\n class Client\n # Create a new webhook\n # @param url [Strin...
ruby
chosen