munola 0.5.1 → 0.6.0

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: 1ab78c18a2c9958d0c634e2177f711100a0fb3d6238a792d821a5ae559a84ec3
4
- data.tar.gz: 4fb06f8764e9678598ea2a202168009e6e105352f67f05209a0ee1fbe455fc2c
3
+ metadata.gz: 558cd383ea993d03a3a667a3287a7ae27db1f8a41642e63bce0727846a1af987
4
+ data.tar.gz: 5cd95dccec42025f8cea27b8b6aaa528f8a1f7e4b17ddb1be53541a12bf62268
5
5
  SHA512:
6
- metadata.gz: 8e283df48b4b6f8de613a40e3898c1912568dceab40069fd5af52cfb02db3aa11fc38e79440252566e84a66a5a096aed3590caf07a7a88f34780cfadb4e4309c
7
- data.tar.gz: 8d91d165e1fccfe346955d617fd6b0786764619fafa3b4acff654ec327e0f7ec06dabad8e9600daab7dabb5821593e9b1676ff0e8286a0feea9fa93ae8076849
6
+ metadata.gz: 2a47d2376487ef8e19cf22b5f66d00f32eb1ab8e7cab3750846ccc048a6739ec5cd7f6f4e7a527079a7c5ca3555baeb5d2ac7cf9000c2aa4ed772e225d30be0b
7
+ data.tar.gz: 51e549f4e966e6ad231f7618c2b9e7826a84fa0b2c8972c3fd35ff666128bfdf2d0f2b9fda657139b1548ac2ae9a2f76c138e75e8c178a9ebc95f9aa3a7c5ccb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,55 @@
1
+ ## enola 0.5.3, enola-rb 0.5.3 and munola 0.6.0 (2026-08-24)
2
+
3
+ Both providers are on again. enola-labs shipped the prefix walk fix in 0.4.6,
4
+ which is the release the enola and enola-rb gems now drive, so the config they
5
+ write carries Prism and Rubydex as it did before the hang was found.
6
+
7
+ munola waits. Its binary is a fork release cut before that fix, so it stays on
8
+ Prism alone until the channel is re-cut, and its version file says which
9
+ upstream it is built on rather than implying the newest.
10
+
11
+ munola-rb is gone, and was never published. The railtie and generator move
12
+ into munola, which is why munola is 0.6.0: one gem for one channel, since the
13
+ split that makes sense for enola and enola-rb, letting a Rubyist take the
14
+ binary wrapper without the Rails layer, does not describe anyone's use of
15
+ munola. Requiring munola still loads no Rails; the generator registers when
16
+ the application has already loaded it.
17
+
18
+ ## enola 0.5.2, enola-rb 0.5.2, munola 0.5.2 and munola-rb 0.5.2 (2026-08-23)
19
+
20
+ Rubydex is off in the config these gems write, and named in a comment beside
21
+ the reason. The release each gem drives carries a walk that can fail to
22
+ return: a constant reference spanning lines could be treated as its own
23
+ predecessor, so a tree with vendored gems could snapshot for twenty-six
24
+ minutes and several gigabytes without finishing. Two of the three Rails trees
25
+ it was tried on did exactly that.
26
+
27
+ The fix exists and is not yet in a published enola, so the default cannot
28
+ depend on it. Prism is unaffected and stays on: it parses a monolith in 13.7
29
+ seconds. Uncommenting the two lines brings Rubydex back for anyone who wants
30
+ it deliberately, and the default returns the moment the binary each gem drives
31
+ carries the fix.
32
+
33
+ ## enola 0.5.1 (2026-08-23)
34
+
35
+ The resolver no longer probes its own binstub. It read a candidate's first 512
36
+ bytes looking for the marker RubyGems writes, and a real binstub carries a
37
+ `/bin/sh` + `ruby -x` preamble holding the interpreter's absolute path, which puts
38
+ that marker around byte 580 — outside the window. So the guard missed every
39
+ RubyGems-generated binstub, the wrapper ran itself, and running itself has no
40
+ bottom: `enola --version` on a cold cache spawned Ruby processes until it was
41
+ killed. The whole file is read now, capped at 64 KiB so a released binary is never
42
+ slurped only to be rejected, and `Gem.bin_path` is recognised beside
43
+ `Gem.activate_bin_path`. A probe also marks its child's environment, and a resolver
44
+ that sees the marker declines to look at PATH at all, so the recursion is bounded
45
+ by construction rather than by how well a heuristic reads a file.
46
+
47
+ The marker is written where it is spawned: every probe passes it into the child,
48
+ so a wrapper reached under another name leaves PATH alone instead of probing in
49
+ turn. That bound is what covers the wrappers the content check cannot see, a
50
+ version manager's shim among them, which carries none of the markers a binstub
51
+ does. Reported and fixed by dejo1307 in #1.
52
+
1
53
  ## munola 0.4.4.2 and munola-rb 0.4.4.2 (2026-08-23)
