anonymous_loader 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +15 -1
- data/lib/anonymous_loader/version.rb +1 -1
- data/lib/anonymous_loader.rb +6 -6
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06e5884f3818058e31e0afecc25c484b86d5c7e30e66945b56c91e0c3e6f17a7
|
|
4
|
+
data.tar.gz: 90e0cae8936a57462cd621c4569f2c3c75e19937bc6a1b8970f41f4fcf202b54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca9b84518a8804268f70220fb55d928a50138ed225c10469327166b0630e8454397bc2f2cce9e26a0443234e9376afc7ac18c6f0c64551259555bc557beb1d9d
|
|
7
|
+
data.tar.gz: 5aefc20bf6dac037237408f5442eca1f3801a1d3ec7a5dcd02fa54314e57f1ce404f1fa56c30188c5907d0fafc6643df3777facf868d67c8eee351cf7930c99b
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,18 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.1.1] - 2026-06-18
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.1.1][0.1.1t]
|
|
36
|
+
- COVERAGE: 96.33% -- 105/109 lines in 2 files
|
|
37
|
+
- BRANCH COVERAGE: 81.58% -- 31/38 branches in 2 files
|
|
38
|
+
- 88.89% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Fixed `$LOAD_PATH` version validation when the requested Ruby file and the
|
|
43
|
+
adjacent version file live at different directory depths.
|
|
44
|
+
|
|
33
45
|
## [0.1.0] - 2026-06-18
|
|
34
46
|
|
|
35
47
|
- TAG: [v0.1.0][0.1.0t]
|
|
@@ -43,6 +55,8 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
43
55
|
- Added the initial anonymous namespace loader API with explicit path,
|
|
44
56
|
RubyGems metadata, and `$LOAD_PATH` resolution strategies.
|
|
45
57
|
|
|
46
|
-
[Unreleased]: https://github.com/ruby-oauth/anonymous_loader/compare/v0.1.
|
|
58
|
+
[Unreleased]: https://github.com/ruby-oauth/anonymous_loader/compare/v0.1.1...HEAD
|
|
59
|
+
[0.1.1]: https://github.com/ruby-oauth/anonymous_loader/compare/v0.1.0...v0.1.1
|
|
60
|
+
[0.1.1t]: https://github.com/ruby-oauth/anonymous_loader/releases/tag/v0.1.1
|
|
47
61
|
[0.1.0]: https://github.com/ruby-oauth/anonymous_loader/compare/eb9b54b0b8a62d8982ed17605a22ed259ac48b24...v0.1.0
|
|
48
62
|
[0.1.0t]: https://github.com/ruby-oauth/anonymous_loader/releases/tag/v0.1.0
|
data/lib/anonymous_loader.rb
CHANGED
|
@@ -18,7 +18,7 @@ module AnonymousLoader
|
|
|
18
18
|
PathRequest = Struct.new(:path, :gem_name, :require_path, :requirement, :version_file)
|
|
19
19
|
# Internal load-path version lookup request.
|
|
20
20
|
# @api private
|
|
21
|
-
VersionRequest = Struct.new(:candidate, :version_file)
|
|
21
|
+
VersionRequest = Struct.new(:candidate, :require_path, :version_file)
|
|
22
22
|
|
|
23
23
|
class << self
|
|
24
24
|
# Evaluate one or more Ruby files inside a fresh anonymous module.
|
|
@@ -165,16 +165,16 @@ module AnonymousLoader
|
|
|
165
165
|
end
|
|
166
166
|
|
|
167
167
|
def resolve_versioned_load_path(candidates, request)
|
|
168
|
-
versions = load_path_versions(candidates, request
|
|
168
|
+
versions = load_path_versions(candidates, request)
|
|
169
169
|
match = versions.find { |pair| request.requirement.satisfied_by?(pair.last) }
|
|
170
170
|
return match.first if match
|
|
171
171
|
|
|
172
172
|
raise_load_path_version_mismatch(request, versions.map(&:last))
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
-
def load_path_versions(candidates,
|
|
175
|
+
def load_path_versions(candidates, request)
|
|
176
176
|
candidates.each_with_object([]) do |candidate, versions|
|
|
177
|
-
version = version_for_load_path_candidate(VersionRequest.new(candidate, version_file))
|
|
177
|
+
version = version_for_load_path_candidate(VersionRequest.new(candidate, request.require_path, request.version_file))
|
|
178
178
|
versions << [candidate, version] if version
|
|
179
179
|
end
|
|
180
180
|
end
|
|
@@ -219,8 +219,8 @@ module AnonymousLoader
|
|
|
219
219
|
|
|
220
220
|
def load_path_root(request)
|
|
221
221
|
candidate_dir = File.dirname(request.candidate)
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
require_depth = request.require_path.split("/").length - 1
|
|
223
|
+
require_depth.times { candidate_dir = File.dirname(candidate_dir) }
|
|
224
224
|
candidate_dir
|
|
225
225
|
end
|
|
226
226
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anonymous_loader
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -276,10 +276,10 @@ licenses:
|
|
|
276
276
|
- MIT
|
|
277
277
|
metadata:
|
|
278
278
|
homepage_uri: https://anonymous-loader.galtzo.com
|
|
279
|
-
source_code_uri: https://github.com/ruby-oauth/anonymous_loader/tree/v0.1.
|
|
280
|
-
changelog_uri: https://github.com/ruby-oauth/anonymous_loader/blob/v0.1.
|
|
279
|
+
source_code_uri: https://github.com/ruby-oauth/anonymous_loader/tree/v0.1.1
|
|
280
|
+
changelog_uri: https://github.com/ruby-oauth/anonymous_loader/blob/v0.1.1/CHANGELOG.md
|
|
281
281
|
bug_tracker_uri: https://github.com/ruby-oauth/anonymous_loader/issues
|
|
282
|
-
documentation_uri: https://www.rubydoc.info/gems/anonymous_loader/0.1.
|
|
282
|
+
documentation_uri: https://www.rubydoc.info/gems/anonymous_loader/0.1.1
|
|
283
283
|
funding_uri: https://github.com/sponsors/pboling
|
|
284
284
|
wiki_uri: https://github.com/ruby-oauth/anonymous_loader/wiki
|
|
285
285
|
news_uri: https://www.railsbling.com/tags/anonymous_loader
|
metadata.gz.sig
CHANGED
|
Binary file
|