bridgetown-routes 1.0.0.alpha8 → 1.0.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: d917ae19ca30876659ffc219abfb20fc4e9c0467e6bd05d810eac1340f333ccb
4
- data.tar.gz: d89955d2559dcd27c944b1a3bab47b6a2589ec574dfd6fe464e5086124ad2bcb
3
+ metadata.gz: c0811ac54602a259129658ac04cf5f07413b88e1421a796fb2af3fb52dcf9356
4
+ data.tar.gz: 7071e940e0eaeb58d33058a42deb6e8f9b1fde1e726bf02109f969c63338c79a
5
5
  SHA512:
6
- metadata.gz: 245ad558271fb777223bccecd885285bcec465a2037156671851ec5ebd763de283ea4071fd718249ae6fefcfe5fb24381ee6e3f56076a8c6fef1895d29da8875
7
- data.tar.gz: c1aca1345361c11c232e30fd2e7efc7c6a42fde16218b9fc622e2de50bd1b7eb33d7f60ad85f2000602a730b8498d1b572abd657730d4aeb2b2829aa65701dbd
6
+ metadata.gz: d4a2217409da125f4412f64dd5537e16838b8439e8626b6ac2e58fbf83c0e89bd6a5e6ae51aaebbb3cea86f3faaeff9d0eb4f49ce863ab299eaf31c3138ec5bf
7
+ data.tar.gz: 47b85c1296b4a2b0a47b45ba08c92018425896a77d42185b4d8b2f0a42610d60962044ab8ee285c9010023a68d86952fa504741bacab049f0430bce4c73cb828
@@ -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.alpha8
4
+ version: 1.0.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: 2021-11-05 00:00:00.000000000 Z
11
+ date: 2022-01-13 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.alpha8
19
+ version: 1.0.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.alpha8
26
+ version: 1.0.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: roda-route_list
29
29
  requirement: !ruby/object:Gem::Requirement