conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update Data Science Studio to v1.4.2\n"
},
{
"from": "human",
"value": "cask :v1 => 'data-science-studio' do\n version '1.4.1a'\n sha256 '09d7d5523befae8efc7063024dab34ad227052e55651d264db9e5b6806607650'\n\n url 'http://downloads.dataiku.com/public/studio/Data%20... | ruby | chosen |
[
{
"from": "system",
"value": "Fix of Auth::Abstract::Handler to return headers within spec.\n401 and 400 responses must have Content-Type and Content-Length defined.\n"
},
{
"from": "human",
"value": "module Rack\n module Auth\n # Rack::Auth::AbstractHandler implements common authentication ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing specs in ruby >= 1.9\n\n* In ruby 1.9 it always sends a #to_ary message to the object, and an rspec mock\n object will accept any message. Change to use a plain Object instance which\n resembles real-world usage more closely.\n"
},
{
"from": "human",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust event-machine to proper protocol\n"
},
{
"from": "human",
"value": "require 'em-websocket'\nrequire 'json'\nrequire 'optparse'\n\naddress = \"0.0.0.0\"\nport = 8080\n\nOptionParser.new do |opts|\n opts.banner = \"Usage: bundle exec server.rb [options]\"\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Support using the homebrewed installation of Python with GDB\n\nAdds a flag, --with-brewed-python, which will build GDB with the\nHomebrewed Python installation instead of the system one. This requires\nPython to be built with --universal so a check for this has been added\nas ... | ruby | chosen |
[
{
"from": "human",
"value": "Write a spec for the case of a CommandBot with no commands\n"
},
{
"from": "gpt",
"value": "require 'discordrb'\n\ndescribe Discordrb::Commands do\n describe Discordrb::Commands::CommandBot do\n it 'should allow no defined commands' do\n bot = Discordrb::Com... | ruby | chosen |
[
{
"from": "system",
"value": "Remove methods that haven't been used\n"
},
{
"from": "human",
"value": "module DidYouMean\n class SimilarMethodFinder\n include BaseFinder\n attr_reader :method_name, :receiver\n\n def initialize(exception)\n @method_name, @receiver = exception.name,... | ruby | chosen |
[
{
"from": "system",
"value": "Add some convenience methods for RealtyUsage\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 # @return [B... | ruby | chosen |
[
{
"from": "system",
"value": "Raise NotImplementedError if there is not Fiber support\n"
},
{
"from": "human",
"value": "module Rubinius\n class Fiber\n def self.create(size, callable)\n Ruby.primitive :fiber_new\n raise PrimitiveFailure, \"fiber_new failed\"\n end\n\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Fix truncate_first_line if message is nil\n"
},
{
"from": "human",
"value": "module CommitsHelper\n def commit_status_alert_class(commit)\n return unless commit\n\n case commit.status\n when 'success'\n 'alert-success'\n when 'failed', 'canceled'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use the RSpec documentation formatter\n"
},
{
"from": "human",
"value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire 'rspec/rails... | ruby | chosen |
[
{
"from": "system",
"value": "Write an initializer for LightBot\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 part of the API.\nmodul... | ruby | chosen |
[
{
"from": "system",
"value": ":anchor: Create an initializer for Embed\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 end\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Correct a few small YARD doc syntax errors. [ci skip]\n"
},
{
"from": "human",
"value": "module JMESPath\n class Token < Struct.new(:type, :value, :position, :binding_power)\n\n # @api private\n NULL_TOKEN = Token.new(:eof, '', nil)\n\n # binding power\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add teardown so locale test doesn't clobber other tests.\n"
},
{
"from": "human",
"value": "require \"test/unit\"\n\nrequire \"faker\"\n\nclass TestLocale < Test::Unit::TestCase\n def test_case_name\n I18n.locale = :en\n Faker::Config.locale = :de\n assert... | ruby | chosen |
[
{
"from": "system",
"value": "Add refactored count between solution\n"
},
{
"from": "human",
"value": "# Count Between\n\n# I worked on this challenge by myself.\n\n# count_between is a method with three arguments:\n# 1. An array of integers\n# 2. An integer lower bound\n# 3. An integer up... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused stepdefs. Thanks -f usage.\n"
},
{
"from": "human",
"value": "Given /^I have a local file named \"([^\"]*)\" with:$/ do |filename, content|\n File.open(filename, 'w') {|io| io.write(content)}\nend\n\nWhen /^I do aruba (.*)$/ do |aruba_step|\n begin\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add integration tests in example cookbook for graphite_service resource\n"
},
{
"from": "human",
"value": "include_recipe \"graphite::carbon\"\n\ngraphite_carbon_cache \"default\" do\n config ({\n enable_logrotation: true,\n user: nil,\n max_cache_si... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dead code from pause state\n"
},
{
"from": "human",
"value": "require 'singleton'\nclass PauseState < GameState\n include Singleton\n attr_accessor :play_state\n\n def initialize\n @message = Gosu::Image.from_text(\n $window, \"Game Paused\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set instance variables instead of calling instance methods for on!, off!"
},
{
"from": "human",
"value": "module CachedResource\n # The Configuration class contains global configuration options\n # for CachedResource as well as class specific options.\n class Con... | ruby | chosen |
[
{
"from": "system",
"value": "Add glib dep to prevent compile errors\n\nCloses #4402.\n\nSigned-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass KdePhonon <Formula\n url 'ftp://ftp.kde.org/pub/kde/stabl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove json (using YAJL instead)\n"
},
{
"from": "human",
"value": "unless ENV['CI']\n require 'simplecov'\n SimpleCov.start do\n add_group 'Tweetstream', 'lib/tweetstream'\n add_group 'Specs', 'spec'\n end\nend\n\nrequire 'tweetstream'\nrequire 'tweetstrea... | ruby | chosen |
[
{
"from": "human",
"value": "[Lock] Add specs for bundle lock\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"bundle lock\" do\n def strip_lockfile(lockfile)\n strip_whitespace(lockfile).sub(/\\n\\Z/, '')\n end\n\n def read_lockfile(file = \"Gemfile.lock\")\n stri... | ruby | chosen |
[
{
"from": "system",
"value": "Install info pages to correct place\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Gdbm <Formula\n url 'http://gnu.sixsigmaonline.org/gnu/gdbm/gdbm-1.8.3.tar.gz'\n homepage 'http://www.gnu.org/software/gdbm/'\n md5 '1d1b1d5c0245b1c00aff92da751e9aa1... | ruby | chosen |
[
{
"from": "system",
"value": "Use doc formatter when running Doublespeak tests\n"
},
{
"from": "human",
"value": "require 'shoulda/matchers/doublespeak'\n\nPROJECT_ROOT = File.expand_path('../..', __FILE__)\n$LOAD_PATH << File.join(PROJECT_ROOT, 'lib')\n\nRSpec.configure do |config|\n config.or... | ruby | chosen |
[
{
"from": "system",
"value": "Add explicit dependency on sprockets.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sass/rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"sass-rails\"\n s.version = S... | ruby | chosen |
[
{
"from": "system",
"value": "Use vcr as a debug tool\n\n(force VCR to re-record a cassette on each request)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Pushwoosh do\n before do\n Pushwoosh.configure do |config|\n config.application = '5555-5555'\n config.a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in socket specs.\n"
},
{
"from": "human",
"value": "shared :pack_sockaddr_in do |cmd|\n describe \"Socket##{cmd}\" do\n\n it \"packs and unpacks\" do\n sockaddr_in = Socket.pack_sockaddr_in 0, ''\n Socket.unpack_sockaddr_in(sockaddr_in).should... | ruby | chosen |
[
{
"from": "system",
"value": "Patch posted_on date to check if it is blank before attempting to format it\n"
},
{
"from": "human",
"value": "module JobsHelper\n def job_creator_name(job)\n if job.user\n link_to(job.user.try(:name), directory_user_path(job.user))\n else\n \"Not d... | ruby | chosen |
[
{
"from": "system",
"value": "Change spec to accurantly reflect test\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/fixtures/procs.rb'\nrequire File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe \"Proc.new with an associated block\" do\n it \"returns a proc that re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix custom config file test."
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'command_helper'\n\ndescribe \"Invoking the 'mina' command in a project without a deploy.rb\" do\n before :each do\n Dir.chdir root('spec/fixtures/custom_file_env')\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add an event handler for UnknownEvent\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'discordrb/events/generic'\n\n# Event classes and handlers\nmodule Discordrb::Events\n # Event raised when any dispatch is received\n class RawEvent <... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more Regexp interpolation specs\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Regexps with interpolation\" do\n\n it \"allows interpolation of strings\" do\n str = \"foo|bar\"\n /#{str}/.s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Ruby source map mappings generation\n\n1. The code passed should have been the original code, but we only have access to the generated code\n\n2. The order was wrong, first it needs the generated offset and then the source one\n"
},
{
"from": "human",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Use 409 to indicate that interface might be outdated\n\nBecause invalid actions shouldn't be shown on the page.\n"
},
{
"from": "human",
"value": "class Projects::RunnerProjectsController < Projects::ApplicationController\n before_action :authorize_admin_build!\n\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature test for accessing MR created from fork\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature 'Merge request created from fork' do\n given(:user) { create(:user) }\n given(:project) { create(:project, :public) }\n given(:fork_project) { cre... | ruby | chosen |
[
{
"from": "system",
"value": "Update scientific name model spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe ScientificName do\n context 'all fields present' do\n let(:sn) { FactoryGirl.create(:zea_mays) }\n\n it 'should save a basic scientific name' do\n sn.... | ruby | chosen |
[
{
"from": "human",
"value": "Add acceptance tests for onedatastore type\n"
},
{
"from": "gpt",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'onedatastore type' do\n\n describe 'when creating datastore' do\n it 'should idempotently run' do\n pending 'Need fix'\n pp = <<-EO... | ruby | chosen |
[
{
"from": "system",
"value": "Fix load order for active_support\n\nhttps://github.com/rails/rails/issues/14664\n"
},
{
"from": "human",
"value": "require 'active_support/core_ext'\nrequire 'spyke/base'\nrequire 'spyke/middleware/rails_logger' if defined?(Rails)\nrequire 'spyke/version'\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Fix style issue identified by cookstyle\n\nSigned-off-by: Stuart Preston <1c8c08db85a36cc69d975124539be839dea91342@chef.io>\n"
},
{
"from": "human",
"value": "describe file('c:/windows/fonts/CodeNewRoman.otf') do\n it { should exist }\nend\n\ndescribe file('c:/windo... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the branch we're testing is on the 1st page!\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Download buttons in branches page', feature: true do\n given(:user) { create(:user) }\n given(:role) { :developer }\n given(:status) { 'suc... | ruby | chosen |
[
{
"from": "system",
"value": "Update assert_cmd_output helper to use Integer.upto instead of Kernel.loop\n"
},
{
"from": "human",
"value": "# A set of helpful methods and assertions for running tests.\n\nmodule TestHelper\n\n # Execute the given command in a shell.\n def execute_cmd(cmd)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a log-out step and expectation to log-in test\n"
},
{
"from": "human",
"value": "module QA\n context 'Manage', :smoke do\n describe 'basic user login' do\n it 'user logs in using basic credentials' do\n Runtime::Browser.visit(:gitlab, Page::Main:... | ruby | chosen |
[
{
"from": "system",
"value": "Disable auth checks for basic pages"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n\n def home\n end\n\n def error\n redirect_to root_path if flash.empty?\n end\nend\n"
},
{
"from": "gpt",
"value": "class PagesCont... | ruby | chosen |
[
{
"from": "system",
"value": "Use find_in_batches instead of destroy_all\n\ndestroy_all loads all records at once\n"
},
{
"from": "human",
"value": "# Mounted uploaders are destroyed by carrierwave's after_commit\n# hook. This hook fetches upload location (local vs remote) from\n# Upload model. ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec to 3.1\n- remove rspec-expectations\n- remove rspec-mocks"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pushwoosh/version'\n\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade multi_json to ~> 1.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"her/version\"\n\nGem::Specification.new do |s|\n s.name = \"her\"\n s.version = Her::VERSION\n s.author... | ruby | chosen |
[
{
"from": "system",
"value": "Replace the deprecated RedcarpetCompat instance\n"
},
{
"from": "human",
"value": "require \"github/markup/implementation\"\n\nmodule GitHub\n module Markup\n class Markdown < Implementation\n MARKDOWN_GEMS = {\n \"github/markdown\" => proc { |conten... | ruby | chosen |
[
{
"from": "system",
"value": "Update stages index migration batch size\n"
},
{
"from": "human",
"value": "class ScheduleStagesIndexMigration < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n MIGRATION = 'MigrateStageIndex'.freeze\n BATCH_SIZE = 200... | ruby | chosen |
[
{
"from": "system",
"value": "Move comment above require lines.\n\nSigned-off-by: Krzysztof Wilczynski <9bf091559fc98493329f7d619638c79e91ccf029@linux.com>\n"
},
{
"from": "human",
"value": "require 'facter'\nrequire 'facter/manufacturer'\n\n#\n# bios_and_system.rb\n#\n\nquery = {\n 'BIOS [Ii]n... | ruby | chosen |
[
{
"from": "system",
"value": "Set close-on-exec on lock file descriptors\n\nThe formula locks used by the installer and commands like link and\nunlink are backed by open files and flock(). The open file descriptors\nare thus leaked to any subprocesses. This can result in weird behavior\nin programs spawned ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the nil check to be true instead of false\n"
},
{
"from": "human",
"value": "module Discordrb::Events\n module Utility\n def matches_all(attributes, to_check, &block)\n # \"Zeroth\" case: attributes is nil\n return false unless attributes\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move syntax-error-fixing paren to the right place\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\ndescribe \"Resolving\" do\n\n before :each do\n @deps = []\n @index = an_awesome_index\n end\n\n it \"resolves\" ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the EE `rebase_commit_sha` migration back in its original location\n"
},
{
"from": "gpt",
"value": "# This migration is a duplicate of 20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb\n#\n# We backported this feature from EE using the same migration, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in OperationsWorker worker_roles\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::BaseManager::OperationsWorker::Runner < ::MiqQueueWorkerBase::Runner\n def worker_roles\n %w[ems_operations\"]\n end\n\n attr_reader :ems\n\n def after_ini... | ruby | chosen |
[
{
"from": "system",
"value": "Fix existing key logic in test suite\n"
},
{
"from": "human",
"value": "module Gitlab\n module Ci\n module Reports\n class TestSuite\n attr_reader :name\n attr_reader :test_cases\n attr_reader :total_time\n\n def initialize(name ... | ruby | chosen |
[
{
"from": "system",
"value": "Return repositories to which user is a member, not just owner\n"
},
{
"from": "human",
"value": "module Bitbucket\n class Client\n def initialize(options = {})\n @connection = Connection.new(options)\n end\n\n def issues(repo)\n path = \"/reposit... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in user activity debug log message\n"
},
{
"from": "human",
"value": "module Users\n class ActivityService\n def initialize(author, activity)\n @author = author.respond_to?(:user) ? author.user : author\n @activity = activity\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add chefspec test for push-options\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'openvpn::default' do\n let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) }\n\n it 'converges' do\n chef_run\n end\nend\n"
},
{
"... | ruby | chosen |
[
{
"from": "system",
"value": "Check if playback succeeded in capybara test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndef uploaded_file(path, type)\n ActionDispatch::Http::UploadedFile.new(\n :filename => File.basename(path),\n :tempfile => File.open(path),\n :type => ... | ruby | chosen |
[
{
"from": "system",
"value": "Change variable from 'application' to 'application_variables'\n"
},
{
"from": "human",
"value": "include_recipe 'aws'\n\nnode[:deploy].each do |app_name, deploy_config|\n aws_s3_file \"#{deploy_config[:deploy_to]}/current/config/apple_push_notification.pem\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the call we use\n"
},
{
"from": "human",
"value": "class Runner\n attr_accessor :project, :build\n @queue = :runner\n\n def self.perform(build_id)\n new(Build.find(build_id)).run\n end\n\n def initialize(build)\n @build = build\n @project = buil... | ruby | chosen |
[
{
"from": "system",
"value": "Add '.well-known' to the list of reserved namespaces\n\nSee https://gitlab.com/gitlab-org/gitlab-ce/issues/22759\n"
},
{
"from": "human",
"value": "# NamespaceValidator\n#\n# Custom validator for GitLab namespace values.\n#\n# Values are checked for formatting and e... | ruby | chosen |
[
{
"from": "system",
"value": "Use geocoding formatter on automatic geocoding\n"
},
{
"from": "human",
"value": "# encoding: UTF-8'\nclass AutomaticGeocoding < Sequel::Model\n\n one_to_one :table\n many_to_one :original_geocoding, class: :Geocoding\n\n def before_save\n super\n self.upda... | ruby | chosen |
[
{
"from": "system",
"value": "Add pending to feature spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Upload data after creating a new app' do\n background do\n @token = FactoryGirl.create(:welcome_token)\n end\n\n scenario 'upload data and sign in'\n visit wel... | ruby | chosen |
[
{
"from": "system",
"value": "Include missed helper in Environment Notification Plugin\n"
},
{
"from": "human",
"value": "class EnvironmentNotificationPluginPublicController < PublicController\n\n helper EnvironmentNotificationHelper\n\n def notifications_with_popup\n @hide_notifications = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use tenant to pre-set biller in new Invoices.\n"
},
{
"from": "human",
"value": "class InvoicesController < AuthorizedController\n public\n # Actions\n def new\n invoice_params = params[:invoice] || {}\n invoice_params.merge!(:company_id => current_user.per... | ruby | chosen |
[
{
"from": "system",
"value": "Return cached resource after setting it up"
},
{
"from": "human",
"value": "module CachedResource\n # The Model module is included in ActiveResource::Base and\n # provides methods to enable caching and manipulate the caching\n # configuration\n module Model\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a note about identity map usage.\n"
},
{
"from": "human",
"value": "module MongoMapper\n module Middleware\n class IdentityMap\n class Body\n def initialize(target, original)\n @target = target\n @original = original\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"current\" organization as default biller for invoices.\n"
},
{
"from": "human",
"value": "class InvoicesController < InheritedResources::Base\n # Responders\n respond_to :html, :js\n\n protected\n def collection\n @invoices ||= end_of_association_ch... | ruby | chosen |
[
{
"from": "system",
"value": "Change the log file store_dir to contain the object IDs\n"
},
{
"from": "human",
"value": "class LogFileUploader < CarrierWave::Uploader::Base\n storage :file\n\n def store_dir\n 'log_files/'\n end\n\n def cache_dir\n \"#{Rails.root}/tmp/uploads\"\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add opensource tag to FC071\n\nIf you're not opensource you really don't care about this rule.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "rule \"FC071\", \"Missing LICENSE file\" do\n tags %w{st... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for Swift 2 / iOS 9 / OS X 10.11\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'ReachabilitySwift'\n s.version = '1.1'\n s.homepage = 'https://github.com/ashleymills/Reachability.swift'\n s.authors = {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace empty strings with a constant\n"
},
{
"from": "human",
"value": "require 'delegate'\n\nmodule DidYouMean\n class ClassNameChecker\n include SpellCheckable\n attr_reader :class_name, :original_message\n\n def initialize(exception)\n @class_name... | ruby | chosen |
[
{
"from": "system",
"value": "Add Terence to the author list\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'bundler/version'\n\nGem::Specification.new do |s|\n s.name = \"bundle... | ruby | chosen |
[
{
"from": "system",
"value": "Modify subject of emails sent about jobs\n"
},
{
"from": "human",
"value": "class JobMailer < ApplicationMailer\n add_template_helper(JobsHelper)\n\n def new_job(job_id)\n @job = Job.find(job_id)\n\n subject = \"[MENAdevs] Someone posted a new job\"\n\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the protected branches factory.\n\n1. Previously, we were using `after_create` to create access levels.\n\n2. At the time of protected branch creation, there are _no_ access\n levels present, which is invalid, and creation fails.\n\n3. Fixed by setting access levels befor... | ruby | chosen |
[
{
"from": "system",
"value": "Build a employment when none exists on the edit action.\n"
},
{
"from": "human",
"value": "class EmployeesController < PeopleController\n defaults :resource_class => Employee\n\n def new\n @employee = Employee.new(params[:employee])\n\n @employee.build_vcard... | ruby | chosen |
[
{
"from": "system",
"value": "Order translation groups by name\n"
},
{
"from": "human",
"value": "require 'active_record'\n\nmodule I18n\n module Backend\n class Releaf\n class TranslationGroup < ::ActiveRecord::Base\n\n self.table_name = \"releaf_translation_groups\"\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Back-In-Time to v. 2.3.0 and add link\n"
},
{
"from": "human",
"value": "class BackInTime < Cask\n url 'http://www.tri-edre.com/pub/files/backintime203.dmg'\n homepage 'http://www.tri-edre.fr/english/backintime.html'\n version '2.0.3'\n sha1 '3c30818d789f... | ruby | chosen |
[
{
"from": "system",
"value": "Remove trailing slash when getting mirrors\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'yaml/store'\n\nmodule Braid\n class Config\n class PathAlreadyInUse < BraidError\n end\n class MirrorDoesNotExist < BraidError\n end\n\n def initia... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic implementation of find-route command\n\nThis command allows to retrieve all the URLs associated with a given controller or controller action.\nUse like: find-route MyController OR find-route MyController#show\n"
},
{
"from": "gpt",
"value": "class PryRails... | ruby | chosen |
[
{
"from": "system",
"value": "Add license sepcification for RubyGems.org\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire_relative 'lib/jrubyfx/version'\n\n# This must be assigned to the global spec variable as its relied upon in the Rakefile.\n$spec = Gem::Specification.new... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debug statement from admin/topics test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"topics\" do\n let(:forum) { Factory(:forum) }\n let(:topic) { Factory(:topic, :forum => forum) }\n\n before do\n sign_in! :admin => true\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bignum specs for 64bit Fixnum bounds\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe \"Bignum\" do\n platform_is :wordsize => 32 do\n it \"has positive threshold value 2 ** 30\" do\n max = 2 ** 30\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update test expectations to account for new verbose-mode string escaping.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'command_helper'\n\ndescribe \"Invoking the 'mina' command in a project\" do\n before :each do\n Dir.chdir root('test_env'... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default avatar image in search autocomplete\n"
},
{
"from": "human",
"value": "json.posts do |json|\n json.array! @posts do |post|\n json.id post.id\n json.title truncate(post.title, length: 48)\n json.avatar_url post.user.avatar_url.present? ? post.us... | ruby | chosen |
[
{
"from": "system",
"value": "Fix conflicting variable name that was causing an infinite loop"
},
{
"from": "human",
"value": "# encoding: UTF-8\nmodule MongoMapper\n module Plugins\n module EmbeddedCallbacks\n def self.configure(model)\n model.class_eval do\n extend ::... | ruby | chosen |
[
{
"from": "system",
"value": "Replace @@main_class through class instance variable\n"
},
{
"from": "human",
"value": "require 'shellwords'\nrequire 'stringio'\nrequire 'aruba/processes/basic_process'\n\nmodule Aruba\n module Processes\n class InProcess < BasicProcess\n class FakeKernel\... | ruby | chosen |
[
{
"from": "human",
"value": "Add Xmarks for Safari cask\n"
},
{
"from": "gpt",
"value": "class XmarksSafari < Cask\n url 'https://static.xmarks.com/clients/safari/xmarks_for_safari_2.0.11.dmg'\n homepage 'http://www.xmarks.com/'\n version '2.0.11'\n sha1 'eae9ce0865bf1d4a3e6a2ff020793b36efdf1b51... | ruby | chosen |
[
{
"from": "system",
"value": "Remove cache directories from vagrant NFS sync"
},
{
"from": "human",
"value": "Badgiy::Application.configure do\n config.action_controller.perform_caching = false\n config.action_dispatch.best_standards_support = :builtin\n config.action_mailer.delivery_method =... | ruby | chosen |
[
{
"from": "system",
"value": "Add ~encoding tag to cucumber to only run tests for Encoding on platforms which support it\n"
},
{
"from": "human",
"value": "require 'rubygems' unless defined?(Gem)\nrequire 'rake'\nrequire 'cucumber/rake/task'\nrequire 'yard'\n\nrequire 'bundler'\nBundler::GemHelp... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Make sure Firefox shutdown happens even if the RPC fails.\n\nr16693\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n module Firefox\n\n # @api private\n class Bridge < Remote::Bridge\n\n def initialize(opts = {... | ruby | chosen |
[
{
"from": "system",
"value": "Add an explicit check for MRI, don't define TS::Array or TS::Hash for other platforms.\n"
},
{
"from": "human",
"value": "require 'thread_safe/version'\n\nmodule ThreadSafe\n autoload :Cache, 'thread_safe/cache'\n \n if defined?(JRUBY_VERSION)\n require 'jruby... | ruby | chosen |
[
{
"from": "system",
"value": "Make pandoc filter more robust\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass Nanoc::Filters::PandocTest < Nanoc::TestCase\n\n def test_filter\n if_have 'pandoc-ruby' do\n if `which pandoc`.strip.empty?\n skip \"could not find pandoc\"... | ruby | chosen |
[
{
"from": "system",
"value": "Return true if to_salary is blank\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 salary\") unl... | ruby | chosen |
[
{
"from": "system",
"value": "Order Day by descending date by default.\n"
},
{
"from": "human",
"value": "class Day < ActiveRecord::Base\n # Associations\n validates_date :date\n\n after_update :create_bookings\n \n private\n def create_bookings\n BookingTemplate.create_booking('day:cas... | ruby | chosen |
[
{
"from": "system",
"value": "Use a better name than 'sensitiveness' (What does it mean?)\n"
},
{
"from": "human",
"value": "require \"text\"\n\nmodule DidYouMean\n class MethodMatcher\n attr_reader :method_collection, :target_method\n\n def initialize(method_collection, target_method)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the Firefox Nightly URL\n"
},
{
"from": "human",
"value": "cask :v1 => 'firefox-nightly' do\n version '45.0a1'\n sha256 :no_check # required as upstream package is updated in-place\n\n url \"https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-tr... | ruby | chosen |
[
{
"from": "system",
"value": "Update Yummy FTP.app to v1.11.4\n"
},
{
"from": "human",
"value": "cask 'yummy-ftp' do\n version '1.11.3'\n sha256 '2448966d12c2a97eab79b49426c8771e231e770bdc1fb317772e9b9b2f0aadef'\n\n url 'http://www.yummysoftware.com/downloads/YummyFTP.zip'\n appcast 'http://... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.