conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix debug logging error in Keyboard\n" }, { "from": "human", "value": "require 'remedy/console'\nrequire 'remedy/key'\n\nmodule Remedy\n module Keyboard\n module_function\n\n def get\n parse raw_get\n end\n\n def raw_get\n Console.raw do\n ...
ruby
chosen
[ { "from": "system", "value": "Update download URL for Balsamiq Mockups\n\nCloses #6944.\n" }, { "from": "human", "value": "class BalsamiqMockups < Cask\n version :latest\n sha256 :no_check\n\n url 'http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop.dmg'\n homepage 'http://balsami...
ruby
chosen
[ { "from": "system", "value": "Update Devise bypass sign in method\n" }, { "from": "human", "value": "class Releaf::Permissions::ProfileController < Releaf::ActionController\n def load_resource\n # assign current user\n @resource = user.becomes(resource_class)\n end\n\n def success_url\n...
ruby
chosen
[ { "from": "system", "value": "Update Thunderbird Beta to 33.0b1 (Sep 24, 2014 version)" }, { "from": "human", "value": "class ThunderbirdBeta < Cask\n version '33.0b1'\n sha256 '96db91d29cf5ec4e01e1c877eb804c9894e699e57c0d6d55219b1f53cbdb0dab'\n\n url \"https://download-installer.cdn.mozilla....
ruby
chosen
[ { "from": "system", "value": "Update TG Pro to 2.8.8\n" }, { "from": "human", "value": "cask :v1 => 'tg-pro' do\n version '2.8.7'\n sha256 '32b622cec40f4cfe0cd5455dd110696b8284524aadd92c552a769c130bbc88e7'\n\n url \"http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip...
ruby
chosen
[ { "from": "system", "value": "Fix Cisaurus.job_done? to continue to poll while 202\n" }, { "from": "human", "value": "require \"heroku/client\"\n\nclass Heroku::Client::Cisaurus\n\n include Heroku::Helpers\n\n def initialize(uri)\n require 'rest_client'\n @uri = URI.parse(uri)\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Add test-unit as a dependency to fix tests on 2.2.0\n\nFixes #29\n\nReferenced fix from;\nhttps://github.com/rails/rails/pull/18306\nhttps://github.com/tmm1/rails/commit/aa01162ffeba391329ab2b8559d9aa6d0182b74e\n" }, { "from": "human", "value": "# -*- encoding: utf-...
ruby
chosen
[ { "from": "system", "value": "Use the new syntax when defining the facet\n" }, { "from": "human", "value": "module Domgen\n module JSON\n\n def self.include_json(type, parent_key)\n type.class_eval(<<-RUBY)\n attr_writer :name\n\n def name\n @name || Domgen::Naming.json...
ruby
chosen
[ { "from": "system", "value": "Initialize Twitter widget from config options\n" }, { "from": "human", "value": "require 'twitter/json_stream'\nrequire 'json'\n\nmodule Sonia\n module Widgets\n class Twitter < Sonia::Widget\n def initialize(username, password)\n super()\n\n ...
ruby
chosen
[ { "from": "system", "value": "Rename local variable to avoid confusion\n" }, { "from": "human", "value": "\nmodule Logster\n class BaseStore\n\n attr_accessor :level, :max_retention, :skip_empty, :ignore\n\n def initialize\n @dedup = false\n @max_retention = 60 * 60 * 24 * 7\n ...
ruby
chosen
[ { "from": "system", "value": "Upgrade Evernote Beta to BETA_6.0.6_Beta_1_451237\n" }, { "from": "human", "value": "cask :v1 => 'evernote-beta' do\n version '5.6beta6'\n sha256 '4cdd361c873ce94ba5b3abfe98d967267644f99be700c1af1a2c56b2bfe06f54'\n\n url 'http://cdn1.evernote.com/mac-smd/prerelea...
ruby
chosen
[ { "from": "system", "value": "Add readline and openssl to default install\n" }, { "from": "human", "value": "\nrequire_relative \"lib/output\"\nrequire_relative \"lib/homebrew\"\nrequire_relative \"lib/sh\"\n\ndesc \"Ensure homebrew is installed and up to date\"\ntask :homebrew => 'homebrew:upda...
ruby
chosen
[ { "from": "human", "value": "Add spec for GitLab.com importer\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Gitlab::GitlabImport::Importer, lib: true do\n describe '#execute' do\n it 'persists issues' do\n stub_request('issues', [\n {\n 'id' => 25798...
ruby
chosen
[ { "from": "system", "value": "Clear subscribers between controller specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe StripeEvent::WebhookController do\n before do\n @base_params = { :use_route => :stripe_event }\n end\n\n context \"with valid event data\" do\n l...
ruby
chosen
[ { "from": "system", "value": "Set license as MIT in the gemspec\n\nFixes #57\n" }, { "from": "human", "value": "$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire 'cocaine/version'\n\nGem::Specification.new do |s|\n s.name = \"cocaine\"\n s.version = Cocaine...
ruby
chosen
[ { "from": "system", "value": "Update the gem to use the current homepage\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vertica/version'\n\nGem::Specification.new do |s|...
ruby
chosen
[ { "from": "system", "value": "Update PDF Converter Master to 4.0.0\n" }, { "from": "human", "value": "cask :v1 => 'pdf-converter-master' do\n version '3.5.0'\n sha256 'c927cea0b588dfc421c6f2feec6ab4a660c554a039e2bb160840b3bac17ed5ba'\n\n url \"http://www.lightenpdf.com/download/download.aspx?...
ruby
chosen
[ { "from": "system", "value": "Update rails-html-sanitizer version to v1.0.3\n\nrails-html-sanitizer 1.0.2 is vulnerable: https://groups.google.com/d/msg/rubyonrails-security/uh--W4TDwmI/m_CVZtdbFQAJ" }, { "from": "human", "value": "version = File.read(File.expand_path('../../RAILS_VERSION', __F...
ruby
chosen
[ { "from": "system", "value": "Support stack traces with erb files in them and also show all lines from stack trace even when it's not a ruby file. Just don't link files which aren't ruby files.\n\n- Closes #155.\n" }, { "from": "human", "value": "require 'rspec/core/formatters/html_formatter'\n\...
ruby
chosen
[ { "from": "system", "value": "Add themes to editor seeds\n" }, { "from": "human", "value": "json.key_format!(camelize: :lower)\njson.call(Pageflow.config,\n :confirm_encoding_jobs,\n :available_locales,\n :available_public_locales,\n :available_text_track_kind...
ruby
chosen
[ { "from": "system", "value": "Update the extension template for the new Extension class.\n" }, { "from": "human", "value": "# Require core library\nrequire \"middleman-core\"\n\n# Extension namespace\nmodule MyExtension\n class << self\n\n # Called when user `activate`s your extension\n d...
ruby
chosen
[ { "from": "system", "value": "Upgrade Myo Connect.app to v0.8.0\n" }, { "from": "human", "value": "cask :v1 => 'myo-connect' do\n version '0.7.0'\n sha256 '61924ae6a813f33328f6275d37047ba7379c503d52be323e177b6f44220ce7fa'\n\n # amazonaws.com is the official download host per the vendor homepa...
ruby
chosen
[ { "from": "system", "value": "Make it compatible with 1.8.7\n" }, { "from": "human", "value": "require 'aruba/processes/spawn_process'\n\nmodule Aruba\n module Processes\n # Debug Process\n class DebugProcess < BasicProcess\n # Use only if mode is :debug\n def self.match?(mode)\...
ruby
chosen
[ { "from": "human", "value": "Add application controller spec to test simplify_format.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nclass ApplicationController < ActionController::Base\n include ApiVersions::SimplifyFormat\n\n def index\n render nothing: true, status: 200\n end...
ruby
chosen
[ { "from": "system", "value": "Exclude `vendor` path from simplecov\n\nFixes #274\n" }, { "from": "human", "value": "require 'puppetlabs_spec_helper/module_spec_helper'\nrequire 'rspec-puppet-facts'\ninclude RspecPuppetFacts\n\nif Dir.exist?(File.expand_path('../../lib', __FILE__)) && RUBY_VERSIO...
ruby
chosen
[ { "from": "system", "value": "Fix missing \"guest tools not detected\" translation\n" }, { "from": "human", "value": "module VagrantPlugins\n module Parallels\n module Action\n class CheckGuestTools\n def initialize(app, env)\n @app = app\n end\n\n def call...
ruby
chosen
[ { "from": "system", "value": "Add extra sleep to fix false positive failing tests\n" }, { "from": "human", "value": "require \"timeout\"\n\nmodule WaitSteps\n extend RSpec::Matchers::DSL\n\n matcher :become_true do\n match do |block|\n begin\n Timeout.timeout(Capybara.default_wa...
ruby
chosen
[ { "from": "system", "value": "Add missing require of identitty v3\n\nOtherwise we get exception with missing\nFog::Identity::OpenStack::V3\n" }, { "from": "human", "value": "require 'fog/openstack/compute'\nrequire 'fog/openstack/identity_v2'\nrequire 'fog/openstack/image'\nrequire 'fog/openstac...
ruby
chosen
[ { "from": "system", "value": "Address deprecation warning from rspec-mocks." }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rspec/core/formatters/progress_formatter'\n\ndescribe RSpec::Core::Formatters::ProgressFormatter do\n\n before do\n @output = StringIO.new\n @for...
ruby
chosen
[ { "from": "system", "value": "Update League Gothic to sha256 checksums\n" }, { "from": "human", "value": "class FontLeagueGothic < Cask\n url 'http://files.theleagueofmoveabletype.com/downloads/theleagueof-league-gothic-64c3ede.zip'\n homepage 'https://www.theleagueofmoveabletype.com/league-go...
ruby
chosen
[ { "from": "system", "value": "Update podspec for version 0.2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'RFOverlayScrollView'\n s.version = '0.1'\n s.platform = :osx, '10.8'\n s.license = 'MIT'\n s.summary = 'Overlay style NSScrollView even when a mouse is att...
ruby
chosen
[ { "from": "system", "value": "Reduce scope of orphaned builds to be removed\n" }, { "from": "human", "value": "class AddPipelineBuildForeignKey < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def up\n execute <<~...
ruby
chosen
[ { "from": "system", "value": "Update to Plex Media Server 0.9.8.18.290\n" }, { "from": "human", "value": "class PlexMediaServer < Cask\n url 'http://downloads.plexapp.com/plex-media-server/0.9.8.17.282-c844f09/PlexMediaServer-0.9.8.17.282-c844f09-OSX.zip'\n homepage 'http://plexapp.com'\n ver...
ruby
chosen
[ { "from": "system", "value": "Use %w literal rather than array literal\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/knife_cookbook_doc/version', __FILE__)\n\nGem::Specification.new do |s|\n s.authors = ['Mathias Lafeldt', 'Peter Donald']\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"restored the ability to use method missing matchers like be_blank or be_true in before blocks for routing example groups\"\n\nThis reverts commit c1c2f606eba41be720224aa1f972ea0730d3c489.\n\nUnfortunately, there is code outside rspec's control that refers\ndirectly to ...
ruby
chosen
[ { "from": "system", "value": "Add an API for reading event objects from a Notifier.\n" }, { "from": "human", "value": "require 'singleton'\n\nmodule INotify\n class Notifier < IO\n def initialize\n @fd = Native.inotify_init\n return super(@fd) unless @fd < 0\n\n raise SystemCa...
ruby
chosen
[ { "from": "system", "value": "Use display port provided by Fog\n\nPrevious to this commit, the VNC port was determined using the\ndeprecated vnc_port method in Fog. This commit uses the display[:port]\nmethod.\n" }, { "from": "human", "value": "require 'veewee/provider/core/box'\nrequire 'veewe...
ruby
chosen
[ { "from": "system", "value": "Upgrade Google App Engine Launcher\n" }, { "from": "human", "value": "class Googleappenginelauncher < Cask\n url 'https://commondatastorage.googleapis.com/appengine-sdks/featured/GoogleAppEngineLauncher-1.9.1.dmg'\n homepage 'https://developers.google.com/appengin...
ruby
chosen
[ { "from": "system", "value": "Fix problema de ler arquivo que não existe\n\nO arquivo application.rb poderia tentar ler o arquivo local_env.yml\nsem este existir o que causava erro de failed to load file e\nquebrava os tests no Travis.\n" }, { "from": "human", "value": "require File.expand_path(...
ruby
chosen
[ { "from": "human", "value": "Add drbd and heartbeat, like peas and carrots\n" }, { "from": "gpt", "value": "#\n# Cookbook Name:: drbd\n# Recipe:: default\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file excep...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Jing 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 => 'jing' do\n version :latest\n sha256 :no_che...
ruby
chosen
[ { "from": "system", "value": "Upgrade Löve to version 0.9.1.\n" }, { "from": "human", "value": "class Love < Cask\n url 'https://bitbucket.org/rude/love/downloads/love-0.9.0-macosx-x64.zip'\n homepage 'http://love2d.org'\n version '0.9.0'\n sha256 'aabceb10910b271ac85e236ad5937396bd4cf3b8b5c...
ruby
chosen
[ { "from": "system", "value": "Fix Capybara `default_wait_time` depreciation warning\n" }, { "from": "human", "value": "require \"timeout\"\n\nmodule WaitSteps\n extend RSpec::Matchers::DSL\n\n matcher :become_true do\n match do |block|\n begin\n Timeout.timeout(Capybara.default_...
ruby
chosen
[ { "from": "system", "value": "Add license metadata to the gemspec file\n\nfixes #439\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'opal/version'\n\nGem::Specification.new do |s|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix for bin/ci spec failure on localised linux\n\n* Force system date to be executed against \"C\" locale\n\nSigned-off-by: Eero Saynatkari <0177bde8141a5cae83aa68d349f2b0f6a47123ee@projects.kittensoft.org>\n" }, { "from": "human", "value": "def with_timezone(name, ...
ruby
chosen
[ { "from": "system", "value": "Use SCRIPT_NAME instead of REQUEST_PATH to get the current path\n" }, { "from": "human", "value": "module SplitWimduDashboard\n class ActivityReporter\n SAFE_METHODS = %w{GET HEAD}\n\n def initialize(env)\n @env = env\n end\n\n def report\n Sp...
ruby
chosen
[ { "from": "system", "value": "Fix path in podpsec source (folder name in repo has typo)\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'TLTagsControl'\n s.version = '1.0.0'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.authors = { 'ali3...
ruby
chosen
[ { "from": "system", "value": "Revert \"Don't insist on ActiveSupport version. [v0.0.7]\"\n\nThis reverts commit b091abf07d6558044df95540bcb825a239d09a57.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOA...
ruby
chosen
[ { "from": "system", "value": "Use the full file modes in the init service recipe\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "# include helper methods\nclass ::Chef::Recipe\n include ::Opscode::ChefClient::Helpers\nend\n\n# li...
ruby
chosen
[ { "from": "system", "value": "[google|compute] Use a valid image for v1 in example\n" }, { "from": "human", "value": "def test\n connection = Fog::Compute.new({ :provider => \"Google\" })\n time = Time.now.utc.to_i\n disk = connection.disks.create({\n :name => 'foggydisk',\n :size_gb =>...
ruby
chosen
[ { "from": "human", "value": "Add migration to not crop page part content > 64kB in MySql and MSSQL\n" }, { "from": "gpt", "value": "class ExtendPagePartContentLimit < ActiveRecord::Migration\n def self.up\n if ActiveRecord::Base.connection.adapter_name =~ /m[sy]sql/i\n # Make sure text ...
ruby
chosen
[ { "from": "human", "value": "Add script to find long line in .js files.\n" }, { "from": "gpt", "value": "#!/usr/bin/ruby\n\n# VexFlow - Copyright Mohit Muthanna Cheppudira 2012\n#\n# Look for >80 lines and hard tabs.\n\nSRCDIR = \"../src\"\nDIRS = [ \"../src/*.js\", \"../vextab/*.js\" ]\n\nunles...
ruby
chosen
[ { "from": "system", "value": "Revert \"Prevent custom fact from complaining when openresty is installed\"\n" }, { "from": "human", "value": "Facter.add(:nginx_version) do\n setcode do\n if Facter.value('kernel') != 'windows' && Facter::Util::Resolution.which('nginx')\n nginx_version = F...
ruby
chosen
[ { "from": "system", "value": "Migrate pipeline stages only when not migrated already\n" }, { "from": "human", "value": "class MigratePipelineStages < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def up\n disable...
ruby
chosen
[ { "from": "system", "value": "Update gemspec with renamed test file\n" }, { "from": "human", "value": "# vim:fileencoding=utf-8\n\nGem::Specification.new do |gem|\n gem.authors = ['Mathias Meyer']\n gem.email = ['meyer@paperplanes.de']\n gem.summary = 'A drop-in replacement f...
ruby
chosen
[ { "from": "system", "value": "Format the time for < 1000 ms\n" }, { "from": "human", "value": "require 'mysql2'\n\n# Instrument SQL time\nclass Mysql2::Client\n class << self\n attr_accessor :query_time, :query_count\n end\n self.query_count = 0\n self.query_time = 0\n\n def query_with_t...
ruby
chosen
[ { "from": "system", "value": "Make Vagrant Manager easier to update\n" }, { "from": "human", "value": "class VagrantManager < Cask\n version '1.5.5'\n sha256 '778815d9b5a41e30363f8ca652fc5964beb4fbca0691feaad2595e1382870762'\n\n url 'https://github.com/lanayotech/vagrant-manager/releases/down...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v6675svn\n\nHandBrakeCLI Nightly v6675svn built 2014-12-30.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '6642svn'\n sha256 '25bb0e977db0ea667bc3b8989b730008f1b222080f938c69e50221bb1ebc2d56'\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add a migration that fixes the data problems caused by the PublicBody bug\n" }, { "from": "gpt", "value": "# The PublicBody model class had a bug that meant the\n# translations for first_letter and publication_scheme\n# were not being correctly populated.\n#\n# This ...
ruby
chosen
[ { "from": "system", "value": "Use false/true mixin in migration from !3640\n" }, { "from": "human", "value": "class AddVisibilityLevelToSnippet < ActiveRecord::Migration\n def up\n add_column :snippets, :visibility_level, :integer, :default => 0, :null => false\n\n execute(\"UPDATE snippe...
ruby
chosen
[ { "from": "system", "value": "Fix to add nil check\n" }, { "from": "human", "value": "class SS::Migration20150423044546\n def change\n Ezine::Page.all.each do |page|\n results = page[:results]\n next if results.empty?\n next if results.first.instance_of? Ezine::Result\n\n ...
ruby
chosen
[ { "from": "system", "value": "Set Time as the primivite class of DM::Mongo::Types::Date\n" }, { "from": "human", "value": "module DataMapper\n module Mongo\n module Types\n class Date < DataMapper::Type\n primitive ::Date\n\n def self.load(value, property)\n self....
ruby
chosen
[ { "from": "human", "value": "Add formula for Plowshare 3\n\nCloses #224.\n\nSigned-off-by: Xiyue Deng <4900478725231961caf32165c870e05cea7389d8@gmail.com>\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass Plowshare3 < Formula\n homepage 'http://code.google.com/p/plowshare/'\n url 'ht...
ruby
chosen
[ { "from": "system", "value": "Update Pupil Cask to use SHA256" }, { "from": "human", "value": "class Pupil < Cask\n url 'http://pupil.io/downloads/1.1/Pupil.app.zip'\n homepage 'http://pupil.io/'\n version '1.1'\n sha1 'a5a0a59b8963552776b06b11774dfa232b3c1c68'\n link 'Pupil.app'\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v6559svn\n\nHandBrakeCLI Nightly Build 6430svn released 2014-11-25.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '6536svn'\n sha256 'e0efe336b287ae5df4b592b74434a6c61cdfda9affea8409fd8bba03034bc8...
ruby
chosen
[ { "from": "human", "value": "Test searching for an event\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nfeature 'search for events' do\n background do\n create :event, title: 'Ruby Future', start_time: today + 1.day\n create :event, title: 'Python Past', start_time: today - 1....
ruby
chosen
[ { "from": "system", "value": "Disable migrations output in migrations helpers\n" }, { "from": "human", "value": "module MigrationsHelpers\n def table(name)\n Class.new(ActiveRecord::Base) { self.table_name = name }\n end\n\n def migrations_paths\n ActiveRecord::Migrator.migrations_paths...
ruby
chosen
[ { "from": "system", "value": "Use octokit_warn instead of warn\n" }, { "from": "human", "value": "module Octokit\n\n # Default setup options for preview features\n module Preview\n\n PREVIEW_TYPES = {\n :branch_protection => 'application/vnd.github.loki-preview+json'.freeze,\n :mi...
ruby
chosen
[ { "from": "system", "value": "Add Business Support API and transition-config to Custom's apps\n\n- The daily roundup of PRs was missing one of mine because the\n Business Support API wasn't tracked.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire \"./lib/github_fetcher.rb\"\nr...
ruby
chosen
[ { "from": "system", "value": "Add summary to gemspec so it builds." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/bronto/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Martin Gordon\"]\n gem.email = [\"marti...
ruby
chosen
[ { "from": "system", "value": "Use fewer conditionals & simplify the required files\n" }, { "from": "human", "value": "require 'active_support/core_ext'\n\nrequire 'ransack/configuration'\n\nif defined?(::Mongoid)\n require 'ransack/adapters/mongoid/ransack/constants'\nelse\n require 'ransack/a...
ruby
chosen
[ { "from": "system", "value": "Make it possible to give 1 second instead of 1 seconds\n" }, { "from": "human", "value": "if Aruba::VERSION >= '1.0.0'\n Aruba.configure do |config|\n config.working_directory = 'tmp/cucumber'\n end\nend\n\nGiven(/the default aruba timeout is (\\d+) seconds/) d...
ruby
chosen
[ { "from": "system", "value": "Read options from Rails app configuration in Railtie\n" }, { "from": "human", "value": "require 'image_optim'\n\nclass ImageOptim\n class Railtie < Rails::Railtie\n initializer 'image_optim.initializer' do |app|\n if app.config.assets.compress && app.config...
ruby
chosen
[ { "from": "system", "value": "Add symbol for sexp pystring representation\n" }, { "from": "human", "value": "module Cucumber\n module Ast\n # Represents an inline argument in a step. Example:\n #\n # Given the message\n # \"\"\"\n # I like\n # Cucumber sandwich\n...
ruby
chosen
[ { "from": "system", "value": "Add test for missing oEmbed `url` param\n\nAlso add dummy `url`s to other tests so this one doesn't trip them up.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass OembedControllerTest < ActionController::TestCase\n \n tests ApiController\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Replace custom passenger cap snipplet by cap_recipe.\n" }, { "from": "human", "value": "#Application\nset :application, 'bookyt'\nset :repository, 'git@github.com:huerlisi/bookyt.git'\n\n# Deployment\nset :server, :passenger\nset :user, \"deployer\" ...
ruby
chosen
[ { "from": "system", "value": "Remove version constraint for Rake\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"localdoc/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n...
ruby
chosen
[ { "from": "system", "value": ":anchor: Add an accessor for the title\n" }, { "from": "human", "value": "module Discordrb::Webhooks\n # An embed is a multipart-style attachment to a webhook message that can have a variety of different purposes and\n # appearances.\n class Embed\n def initia...
ruby
chosen
[ { "from": "system", "value": "Update HandBrake Nightly to v6494svn\n\nHandBrakeCLI Nightly Build 6469svn released 2014-11-01.\n" }, { "from": "human", "value": "class HandbrakecliNightly < Cask\n version '6469svn'\n sha256 '0eb150843aa2a7f2f23ad1c9359478e1843f26fc12d50a0c55a8fc92f0a7d398'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update RubyMine with bundled JDK to 8.0.0\n" }, { "from": "human", "value": "cask :v1 => 'rubymine-bundled-jdk' do\n version '7.1.4'\n sha256 '4f5df21a17eb8bb337756db485ef489f720b87f6f97398afb6358e5cd9261071'\n\n url \"https://download.jetbrains.com/ruby/RubyMine...
ruby
chosen
[ { "from": "system", "value": "Raise LoadError when the script does not have data_path\n" }, { "from": "human", "value": "# -*- encoding: us-ascii -*-\n\nmodule Rubinius\n class CodeLoader\n\n # Searches $LOAD_PATH for a file named +name+. Does not append any file\n # extension to +name+ w...
ruby
chosen
[ { "from": "human", "value": "Add a test for enabling Ezine::Member migration\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire Rails.root.join('lib/migrations/ezine/20150408081234_enable_member_state.rb')\n\nRSpec.describe SS::Migration20150408081234, dbscope: :example do\n before...
ruby
chosen
[ { "from": "system", "value": "Improve Draper integration proof-of-concept [ci skip]\n" }, { "from": "human", "value": "module ActiveAdmin\n class ResourceController < BaseController\n module Decorators\n protected\n\n def resource\n decorator = active_admin_config.decorator_...
ruby
chosen
[ { "from": "system", "value": "Add flags to determine what data is tracked for a layer comp\n" }, { "from": "human", "value": "class PSD\n class Resource\n class Section\n class LayerComps < Section\n def self.id; 1065; end\n def self.name; :layer_comps; end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Fix user creation cause of dual namespace build\n" }, { "from": "human", "value": "class UserObserver < ActiveRecord::Observer\n def after_create(user)\n user.create_namespace(path: user.username, name: user.name)\n\n log_info(\"User \\\"#{user.name}\\\" (#{u...
ruby
chosen
[ { "from": "system", "value": "Fix migration so it will run on pg and mysql\n" }, { "from": "human", "value": "class ChangeTeamCityChainedProjectstoRestProjects < ActiveRecord::Migration\n def up\n execute <<-SQL\n UPDATE projects set type = \"TeamCityRestProject\" where type = \"TeamC...
ruby
chosen
[ { "from": "system", "value": "Use WeakRef.__object__ in ThreadGroup to get the object once.\n" }, { "from": "human", "value": "class ThreadGroup\n def initialize\n @threads = []\n end\n\n def add(thread)\n if thread.group\n thread.group.remove(thread)\n end\n thread.add_to_gr...
ruby
chosen
[ { "from": "system", "value": "Make CLI options extraction more readable\n" }, { "from": "human", "value": "require 'thor'\n\nmodule LicenseFinder\n module CLI\n class Base < Thor\n class_option :project_path, desc: \"Path to the project. Defaults to current working directory.\"\n c...
ruby
chosen
[ { "from": "system", "value": "Fix the WebSocket wrapper trying to access the WSCS module wrong\n" }, { "from": "human", "value": "require 'websocket-client-simple'\n\nmodule WebSocket::Client::Simple\n # Patch to the WSCS class to allow reading the internal thread\n class Client\n # @return...
ruby
chosen
[ { "from": "system", "value": "Add error checking for params for SNS\n" }, { "from": "human", "value": "class Service::SNS < Service\n def receive_logs\n sns = AWS::SNS.new(\n :access_key_id => settings[:aws_access_key_id],\n :secret_access_key => settings[:aws_secret_access_key],\n ...
ruby
chosen
[ { "from": "human", "value": "Add Tag by Feisty Dog\n" }, { "from": "gpt", "value": "class FeistyDogTag < Cask\n version :latest\n sha256 :no_check\n\n url 'https://s3.amazonaws.com/feisty-dog/Tag.zip'\n homepage 'http://www.feisty-dog.com/tag/'\n license :commercial\n\n app 'Tag.app'\nend\...
ruby
chosen
[ { "from": "system", "value": "Add chef-zero dependency for tests\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef_fs/version'\n\nGem::Specification.new do |s|\n s.name = \"knife-essentials\"\n s.version = ChefFS::VERSION\n s.platform = Gem::Platfor...
ruby
chosen
[ { "from": "human", "value": "Add spec for ActionView template handler.\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'action_view'\nrequire 'active_support/core_ext/object/to_json'\nrequire 'haml_coffee_assets/action_view/template_handler'\n\ndescribe HamlCoffeeAssets::ActionVi...
ruby
chosen
[ { "from": "system", "value": "Use .cyt instead of .int in cap\n" }, { "from": "human", "value": "#Application\nset :application, 'bookyt'\nset :repository, 'git@github.com:CyTeam/bookyt.git'\n\n# Deployment\nset :server, :passenger\nset :user, \"deployer\" # The se...
ruby
chosen
[ { "from": "system", "value": "Add spec to make sure we don't concat::setup\n" }, { "from": "human", "value": "require 'spec_helper'\n \ndescribe 'openvpn::config', :type => :class do\n \n it { should create_class('openvpn::config') }\n \n context \"on Debian based machines\" do\n let (:fa...
ruby
chosen
[ { "from": "system", "value": "Update Sequel Pro.app to latest version.\n" }, { "from": "human", "value": "cask :v1 => 'sequel-pro-nightly' do\n version '36c6eeb3a2'\n sha256 '3a74e3c37fec5118a3576c8fa00fce2962b0b14335a2e71f4aa35b064578a6c3'\n\n url 'http://nightly.sequelpro.com/builds/Sequel_...
ruby
chosen
[ { "from": "system", "value": "Add a module_function marker to levenshtein\n" }, { "from": "human", "value": "require 'discordrb/version'\nrequire 'discordrb/bot'\nrequire 'discordrb/commands/command_bot'\n\n# All discordrb functionality, to be extended by other files\nmodule Discordrb\n # Simpl...
ruby
chosen
[ { "from": "system", "value": "Clean old rails2 style code\n" }, { "from": "human", "value": "# Custom Redis configuration\nrails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'\nrails_env = ENV['RAILS_ENV'] || 'development'\nconfig_file = File.join(rails_root, 'config', 'resque....
ruby
chosen
[ { "from": "system", "value": "Add support for Rails 4's config.console\n" }, { "from": "human", "value": "require \"pry-rails/version\"\n\nmodule PryRails\n begin\n require 'pry'\n\n if (defined?(::Rails::Console) and ::Rails::VERSION::MAJOR >= 3)\n class Railtie < ::Rails::Railtie\n...
ruby
chosen
[ { "from": "system", "value": "Add missing require in tests\n" }, { "from": "human", "value": "\nshared_context :email_shared_context do\n let(:mail_key) { \"59d8df8370b7e95c5a49fbf86aeb2c93\" }\n let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }\n let(:markdown) { \"![image](uploads/i...
ruby
chosen