bundler-source-vault 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/plugins.rb +7 -9
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: debc046091a6e5422aea72d262b62eb4685b802f0891c244186133cd3a25eb80
4
- data.tar.gz: 62fc43b8506692df13bc4b4d45ab71dec5e3037b821d04e44b9efceebfd1a7b8
3
+ metadata.gz: 2ac3a7cc56bc99ebc080c4e7e810d2e272316b511a3139e297636f448d3bcdc1
4
+ data.tar.gz: 399892f3d3183189136a2988b43cd69cca97e9bb927b503bceaa5c3db72ed151
5
5
  SHA512:
6
- metadata.gz: 474dc2107298fecbe58ab4465e3828ca6701bb1f5fcc1a4387efbb4a45212e347f2894bf5197be8c4585c74e7991f233719182cb067006feb9ba1fc7d1ea8484
7
- data.tar.gz: 8489f997fb187ec2b7224ad4e87f4de30379b434fff7cb880b8be56b45fbf815c7edc3d123080414c113e04ef9a868f1b4e97eae9a8d07fe800c1d414658662c
6
+ metadata.gz: e550996ceac7614a88249d0713512a5c9609679aa3ef1e8eb9f1bc5290d5d75e9af615b62e2f80dc44b08977a8ebe47c229ab74f12c24b35c23dbc8f8893c94b
7
+ data.tar.gz: 17c085d7dd3b07714415bf962644a276e1668336baba1c5efa40a479fbbfc2536a52f0798f578b3deca246c6907c71ee9de089ceb1a033b08afcfc730cf26bbb
data/plugins.rb CHANGED
@@ -1,10 +1,3 @@
1
- # An addressed vault is redirected from Bundler's after-eval hook, which
2
- # Bundler gained in 4.1.0. An older Bundler would leave the address unredirected
3
- # and fail as an unreachable host, so it is refused here, by name.
4
- unless Bundler::Plugin::Events.defined_event?("after-eval")
5
- raise Bundler::PluginError, "bundler-source-vault needs Bundler 4.1.0 or newer; this is Bundler #{Bundler::VERSION}"
6
- end
7
-
8
1
  require_relative "gemvault_load_path"
9
2
 
10
3
  # Runs on every evaluation. Bundler discards the registration while configuring
@@ -34,6 +27,11 @@ Bundler::Plugin::API.source("vault", Bundler::Plugin::VaultSource)
34
27
  # and its lockfile carry no plugin source. Bundler loads this file for the
35
28
  # after-eval hook from the plugin index alone, which is what lets a tool that
36
29
  # never installs plugins still resolve from a vault committed beside the plugin.
37
- Bundler::Plugin::API.hook("after-eval") do |definition|
38
- Bundler::Plugin::VaultRedirection.new(definition).apply
30
+ # Bundler gained the hook in 4.1.0; an older one keeps the vault source type,
31
+ # and an addressed vault there is left unredirected and fails as an unreachable
32
+ # host.
33
+ if Bundler::Plugin::Events.defined_event?("after-eval")
34
+ Bundler::Plugin::API.hook("after-eval") do |definition|
35
+ Bundler::Plugin::VaultRedirection.new(definition).apply
36
+ end
39
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-source-vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Gillis
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.3.0
18
+ version: 0.3.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.3.0
25
+ version: 0.3.1
26
26
  description: Registers the :vault source type with Bundler, enabling gem installation
27
27
  from .gemv vault files
28
28
  email: