static-rails 0.0.14 → 0.1.0

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: 2a6e7ad52cd960477f61b0faaa6364968844e8d2862714e35340531a12aa82e5
4
- data.tar.gz: 0a66a78cfdec31a91354c8815e1ec612a44345230bfb5115cdd1afc999bbcc85
3
+ metadata.gz: 8846ca971b36ed95a7ba06212eef226adb0fbdacf9d9aa15762b187e6aec03f9
4
+ data.tar.gz: ddb2e471f12f203ce116caf877146e233747a914c7e1a658bc2e9aa3aff7532a
5
5
  SHA512:
6
- metadata.gz: fca6f6a4ffa3a2893019d583853d1e790e8a28e90fb6140a53ce4f5dfdf4b34abfb5d9a350f3a4e5d6e5245a3461f6b303f62208cd55b9158c1256e38f35f1f8
7
- data.tar.gz: 4d03d6226092c97f5fe9f35283c77d4544f3addb4766d42a01eb6cd69568763ab24ff5220181e0f7b5f7cce69722b073367b098bd1e525c37923b449ca460903
6
+ metadata.gz: c4f83928251c9b853b9085a9568d7f3209aa2f6b3b604ffd042e09970d18f2f45b896c08bfd2010abe6f25cc5b66306e85b00aa7048c49112ebe3133abea0eee
7
+ data.tar.gz: 3da16f4970943c2899d1c2ce908b3602fccf5f0076dee19e7b2bf082685d6d09085930a4d46b066ff74b8d89e81ef799ac4786f147ca602b17af313745a26e2b
data/.standard.yml CHANGED
@@ -1,3 +1,4 @@
1
+ ruby_version: 2.5
1
2
  ignore:
2
3
  - example/**/*
3
4
  - node_modules/**/*
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.0
2
+
3
+ * Add support for Rails 6.1 when CSRF is enabled
4
+ * Increase required Ruby to 2.5
5
+
1
6
  ## 0.0.14
2
7
 
3
8
  * HTML & XML won't be cached by default in production
data/Gemfile.lock CHANGED
@@ -1,50 +1,52 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- static-rails (0.0.14)
4
+ static-rails (0.1.0)
5
5
  rack-proxy (~> 0.6)
6
6
  railties (>= 5.0.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (6.0.3.3)
12
- actionview (= 6.0.3.3)
13
- activesupport (= 6.0.3.3)
14
- rack (~> 2.0, >= 2.0.8)
11
+ actionpack (6.1.3.2)
12
+ actionview (= 6.1.3.2)
13
+ activesupport (= 6.1.3.2)
14
+ rack (~> 2.0, >= 2.0.9)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.0.3.3)
19
- activesupport (= 6.0.3.3)
18
+ actionview (6.1.3.2)
19
+ activesupport (= 6.1.3.2)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activesupport (6.0.3.3)
24
+ activesupport (6.1.3.2)
25
25
  concurrent-ruby (~> 1.0, >= 1.0.2)
26
- i18n (>= 0.7, < 2)
27
- minitest (~> 5.1)
28
- tzinfo (~> 1.1)
29
- zeitwerk (~> 2.2, >= 2.2.2)
30
- ast (2.4.1)
26
+ i18n (>= 1.6, < 2)
27
+ minitest (>= 5.1)
28
+ tzinfo (~> 2.0)
29
+ zeitwerk (~> 2.3)
30
+ ast (2.4.2)
31
31
  builder (3.2.4)
32
- concurrent-ruby (1.1.7)
32
+ concurrent-ruby (1.1.8)
33
33
  crass (1.0.6)
34
- erubi (1.9.0)
35
- i18n (1.8.5)
34
+ erubi (1.10.0)
35
+ i18n (1.8.10)
36
36
  concurrent-ruby (~> 1.0)
37
- loofah (2.7.0)
37
+ loofah (2.9.1)
38
38
  crass (~> 1.0.2)
39
39
  nokogiri (>= 1.5.9)
40
40
  method_source (1.0.0)
41
- mini_portile2 (2.4.0)
42
- minitest (5.14.2)
43
- nokogiri (1.10.10)
44
- mini_portile2 (~> 2.4.0)
45
- parallel (1.19.2)
46
- parser (2.7.1.4)
41
+ mini_portile2 (2.5.1)
42
+ minitest (5.14.4)
43
+ nokogiri (1.11.3)
44
+ mini_portile2 (~> 2.5.0)
45
+ racc (~> 1.4)
46
+ parallel (1.20.1)
47
+ parser (3.0.1.1)
47
48
  ast (~> 2.4.1)
49
+ racc (1.5.2)
48
50
  rack (2.2.3)
49
51
  rack-proxy (0.6.5)
50
52
  rack
@@ -55,40 +57,39 @@ GEM
55
57
  nokogiri (>= 1.6)
56
58
  rails-html-sanitizer (1.3.0)
57
59
  loofah (~> 2.3)
58
- railties (6.0.3.3)
59
- actionpack (= 6.0.3.3)
60
- activesupport (= 6.0.3.3)
60
+ railties (6.1.3.2)
61
+ actionpack (= 6.1.3.2)
62
+ activesupport (= 6.1.3.2)
61
63
  method_source
62
64
  rake (>= 0.8.7)
63
- thor (>= 0.20.3, < 2.0)
65
+ thor (~> 1.0)
64
66
  rainbow (3.0.0)
65
- rake (13.0.1)
66
- regexp_parser (1.8.0)
67
- rexml (3.2.4)
68
- rubocop (0.91.1)
67
+ rake (13.0.3)
68
+ regexp_parser (2.1.1)
69
+ rexml (3.2.5)
70
+ rubocop (1.14.0)
69
71
  parallel (~> 1.10)
70
- parser (>= 2.7.1.1)
72
+ parser (>= 3.0.0.0)
71
73
  rainbow (>= 2.2.2, < 4.0)
72
- regexp_parser (>= 1.7)
74
+ regexp_parser (>= 1.8, < 3.0)
73
75
  rexml
74
- rubocop-ast (>= 0.4.0, < 1.0)
76
+ rubocop-ast (>= 1.5.0, < 2.0)
75
77
  ruby-progressbar (~> 1.7)
76
- unicode-display_width (>= 1.4.0, < 2.0)
77
- rubocop-ast (0.4.2)
78
- parser (>= 2.7.1.4)
79
- rubocop-performance (1.8.1)
80
- rubocop (>= 0.87.0)
78
+ unicode-display_width (>= 1.4.0, < 3.0)
79
+ rubocop-ast (1.5.0)
80
+ parser (>= 3.0.1.1)
81
+ rubocop-performance (1.11.2)
82
+ rubocop (>= 1.7.0, < 2.0)
81
83
  rubocop-ast (>= 0.4.0)
82
- ruby-progressbar (1.10.1)
83
- standard (0.6.2)
84
- rubocop (= 0.91.1)
85
- rubocop-performance (= 1.8.1)
86
- thor (1.0.1)
87
- thread_safe (0.3.6)
88
- tzinfo (1.2.7)
89
- thread_safe (~> 0.1)
90
- unicode-display_width (1.7.0)
91
- zeitwerk (2.4.0)
84
+ ruby-progressbar (1.11.0)
85
+ standard (1.1.1)
86
+ rubocop (= 1.14.0)
87
+ rubocop-performance (= 1.11.2)
88
+ thor (1.1.0)
89
+ tzinfo (2.0.4)
90
+ concurrent-ruby (~> 1.0)
91
+ unicode-display_width (2.0.0)
92
+ zeitwerk (2.4.2)
92
93
 
93
94
  PLATFORMS
94
95
  ruby
@@ -100,4 +101,4 @@ DEPENDENCIES
100
101
  static-rails!
101
102
 
102
103
  BUNDLED WITH
103
- 2.1.4
104
+ 2.2.15
@@ -35,5 +35,9 @@ module StaticRails
35
35
  def per_form_csrf_tokens
36
36
  false
37
37
  end
38
+
39
+ def urlsafe_csrf_tokens
40
+ Rails.application.config.action_controller.urlsafe_csrf_tokens
41
+ end
38
42
  end
39
43
  end
@@ -13,10 +13,10 @@ module StaticRails
13
13
  end
14
14
 
15
15
  def call(env)
16
- return @app.call(env) unless env["PATH_INFO"]&.start_with?(/\/?#{PATH_INFO_OBFUSCATION}/) || @determines_whether_to_handle_request.call(env)
16
+ return @app.call(env) unless env["PATH_INFO"]&.start_with?(/\/?#{PATH_INFO_OBFUSCATION}/o) || @determines_whether_to_handle_request.call(env)
17
17
 
18
18
  env = env.merge(
19
- "PATH_INFO" => env["PATH_INFO"].gsub(/^\/?#{PATH_INFO_OBFUSCATION}/, "")
19
+ "PATH_INFO" => env["PATH_INFO"].gsub(/^\/?#{PATH_INFO_OBFUSCATION}/o, "")
20
20
  )
21
21
  status, headers, body = super(env)
22
22
 
@@ -29,5 +29,9 @@ module StaticRails
29
29
  def per_form_csrf_tokens
30
30
  false
31
31
  end
32
+
33
+ def urlsafe_csrf_tokens
34
+ Rails.application.config.action_controller.urlsafe_csrf_tokens
35
+ end
32
36
  end
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module StaticRails
2
- VERSION = "0.0.14"
2
+ VERSION = "0.1.0"
3
3
  end
data/script/test CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  set -e
4
4
 
5
- echo "--> Running standard:fix"
6
- bundle exec rake standard:fix
7
-
8
5
  echo "--> Running example app's tests"
9
6
  cd example
10
7
  ./script/test
11
8
  cd ..
9
+
10
+ echo "--> Running standard:fix"
11
+ bundle exec rake standard:fix
12
+
data/static-rails.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.summary = "Build & serve static sites (e.g. Jekyll, Hugo) from your Rails app"
10
10
  spec.homepage = "https://github.com/testdouble/static-rails"
11
11
  spec.license = "MIT"
12
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
13
13
 
14
14
  spec.metadata["homepage_uri"] = spec.homepage
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-23 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.6'
41
- description:
41
+ description:
42
42
  email:
43
43
  - searls@gmail.com
44
44
  executables: []
@@ -89,7 +89,7 @@ licenses:
89
89
  - MIT
90
90
  metadata:
91
91
  homepage_uri: https://github.com/testdouble/static-rails
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -97,15 +97,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- version: 2.3.0
100
+ version: 2.5.0
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.1.2
108
- signing_key:
107
+ rubygems_version: 3.1.4
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: Build & serve static sites (e.g. Jekyll, Hugo) from your Rails app
111
111
  test_files: []