devpack 0.4.2 → 0.4.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/devpack/gem_glob.rb +7 -11
- data/lib/devpack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2019c7650f694b42f7b6dc248cab53d227b3818aa126d91b64375ca305592622
|
|
4
|
+
data.tar.gz: a0084d6a265e4a30a36baf09f16f20c2665bae572b36af660dcd54a0ca7193b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78ecad5e11f27adcff1493669277001bf655457eb3eb30de370880efe6105f5dc0e0cb21efbbdd6c7a2a2981edf4db429ba67f00c6fc999310985aa04fa7eeca
|
|
7
|
+
data.tar.gz: f9a8f213d55ed153fdbc3c63adcb09b223a951e01a53cc01709135b58388c45bb718f565dfa1895ea69ab199d9f232d3e0e30b75fcb0022db5df05e68b8136b5
|
data/CHANGELOG.md
CHANGED
|
@@ -44,3 +44,7 @@ Fully activate gem on load: add gem spec to `Gem.loaded_specs` and set instance
|
|
|
44
44
|
|
|
45
45
|
- Add support for gems which are not required automatically
|
|
46
46
|
- Fix requiring gems where a hyphen in the gem name corresponds to a path slash in the require.
|
|
47
|
+
|
|
48
|
+
## 0.4.3
|
|
49
|
+
|
|
50
|
+
Locate gems via `Gem.path` instead of reading the `GEM_PATH`/`GEM_HOME` environment variables directly. When `BUNDLE_PATH` is configured (e.g. in Docker images), Bundler sets `GEM_PATH` to an empty string so that RubyGems searches only the bundle path — read literally, that meant no search path at all, so installed gems were never found. `Gem.path` resolves the same variables the way RubyGems does.
|
data/lib/devpack/gem_glob.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Devpack
|
|
4
|
-
# Locates gems by searching in
|
|
4
|
+
# Locates gems by searching in RubyGems' effective search path (Gem.path)
|
|
5
5
|
class GemGlob
|
|
6
6
|
def find(name)
|
|
7
7
|
matched_paths(name)
|
|
@@ -15,10 +15,13 @@ module Devpack
|
|
|
15
15
|
@glob ||= gem_paths.map { |path| Dir.glob(path.join('gems', '*')) }.flatten
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Gem.path rather than the GEM_PATH/GEM_HOME environment variables:
|
|
19
|
+
# Bundler sets GEM_PATH to an empty string when BUNDLE_PATH is configured
|
|
20
|
+
# (so RubyGems searches only the bundle path), which read literally is no
|
|
21
|
+
# search path at all. Gem.path resolves the same variables the way
|
|
22
|
+
# RubyGems does.
|
|
18
23
|
def gem_paths
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
gem_path.split(':').map { |path| Pathname.new(path) }
|
|
24
|
+
Gem.path.map { |path| Pathname.new(path) }
|
|
22
25
|
end
|
|
23
26
|
|
|
24
27
|
def match?(name_with_version, basename)
|
|
@@ -42,12 +45,5 @@ module Devpack
|
|
|
42
45
|
def version(path)
|
|
43
46
|
Gem::Version.new(File.split(path).last.rpartition('-').last)
|
|
44
47
|
end
|
|
45
|
-
|
|
46
|
-
def gem_path
|
|
47
|
-
return ENV.fetch('GEM_PATH', nil) if ENV.key?('GEM_PATH')
|
|
48
|
-
return ENV.fetch('GEM_HOME', nil) if ENV.key?('GEM_HOME')
|
|
49
|
-
|
|
50
|
-
nil
|
|
51
|
-
end
|
|
52
48
|
end
|
|
53
49
|
end
|
data/lib/devpack/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devpack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bob Farrell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: byebug
|
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
- !ruby/object:Gem::Version
|
|
154
154
|
version: '0'
|
|
155
155
|
requirements: []
|
|
156
|
-
rubygems_version: 3.
|
|
156
|
+
rubygems_version: 3.5.22
|
|
157
157
|
signing_key:
|
|
158
158
|
specification_version: 4
|
|
159
159
|
summary: Conveniently tailor your development environment
|