markdowndocs 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42524ce732ca270ae79839b4d26522b30fab9e088793df8c62e0c20ac0c5b1c3
4
- data.tar.gz: c999713e3b504d54838db523a0f708110f9f28a049efd1568dacfbafa3b9d1c6
3
+ metadata.gz: 310be55d869a1dbc1399c9964424ce458494aca95a702272cd3529ae9a212f63
4
+ data.tar.gz: a6f95d22f40b2385b92ab455b467fc271c22ba93449d7b07eafc34beaa5f37a8
5
5
  SHA512:
6
- metadata.gz: 66583f10a3cf8c80eb651a0d3b0cbd99f86604313a36e91713d90569ee1ac1eb4889782969fcac16ad91dbb067a2a3853a20b5f99ddb7a7767529b7a489d7216
7
- data.tar.gz: 705f2632e8a1429571b483d6a5ef6285af1a6380f428743b8adb5181342e2854027b327eceb3df001be4a6af3b932f713c2b6e48a5c81870569d6ae2dcfdb1fd
6
+ metadata.gz: f01d9eabec60ff72ff96dba5c4b03f270ab8087fe72d70f68ad405c15cb51645d341c10354156951bea744e0167242ecb0a739389cee986688a3eca7fa46dbff
7
+ data.tar.gz: 67d251f7b2b0266dc6b6d71951f0cf11a4d243639b8f6e248385e165221d0f828a6723a207480165ad8c996577179b9ec4c1bbdcddaf289cebe893d010d3a579
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.1] - 2026-02-20
9
+
10
+ ### Fixed
11
+
12
+ - Host app route helpers (e.g., `about_path`, `root_path`) now resolve correctly when rendered inside the engine's layout context. Previously, `isolate_namespace` caused these helpers to resolve against the engine's catch-all `:slug` route, producing URLs like `/docs/about` instead of `/about`. Replaced `helper Rails.application.routes.url_helpers` with `main_app` delegation pattern.
13
+
8
14
  ## [0.1.0] - 2026-02-20
9
15
 
10
16
  ### Added
@@ -23,4 +29,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
29
  - i18n support for all UI strings
24
30
  - Install generator (`rails generate markdowndocs:install`)
25
31
 
32
+ [0.1.1]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.1
26
33
  [0.1.0]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.0
@@ -4,9 +4,25 @@ module Markdowndocs
4
4
  class ApplicationController < ::ApplicationController
5
5
  protect_from_forgery with: :exception
6
6
 
7
- # Make host app route helpers available in engine views
8
- # (needed because isolate_namespace blocks host helpers by default)
9
- helper Rails.application.routes.url_helpers
7
+ # Delegate unresolved route helpers to the host app via main_app.
8
+ # isolate_namespace blocks host helpers by default, and the commonly-used
9
+ # `helper Rails.application.routes.url_helpers` doesn't reliably win the
10
+ # method-lookup race — so host-app links like about_path can resolve
11
+ # against the engine's catch-all :slug route instead. This delegation
12
+ # ensures host app route helpers always work correctly in engine views.
13
+ helper do
14
+ def method_missing(method, *args, &block)
15
+ if main_app.respond_to?(method)
16
+ main_app.send(method, *args, &block)
17
+ else
18
+ super
19
+ end
20
+ end
21
+
22
+ def respond_to_missing?(method, include_private = false)
23
+ main_app.respond_to?(method, include_private) || super
24
+ end
25
+ end
10
26
 
11
27
  # Support Rails 8 built-in authentication (allow_unauthenticated_access)
12
28
  # without requiring it — works with any auth system or none at all
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdowndocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura