munola 0.4.4.1 → 0.5.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: fc1f44ab0b5e72d5f18dda2afe879b156a0b9ac9a0ae337a1419b3641d2e91a1
4
- data.tar.gz: d3f40bfc7e5c2225a268c025ef8a5ab4d141cc3109d1e0faa79c05d7204b210f
3
+ metadata.gz: 3fef04df27a6176d9c98ef6a96588ab444f63e92a6ef3c3c3fd73268af931de3
4
+ data.tar.gz: 8190ecb25656352775ea9ead33c18e04c7faddaac23d67644045398fea80ce26
5
5
  SHA512:
6
- metadata.gz: 7401c008c0765293332500601bcb0243342f04e36f8332a4ca48a9f0de72525677b22aea0b1accb83989bcd8c072e70f114531c746057fd5e8a4e7288f139ef8
7
- data.tar.gz: 5d91e09afc035996dfca5798b73f16f93cd4effad7a70b3da65dc919509892c5794b2dce05be6f9147e253bc02af125da98dd0ef45912ce507b5f2103f406d12
6
+ metadata.gz: 7524cf02ef40ba7136a5ff531ffda09c2e1056b9a53b73710728be0ad64a7158d3aeccf94492a7401619776d2a44a07e22bcff7511ac775083112de200df4820
7
+ data.tar.gz: fcf9fc3d4ac887817ad8dab39f5c071d4569a282a12fa2720bd5f935da62a4793e6a833c45032cead51f653603baf675f78f2f064351a8bae23516f912a9e883
data/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## munola 0.4.4.2 and munola-rb 0.4.4.2 (2026-08-23)
2
+
3
+ munola follows the channel it drives. Its binary is now cut from the stable
4
+ channel after it took eight changes measured against a Ruby architecture
5
+ linter, so the gem's version moves with the release it fetches. The Rails
6
+ layer is its own gem, `munola-rb`, the way `enola-rb` is for the upstream
7
+ channel; `require "munola"` loads no Rails. A catalogue recipe the binary
8
+ already binds is no longer bound a second time.
9
+
10
+ ## enola 0.4.4.1 and enola-rb 0.4.4.1 (2026-08-23)
11
+
12
+ Wrapper fixes on the same upstream release. A test that set the channel put
13
+ back upstream rather than what it found, so on some orderings a channel gem's
14
+ own installation read as upstream. The Rails layer packaged its generator
15
+ through a glob wide enough to take another channel's; it now packages its own.
16
+ Both gems still drive upstream v0.4.4.
17
+
18
+ ## munola-rb 0.4.4.1 (2026-08-23)
19
+
20
+ The Rails layer over munola, what enola-rb is to enola: `rails generate
21
+ munola:install [--tenant-column COLUMN]` writes the starter laws, the
22
+ bindings the binary's own init picks and the munola catalogue, and the
23
+ enola:init, enola:snapshot and enola:check tasks drive munola's binary
24
+ because munola installs its own resolver. The generator and the railtie
25
+ move here out of the munola gem, so `require "munola"` loads no Rails and a
26
+ project that only drives the binary carries no Rails machinery. The recipe
27
+ catalogue, the detection and the tenant-column argument stay munola's.
28
+
29
+ `Enola.resolver_factory` is readable as well as writable, so whoever
30
+ replaces it can put back what was installed rather than what it assumed.
31
+
1
32
  ## munola 0.4.4.1 (2026-08-23)
2
33
 
3
34
  The wrapper over the munola channel, first release with an implementation.
data/LICENSE CHANGED
@@ -187,7 +187,7 @@ APPENDIX: How to apply the Apache License to your work.
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright (c) 2026 Dejan Menges
190
+ Copyright (c) 2026 Muhamed Isabegovic
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,13 +1,19 @@
1
1
  # enola-rb
2
2
 
3
- Three pure-Ruby gems, one repository, for running
3
+ 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.
11
+
7
12
  ## `enola`
8
13
 
9
- The wrapper of the released enola. Its version is the upstream release it
10
- drives: `enola 0.4.4` runs enola-labs' v0.4.4.
14
+ The wrapper of the released enola. The gem versions itself; the release it
15
+ drives is `Enola::UPSTREAM_VERSION`, v0.4.4 as of `enola 0.5.0`, and every
16
+ gemspec summary names it.
11
17
 
12
18
  ```ruby
13
19
  gem "enola"
@@ -39,7 +45,7 @@ This gem is not an enola-labs release; it runs theirs.
39
45
 
40
46
  ## `enola-rb`
41
47
 
42
- The Rails layer over `enola`. It depends on `enola` at the same version and on
48
+ The Rails layer over `enola`. It depends on `enola` at the same minor and on
43
49
  [enola-guides](https://github.com/misabegovic/enola-guides), and adds nothing
44
50
  to the binary's surface.
45
51
 
@@ -68,18 +74,17 @@ remedy.
68
74
 
69
75
  One person's taste on top of enola: the same wrapper over another channel,
70
76
  the builds cut from [a fork of enola](https://github.com/misabegovic/enola),
71
- versioned as the upstream they are built on plus a fourth segment
72
- (`0.4.4.1` drives a build on v0.4.4), each release naming what differs from
73
- that upstream. It is offered upstream where it fits and is not positioned
74
- against it. What it adds is the channel and the catalogue.
77
+ each release naming what differs from that upstream. The gem versions itself;
78
+ the channel release it fetches is `Munola::CHANNEL_VERSION`, which carries the
79
+ upstream it is built on plus a segment of its own (`0.4.4.2` on v0.4.4). It is
80
+ offered upstream where it fits and is not positioned against it. What it adds is the channel and the catalogue.
75
81
 
76
82
  ```ruby
77
83
  gem "munola"
78
84
  ```
79
85
 
80
86
  ```sh
81
- bin/rails generate munola:install --tenant-column company_id
82
- bundle exec munola init .
87
+ bundle exec munola init . --tenant-column company_id
83
88
  bundle exec munola --version
84
89
  ```
85
90
 
@@ -95,9 +100,31 @@ inflection table; it writes `mcp-arch.yaml` with both Ruby providers on by
95
100
  default, Prism through the script the `enola` gem carries and Rubydex built
96
101
  into the binary, and fetches the Rubydex library, a failed fetch reported as a
97
102
  named skip. It never asks a question. `munola --version` names the munola
98
- version, the upstream it is built on and which binary answered.
103
+ version, the channel release and upstream it is built on, and which binary
104
+ answered.
105
+
106
+ The binary comes from the fork's releases the way `enola`'s comes from
107
+ upstream's, fetched on first use and verified against the sha256 the release
108
+ publishes; `MUNOLA_BINARY=/path/to/enola` names one to drive instead, and
109
+ every command says which answered. `munola` depends on `enola` at the same
110
+ minor and on `enola-guides` 0.3.1 or later; requiring it loads no Rails.
111
+
112
+ ## `munola-rb`
113
+
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
+ ```
120
+
121
+ ```sh
122
+ bin/rails generate munola:install --tenant-column company_id
123
+ bin/rake enola:snapshot
124
+ bin/rake enola:check
125
+ ```
99
126
 
100
- The first munola release is what makes the channel real; until it is cut,
101
- `MUNOLA_BINARY=/path/to/enola` names the binary to drive, and every command
102
- says so. `munola` depends on `enola` and `enola-rb` at its upstream version
103
- and on `enola-guides` 0.3.1 or later.
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.
@@ -12,6 +12,7 @@ module Munola
12
12
  PLACEHOLDERS = { column: "TENANT_COLUMN", table: "TENANT_TABLE" }.freeze
13
13
 
14
14
  def self.source_dir
15
+ require "enola-rb"
15
16
  File.join(EnolaRb::Guides.root, "recipes")
16
17
  end
17
18
 
@@ -4,7 +4,7 @@ module Munola
4
4
  CHANNEL = Enola::Channel.new(
5
5
  name: "munola",
6
6
  release_base: "https://github.com/misabegovic/enola/releases/download",
7
- version: VERSION,
7
+ version: CHANNEL_VERSION,
8
8
  asset_prefix: "enola",
9
9
  tag_prefix: "munola-v"
10
10
  ).freeze
@@ -32,6 +32,6 @@ module Munola
32
32
  end
33
33
 
34
34
  def self.channel_line(found = resolve)
35
- "munola #{VERSION}, built on enola #{UPSTREAM_VERSION}; binary via #{found.source} (#{found.path})"
35
+ "munola #{VERSION}, channel #{CHANNEL_VERSION} on enola #{UPSTREAM_VERSION}; binary via #{found.source} (#{found.path})"
36
36
  end
37
37
  end
@@ -26,7 +26,11 @@ module Munola
26
26
  # The Rails layer first (starter laws, the binary's own init, upstream's
27
27
  # recipes commented), then what only munola carries: the catalogue, the
28
28
  # bindings the tree justifies, the providers both on by default.
29
+ # enola-rb carries the installer this reuses; it is required here rather
30
+ # than at load time so `require "munola"` stays a wrapper and pulls in no
31
+ # Rails machinery for a project that only drives the binary.
29
32
  def install
33
+ require "enola-rb"
30
34
  rails = EnolaRb::Installer.new(@root, binary: resolved_binary, stderr: @stderr).install
31
35
  @report.written.concat(rails.written)
32
36
  @report.notes.concat(rails.notes)
@@ -55,6 +59,10 @@ module Munola
55
59
  File.join(@root, "enola", "constraints", "recipes.yaml")
56
60
  end
57
61
 
62
+ # A munola binary carries the catalogue itself, so its own `constraints
63
+ # init` may already have bound a recipe this would bind again, and two
64
+ # instances of one recipe expand to colliding rule ids. What the file
65
+ # already names is left alone and counted as bound.
58
66
  def bind(names)
59
67
  @bound = names & Catalogue::RECIPES
60
68
  @commented = Catalogue::RECIPES - @bound
@@ -62,7 +70,8 @@ module Munola
62
70
  return if existing.include?("# munola catalogue")
63
71
 
64
72
  doc = YAML.safe_load(existing) || {}
65
- entries = Array(doc["use_recipe"]) + @bound.map { |name| { "recipe" => name, "as" => name, "mode" => "advisory" } }
73
+ declared = Array(doc["use_recipe"]).map { |entry| entry["recipe"] }.compact
74
+ entries = Array(doc["use_recipe"]) + (@bound - declared).map { |name| { "recipe" => name, "as" => name, "mode" => "advisory" } }
66
75
  body = YAML.dump({ "use_recipe" => entries }).sub(/\A---\n/, "")
67
76
  tail = existing[/\n# Shipped recipes not bound.*\z/m].to_s
68
77
  commented = @commented.map { |name| "# - recipe: #{name}\n# as: #{name}\n# mode: advisory\n" }.join
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Munola
4
+ # UPSTREAM_VERSION names the enola release this channel is built on,
5
+ # CHANNEL_VERSION the fork release the gem fetches.
4
6
  UPSTREAM_VERSION = "0.4.4"
5
- VERSION = "#{UPSTREAM_VERSION}.1"
7
+ CHANNEL_VERSION = "0.4.4.2"
8
+ VERSION = "0.5.0"
6
9
  end
data/lib/munola.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "enola"
4
- require "enola-rb"
5
4
  require_relative "munola/version"
6
5
  require_relative "munola/channel"
7
6
  require_relative "munola/catalogue"
@@ -9,7 +8,6 @@ require_relative "munola/detector"
9
8
  require_relative "munola/providers_config"
10
9
  require_relative "munola/installer"
11
10
  require_relative "munola/cli"
12
- require_relative "munola/railtie" if defined?(Rails::Railtie)
13
11
 
14
12
  Enola.channel = Munola::CHANNEL
15
13
  Enola.resolver_factory = -> { Munola::Resolver.new(channel: Munola::CHANNEL) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: munola
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muhamed Isabegovic
@@ -14,30 +14,30 @@ dependencies:
14
14
  name: enola
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.4
19
+ version: 0.5.0
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.4.4
26
+ version: 0.5.0
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.4.4
33
+ version: 0.5.0
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.4.4
40
+ version: 0.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: enola-guides
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -54,13 +54,13 @@ dependencies:
54
54
  version: 0.3.1
55
55
  description: |
56
56
  The same pure-Ruby wrapper as the enola gem over another channel: the
57
- builds cut from a fork of enola, versioned as the upstream they are built
58
- on plus a fourth segment, each release naming what differs. `munola init`
59
- writes the recipe catalogue the enola-guides gem carries (Ember, data
60
- ownership, API boundaries, background work, a tenant foreign key) into
61
- the project and binds the recipes its tree justifies, and turns both Ruby
62
- providers on by default. Offered upstream where it fits; no binary here,
63
- nothing compiled.
57
+ builds cut from a fork of enola, each release naming what differs. This
58
+ gem drives channel release 0.4.4.2, built on enola
59
+ 0.4.4. `munola init` writes the recipe catalogue the
60
+ enola-guides gem carries (Ember, data ownership, API boundaries,
61
+ background work, a tenant foreign key) into the project and binds the
62
+ recipes its tree justifies, and turns both Ruby providers on by default. The Rails generator lives in munola-rb. Offered
63
+ upstream where it fits; no binary here, nothing compiled.
64
64
  email:
65
65
  - m.isabegovic@hotmail.com
66
66
  executables:
@@ -72,7 +72,6 @@ files:
72
72
  - LICENSE
73
73
  - README.md
74
74
  - exe/munola
75
- - lib/generators/munola/install/install_generator.rb
76
75
  - lib/munola.rb
77
76
  - lib/munola/catalogue.rb
78
77
  - lib/munola/channel.rb
@@ -80,7 +79,6 @@ files:
80
79
  - lib/munola/detector.rb
81
80
  - lib/munola/installer.rb
82
81
  - lib/munola/providers_config.rb
83
- - lib/munola/railtie.rb
84
82
  - lib/munola/version.rb
85
83
  homepage: https://github.com/misabegovic/enola-rb
86
84
  licenses:
@@ -1,19 +0,0 @@
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
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Munola
4
- class Railtie < Rails::Railtie
5
- generators { require_relative "../generators/munola/install/install_generator" }
6
- end
7
- end