nomono 1.1.17 → 1.1.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6b544ca0a97335dcc143f570dfb161d9f1fa5830665b63c828f4f444cb7fb10
4
- data.tar.gz: a37ea56a21841475a512d4b22a3e639a88d9584a79efa16e147059707df059fb
3
+ metadata.gz: 2650a3d39f91c3d845e1ee61a668b03aa8d20b852784acd38ba120155a854d3d
4
+ data.tar.gz: 68743828a4832ad23890a0ce2de8eb59b600ff844cffa408af6eb155b39189ac
5
5
  SHA512:
6
- metadata.gz: f24deb7936863f43c503b58681798f40ce29d1c1fcafff66e54ba10386118deb21a7dd59649b5a1f7c8bd2a4cb2f1ff43cfba0541328ccca3e7d684a3f281fc2
7
- data.tar.gz: 31578f60247d67250797ec9479b4a6bac1f197a47c7b1ba6f52d23c2a090a0d11110e45fe19ef1e888892cfd72c247e1c72fa2c15db2371fc106bf8145d44ea3
6
+ metadata.gz: c05eeb49b45c539a6e0eae5a8882407a3bb402f6280de7dae15c4c06cbbe19ae431494fc8303cb8d44434edb0ee6e0b3ce568462a027f8155e9e897f202fbc7a
7
+ data.tar.gz: 2254daed8e16b52264414f7dbf9a2c43f25c7b800a40cd86254074a1144ac2b43d9b2e774abaf27fc092e9d963fca72ed8f7699db8778f5a17e68f7bb678e060
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,21 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.1.18] - 2026-11-03
34
+
35
+ - TAG: [v1.1.18][1.1.18t]
36
+ - COVERAGE: 97.57% -- 201/206 lines in 7 files
37
+ - BRANCH COVERAGE: 85.54% -- 71/83 branches in 7 files
38
+ - 27.78% documented
39
+
40
+ ### Added
41
+
42
+ - [#34] Support resolving gems from configured relative subdirectories within workspace or vendor roots.
43
+
44
+ ### Security
45
+
46
+ - Require Addressable 2.9.1 or later and Nokogiri 1.19.5 or later to avoid known vulnerabilities in older dependency releases.
47
+
33
48
  ## [1.1.17] - 2026-10-28
34
49
 
35
50
  - TAG: [v1.1.17][1.1.17t]
@@ -502,7 +517,9 @@ Please file a bug if you notice a violation of semantic versioning.
502
517
  - TAG: [v1.0.0][1.0.0t]
503
518
  - 12.50% documented
504
519
 
505
- [Unreleased]: https://github.com/kettle-dev/nomono/compare/v1.1.17...HEAD
520
+ [Unreleased]: https://github.com/kettle-dev/nomono/compare/v1.1.18...HEAD
521
+ [1.1.18]: https://github.com/kettle-dev/nomono/compare/v1.1.17...v1.1.18
522
+ [1.1.18t]: https://github.com/kettle-dev/nomono/releases/tag/v1.1.18
506
523
  [1.1.17]: https://github.com/kettle-dev/nomono/compare/v1.1.16...v1.1.17
507
524
  [1.1.17t]: https://github.com/kettle-dev/nomono/releases/tag/v1.1.17
508
525
  [1.1.16]: https://github.com/kettle-dev/nomono/compare/v1.1.15...v1.1.16
data/README.md CHANGED
@@ -149,6 +149,7 @@ Nomono has an *environment contract*. By default (`prefix: "NOMONO_GEMS"`):
149
149
  - `NOMONO_GEMS_VENDORED_GEMS` (or legacy `VENDORED_GEMS`) is a comma-delimited list of gem names resolved from a vendor directory. This is **independent** of `NOMONO_GEMS_DEV` — it applies when you have vendored copies of specific gems that should override both the workspace and released versions.
150
150
  - `NOMONO_GEMS_VENDOR_GEM_DIR` (or legacy `VENDOR_GEM_DIR`) is the base path of the vendor directory used for gems listed in `NOMONO_GEMS_VENDORED_GEMS`. Defaults to `$workspace_root/vendor`. This is **not** an alternative form of the workspace root — it only affects vendored gems.
151
151
  - `NOMONO_GEMS_PATH_ALIASES` (or global fallback `NOMONO_PATH_ALIASES`) is a comma-delimited list of `source=canonical` absolute path aliases. Each pair must resolve to the same real directory. Matching local gem paths are rewritten to the canonical spelling before Bundler receives them, preventing `Gemfile.lock` churn from equivalent paths such as `/var/home/...` and `/home/...`.
152
+ - The `subdirs:` option maps gem names to relative paths within the selected workspace or vendor directory. Use it when a gem's source is nested inside a repository; paths must be relative and cannot contain `..`.
152
153
  - `NOMONO_GEMS_DEBUG` enables debug output from nomono.
153
154
 
154
155
  ### Examples
@@ -209,6 +210,19 @@ eval_nomono_gems(
209
210
  )
210
211
  ```
211
212
 
213
+ For a gem stored in a subdirectory of its repository, map its name to that
214
+ relative path. Other gems keep the default `<root>/<gem-name>` layout:
215
+
216
+ ```ruby
217
+ eval_nomono_gems(
218
+ gems: %w[structuredmerge-core],
219
+ prefix: "STRUCTUREDMERGE_CORE",
220
+ path_env: "STRUCTUREDMERGE_CORE_DEV",
221
+ root: %w[src my structuredmerge structuredmerge],
222
+ subdirs: {"structuredmerge-core" => "packages/ruby"}
223
+ )
224
+ ```
225
+
212
226
  This is the pattern generated by `kettle-jem`: the Gemfile remains readable,
213
227
  and nomono owns the path normalization for sibling repositories. When
214
228
  `KETTLE_DEV_DEV=false` or is unset, the modular local override is skipped and
@@ -497,7 +511,7 @@ Thanks for RTFM. ☺️
497
511
  [📌gitmoji]: https://gitmoji.dev
498
512
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
499
513
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
500
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.195-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
514
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.206-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
501
515
  [🔐security]: https://github.com/kettle-dev/nomono/blob/main/SECURITY.md
502
516
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
503
517
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -12,7 +12,7 @@ module Nomono
12
12
  end
13
13
 
14
14
  def gems(gems:, prefix: "NOMONO_GEMS", allowlist: gems, path_env: nil, vendored_gems_env: nil, vendor_gem_dir_env: nil,
15
- debug_env: nil, path_aliases: nil, path_aliases_env: nil, root: ["src", "my"], strict: true, **_options)
15
+ debug_env: nil, path_aliases: nil, path_aliases_env: nil, subdirs: nil, root: ["src", "my"], strict: true, **_options)
16
16
  requested = normalize_gems(gems)
17
17
  allowed = normalize_gems(allowlist)
18
18
  requested.each { |gem_name| validate_gem_name!(gem_name, allowed, strict: strict) }
@@ -28,10 +28,11 @@ module Nomono
28
28
  aliases = normalize_path_aliases(
29
29
  path_aliases || fetch_with_fallback(path_aliases_env || "#{prefix}_PATH_ALIASES", "", "NOMONO_PATH_ALIASES")
30
30
  )
31
+ gem_subdirs = normalize_subdirs(subdirs)
31
32
 
32
33
  gem_paths = requested.each_with_object({}) do |gem_name, memo|
33
34
  base = vendored.include?(gem_name) ? vendor_dir : dev_root
34
- memo[gem_name] = normalize_path_alias(File.join(base, gem_name), aliases)
35
+ memo[gem_name] = normalize_path_alias(File.join(base, gem_subdirs.fetch(gem_name, gem_name)), aliases)
35
36
  end
36
37
 
37
38
  debug_key = debug_env || "#{prefix}_DEBUG"
@@ -71,6 +72,23 @@ module Nomono
71
72
  end
72
73
  end
73
74
 
75
+ def normalize_subdirs(value)
76
+ return {} if value.nil?
77
+ unless value.is_a?(Hash)
78
+ raise Error, "subdirs must be configured as a hash of gem names to relative paths"
79
+ end
80
+
81
+ value.each_with_object({}) do |(gem_name, subdir), memo|
82
+ path = subdir.to_s
83
+ segments = path.split(/[\\\/]+/)
84
+ if path.empty? || path.start_with?("/") || path.match?(/\A[A-Za-z]:/) || segments.include?("..") || segments.all? { |segment| segment.empty? || segment == "." }
85
+ raise Error, "subdirectory for gem '#{gem_name}' must be a relative path without '..'"
86
+ end
87
+
88
+ memo[gem_name.to_s] = path
89
+ end
90
+ end
91
+
74
92
  def fetch_with_fallback(primary_key, default, legacy_key = nil)
75
93
  primary = env[primary_key]
76
94
  return primary unless primary.nil? || primary.empty?
@@ -4,7 +4,7 @@ module Nomono
4
4
  # Version namespace for this gem.
5
5
  module Version
6
6
  # Current gem version.
7
- VERSION = "1.1.17"
7
+ VERSION = "1.1.18"
8
8
  end
9
9
  # Current gem version exposed at the traditional constant location.
10
10
  VERSION = Version::VERSION # Traditional Constant Location
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nomono
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.17
4
+ version: 1.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -174,7 +174,7 @@ dependencies:
174
174
  version: '2.0'
175
175
  - - ">="
176
176
  - !ruby/object:Gem::Version
177
- version: 2.0.28
177
+ version: 2.0.29
178
178
  type: :development
179
179
  prerelease: false
180
180
  version_requirements: !ruby/object:Gem::Requirement
@@ -184,7 +184,7 @@ dependencies:
184
184
  version: '2.0'
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 2.0.28
187
+ version: 2.0.29
188
188
  - !ruby/object:Gem::Dependency
189
189
  name: turbo_tests2
190
190
  requirement: !ruby/object:Gem::Requirement
@@ -283,10 +283,10 @@ licenses:
283
283
  - AGPL-3.0-only
284
284
  metadata:
285
285
  homepage_uri: https://nomono.galtzo.com/
286
- source_code_uri: https://github.com/kettle-dev/nomono/tree/v1.1.17
287
- changelog_uri: https://github.com/kettle-dev/nomono/blob/v1.1.17/CHANGELOG.md
286
+ source_code_uri: https://github.com/kettle-dev/nomono/tree/v1.1.18
287
+ changelog_uri: https://github.com/kettle-dev/nomono/blob/v1.1.18/CHANGELOG.md
288
288
  bug_tracker_uri: https://github.com/kettle-dev/nomono/issues
289
- documentation_uri: https://www.rubydoc.info/gems/nomono/1.1.17
289
+ documentation_uri: https://www.rubydoc.info/gems/nomono/1.1.18
290
290
  funding_uri: https://github.com/sponsors/pboling
291
291
  wiki_uri: https://github.com/kettle-dev/nomono/wiki
292
292
  news_uri: https://www.railsbling.com/tags/nomono
metadata.gz.sig CHANGED
Binary file