2
54
 
3
55
  munola follows the channel it drives. Its binary is now cut from the stable
data/README.md CHANGED
@@ -4,10 +4,11 @@ Four pure-Ruby gems, one repository, for running
4
4
  [enola](https://github.com/enola-labs/enola), the architecture-graph tool,
5
5
  from Ruby. None of them carries a binary or compiles anything.
6
6
 
7
- Two channels, the same layering on both: `enola` wraps the released upstream
8
- binary and `enola-rb` adds the Rails layer on it; `munola` wraps the munola
9
- binary and `munola-rb` adds the Rails layer on that. The Rails code is written
10
- once, in `enola-rb`, and the munola gems add only what is munola's own.
7
+ Two channels. `enola` wraps the released upstream binary and `enola-rb` adds
8
+ the Rails layer on it, split so a Rubyist can take the wrapper without Rails.
9
+ `munola` is one gem for its own channel, wrapper and Rails layer together,
10
+ because nobody installs it to avoid Rails. The Rails code is written once, in
11
+ `enola-rb`, and munola adds only what is munola's own.
11
12
 
12
13
  ## `enola`
13
14
 
@@ -109,14 +110,9 @@ publishes; `MUNOLA_BINARY=/path/to/enola` names one to drive instead, and
109
110
  every command says which answered. `munola` depends on `enola` at the same
110
111
  minor and on `enola-guides` 0.3.1 or later; requiring it loads no Rails.
111
112
 
112
- ## `munola-rb`
113
+ ## munola under Rails
113
114
 
114
- The Rails layer over `munola`, what `enola-rb` is to `enola`. It depends on
115
- both at the same minor and adds one generator.
116
-
117
- ```ruby
118
- gem "munola-rb"
119
- ```
115
+ munola carries its own generator, and the rake tasks are enola-rb's:
120
116
 
121
117
  ```sh
122
118
  bin/rails generate munola:install --tenant-column company_id
@@ -124,7 +120,8 @@ bin/rake enola:snapshot
124
120
  bin/rake enola:check
125
121
  ```
126
122
 
127
- The generator runs the same install `munola init` does. The rake tasks are
128
- enola-rb's and need no munola copy: `munola` installs its own resolver when it
129
- loads, so `enola:snapshot` and `enola:check` drive the munola binary in an app
130
- that has this gem, and the upstream binary in one that does not.
123
+ The generator runs the same install `munola init` does. `munola` installs its
124
+ own resolver when it loads, so `enola:snapshot` and `enola:check` drive the
125
+ munola binary in an app that has this gem, and the upstream binary in one that
126
+ does not. Requiring munola loads no Rails; the generator registers when the
127
+ application has already loaded it.
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+ require "munola"
5
+
6
+ module Munola
7
+ module Generators
8
+ class InstallGenerator < Rails::Generators::Base
9
+ desc "Writes enola/constraints/ and the munola recipe catalogue, binding what the tree shows a need for"
10
+ class_option :tenant_column, type: :string, default: nil, desc: "The column most tables carry; confirmed against db/schema.rb"
11
+
12
+ def install
13
+ Munola::Installer.new(destination_root, tenant_column: options[:tenant_column]).install.lines.each { |line| say line }
14
+ rescue Enola::Error => e
15
+ raise Thor::Error, "munola: #{e.message}"
16
+ end
17
+ end
18
+ end
19
+ end
@@ -27,7 +27,10 @@ module Munola
27
27
  else
28
28
  lines << " # prism: the enola gem on this machine carries no provider script; add one here to run it"
29
29
  end
30
- lines += [" - name: rubydex", " expected_version: \"#{RUBYDEX_VERSION}\""]
30
+ lines += [" # rubydex is off until the channel release carries the walk fix:",
31
+ " # a reference spanning lines could be its own predecessor, so a tree with",
32
+ " # vendored gems could snapshot without ever finishing. Uncomment to run it.",
33
+ " # - name: rubydex", " # expected_version: \"#{RUBYDEX_VERSION}\""]
31
34
  "#{lines.join("\n")}\n"
32
35
  end
33
36
 
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Munola
4
+ # The enola:* tasks come from the enola-rb railtie and drive whatever channel
5
+ # is installed; requiring munola installs its resolver, so under this gem
6
+ # they run the munola binary. Only the generator is munola's own.
7
+ class Railtie < Rails::Railtie
8
+ generators { require_relative "../generators/munola/install/install_generator" }
9
+ end
10
+ end
@@ -5,5 +5,5 @@ module Munola
5
5
  # CHANNEL_VERSION the fork release the gem fetches.
6
6
  UPSTREAM_VERSION = "0.4.4"
7
7
  CHANNEL_VERSION = "0.4.4.2"
8
- VERSION = "0.5.1"
8
+ VERSION = "0.6.0"
9
9
  end
data/lib/munola.rb CHANGED
@@ -8,6 +8,10 @@ require_relative "munola/detector"
8
8
  require_relative "munola/providers_config"
9
9
  require_relative "munola/installer"
10
10
  require_relative "munola/cli"
11
+ # munola is a wrapper first. enola-rb requires rails because it is the Rails
12
+ # layer; munola only registers its generator when the application has already
13
+ # loaded Rails, so driving the binary alone costs nothing.
14
+ require_relative "munola/railtie" if defined?(Rails::Railtie)
11
15
 
12
16
  Enola.channel = Munola::CHANNEL
13
17
  Enola.resolver_factory = -> { Munola::Resolver.new(channel: Munola::CHANNEL) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: munola
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muhamed Isabegovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-23 00:00:00.000000000 Z
11
+ date: 2026-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enola
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: 0.5.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.0
26
+ version: 0.5.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: enola-rb
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.0
33
+ version: 0.5.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.5.0
40
+ version: 0.5.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: enola-guides
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ description: |
66
66
  enola-guides gem carries (Ember, data ownership, API boundaries,
67
67
  background work, a tenant foreign key) into the project, binds the
68
68
  recipes its tree justifies, and turns both Ruby providers on by default.
69
- The Rails generator lives in munola-rb. Offered upstream where it fits;
69
+ Under Rails it adds `rails generate munola:install`; the enola:* rake tasks come from enola-rb and drive munola's binary. Offered upstream where it fits;
70
70
  no binary here, nothing compiled.
71
71
  email:
72
72
  - m.isabegovic@hotmail.com
@@ -79,6 +79,7 @@ files:
79
79
  - LICENSE
80
80
  - README.md
81
81
  - exe/munola
82
+ - lib/generators/munola/install/install_generator.rb
82
83
  - lib/munola.rb
83
84
  - lib/munola/catalogue.rb
84
85
  - lib/munola/channel.rb
@@ -86,6 +87,7 @@ files:
86
87
  - lib/munola/detector.rb
87
88
  - lib/munola/installer.rb
88
89
  - lib/munola/providers_config.rb
90
+ - lib/munola/railtie.rb
89
91
  - lib/munola/version.rb
90
92
  homepage: https://github.com/misabegovic/enola-rb
91
93
  licenses: