bridgetown-routes 1.0.0 → 1.1.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cafc5bdea40bacaf7d7c2bb6badbc490cf67602dccccf1e1147a8ba9aec601ee
|
4
|
+
data.tar.gz: da29fd235e26ae5cc22c3ba95150fc1f5f3fb0cb79dbfff63852b8854d228dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1505f55118bba6242048102ea518d988230469e6ab1d5e90278129ad03f4d0e934a46a0b5a4b294df5c760b62f766ce24de02a8c8e51230ba4a8674f9153530c
|
7
|
+
data.tar.gz: 300c16eceb5cb3ff3a2cf9fca60462d8d7e3b7a508bb4ef13292b4d80ce6f2fccb33636c6c373fbfc868bf8024a1a3539ff14647723555dbcc2519366e8164bf
|
@@ -3,7 +3,14 @@
|
|
3
3
|
module Bridgetown
|
4
4
|
module Routes
|
5
5
|
module RodaRouter
|
6
|
-
def self.start!(app)
|
6
|
+
def self.start!(app) # rubocop:todo Metrics/MethodLength
|
7
|
+
unless Bridgetown::Current.site
|
8
|
+
Bridgetown.logger.warn(
|
9
|
+
"The `bridgetown_routes` plugin hasn't been configured in the Roda app."
|
10
|
+
)
|
11
|
+
return
|
12
|
+
end
|
13
|
+
|
7
14
|
r = app.request
|
8
15
|
response = app.response
|
9
16
|
|
data/lib/bridgetown-routes.rb
CHANGED
@@ -16,6 +16,7 @@ module Bridgetown
|
|
16
16
|
|
17
17
|
# rubocop:disable Bridgetown/NoPutsAllowed
|
18
18
|
def self.print_roda_routes
|
19
|
+
# TODO: this needs to be fully documented, currently no info on how to generate .routes.json
|
19
20
|
routes = begin
|
20
21
|
JSON.parse(File.read("#{Dir.pwd}/.routes.json"))
|
21
22
|
rescue StandardError
|
@@ -26,8 +26,8 @@ class Roda
|
|
26
26
|
def self.configure(app, _opts = {})
|
27
27
|
return unless app.opts[:bridgetown_site].nil?
|
28
28
|
|
29
|
-
raise "Roda app failure: the bridgetown_ssr plugin must be registered before" \
|
30
|
-
"
|
29
|
+
raise "Roda app failure: the bridgetown_ssr plugin must be registered before " \
|
30
|
+
"bridgetown_routes"
|
31
31
|
end
|
32
32
|
|
33
33
|
module InstanceMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.
|
19
|
+
version: 1.1.0.beta3
|
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: 1.0.
|
26
|
+
version: 1.1.0.beta3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: roda-route_list
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,9 +68,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: '0'
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "
|
71
|
+
- - ">"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: 1.3.1
|
74
74
|
requirements: []
|
75
75
|
rubygems_version: 3.1.4
|
76
76
|
signing_key:
|