bridgetown-routes 1.0.0.beta3 → 1.1.0.beta2

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: 1691849d6bd8abb8a4f3ad307e8ff5b2fbaec1e133980e354e4290696c3933c8
4
- data.tar.gz: 862d016873ccdfe61768a02954a78b20109dd5a4d23db4a87eb843930eeb2843
3
+ metadata.gz: 3d22bcc10b18f3ec902ba5269547649eed276dc999c6ec8c1e9413b1a23ef00a
4
+ data.tar.gz: 6d33a9cada0b8131d11f13cae9b1c31d1fa9674a409dde7472b777329187e91a
5
5
  SHA512:
6
- metadata.gz: cd3b3e04d5163be5de51bdad310551c073c8fb62ad079d28631d48b86b6fdb4121606e83b83bcc4fb8cf293dc378d6a4d3b63ba058c2b1a355368ad5992ea650
7
- data.tar.gz: 3389ae51686d92654c5994c242fe6c5f39baa94f66240ed7b61c706deaf08364cda203dafe211e63a91dcdbb0a85179421583c7b18f8c8c049c4a4d201be3120
6
+ metadata.gz: 8e2b0a752d5f3311b37ee70439b5d598f24694965ef2ea4be5cab34b20097463a3465f4b01f92385373d6b1693d76a6171a232c990759e36a0c5fde0c8fd4da1
7
+ data.tar.gz: 815fe2dd41a8d876c4dbb63956a4149b5cf6b5b2797a0a2e11dda535615b5f44c8930aefd61cd392eb4fc816ebfa3243264fa6a18c27642d3c914e632b3c87fe
@@ -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.beta3
4
+ version: 1.1.0.beta2
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-02-18 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.beta3
19
+ version: 1.1.0.beta2
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.beta3
26
+ version: 1.1.0.beta2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: roda-route_list
29
29
  requirement: !ruby/object:Gem::Requirement