repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/env_spec.rb | spec/bundler/env_spec.rb | # frozen_string_literal: true
require "openssl"
require "bundler/settings"
RSpec.describe Bundler::Env do
let(:git_proxy_stub) { Bundler::Source::Git::GitProxy.new(nil, nil, nil) }
describe "#report" do
it "prints the environment" do
out = described_class.report
expect(out).to include("Environme... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/ui_spec.rb | spec/bundler/ui_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::UI do
describe Bundler::UI::Silent do
it "has the same instance methods as Shell" do
shell = Bundler::UI::Shell
methods = proc do |cls|
cls.instance_methods.map do |i|
m = shell.instance_method(i)
[i, m.parameters]
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/bundler_spec.rb | spec/bundler/bundler_spec.rb | # frozen_string_literal: true
require "bundler"
require "tmpdir"
RSpec.describe Bundler do
describe "#load_gemspec_uncached" do
let(:app_gemspec_path) { tmp("test.gemspec") }
subject { Bundler.load_gemspec_uncached(app_gemspec_path) }
context "with incorrect YAML file" do
before do
File.o... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/cli_spec.rb | spec/bundler/cli_spec.rb | # frozen_string_literal: true
require "bundler/cli"
RSpec.describe "bundle executable" do
it "returns non-zero exit status when passed unrecognized options" do
bundle "--invalid_argument"
expect(exitstatus).to_not be_zero if exitstatus
end
it "returns non-zero exit status when passed unrecognized task"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/worker_spec.rb | spec/bundler/worker_spec.rb | # frozen_string_literal: true
require "bundler/worker"
RSpec.describe Bundler::Worker do
let(:size) { 5 }
let(:name) { "Spec Worker" }
let(:function) { proc {|object, worker_number| [object, worker_number] } }
subject { described_class.new(size, name, function) }
after { subject.stop }
describe "#initia... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/lockfile_parser_spec.rb | spec/bundler/lockfile_parser_spec.rb | # frozen_string_literal: true
require "bundler/lockfile_parser"
RSpec.describe Bundler::LockfileParser do
let(:lockfile_contents) { strip_whitespace(<<-L) }
GIT
remote: https://github.com/alloy/peiji-san.git
revision: eca485d8dc95f12aaec1a434b49d295c7e91844b
specs:
peiji-san (1.2.0)
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/settings_spec.rb | spec/bundler/settings_spec.rb | # frozen_string_literal: true
require "bundler/settings"
RSpec.describe Bundler::Settings do
subject(:settings) { described_class.new(bundled_app) }
describe "#set_local" do
context "when the local config file is not found" do
subject(:settings) { described_class.new(nil) }
it "raises a GemfileN... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/definition_spec.rb | spec/bundler/definition_spec.rb | # frozen_string_literal: true
require "bundler/definition"
RSpec.describe Bundler::Definition do
describe "#lock" do
before do
allow(Bundler).to receive(:settings) { Bundler::Settings.new(".") }
allow(Bundler::SharedHelpers).to receive(:find_gemfile) { Pathname.new("Gemfile") }
allow(Bundler).... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin_spec.rb | spec/bundler/plugin_spec.rb | # frozen_string_literal: true
require_relative "../support/streams"
RSpec.describe Bundler::Plugin do
Plugin = Bundler::Plugin
let(:installer) { double(:installer) }
let(:index) { double(:index) }
let(:spec) { double(:spec) }
let(:spec2) { double(:spec2) }
before do
build_lib "new-plugin", :path => ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/endpoint_specification_spec.rb | spec/bundler/endpoint_specification_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::EndpointSpecification do
let(:name) { "foo" }
let(:version) { "1.0.0" }
let(:platform) { Gem::Platform::RUBY }
let(:dependencies) { [] }
let(:metadata) { nil }
subject(:spec) { described_class.new(name, version, platform, dependenc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher_spec.rb | spec/bundler/fetcher_spec.rb | # frozen_string_literal: true
require "bundler/fetcher"
RSpec.describe Bundler::Fetcher do
let(:uri) { Bundler::URI("https://example.com") }
let(:remote) { double("remote", :uri => uri, :original_uri => nil) }
subject(:fetcher) { Bundler::Fetcher.new(remote) }
before do
allow(Bundler).to receive(:root) ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/version_ranges_spec.rb | spec/bundler/version_ranges_spec.rb | # frozen_string_literal: true
require "bundler/version_ranges"
RSpec.describe Bundler::VersionRanges do
describe ".empty?" do
shared_examples_for "empty?" do |exp, *req|
it "returns #{exp} for #{req}" do
r = Gem::Requirement.new(*req)
ranges = described_class.for(r)
expect(describe... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source_list_spec.rb | spec/bundler/source_list_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::SourceList do
before do
allow(Bundler).to receive(:root) { Pathname.new "./tmp/bundled_app" }
stub_const "ASourcePlugin", Class.new(Bundler::Plugin::API)
ASourcePlugin.source "new_source"
allow(Bundler::Plugin).to receive(:source?).with("new_sour... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/build_metadata_spec.rb | spec/bundler/build_metadata_spec.rb | # frozen_string_literal: true
require "bundler"
require "bundler/build_metadata"
RSpec.describe Bundler::BuildMetadata do
before do
allow(Time).to receive(:now).and_return(Time.at(0))
Bundler::BuildMetadata.instance_variable_set(:@built_at, nil)
end
describe "#built_at" do
it "returns %Y-%m-%d form... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/psyched_yaml_spec.rb | spec/bundler/psyched_yaml_spec.rb | # frozen_string_literal: true
require "bundler/psyched_yaml"
RSpec.describe "Bundler::YamlLibrarySyntaxError" do
it "is raised on YAML parse errors" do
expect { YAML.parse "{foo" }.to raise_error(Bundler::YamlLibrarySyntaxError)
end
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/uri_credentials_filter_spec.rb | spec/bundler/uri_credentials_filter_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::URICredentialsFilter do
subject { described_class }
describe "#credential_filtered_uri" do
shared_examples_for "original type of uri is maintained" do
it "maintains same type for return value as uri input type" do
expect(subject.credential_fi... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/index_spec.rb | spec/bundler/index_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Index do
let(:specs) { [] }
subject { described_class.build {|i| i.use(specs) } }
context "specs with a nil platform" do
let(:spec) do
Gem::Specification.new do |s|
s.name = "json"
s.version = "1.8.3"
allow(s).to receive(:pl... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/vendored_persistent_spec.rb | spec/bundler/vendored_persistent_spec.rb | # frozen_string_literal: true
require "bundler/vendored_persistent"
RSpec.describe Bundler::PersistentHTTP do
describe "#warn_old_tls_version_rubygems_connection" do
let(:uri) { "https://index.rubygems.org" }
let(:connection) { instance_double(Bundler::Persistent::Net::HTTP::Persistent::Connection) }
le... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/ruby_version_spec.rb | spec/bundler/ruby_version_spec.rb | # frozen_string_literal: true
require "bundler/ruby_version"
RSpec.describe "Bundler::RubyVersion and its subclasses" do
let(:version) { "2.0.0" }
let(:patchlevel) { "645" }
let(:engine) { "jruby" }
let(:engine_version) { "2.0.1" }
describe Bundler::RubyVersion do... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/spec_set_spec.rb | spec/bundler/spec_set_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::SpecSet do
let(:specs) do
[
build_spec("a", "1.0"),
build_spec("b", "1.0"),
build_spec("c", "1.1") do |s|
s.dep "a", "< 2.0"
s.dep "e", "> 0"
end,
build_spec("d", "2.0") do |s|
s.dep "a", "1.0"
s.d... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/shared_helpers_spec.rb | spec/bundler/shared_helpers_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::SharedHelpers do
let(:ext_lock_double) { double(:ext_lock) }
before do
pwd_stub
allow(Bundler.rubygems).to receive(:ext_lock).and_return(ext_lock_double)
allow(ext_lock_double).to receive(:synchronize) {|&block| block.call }
end
let(:pwd_stub)... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/rubygems_integration_spec.rb | spec/bundler/rubygems_integration_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::RubygemsIntegration do
it "uses the same chdir lock as rubygems" do
expect(Bundler.rubygems.ext_lock).to eq(Gem::Ext::Builder::CHDIR_MONITOR)
end
context "#validate" do
let(:spec) do
Gem::Specification.new do |s|
s.name = "to-validate"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/ruby_dsl_spec.rb | spec/bundler/ruby_dsl_spec.rb | # frozen_string_literal: true
require "bundler/ruby_dsl"
RSpec.describe Bundler::RubyDsl do
class MockDSL
include Bundler::RubyDsl
attr_reader :ruby_version
end
let(:dsl) { MockDSL.new }
let(:ruby_version) { "2.0.0" }
let(:version) { "2.0.0" }
let(:engine) { "jruby" }
let(:engine_version) { "9... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/compact_index_client/gem_parser_spec.rb | spec/bundler/compact_index_client/gem_parser_spec.rb | # frozen_string_literal: true
require "bundler/compact_index_client/gem_parser"
RSpec.describe Bundler::CompactIndexClient::GemParser do
def parse(line)
parser = Bundler::CompactIndexClient::GemParser.new
parser.parse(line)
end
context "platform" do
it "existent" do
checksum = "d5956d2bcb509a... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/compact_index_client/updater_spec.rb | spec/bundler/compact_index_client/updater_spec.rb | # frozen_string_literal: true
require "net/http"
require "bundler/compact_index_client"
require "bundler/compact_index_client/updater"
RSpec.describe Bundler::CompactIndexClient::Updater do
let(:fetcher) { double(:fetcher) }
let(:local_path) { Pathname("/tmp/localpath") }
let(:remote_path) { double(:remote_path... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/api_spec.rb | spec/bundler/plugin/api_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::API do
context "plugin declarations" do
before do
stub_const "UserPluginClass", Class.new(Bundler::Plugin::API)
end
describe "#command" do
it "declares a command plugin with same class as handler" do
expect(Bundler::Plugin... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/dsl_spec.rb | spec/bundler/plugin/dsl_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::DSL do
DSL = Bundler::Plugin::DSL
subject(:dsl) { Bundler::Plugin::DSL.new }
before do
allow(Bundler).to receive(:root) { Pathname.new "/" }
end
describe "it ignores only the methods defined in Bundler::Dsl" do
it "doesn't raises error ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/source_list_spec.rb | spec/bundler/plugin/source_list_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::SourceList do
SourceList = Bundler::Plugin::SourceList
before do
allow(Bundler).to receive(:root) { Pathname.new "/" }
end
subject(:source_list) { SourceList.new }
describe "adding sources uses classes for plugin" do
it "uses Plugin::In... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/events_spec.rb | spec/bundler/plugin/events_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::Events do
context "plugin events" do
before { Bundler::Plugin::Events.send :reset }
describe "#define" do
it "raises when redefining a constant" do
Bundler::Plugin::Events.send(:define, :TEST_EVENT, "foo")
expect do
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/index_spec.rb | spec/bundler/plugin/index_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::Index do
Index = Bundler::Plugin::Index
before do
allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
gemfile ""
path = lib_path(plugin_name)
index.register_plugin("new-plugin", path.to_s, [path.join(... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/installer_spec.rb | spec/bundler/plugin/installer_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::Installer do
subject(:installer) { Bundler::Plugin::Installer.new }
describe "cli install" do
it "uses Gem.sources when non of the source is provided" do
sources = double(:sources)
Bundler.settings # initialize it before we have to touc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/plugin/api/source_spec.rb | spec/bundler/plugin/api/source_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Plugin::API::Source do
let(:uri) { "uri://to/test" }
let(:type) { "spec_type" }
subject(:source) do
klass = Class.new
klass.send :include, Bundler::Plugin::API::Source
klass.new("uri" => uri, "type" => type)
end
describe "attributes" do
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/settings/validator_spec.rb | spec/bundler/settings/validator_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Settings::Validator do
describe ".validate!" do
def validate!(key, value, settings)
transformed_key = Bundler.settings.key_for(key)
if value.nil?
settings.delete(transformed_key)
else
settings[transformed_key] = value
e... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher/downloader_spec.rb | spec/bundler/fetcher/downloader_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Fetcher::Downloader do
let(:connection) { double(:connection) }
let(:redirect_limit) { 5 }
let(:uri) { Bundler::URI("http://www.uri-to-fetch.com/api/v2/endpoint") }
let(:options) { double(:options) }
subject { described_class.new(co... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher/dependency_spec.rb | spec/bundler/fetcher/dependency_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Fetcher::Dependency do
let(:downloader) { double(:downloader) }
let(:remote) { double(:remote, :uri => Bundler::URI("http://localhost:5000")) }
let(:display_uri) { "http://sample_uri.com" }
subject { described_class.new(downloader, remote, display_ur... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher/compact_index_spec.rb | spec/bundler/fetcher/compact_index_spec.rb | # frozen_string_literal: true
# load CompactIndexClient upfront to prevent thread safety issues during parallel specs
require "bundler/compact_index_client"
RSpec.describe Bundler::Fetcher::CompactIndex do
let(:downloader) { double(:downloader) }
let(:display_uri) { Bundler::URI("http://sampleuri.com") }
let(:... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher/base_spec.rb | spec/bundler/fetcher/base_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Fetcher::Base do
let(:downloader) { double(:downloader) }
let(:remote) { double(:remote) }
let(:display_uri) { "http://sample_uri.com" }
class TestClass < described_class; end
subject { TestClass.new(downloader, remote, display_uri) }
describe ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/fetcher/index_spec.rb | spec/bundler/fetcher/index_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Fetcher::Index do
let(:downloader) { nil }
let(:remote) { nil }
let(:display_uri) { "http://sample_uri.com" }
let(:rubygems) { double(:rubygems) }
let(:gem_names) { %w[foo bar] }
subject { described_class.new(downloader, remote, display_uri)... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source/path_spec.rb | spec/bundler/source/path_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Source::Path do
before do
allow(Bundler).to receive(:root) { Pathname.new("root") }
end
describe "#eql?" do
subject { described_class.new("path" => "gems/a") }
context "with two equivalent relative paths from different roots" do
let(:a_gem... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source/git_spec.rb | spec/bundler/source/git_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Source::Git do
before do
allow(Bundler).to receive(:root) { Pathname.new("root") }
end
let(:uri) { "https://github.com/foo/bar.git" }
let(:options) do
{ "uri" => uri }
end
subject { described_class.new(options) }
describe "#to_s" do
it ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source/rubygems_spec.rb | spec/bundler/source/rubygems_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Source::Rubygems do
before do
allow(Bundler).to receive(:root) { Pathname.new("root") }
end
describe "caches" do
it "includes Bundler.app_cache" do
expect(subject.caches).to include(Bundler.app_cache)
end
it "includes GEM_PATH entries"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source/git/git_proxy_spec.rb | spec/bundler/source/git/git_proxy_spec.rb | # frozen_string_literal: true
RSpec.describe Bundler::Source::Git::GitProxy do
let(:path) { Pathname("path") }
let(:uri) { "https://github.com/bundler/bundler.git" }
let(:ref) { "HEAD" }
let(:revision) { nil }
let(:git_source) { nil }
subject { described_class.new(path, uri, ref, revision, git_source) }
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source/rubygems/remote_spec.rb | spec/bundler/source/rubygems/remote_spec.rb | # frozen_string_literal: true
require "bundler/source/rubygems/remote"
RSpec.describe Bundler::Source::Rubygems::Remote do
def remote(uri)
Bundler::Source::Rubygems::Remote.new(uri)
end
before do
allow(Digest(:MD5)).to receive(:hexdigest).with(duck_type(:to_s)) {|string| "MD5HEX(#{string})" }
end
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/ui/shell_spec.rb | spec/bundler/ui/shell_spec.rb | # frozen_string_literal: true
require_relative "../../support/streams"
RSpec.describe Bundler::UI::Shell do
subject { described_class.new }
before { subject.level = "debug" }
describe "#info" do
before { subject.level = "info" }
it "prints to stdout" do
expect { subject.info("info") }.to output(... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/installer/spec_installation_spec.rb | spec/bundler/installer/spec_installation_spec.rb | # frozen_string_literal: true
require "bundler/installer/parallel_installer"
RSpec.describe Bundler::ParallelInstaller::SpecInstallation do
let!(:dep) do
a_spec = Object.new
def a_spec.name
"I like tests"
end
a_spec
end
describe "#ready_to_enqueue?" do
context "when in enqueued state"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/installer/parallel_installer_spec.rb | spec/bundler/installer/parallel_installer_spec.rb | # frozen_string_literal: true
require "bundler/installer/parallel_installer"
RSpec.describe Bundler::ParallelInstaller do
let(:installer) { instance_double("Installer") }
let(:all_specs) { [] }
let(:size) { 1 }
let(:standalone) { false }
let(:force) { false }
subject { described_class.new(installer, all_... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/installer/gem_installer_spec.rb | spec/bundler/installer/gem_installer_spec.rb | # frozen_string_literal: true
require "bundler/installer/gem_installer"
RSpec.describe Bundler::GemInstaller do
let(:installer) { instance_double("Installer") }
let(:spec_source) { instance_double("SpecSource") }
let(:spec) { instance_double("Specification", :name => "dummy", :version => "0.0.1", :loaded_from =... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/other/major_deprecation_spec.rb | spec/other/major_deprecation_spec.rb | # frozen_string_literal: true
RSpec.describe "major deprecations" do
let(:warnings) { err }
describe "Bundler" do
before do
install_gemfile! <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
end
describe ".clean_env" do
before do
source = "Bundler.clean_e... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/other/cli_dispatch_spec.rb | spec/other/cli_dispatch_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle command names" do
it "work when given fully" do
bundle "install"
expect(err).to eq("Could not locate Gemfile")
expect(last_command.stdboth).not_to include("Ambiguous command")
end
it "work when not ambiguous" do
bundle "ins"
expect(err).to... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/other/ext_spec.rb | spec/other/ext_spec.rb | # frozen_string_literal: true
RSpec.describe "Gem::Specification#match_platform" do
it "does not match platforms other than the gem platform" do
darwin = gem "lol", "1.0", "platform_specific-1.0-x86-darwin-10"
expect(darwin.match_platform(pl("java"))).to eq(false)
end
context "when platform is a string"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/other/platform_spec.rb | spec/other/platform_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle platform" do
context "without flags" do
let(:bundle_platform_platforms_string) do
local_platforms.reverse.map {|pl| "* #{pl}" }.join("\n")
end
it "returns all the output" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/path_spec.rb | spec/install/path_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
describe "with --path" do
before :each do
build_gem "rack", "1.0.0", :to_system => true do |s|
s.write "lib/rack.rb", "puts 'FAIL'"
end
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/deploy_spec.rb | spec/install/deploy_spec.rb | # frozen_string_literal: true
RSpec.describe "install with --deployment or --frozen" do
before do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
end
context "with CLI flags", :bundler => "< 3" do
it "fails without a lockfile and says that --deployment requires a lock" do
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemspecs_spec.rb | spec/install/gemspecs_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
describe "when a gem has a YAML gemspec" do
before :each do
build_repo2 do
build_gem "yaml_spec", :gemspec => :yaml
end
end
it "still installs correctly" do
gemfile <<-G
source "#{file_uri_for(gem_repo2)}"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/failure_spec.rb | spec/install/failure_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
context "installing a gem fails" do
it "prints out why that gem was being installed" do
build_repo2 do
build_gem "activesupport", "2.3.2" do |s|
s.extensions << "Rakefile"
s.write "Rakefile", <<-RUBY
ta... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/prereleases_spec.rb | spec/install/prereleases_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
describe "when prerelease gems are available" do
it "finds prereleases" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "not_released"
G
expect(the_bundle).to include_gems "not_released 1.0.pre"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/git_spec.rb | spec/install/git_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
context "git sources" do
it "displays the revision hash of the gem repository", :bundler => "< 3" do
build_git "foo", "1.0", :path => lib_path("foo")
install_gemfile! <<-G
gem "foo", :git => "#{file_uri_for(lib_path("foo"))}"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile_spec.rb | spec/install/gemfile_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
context "with duplicated gems" do
it "will display a warning" do
install_gemfile <<-G
gem 'rails', '~> 4.0.0'
gem 'rails', '~> 4.0.0'
G
expect(err).to include("more than once")
end
end
context "with --gemf... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/bundler_spec.rb | spec/install/bundler_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
describe "with bundler dependencies" do
before(:each) do
build_repo2 do
build_gem "rails", "3.0" do |s|
s.add_dependency "bundler", ">= 0.9.0.pre"
end
build_gem "bundler", "0.9.1"
build_gem "bundler",... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/global_cache_spec.rb | spec/install/global_cache_spec.rb | # frozen_string_literal: true
RSpec.describe "global gem caching" do
before { bundle! "config set global_gem_cache true" }
describe "using the cross-application user cache" do
let(:source) { "http://localgemserver.test" }
let(:source2) { "http://gemserver.example.org" }
def source_global_cache(*segm... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/security_policy_spec.rb | spec/install/security_policy_spec.rb | # frozen_string_literal: true
require "rubygems/security"
# unfortunately, testing signed gems with a provided CA is extremely difficult
# as 'gem cert' is currently the only way to add CAs to the system.
RSpec.describe "policies with unsigned gems" do
before do
build_security_repo
gemfile <<-G
sourc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/allow_offline_install_spec.rb | spec/install/allow_offline_install_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with :allow_offline_install" do
before do
bundle "config set allow_offline_install true"
end
context "with no cached data locally" do
it "still installs" do
skip "corrupt test gem" if Gem.win_platform?
install_gemfile! <<-G, :arti... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/binstubs_spec.rb | spec/install/binstubs_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
describe "when system_bindir is set" do
# On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if
# you want to avoid sudo installs for system gems with OS X's default ruby
it "overrides Gem.bindir" do
expect(Pathname.... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/redownload_spec.rb | spec/install/redownload_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
before :each do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
end
shared_examples_for "an option to force redownloading gems" do
it "re-installs installed gems" do
rack_lib = default_bundle_path("gems/... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/yanked_spec.rb | spec/install/yanked_spec.rb | # frozen_string_literal: true
RSpec.context "when installing a bundle that includes yanked gems" do
before(:each) do
build_repo4 do
build_gem "foo", "9.0.0"
end
end
it "throws an error when the original gem version is yanked" do
lockfile <<-L
GEM
remote: #{file_uri_for(gem_repo... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/process_lock_spec.rb | spec/install/process_lock_spec.rb | # frozen_string_literal: true
RSpec.describe "process lock spec" do
describe "when an install operation is already holding a process lock" do
before { FileUtils.mkdir_p(default_bundle_path) }
it "will not run a second concurrent bundle install until the lock is released" do
thread = Thread.new do
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/path_spec.rb | spec/install/gemfile/path_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with explicit source paths" do
it "fetches gems with a global path source", :bundler => "< 3" do
build_lib "foo"
install_gemfile <<-G
path "#{lib_path("foo-1.0")}"
gem 'foo'
G
expect(the_bundle).to include_gems("foo 1.0")
en... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/groups_spec.rb | spec/install/gemfile/groups_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with groups" do
describe "installing with no options" do
before :each do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
group :emo do
gem "activesupport", "2.3.5"
end
gem "thi... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/ruby_spec.rb | spec/install/gemfile/ruby_spec.rb | # frozen_string_literal: true
RSpec.describe "ruby requirement" do
def locked_ruby_version
Bundler::RubyVersion.from_string(Bundler::LockfileParser.new(File.read(bundled_app_lock)).ruby_version)
end
# As discovered by https://github.com/rubygems/bundler/issues/4147, there is
# no test coverage to ensure t... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/install_if.rb | spec/install/gemfile/install_if.rb | # frozen_string_literal: true
describe "bundle install with install_if conditionals" do
it "follows the install_if DSL" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
install_if(lambda { true }) do
gem "activesupport", "2.3.5"
end
gem "thin", :install_if => false
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/git_spec.rb | spec/install/gemfile/git_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with git sources" do
describe "when floating on master" do
before :each do
build_git "foo" do |s|
s.executables = "foobar"
end
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
git "#{lib_path("foo-1.0"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | true |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/gemspec_spec.rb | spec/install/gemfile/gemspec_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install from an existing gemspec" do
before(:each) do
build_repo2 do
build_gem "bar"
build_gem "bar-dev"
end
end
it "should install runtime and development dependencies" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.writ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/sources_spec.rb | spec/install/gemfile/sources_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with gems on multiple sources" do
# repo1 is built automatically before all of the specs run
# it contains rack-obama 1.0.0 and rack 0.9.1 & 1.0.0 amongst other gems
context "without source affinity" do
before do
# Oh no! Someone evil is try... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/specific_platform_spec.rb | spec/install/gemfile/specific_platform_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with specific_platform enabled" do
before do
bundle "config set specific_platform true"
build_repo2 do
build_gem("google-protobuf", "3.0.0.alpha.5.0.5.1")
build_gem("google-protobuf", "3.0.0.alpha.5.0.5.1") {|s| s.platform = "x86_64-li... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/lockfile_spec.rb | spec/install/gemfile/lockfile_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with a lockfile present" do
let(:gf) { <<-G }
source "#{file_uri_for(gem_repo1)}"
gem "rack", "1.0.0"
G
subject do
install_gemfile(gf)
end
context "gemfile evaluation" do
let(:gf) { super() + "\n\n File.open('evals', 'a') {|f| f ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/eval_gemfile_spec.rb | spec/install/gemfile/eval_gemfile_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with gemfile that uses eval_gemfile" do
before do
build_lib("gunks", :path => bundled_app.join("gems/gunks")) do |s|
s.name = "gunks"
s.version = "0.0.1"
end
end
context "eval-ed Gemfile points to an internal gemspec" do
bef... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gemfile/platform_spec.rb | spec/install/gemfile/platform_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install across platforms" do
it "maintains the same lockfile if all gems are compatible across platforms" do
lockfile <<-G
GEM
remote: #{file_uri_for(gem_repo1)}/
specs:
rack (0.9.1)
PLATFORMS
#{not_local}
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/mirror_spec.rb | spec/install/gems/mirror_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with a mirror configured" do
describe "when the mirror does not match the gem source" do
before :each do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
bundle "config set --local mirror.http://gems.exam... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/sudo_spec.rb | spec/install/gems/sudo_spec.rb | # frozen_string_literal: true
RSpec.describe "when using sudo", :sudo => true do
describe "and BUNDLE_PATH is writable" do
context "but BUNDLE_PATH/build_info is not writable" do
let(:subdir) do
system_gem_path("cache")
end
before do
bundle! "config set path.system true"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/flex_spec.rb | spec/install/gems/flex_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle flex_install" do
it "installs the gems as expected" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem 'rack'
G
expect(the_bundle).to include_gems "rack 1.0.0"
expect(the_bundle).to be_locked
end
it "installs even whe... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/env_spec.rb | spec/install/gems/env_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with ENV conditionals" do
describe "when just setting an ENV key as a string" do
before :each do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
env "BUNDLER_TEST" do
gem "rack"
end
G
end
it "exc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/dependency_api_spec.rb | spec/install/gems/dependency_api_spec.rb | # frozen_string_literal: true
RSpec.describe "gemcutter's dependency API" do
let(:source_hostname) { "localgemserver.test" }
let(:source_uri) { "http://#{source_hostname}" }
it "should use the API" do
skip "artifice issues?" if Gem.win_platform?
gemfile <<-G
source "#{source_uri}"
gem "rack... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/compact_index_spec.rb | spec/install/gems/compact_index_spec.rb | # frozen_string_literal: true
RSpec.describe "compact index api" do
let(:source_hostname) { "localgemserver.test" }
let(:source_uri) { "http://#{source_hostname}" }
it "should use the API" do
skip "artifice issues?" if Gem.win_platform?
gemfile <<-G
source "#{source_uri}"
gem "rack"
G
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/standalone_spec.rb | spec/install/gems/standalone_spec.rb | # frozen_string_literal: true
RSpec.shared_examples "bundle install --standalone" do
shared_examples "common functionality" do
it "still makes the gems available to normal bundler" do
args = expected_gems.map {|k, v| "#{k} #{v}" }
expect(the_bundle).to include_gems(*args)
end
it "generates a... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/native_extensions_spec.rb | spec/install/gems/native_extensions_spec.rb | # frozen_string_literal: true
RSpec.describe "installing a gem with native extensions", :ruby_repo do
it "installs" do
build_repo2 do
build_gem "c_extension" do |s|
s.extensions = ["ext/extconf.rb"]
s.write "ext/extconf.rb", <<-E
require "mkmf"
name = "c_extension_bundle... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/post_install_spec.rb | spec/install/gems/post_install_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install" do
context "with gem sources" do
context "when gems include post install messages" do
it "should display the post-install messages after installing" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem 'rack'
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/win32_spec.rb | spec/install/gems/win32_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with win32-generated lockfile" do
it "should read lockfile" do
File.open(bundled_app_lock, "wb") do |f|
f << "GEM\r\n"
f << " remote: #{file_uri_for(gem_repo1)}/\r\n"
f << " specs:\r\n"
f << "\r\n"
f << " rack (1.0.0)... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/install/gems/resolving_spec.rb | spec/install/gems/resolving_spec.rb | # frozen_string_literal: true
RSpec.describe "bundle install with install-time dependencies" do
it "installs gems with implicit rake dependencies" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "with_implicit_rake_dep"
gem "another_implicit_rake_dep"
gem "rake"
G
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler.rb | lib/bundler.rb | # frozen_string_literal: true
require_relative "bundler/vendored_fileutils"
require "pathname"
require "rbconfig"
require_relative "bundler/errors"
require_relative "bundler/environment_preserver"
require_relative "bundler/plugin"
require_relative "bundler/rubygems_ext"
require_relative "bundler/rubygems_integration"... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/remote_specification.rb | lib/bundler/remote_specification.rb | # frozen_string_literal: true
module Bundler
# Represents a lazily loaded gem specification, where the full specification
# is on the source server in rubygems' "quick" index. The proxy object is to
# be seeded with what we're given from the source's abbreviated index - the
# full specification will only be fe... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/uri_credentials_filter.rb | lib/bundler/uri_credentials_filter.rb | # frozen_string_literal: true
module Bundler
module URICredentialsFilter
module_function
def credential_filtered_uri(uri_to_anonymize)
return uri_to_anonymize if uri_to_anonymize.nil?
uri = uri_to_anonymize.dup
if uri.is_a?(String)
require_relative "vendored_uri"
uri = Bundle... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source.rb | lib/bundler/source.rb | # frozen_string_literal: true
module Bundler
class Source
autoload :Gemspec, File.expand_path("source/gemspec", __dir__)
autoload :Git, File.expand_path("source/git", __dir__)
autoload :Metadata, File.expand_path("source/metadata", __dir__)
autoload :Path, File.expand_path("source/path", __... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/inline.rb | lib/bundler/inline.rb | # frozen_string_literal: true
# Allows for declaring a Gemfile inline in a ruby script, optionally installing
# any gems that aren't already installed on the user's system.
#
# @note Every gem that is specified in this 'Gemfile' will be `require`d, as if
# the user had manually called `Bundler.require`. To avoid... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/version_ranges.rb | lib/bundler/version_ranges.rb | # frozen_string_literal: true
module Bundler
module VersionRanges
NEq = Struct.new(:version)
ReqR = Struct.new(:left, :right)
class ReqR
Endpoint = Struct.new(:version, :inclusive) do
def <=>(other)
if version.equal?(INFINITY)
return 0 if other.version.equal?(INFINITY)... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/version.rb | lib/bundler/version.rb | # frozen_string_literal: false
module Bundler
VERSION = "2.2.0.dev".freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i
end
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/ui.rb | lib/bundler/ui.rb | # frozen_string_literal: true
module Bundler
module UI
autoload :RGProxy, File.expand_path("ui/rg_proxy", __dir__)
autoload :Shell, File.expand_path("ui/shell", __dir__)
autoload :Silent, File.expand_path("ui/silent", __dir__)
end
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/compact_index_client.rb | lib/bundler/compact_index_client.rb | # frozen_string_literal: true
require "pathname"
require "set"
module Bundler
class CompactIndexClient
DEBUG_MUTEX = Mutex.new
def self.debug
return unless ENV["DEBUG_COMPACT_INDEX"]
DEBUG_MUTEX.synchronize { warn("[#{self}] #{yield}") }
end
class Error < StandardError; end
require... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/endpoint_specification.rb | lib/bundler/endpoint_specification.rb | # frozen_string_literal: true
module Bundler
# used for Creating Specifications from the Gemcutter Endpoint
class EndpointSpecification < Gem::Specification
ILLFORMED_MESSAGE = 'Ill-formed requirement ["#<YAML::Syck::DefaultKey'.freeze
include MatchPlatform
attr_reader :name, :version, :platform, :req... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/setup.rb | lib/bundler/setup.rb | # frozen_string_literal: true
require_relative "shared_helpers"
if Bundler::SharedHelpers.in_bundle?
require_relative "../bundler"
if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"]
begin
Bundler.ui.silence { Bundler.setup }
rescue Bundler::BundlerError => e
Bundler.ui.warn "\e[31m#{e.message}\e[0m"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/rubygems_integration.rb | lib/bundler/rubygems_integration.rb | # frozen_string_literal: true
require "rubygems" unless defined?(Gem)
module Bundler
class RubygemsIntegration
if defined?(Gem::Ext::Builder::CHDIR_MONITOR)
EXT_LOCK = Gem::Ext::Builder::CHDIR_MONITOR
else
require "monitor"
EXT_LOCK = Monitor.new
end
def self.version
@versi... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.