authtown 0.3.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/authtown/version.rb +1 -1
- data/lib/authtown/view_mixin.rb +4 -16
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5354c22eca5eed6bbf2bdfb9abc22b34681b4eea99ae84a22e692a522b12df64
|
|
4
|
+
data.tar.gz: ccf72db36f90a5059724f1df6aaa4c16ac261bf8f7fa27c093b08ffe010c35f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffa84f2f6d723e4c790ee27a242231fcfcb3c70f4567f163d431a7b76d750911e3b98a4d63a4d40cdcd663da20ac4f7d932d59f0107732077d93cd68307d48af
|
|
7
|
+
data.tar.gz: 6444e3cf4af35c02c8c88bf6bd93d17aa2226e81ea193f7353eaae3b8a757d1a201209945a08939604ae5f6586d9f8075edbbf876da5026f31ead98e2bb7b79c
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0] - 2024-05-06
|
|
11
|
+
|
|
12
|
+
- Another refactor to support latest updates in Bridgetown v2
|
|
13
|
+
|
|
10
14
|
## [0.3.0] - 2024-04-07
|
|
11
15
|
|
|
12
16
|
- Refactor how Bridgetown's view layer is integrated with Rodauth, improve performance
|
data/lib/authtown/version.rb
CHANGED
data/lib/authtown/view_mixin.rb
CHANGED
|
@@ -41,23 +41,11 @@ module Authtown::ViewMixin
|
|
|
41
41
|
"#{kwargs.dig(:locals, :rodauth).prefix.delete_prefix("/")}/#{kwargs[:template]}"
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
routes_manifest.routes.each do |route|
|
|
45
|
+
file, localized_slugs = route
|
|
46
|
+
next unless localized_slugs.first == kwargs[:template]
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
file, localized_file_slugs = route
|
|
49
|
-
|
|
50
|
-
file_slug = localized_file_slugs.first
|
|
51
|
-
|
|
52
|
-
next unless file_slug == kwargs[:template]
|
|
53
|
-
|
|
54
|
-
Bridgetown::Routes::CodeBlocks.eval_route_file file, file_slug, self
|
|
55
|
-
route_block = Bridgetown::Routes::CodeBlocks.route_block(file_slug)
|
|
56
|
-
response.instance_variable_set(
|
|
57
|
-
:@_route_file_code, route_block.instance_variable_get(:@_route_file_code)
|
|
58
|
-
) # could be nil
|
|
59
|
-
@_route_locals = kwargs[:locals]
|
|
60
|
-
return instance_exec(request, &route_block)
|
|
48
|
+
return run_file_route(file, slug: localized_slugs.first)
|
|
61
49
|
end
|
|
62
50
|
|
|
63
51
|
Bridgetown.logger.warn("Rodauth template not found: #{kwargs[:template]}")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: authtown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bridgetown
|