bridgetown-routes 1.0.0.alpha9 → 1.0.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: 20e0e225dc950ee0c6f1bcf4a97cba6a4f8237cd1fdc1376ba7578ec2bbaa585
4
- data.tar.gz: 93931ce8a11b576dd5dbf3cd9645644639fc97a854aff8885da2b4234987ccdd
3
+ metadata.gz: 450b46de18949d5a0edcca7b1a75ac953bd00915207cf72e59058f9caa187047
4
+ data.tar.gz: 6d3493314c3d5949ea275f5b160e33bf861ccd19f8ebe9b8227420190edec737
5
5
  SHA512:
6
- metadata.gz: dcfa9e09a36d4ac53d6db4bd3a6e88b3d66278385fea93b8fd2e36f7d8625aaf4a7db6b9c466b8da27d617e2f9a29e7b4f4dc570d3b7f4bb19de01914880fd3c
7
- data.tar.gz: cc2a18644fab5920bfeed6b7d070dd36207dd816ac574f3a8e036038089498894f1207d8e5e05c1a149f91f3b00f92ac239b660cfeff5b3300deced03662def9
6
+ metadata.gz: f324b56a95d65f2aeb9a39bf49d3900919625cdec3abf6f254ae37ba3a8cf125a9d5bd3cf4a5d470abee1834e05fac2b1cef98903a95de17b22d23f158dfa8db
7
+ data.tar.gz: 1fee745f2126e4bda40444783ebe25464ec520f0effe185dcc8c780e26b3ee84fb6f4cec76af16bd718c3740e0f47d1fb78f6a23b8d90d2b7a79eb55ebd14031
@@ -37,8 +37,7 @@ module Bridgetown
37
37
  end
38
38
 
39
39
  code = <<~RUBY
40
- r = app.request
41
- add_route(#{file_slug.inspect}, #{code_postmatch.inspect}) do
40
+ add_route(#{file_slug.inspect}, #{code_postmatch.inspect}) do |r|
42
41
  #{code}
43
42
  end
44
43
  RUBY
@@ -23,7 +23,7 @@ module Bridgetown
23
23
  response.instance_variable_set(
24
24
  :@_route_file_code, route_block.instance_variable_get(:@_route_file_code)
25
25
  ) # could be nil
26
- app.instance_exec(&route_block)
26
+ app.instance_exec(r, &route_block)
27
27
  end
28
28
  end
29
29
 
@@ -66,13 +66,13 @@ module Bridgetown
66
66
  @_basic_flash ||= BlankFlash.new
67
67
  end
68
68
 
69
- # def csrf_tag(...)
70
- # request.scope.csrf_tag(...)
71
- # end
69
+ def csrf_tag(...)
70
+ request.scope.csrf_tag(...)
71
+ end
72
72
 
73
- # def csrf_token(...)
74
- # request.scope.csrf_token(...)
75
- # end
73
+ def csrf_token(...)
74
+ request.scope.csrf_token(...)
75
+ end
76
76
  end
77
77
  end
78
78
  end
@@ -32,7 +32,7 @@ class Roda
32
32
 
33
33
  module InstanceMethods
34
34
  def render_with(data: {}) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
35
- path = Kernel.caller_locations(1, 1).first.absolute_path
35
+ path = Kernel.caller_locations(1, 1).first.path
36
36
  source_path = Pathname.new(path).relative_path_from(
37
37
  Bridgetown::Current.site.in_source_dir("_routes")
38
38
  )
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.alpha9
4
+ version: 1.0.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: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2022-01-26 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.alpha9
19
+ version: 1.0.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.alpha9
26
+ version: 1.0.0.beta2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: roda-route_list
29
29
  requirement: !ruby/object:Gem::Requirement