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/support/artifice/endpoint_creds_diff_host.rb
spec/support/artifice/endpoint_creds_diff_host.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointCredsDiffHost < Endpoint helpers do def auth @auth ||= Rack::Auth::Basic::Request.new(request.env) end def authorized? auth.provided? && auth.basic? && auth.credentials && auth.credentials == %w[use...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_no_gem.rb
spec/support/artifice/compact_index_no_gem.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexNoGem < CompactIndexAPI get "/gems/:id" do halt 500 end end Artifice.activate_with(CompactIndexNoGem)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_basic_authentication.rb
spec/support/artifice/compact_index_basic_authentication.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexBasicAuthentication < CompactIndexAPI before do unless env["HTTP_AUTHORIZATION"] halt 401, "Authentication info not supplied" end end end Artifice.activate_with(CompactIndexBasicAuthentication)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_fallback.rb
spec/support/artifice/endpoint_fallback.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointFallback < Endpoint DEPENDENCY_LIMIT = 60 get "/api/v1/dependencies" do if params[:gems] && params[:gems].size <= DEPENDENCY_LIMIT Marshal.dump(dependencies_for(params[:gems])) else halt 413, "Too man...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_rate_limited.rb
spec/support/artifice/compact_index_rate_limited.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexRateLimited < CompactIndexAPI class RequestCounter def self.queue @queue ||= Queue.new end def self.size @queue.size end def self.enq(name) @queue.enq(name) end def ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_host_redirect.rb
spec/support/artifice/endpoint_host_redirect.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointHostRedirect < Endpoint get "/fetch/actual/gem/:id", :host_name => "localgemserver.test" do redirect "http://bundler.localgemserver.test#{request.path_info}" end get "/api/v1/dependencies" do status 404 end e...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_partial_update.rb
spec/support/artifice/compact_index_partial_update.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexPartialUpdate < CompactIndexAPI # Stub the server to never return 304s. This simulates the behaviour of # Fastly / Rubygems ignoring ETag headers. def not_modified?(_checksum) false end get "/versions"...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_checksum_mismatch.rb
spec/support/artifice/compact_index_checksum_mismatch.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexChecksumMismatch < CompactIndexAPI get "/versions" do headers "ETag" => quote("123") headers "Surrogate-Control" => "max-age=2592000, stale-while-revalidate=60" content_type "text/plain" body "" e...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index.rb
spec/support/artifice/compact_index.rb
# frozen_string_literal: true require_relative "endpoint" $LOAD_PATH.unshift Dir[base_system_gems.join("gems/compact_index*/lib")].first.to_s require "compact_index" class CompactIndexAPI < Endpoint helpers do def load_spec(name, version, platform, gem_repo) full_name = "#{name}-#{version}" full_na...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_host_redirect.rb
spec/support/artifice/compact_index_host_redirect.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexHostRedirect < CompactIndexAPI get "/fetch/actual/gem/:id", :host_name => "localgemserver.test" do redirect "http://bundler.localgemserver.test#{request.path_info}" end get "/versions" do status 404 ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_concurrent_download.rb
spec/support/artifice/compact_index_concurrent_download.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexConcurrentDownload < CompactIndexAPI get "/versions" do versions = File.join(Bundler.rubygems.user_home, ".bundle", "cache", "compact_index", "localgemserver.test.80.dd34752a738ee965a2a4298dc16db6c5", "ve...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_strict_basic_authentication.rb
spec/support/artifice/compact_index_strict_basic_authentication.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexStrictBasicAuthentication < CompactIndexAPI before do unless env["HTTP_AUTHORIZATION"] halt 401, "Authentication info not supplied" end # Only accepts password == "password" unless env["HTTP_...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_api_forbidden.rb
spec/support/artifice/endpoint_api_forbidden.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointApiForbidden < Endpoint get "/api/v1/dependencies" do halt 403 end end Artifice.activate_with(EndpointApiForbidden)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_marshal_fail.rb
spec/support/artifice/endpoint_marshal_fail.rb
# frozen_string_literal: true require_relative "endpoint_fallback" Artifice.deactivate class EndpointMarshalFail < EndpointFallback get "/api/v1/dependencies" do "f0283y01hasf" end end Artifice.activate_with(EndpointMarshalFail)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/fail.rb
spec/support/artifice/fail.rb
# frozen_string_literal: true require "net/http" begin require "net/https" rescue LoadError nil # net/https or openssl end # We can't use artifice here because it uses rack module Artifice; end # for < 2.0, Net::HTTP::Persistent::SSLReuse class Fail < Net::HTTP # Net::HTTP uses a @newimpl instance variable to...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint.rb
spec/support/artifice/endpoint.rb
# frozen_string_literal: true require_relative "../path" require Spec::Path.lib_dir.join("bundler/deprecate") include Spec::Path $LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" ALL_R...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_api_missing.rb
spec/support/artifice/compact_index_api_missing.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexApiMissing < CompactIndexAPI get "/fetch/actual/gem/:id" do warn params[:id] if params[:id] == "rack-1.0.gemspec.rz" halt 404 else File.binread("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_extra_api.rb
spec/support/artifice/endpoint_extra_api.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointExtraApi < Endpoint get "/extra/api/v1/dependencies" do deps = dependencies_for(params[:gems], gem_repo4) Marshal.dump(deps) end get "/extra/specs.4.8.gz" do File.read("#{gem_repo4}/specs.4.8.gz") end ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_extra_api.rb
spec/support/artifice/compact_index_extra_api.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexExtraApi < CompactIndexAPI get "/extra/names" do etag_response do CompactIndex.names(gems(gem_repo4).map(&:name)) end end get "/extra/versions" do etag_response do file = tmp("versions....
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_api_missing.rb
spec/support/artifice/endpoint_api_missing.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointApiMissing < Endpoint get "/fetch/actual/gem/:id" do warn params[:id] if params[:id] == "rack-1.0.gemspec.rz" halt 404 else File.binread("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}") end end...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/windows.rb
spec/support/artifice/windows.rb
# frozen_string_literal: true require_relative "../path" include Spec::Path $LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" Artifice.deactivate class Windows < Sinatra::Base set :...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_timeout.rb
spec/support/artifice/endpoint_timeout.rb
# frozen_string_literal: true require_relative "endpoint_fallback" Artifice.deactivate class EndpointTimeout < EndpointFallback SLEEP_TIMEOUT = 3 get "/api/v1/dependencies" do sleep(SLEEP_TIMEOUT) end end Artifice.activate_with(EndpointTimeout)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/compact_index_extra.rb
spec/support/artifice/compact_index_extra.rb
# frozen_string_literal: true require_relative "compact_index" Artifice.deactivate class CompactIndexExtra < CompactIndexAPI get "/extra/versions" do halt 404 end get "/extra/api/v1/dependencies" do halt 404 end get "/extra/specs.4.8.gz" do File.read("#{gem_repo2}/specs.4.8.gz") end get ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
# frozen_string_literal: true require_relative "endpoint_marshal_fail" Artifice.deactivate class EndpointMarshalFailBasicAuthentication < EndpointMarshalFail before do unless env["HTTP_AUTHORIZATION"] halt 401, "Authentication info not supplied" end end end Artifice.activate_with(EndpointMarshalFa...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/support/artifice/endpoint_basic_authentication.rb
spec/support/artifice/endpoint_basic_authentication.rb
# frozen_string_literal: true require_relative "endpoint" Artifice.deactivate class EndpointBasicAuthentication < Endpoint before do unless env["HTTP_AUTHORIZATION"] halt 401, "Authentication info not supplied" end end end Artifice.activate_with(EndpointBasicAuthentication)
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/cache/path_spec.rb
spec/cache/path_spec.rb
# frozen_string_literal: true RSpec.describe "bundle cache with path" do it "is no-op when the path is within the bundle" do build_lib "foo", :path => bundled_app("lib/foo") install_gemfile <<-G gem "foo", :path => '#{bundled_app("lib/foo")}' G bundle "config set cache_all true" bundle :c...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/cache/gems_spec.rb
spec/cache/gems_spec.rb
# frozen_string_literal: true RSpec.describe "bundle cache" do shared_examples_for "when there are only gemsources" do before :each do gemfile <<-G gem 'rack' G system_gems "rack-1.0.0", :path => :bundle_path bundle! :cache end it "copies the .gem file to vendor/cache" d...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/cache/git_spec.rb
spec/cache/git_spec.rb
# frozen_string_literal: true RSpec.describe "git base name" do it "base_name should strip private repo uris" do source = Bundler::Source::Git.new("uri" => "git@github.com:bundler.git") expect(source.send(:base_name)).to eq("bundler") end it "base_name should strip network share paths" do source = B...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/cache/cache_path_spec.rb
spec/cache/cache_path_spec.rb
# frozen_string_literal: true RSpec.describe "bundle package" do before do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G end context "with --cache-path" do it "caches gems at given path" do bundle :cache, "cache-path" => "vendor/cache-foo" expect(bundled_app("...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/cache/platform_spec.rb
spec/cache/platform_spec.rb
# frozen_string_literal: true RSpec.describe "bundle cache with multiple platforms" do before :each do gemfile <<-G source "#{file_uri_for(gem_repo1)}" platforms :mri, :rbx do gem "rack", "1.0.0" end platforms :jruby do gem "activesupport", "2.3.5" end G l...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/show_spec.rb
spec/commands/show_spec.rb
# frozen_string_literal: true RSpec.describe "bundle show", :bundler => "< 3" do context "with a standard Gemfile" do before :each do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G end it "creates a Gemfile.lock if one did not exist" do FileUtils...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/remove_spec.rb
spec/commands/remove_spec.rb
# frozen_string_literal: true RSpec.describe "bundle remove" do context "when no gems are specified" do it "throws error" do gemfile <<-G source "#{file_uri_for(gem_repo1)}" G bundle "remove" expect(err).to include("Please specify gems to remove.") end end context "when...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/inject_spec.rb
spec/commands/inject_spec.rb
# frozen_string_literal: true RSpec.describe "bundle inject", :bundler => "< 3" do before :each do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G end context "without a lockfile" do it "locks with the injected gems" do expect(bundled_app_lock).not_to exist bund...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/version_spec.rb
spec/commands/version_spec.rb
# frozen_string_literal: true require_relative "../support/path" RSpec.describe "bundle version" do if Spec::Path.ruby_core? COMMIT_HASH = /unknown|[a-fA-F0-9]{7,}/.freeze else COMMIT_HASH = /[a-fA-F0-9]{7,}/.freeze end context "with -v" do it "outputs the version", :bundler => "< 3" do bun...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/doctor_spec.rb
spec/commands/doctor_spec.rb
# frozen_string_literal: true require "find" require "stringio" require "bundler/cli" require "bundler/cli/doctor" RSpec.describe "bundle doctor" do before(:each) do install_gemfile! <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @stdout = StringIO.new [:error, :warn].each do |m...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/update_spec.rb
spec/commands/update_spec.rb
# frozen_string_literal: true RSpec.describe "bundle update" do before :each do build_repo2 install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" gem "rack-obama" gem "platform_specific" G end describe "with no arguments", :bundler => "< 3" do it "...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/install_spec.rb
spec/commands/install_spec.rb
# frozen_string_literal: true RSpec.describe "bundle install with gem sources" do describe "the simple case" do it "prints output and returns if no dependencies are specified" do gemfile <<-G source "#{file_uri_for(gem_repo1)}" G bundle :install expect(err).to match(/no dependenc...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/lock_spec.rb
spec/commands/lock_spec.rb
# frozen_string_literal: true RSpec.describe "bundle lock" do def strip_lockfile(lockfile) strip_whitespace(lockfile).sub(/\n\Z/, "") end def read_lockfile(file = "Gemfile.lock") strip_lockfile bundled_app(file).read end let(:repo) { gem_repo1 } before :each do gemfile <<-G source "#{f...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/console_spec.rb
spec/commands/console_spec.rb
# frozen_string_literal: true RSpec.describe "bundle console", :bundler => "< 3", :readline => true do before :each do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" gem "activesupport", :group => :test gem "rack_middleware", :group => :development G end it "...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/check_spec.rb
spec/commands/check_spec.rb
# frozen_string_literal: true RSpec.describe "bundle check" do it "returns success when the Gemfile is satisfied" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G bundle :check expect(exitstatus).to eq(0) if exitstatus expect(out).to include("The Gemfile's de...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/pristine_spec.rb
spec/commands/pristine_spec.rb
# frozen_string_literal: true require "bundler/vendored_fileutils" RSpec.describe "bundle pristine", :ruby_repo do before :each do build_lib "baz", :path => bundled_app do |s| s.version = "1.0.0" s.add_development_dependency "baz-dev", "=1.0.0" end build_repo2 do build_gem "weakling" ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/newgem_spec.rb
spec/commands/newgem_spec.rb
# frozen_string_literal: true RSpec.describe "bundle gem" do def gem_skeleton_assertions expect(bundled_app("#{gem_name}/#{gem_name}.gemspec")).to exist expect(bundled_app("#{gem_name}/README.md")).to exist expect(bundled_app("#{gem_name}/Gemfile")).to exist expect(bundled_app("#{gem_name}/Rakefile")...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/post_bundle_message_spec.rb
spec/commands/post_bundle_message_spec.rb
# frozen_string_literal: true RSpec.describe "post bundle message" do before :each do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" gem "activesupport", "2.3.5", :group => [:emo, :test] group :test do gem "rspec" end gem "rack-obama", :group => :obama ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/clean_spec.rb
spec/commands/clean_spec.rb
# frozen_string_literal: true RSpec.describe "bundle clean" do def should_have_gems(*gems) gems.each do |g| expect(vendored_gems("gems/#{g}")).to exist expect(vendored_gems("specifications/#{g}.gemspec")).to exist expect(vendored_gems("cache/#{g}.gem")).to exist end end def should_not_...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/list_spec.rb
spec/commands/list_spec.rb
# frozen_string_literal: true RSpec.describe "bundle list" do context "with name-only and paths option" do it "raises an error" do bundle "list --name-only --paths" expect(err).to eq "The `--name-only` and `--paths` options cannot be used together" end end context "with without-group and on...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/help_spec.rb
spec/commands/help_spec.rb
# frozen_string_literal: true RSpec.describe "bundle help" do it "uses mann when available" do with_fake_man do bundle "help gemfile" end expect(out).to eq(%(["#{root}/man/gemfile.5"])) end it "prefixes bundle commands with bundle- when finding the groff files" do with_fake_man do bu...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/viz_spec.rb
spec/commands/viz_spec.rb
# frozen_string_literal: true RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do let(:ruby_graphviz) do graphviz_glob = base_system_gems.join("cache/ruby-graphviz*") Pathname.glob(graphviz_glob).first end before do system_gems ruby_graphviz end it "graphs gems from t...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/cache_spec.rb
spec/commands/cache_spec.rb
# frozen_string_literal: true RSpec.describe "bundle cache" do context "with --gemfile" do it "finds the gemfile" do gemfile bundled_app("NotGemfile"), <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' G bundle "cache --gemfile=NotGemfile" ENV["BUNDLE_GEMFILE"] = "NotG...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/binstubs_spec.rb
spec/commands/binstubs_spec.rb
# frozen_string_literal: true RSpec.describe "bundle binstubs <gem>" do before do skip "https://github.com/rubygems/bundler/issues/6894" if Gem.win_platform? end context "when the gem exists in the lockfile" do it "sets up the binstub" do install_gemfile <<-G source "#{file_uri_for(gem_rep...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/licenses_spec.rb
spec/commands/licenses_spec.rb
# frozen_string_literal: true RSpec.describe "bundle licenses" do before :each do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" gem "with_license" G end it "prints license information for all gems in the bundle" do bundle "licenses" expect(out).to includ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/add_spec.rb
spec/commands/add_spec.rb
# frozen_string_literal: true RSpec.describe "bundle add" do before :each do build_repo2 do build_gem "foo", "1.1" build_gem "foo", "2.0" build_gem "baz", "1.2.3" build_gem "bar", "0.12.3" build_gem "cat", "0.12.3.pre" build_gem "dog", "1.1.3.pre" end build_git "foo",...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/open_spec.rb
spec/commands/open_spec.rb
# frozen_string_literal: true RSpec.describe "bundle open" do context "when opening a regular gem" do before do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G end it "opens the gem with BUNDLER_EDITOR as highest priority" do bundle "open rails", ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/init_spec.rb
spec/commands/init_spec.rb
# frozen_string_literal: true RSpec.describe "bundle init" do it "generates a Gemfile" do bundle! :init expect(out).to include("Writing new Gemfile") expect(bundled_app_gemfile).to be_file end context "when a Gemfile already exists" do before do create_file "Gemfile", <<-G gem "rai...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/issue_spec.rb
spec/commands/issue_spec.rb
# frozen_string_literal: true RSpec.describe "bundle issue" do it "exits with a message" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G bundle "issue" expect(out).to include "Did you find an issue with Bundler?" expect(out).to include "## Environment" e...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/config_spec.rb
spec/commands/config_spec.rb
# frozen_string_literal: true RSpec.describe ".bundle/config" do describe "config" do before { bundle "config set foo bar" } it "prints a detailed report of local and user configuration" do bundle "config list" expect(out).to include("Settings are listed in order of priority. The top value will...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/outdated_spec.rb
spec/commands/outdated_spec.rb
# frozen_string_literal: true RSpec.describe "bundle outdated" do before :each do build_repo2 do build_git "foo", :path => lib_path("foo") build_git "zebra", :path => lib_path("zebra") end install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "zebra", :git => "#{lib_path("...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/info_spec.rb
spec/commands/info_spec.rb
# frozen_string_literal: true RSpec.describe "bundle info" do context "with a standard Gemfile" do before do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" gem "has_metadata" G end it "creates a Gemfile.lock when invoked with a gem name" do ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/commands/exec_spec.rb
spec/commands/exec_spec.rb
# frozen_string_literal: true RSpec.describe "bundle exec" do let(:system_gems_to_install) { %w[rack-1.0.0 rack-0.9.1] } before :each do system_gems(system_gems_to_install, :path => :bundle_path) end it "works with --gemfile flag" do create_file "CustomGemfile", <<-G gem "rack", "1.0.0" G ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/setup_spec.rb
spec/runtime/setup_spec.rb
# frozen_string_literal: true require "tmpdir" require "tempfile" RSpec.describe "Bundler.setup" do describe "with no arguments" do it "makes all groups available" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack", :group => :test G ruby <<-RUBY re...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
true
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/load_spec.rb
spec/runtime/load_spec.rb
# frozen_string_literal: true RSpec.describe "Bundler.load" do describe "with a gemfile" do before(:each) do install_gemfile! <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G allow(Bundler::SharedHelpers).to receive(:pwd).and_return(bundled_app) end it "provides a ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/require_spec.rb
spec/runtime/require_spec.rb
# frozen_string_literal: true RSpec.describe "Bundler.require" do before :each do build_lib "one", "1.0.0" do |s| s.write "lib/baz.rb", "puts 'baz'" s.write "lib/qux.rb", "puts 'qux'" end build_lib "two", "1.0.0" do |s| s.write "lib/two.rb", "puts 'two'" s.add_dependency "three",...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/inline_spec.rb
spec/runtime/inline_spec.rb
# frozen_string_literal: true RSpec.describe "bundler/inline#gemfile" do def script(code, options = {}) requires = ["#{lib_dir}/bundler/inline"] requires.unshift "#{spec_dir}/support/artifice/" + options.delete(:artifice) if options.key?(:artifice) requires = requires.map {|r| "require '#{r}'" }.join("\n...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/executable_spec.rb
spec/runtime/executable_spec.rb
# frozen_string_literal: true RSpec.describe "Running bin/* commands" do before :each do install_gemfile! <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G end it "runs the bundled command when in the bundle" do skip "exec format error" if Gem.win_platform? bundle! "binstubs rac...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/gem_tasks_spec.rb
spec/runtime/gem_tasks_spec.rb
# frozen_string_literal: true RSpec.describe "require 'bundler/gem_tasks'" do before :each do bundled_app("foo.gemspec").open("w") do |f| f.write <<-GEMSPEC Gem::Specification.new do |s| s.name = "foo" s.version = "1.0" s.summary = "dummy" s.author = "Perry M...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/with_unbundled_env_spec.rb
spec/runtime/with_unbundled_env_spec.rb
# frozen_string_literal: true RSpec.describe "Bundler.with_env helpers" do def bundle_exec_ruby!(code, options = {}) build_bundler_context options bundle! "exec '#{Gem.ruby}' -e #{code}", options end def build_bundler_context(options = {}) bundle "config set path vendor/bundle" gemfile "" bu...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/runtime/platform_spec.rb
spec/runtime/platform_spec.rb
# frozen_string_literal: true RSpec.describe "Bundler.setup with multi platform stuff" do it "raises a friendly error when gems are missing locally" do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G lockfile <<-G GEM remote: #{file_uri_for(gem_repo1)}/ sp...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/install_spec.rb
spec/plugins/install_spec.rb
# frozen_string_literal: true RSpec.describe "bundler plugin install" do before do build_repo2 do build_plugin "foo" build_plugin "kung-foo" end end it "shows proper message when gem in not found in the source" do bundle "plugin install no-foo --source #{file_uri_for(gem_repo1)}" ex...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/source_spec.rb
spec/plugins/source_spec.rb
# frozen_string_literal: true RSpec.describe "bundler source plugin" do describe "plugins dsl eval for #source with :type option" do before do update_repo2 do build_plugin "bundler-source-psource" do |s| s.write "plugins.rb", <<-RUBY class OPSource < Bundler::Plugin::API ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/command_spec.rb
spec/plugins/command_spec.rb
# frozen_string_literal: true RSpec.describe "command plugins" do before do build_repo2 do build_plugin "command-mah" do |s| s.write "plugins.rb", <<-RUBY module Mah class Plugin < Bundler::Plugin::API command "mahcommand" # declares the command de...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/list_spec.rb
spec/plugins/list_spec.rb
# frozen_string_literal: true RSpec.describe "bundler plugin list" do before do build_repo2 do build_plugin "foo" do |s| s.write "plugins.rb", <<-RUBY class Foo < Bundler::Plugin::API command "shout" def exec(command, args) puts "Foo shout" ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/hook_spec.rb
spec/plugins/hook_spec.rb
# frozen_string_literal: true RSpec.describe "hook plugins" do context "before-install-all hook" do before do build_repo2 do build_plugin "before-install-all-plugin" do |s| s.write "plugins.rb", <<-RUBY Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_BEFORE_INSTALL_ALL ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/plugins/source/example_spec.rb
spec/plugins/source/example_spec.rb
# frozen_string_literal: true RSpec.describe "real source plugins" do context "with a minimal source plugin" do before do build_repo2 do build_plugin "bundler-source-mpath" do |s| s.write "plugins.rb", <<-RUBY require "bundler-source-mpath" class MPath < Bundler::...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/resolver/basic_spec.rb
spec/resolver/basic_spec.rb
# frozen_string_literal: true RSpec.describe "Resolving" do before :each do @index = an_awesome_index end it "resolves a single gem" do dep "rack" should_resolve_as %w[rack-1.1] end it "resolves a gem with dependencies" do dep "actionpack" should_resolve_as %w[actionpack-2.3.5 actives...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/resolver/platform_spec.rb
spec/resolver/platform_spec.rb
# frozen_string_literal: true RSpec.describe "Resolving platform craziness" do describe "with cross-platform gems" do before :each do @index = an_awesome_index end it "resolves a simple multi platform gem" do dep "nokogiri" platforms "ruby", "java" should_resolve_as %w[nokogiri-...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/update/path_spec.rb
spec/update/path_spec.rb
# frozen_string_literal: true RSpec.describe "path sources" do describe "bundle update --source" do it "shows the previous version of the gem when updated from path source" do build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport") install_gemfile <<-G gem "activesupport",...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/update/git_spec.rb
spec/update/git_spec.rb
# frozen_string_literal: true RSpec.describe "bundle update" do describe "git sources" do it "floats on a branch when :branch is used" do build_git "foo", "1.0" update_git "foo", :branch => "omg" install_gemfile <<-G git "#{lib_path("foo-1.0")}", :branch => "omg" do gem 'foo'...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/update/gemfile_spec.rb
spec/update/gemfile_spec.rb
# frozen_string_literal: true RSpec.describe "bundle update" do context "with --gemfile" do it "finds the gemfile" do gemfile bundled_app("NotGemfile"), <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' G bundle! :install, :gemfile => bundled_app("NotGemfile") bundle! :...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/update/redownload_spec.rb
spec/update/redownload_spec.rb
# frozen_string_literal: true RSpec.describe "bundle update" do before :each do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G end describe "with --force" do it "shows a deprecation when single flag passed", :bundler => 2 do bundle! "update rack --force" ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/update/gems/post_install_spec.rb
spec/update/gems/post_install_spec.rb
# frozen_string_literal: true RSpec.describe "bundle update" do let(:config) {} before do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack', "< 1.0" gem 'thin' G bundle! "config set #{config}" if config bundle! :install end shared_examples "a config observer" do ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/double_check_spec.rb
spec/realworld/double_check_spec.rb
# frozen_string_literal: true RSpec.describe "double checking sources", :realworld => true, :sometimes => true do it "finds already-installed gems" do create_file("rails.gemspec", <<-RUBY) Gem::Specification.new do |s| s.name = "rails" s.version = "5.1.4" s.summary = ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/gemfile_source_header_spec.rb
spec/realworld/gemfile_source_header_spec.rb
# frozen_string_literal: true require_relative "../support/silent_logger" RSpec.describe "fetching dependencies with a mirrored source", :realworld => true do let(:mirror) { "https://server.example.org" } let(:original) { "http://127.0.0.1:#{@port}" } before do setup_server bundle "config set --local m...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/dependency_api_spec.rb
spec/realworld/dependency_api_spec.rb
# frozen_string_literal: true require_relative "../support/silent_logger" RSpec.describe "gemcutter's dependency API", :realworld => true do context "when Gemcutter API takes too long to respond" do before do require_rack port = find_unused_port @server_uri = "http://127.0.0.1:#{port}" ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/mirror_probe_spec.rb
spec/realworld/mirror_probe_spec.rb
# frozen_string_literal: true require_relative "../support/silent_logger" RSpec.describe "fetching dependencies with a not available mirror", :realworld => true do let(:mirror) { @mirror_uri } let(:original) { @server_uri } let(:server_port) { @server_port } let(:host) { "127.0.0.1" } before do require...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/parallel_spec.rb
spec/realworld/parallel_spec.rb
# frozen_string_literal: true RSpec.describe "parallel", :realworld => true, :sometimes => true do it "installs" do gemfile <<-G source "https://rubygems.org" gem 'activesupport', '~> 3.2.13' gem 'faker', '~> 1.1.2' gem 'i18n', '~> 0.6.0' # Because 0.7+ requires Ruby 1.9.3+ G bun...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/edgecases_spec.rb
spec/realworld/edgecases_spec.rb
# frozen_string_literal: true RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do def rubygems_version(name, requirement) ruby! <<-RUBY require "#{spec_dir}/support/artifice/vcr" require "#{lib_dir}/bundler" require "#{lib_dir}/bundler/source/rubygems/remote" ...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/realworld/fixtures/warbler/bin/warbler-example.rb
spec/realworld/fixtures/warbler/bin/warbler-example.rb
# frozen_string_literal: true puts require "bundler/setup"
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/lock/git_spec.rb
spec/lock/git_spec.rb
# frozen_string_literal: true RSpec.describe "bundle lock with git gems" do before :each do build_git "foo" install_gemfile <<-G gem 'foo', :git => "#{lib_path("foo-1.0")}" G end it "doesn't break right after running lock" do expect(the_bundle).to include_gems "foo 1.0.0" end it "loc...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/lock/lockfile_spec.rb
spec/lock/lockfile_spec.rb
# frozen_string_literal: true RSpec.describe "the lockfile format" do include Bundler::GemHelpers it "generates a simple lockfile for a single source, gem" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G lockfile_should_be <<-G GEM remote: #{file_ur...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/yaml_serializer_spec.rb
spec/bundler/yaml_serializer_spec.rb
# frozen_string_literal: true require "bundler/yaml_serializer" RSpec.describe Bundler::YAMLSerializer do subject(:serializer) { Bundler::YAMLSerializer } describe "#dump" do it "works for simple hash" do hash = { "Q" => "Where does Thursday come before Wednesday? In the dictionary. :P" } expect...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/friendly_errors_spec.rb
spec/bundler/friendly_errors_spec.rb
# frozen_string_literal: true require "bundler" require "bundler/friendly_errors" require "cgi" RSpec.describe Bundler, "friendly errors" do context "with invalid YAML in .gemrc" do before do File.open(home(".gemrc"), "w") do |f| f.write "invalid: yaml: hah" end end after do F...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/stub_specification_spec.rb
spec/bundler/stub_specification_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::StubSpecification do let(:gemspec) do Gem::Specification.new do |s| s.name = "gemname" s.version = "1.0.0" s.loaded_from = __FILE__ end end let(:with_bundler_stub_spec) do described_class.from_stub(gemspec) end describe "#f...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/dep_proxy_spec.rb
spec/bundler/dep_proxy_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::DepProxy do let(:dep) { Bundler::Dependency.new("rake", ">= 0") } subject { described_class.new(dep, Gem::Platform::RUBY) } let(:same) { subject } let(:other) { subject.dup } let(:different) { described_class.new(dep, Gem::Platform::JAVA) } describe "#...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/remote_specification_spec.rb
spec/bundler/remote_specification_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::RemoteSpecification do let(:name) { "foo" } let(:version) { Gem::Version.new("1.0.0") } let(:platform) { Gem::Platform::RUBY } let(:spec_fetcher) { double(:spec_fetcher) } subject { described_class.new(name, version, platform, spec_fetch...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/mirror_spec.rb
spec/bundler/mirror_spec.rb
# frozen_string_literal: true require "bundler/mirror" RSpec.describe Bundler::Settings::Mirror do let(:mirror) { Bundler::Settings::Mirror.new } it "returns zero when fallback_timeout is not set" do expect(mirror.fallback_timeout).to eq(0) end it "takes a number as a fallback_timeout" do mirror.fal...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/source_spec.rb
spec/bundler/source_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::Source do class ExampleSource < Bundler::Source end subject { ExampleSource.new } describe "#unmet_deps" do let(:specs) { double(:specs) } let(:unmet_dependency_names) { double(:unmet_dependency_names) } before do allow(subject).to rece...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/retry_spec.rb
spec/bundler/retry_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::Retry do it "return successful result if no errors" do attempts = 0 result = Bundler::Retry.new(nil, nil, 3).attempt do attempts += 1 :success end expect(result).to eq(:success) expect(attempts).to eq(1) end it "returns the fi...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/gem_version_promoter_spec.rb
spec/bundler/gem_version_promoter_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::GemVersionPromoter do context "conservative resolver" do def versions(result) result.flatten.map(&:version).map(&:to_s) end def make_instance(*args) @gvp = Bundler::GemVersionPromoter.new(*args).tap do |gvp| gvp.class.class_eval {...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/dsl_spec.rb
spec/bundler/dsl_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::Dsl do before do @rubygems = double("rubygems") allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems } end describe "#git_source" do it "registers custom hosts" do subject.git_source(:example) {|repo_name| "git@git.example.com:#{re...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/gem_helper_spec.rb
spec/bundler/gem_helper_spec.rb
# frozen_string_literal: true require "rake" require "bundler/gem_helper" RSpec.describe Bundler::GemHelper do let(:app_name) { "lorem__ipsum" } let(:app_path) { bundled_app app_name } let(:app_gemspec_path) { app_path.join("#{app_name}.gemspec") } before(:each) do global_config "BUNDLE_GEM__MIT" => "fal...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false
rubygems/bundler
https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/spec/bundler/environment_preserver_spec.rb
spec/bundler/environment_preserver_spec.rb
# frozen_string_literal: true RSpec.describe Bundler::EnvironmentPreserver do let(:preserver) { described_class.new(env, ["foo"]) } describe "#backup" do let(:env) { { "foo" => "my-foo", "bar" => "my-bar" } } subject { preserver.backup } it "should create backup entries" do expect(subject["BUND...
ruby
MIT
35be6d9a603084f719fec4f4028c18860def07f6
2026-01-04T15:44:52.942591Z
false