summaryrefslogtreecommitdiff
path: root/spec/bundler/plugins/source/example_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/plugins/source/example_spec.rb')
-rw-r--r--spec/bundler/plugins/source/example_spec.rb40
1 files changed, 24 insertions, 16 deletions
diff --git a/spec/bundler/plugins/source/example_spec.rb b/spec/bundler/plugins/source/example_spec.rb
index 9d153b6063..32940bf849 100644
--- a/spec/bundler/plugins/source/example_spec.rb
+++ b/spec/bundler/plugins/source/example_spec.rb
@@ -52,7 +52,7 @@ RSpec.describe "real source plugins" do
build_lib "a-path-gem"
gemfile <<-G
- source "#{file_uri_for(gem_repo2)}" # plugin source
+ source "https://gem.repo2" # plugin source
source "#{lib_path("a-path-gem-1.0")}", :type => :mpath do
gem "a-path-gem"
end
@@ -70,6 +70,10 @@ RSpec.describe "real source plugins" do
it "writes to lock file" do
bundle "install"
+ checksums = checksums_section_when_enabled do |c|
+ c.no_checksum "a-path-gem", "1.0"
+ end
+
expect(lockfile).to eq <<~G
PLUGIN SOURCE
remote: #{lib_path("a-path-gem-1.0")}
@@ -78,7 +82,7 @@ RSpec.describe "real source plugins" do
a-path-gem (1.0)
GEM
- remote: #{file_uri_for(gem_repo2)}/
+ remote: https://gem.repo2/
specs:
PLATFORMS
@@ -86,7 +90,7 @@ RSpec.describe "real source plugins" do
DEPENDENCIES
a-path-gem!
-
+ #{checksums}
BUNDLED WITH
#{Bundler::VERSION}
G
@@ -106,7 +110,7 @@ RSpec.describe "real source plugins" do
end
install_gemfile <<-G
- source "#{file_uri_for(gem_repo2)}" # plugin source
+ source "https://gem.repo2" # plugin source
source "#{lib_path("gem_with_bin-1.0")}", :type => :mpath do
gem "gem_with_bin"
end
@@ -166,7 +170,7 @@ RSpec.describe "real source plugins" do
a-path-gem (1.0)
GEM
- remote: #{file_uri_for(gem_repo2)}/
+ remote: https://gem.repo2/
specs:
PLATFORMS
@@ -319,8 +323,8 @@ RSpec.describe "real source plugins" do
build_git "ma-gitp-gem"
gemfile <<-G
- source "#{file_uri_for(gem_repo2)}" # plugin source
- source "#{file_uri_for(lib_path("ma-gitp-gem-1.0"))}", :type => :gitp do
+ source "https://gem.repo2" # plugin source
+ source "#{lib_path("ma-gitp-gem-1.0")}", :type => :gitp do
gem "ma-gitp-gem"
end
G
@@ -336,16 +340,20 @@ RSpec.describe "real source plugins" do
revision = revision_for(lib_path("ma-gitp-gem-1.0"))
bundle "install"
+ checksums = checksums_section_when_enabled do |c|
+ c.no_checksum "ma-gitp-gem", "1.0"
+ end
+
expect(lockfile).to eq <<~G
PLUGIN SOURCE
- remote: #{file_uri_for(lib_path("ma-gitp-gem-1.0"))}
+ remote: #{lib_path("ma-gitp-gem-1.0")}
type: gitp
revision: #{revision}
specs:
ma-gitp-gem (1.0)
GEM
- remote: #{file_uri_for(gem_repo2)}/
+ remote: https://gem.repo2/
specs:
PLATFORMS
@@ -353,7 +361,7 @@ RSpec.describe "real source plugins" do
DEPENDENCIES
ma-gitp-gem!
-
+ #{checksums}
BUNDLED WITH
#{Bundler::VERSION}
G
@@ -364,14 +372,14 @@ RSpec.describe "real source plugins" do
revision = revision_for(lib_path("ma-gitp-gem-1.0"))
lockfile <<-G
PLUGIN SOURCE
- remote: #{file_uri_for(lib_path("ma-gitp-gem-1.0"))}
+ remote: #{lib_path("ma-gitp-gem-1.0")}
type: gitp
revision: #{revision}
specs:
ma-gitp-gem (1.0)
GEM
- remote: #{file_uri_for(gem_repo2)}/
+ remote: https://gem.repo2/
specs:
PLATFORMS
@@ -413,10 +421,10 @@ RSpec.describe "real source plugins" do
end
it "updates the deps on change in gemfile" do
- update_git "ma-gitp-gem", "1.1", :path => lib_path("ma-gitp-gem-1.0"), :gemspec => true
+ update_git "ma-gitp-gem", "1.1", path: lib_path("ma-gitp-gem-1.0"), gemspec: true
gemfile <<-G
- source "#{file_uri_for(gem_repo2)}" # plugin source
- source "#{file_uri_for(lib_path("ma-gitp-gem-1.0"))}", :type => :gitp do
+ source "https://gem.repo2" # plugin source
+ source "#{lib_path("ma-gitp-gem-1.0")}", :type => :gitp do
gem "ma-gitp-gem", "1.1"
end
G
@@ -432,7 +440,7 @@ RSpec.describe "real source plugins" do
ref = git.ref_for("main", 11)
install_gemfile <<-G
- source "#{file_uri_for(gem_repo2)}" # plugin source
+ source "https://gem.repo2" # plugin source
source '#{lib_path("foo-1.0")}', :type => :gitp do
gem "foo"
end