bridgetown-routes 1.0.0.alpha10 → 1.0.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: ca99bb7a7aac00c07a6ca03a00a450f100f9671169dec554de9161a67fcbda6c
4
- data.tar.gz: d44863e5b5ed37f2a4445495627f8390976a2694b31afc63de1e5a568de2949b
3
+ metadata.gz: 1691849d6bd8abb8a4f3ad307e8ff5b2fbaec1e133980e354e4290696c3933c8
4
+ data.tar.gz: 862d016873ccdfe61768a02954a78b20109dd5a4d23db4a87eb843930eeb2843
5
5
  SHA512:
6
- metadata.gz: 97eb2016b0fae18948ab0a2f67ee32b18139ac30dbfd0de25fb3e00c23254ec2c8a45cab2555a84d601ea8a3b496017c4f30c0f7bef31ac72eacb8fe1039f7af
7
- data.tar.gz: 566ce61bf946a2a85df5dda2d4c3ca96eafa8a2e2a04f047f6b171fcf7be730e472f6ba5822375313ab5f5dd8047570bbfb664399bfd0e4e99aa7c660119fe84
6
+ metadata.gz: cd3b3e04d5163be5de51bdad310551c073c8fb62ad079d28631d48b86b6fdb4121606e83b83bcc4fb8cf293dc378d6a4d3b63ba058c2b1a355368ad5992ea650
7
+ data.tar.gz: 3389ae51686d92654c5994c242fe6c5f39baa94f66240ed7b61c706deaf08364cda203dafe211e63a91dcdbb0a85179421583c7b18f8c8c049c4a4d201be3120
@@ -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.alpha10
4
+ version: 1.0.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: 2021-11-16 00:00:00.000000000 Z
11
+ date: 2022-02-18 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.alpha10
19
+ version: 1.0.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.0.alpha10
26
+ version: 1.0.0.beta3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: roda-route_list
29
29
  requirement: !ruby/object:Gem::Requirement