bridgetown-routes 1.0.0.beta2 → 1.1.0.beta1

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: 450b46de18949d5a0edcca7b1a75ac953bd00915207cf72e59058f9caa187047
4
- data.tar.gz: 6d3493314c3d5949ea275f5b160e33bf861ccd19f8ebe9b8227420190edec737
3
+ metadata.gz: 8e323ac883a684def7e0f82847b9108a7374997fb772cb44c4ade5ccc9cffd87
4
+ data.tar.gz: d357a208535da4e5311f86775ee460fd536b230b2c017c41cf40758b010f5815
5
5
  SHA512:
6
- metadata.gz: f324b56a95d65f2aeb9a39bf49d3900919625cdec3abf6f254ae37ba3a8cf125a9d5bd3cf4a5d470abee1834e05fac2b1cef98903a95de17b22d23f158dfa8db
7
- data.tar.gz: 1fee745f2126e4bda40444783ebe25464ec520f0effe185dcc8c780e26b3ee84fb6f4cec76af16bd718c3740e0f47d1fb78f6a23b8d90d2b7a79eb55ebd14031
6
+ metadata.gz: 84cb312868d5d0d872432cba5a617c229ce5c26e27ecbe964171aa4e9de3242ca6ab061812ffa8e9264a2463e876c206ac2707863a78f07fb5665bb91291eaaa
7
+ data.tar.gz: f966bc8088c23db4805231db6a6092f38c7a1eb3455aba37728224f617616eb08e383148fae5591f1b8a119597b45ea305679f3491e804f6b0e7549a8636e222
@@ -41,7 +41,7 @@ module Bridgetown
41
41
  #{code}
42
42
  end
43
43
  RUBY
44
- instance_eval(code, file, -1)
44
+ instance_eval(code, file, ruby_content ? 1 : 0)
45
45
  end
46
46
  end
47
47
  end
@@ -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
 
@@ -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
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.0.beta2
4
+ version: 1.1.0.beta1
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-01-26 00:00:00.000000000 Z
11
+ date: 2022-06-02 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.0.beta2
19
+ version: 1.1.0.beta1
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.0.beta2
26
+ version: 1.1.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: roda-route_list
29
29
  requirement: !ruby/object:Gem::Requirement