static-rails 0.0.14 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a6e7ad52cd960477f61b0faaa6364968844e8d2862714e35340531a12aa82e5
4
- data.tar.gz: 0a66a78cfdec31a91354c8815e1ec612a44345230bfb5115cdd1afc999bbcc85
3
+ metadata.gz: 8633797890f1b85a04483b7b3c3927d838c2b92e26284a74981a76d89cb7b2a2
4
+ data.tar.gz: c738b9e9cff83c79b6f5deaf44cda66e951bc1aeaa8c2bd6e95d240b14f4c4c0
5
5
  SHA512:
6
- metadata.gz: fca6f6a4ffa3a2893019d583853d1e790e8a28e90fb6140a53ce4f5dfdf4b34abfb5d9a350f3a4e5d6e5245a3461f6b303f62208cd55b9158c1256e38f35f1f8
7
- data.tar.gz: 4d03d6226092c97f5fe9f35283c77d4544f3addb4766d42a01eb6cd69568763ab24ff5220181e0f7b5f7cce69722b073367b098bd1e525c37923b449ca460903
6
+ metadata.gz: 371675f3265c33c8662819fbe3ee6f198dab1c1fe170703fece75ecfd36906769e31def30e20e7d35ab7c206d24f22a25290175a5344ef798d5e3e4327b0bac0
7
+ data.tar.gz: cdcde5698a32cf31775620842ccea02c0685c2658a53298ed19e270778c20e9e51a608643594d961da15c9e054bae591e37ab554df98639626dab880a232c6da
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,12 @@
1
+ ## 0.2.0
2
+
3
+ * Deprecate static-rails
4
+
5
+ ## 0.1.0
6
+
7
+ * Add support for Rails 6.1 when CSRF is enabled
8
+ * Increase required Ruby to 2.5
9
+
1
10
  ## 0.0.14
2
11
 
3
12
  * HTML & XML won't be cached by default in production
data/Gemfile.lock CHANGED
@@ -1,52 +1,54 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- static-rails (0.0.14)
4
+ static-rails (0.2.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.4)
12
+ actionview (= 6.1.4)
13
+ activesupport (= 6.1.4)
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.4)
19
+ activesupport (= 6.1.4)
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.4)
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.9)
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.10.0)
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.3)
42
+ minitest (5.14.4)
43
+ nokogiri (1.11.7)
44
+ mini_portile2 (~> 2.5.0)
45
+ racc (~> 1.4)
46
+ parallel (1.20.1)
47
+ parser (3.0.2.0)
47
48
  ast (~> 2.4.1)
49
+ racc (1.5.2)
48
50
  rack (2.2.3)
49
- rack-proxy (0.6.5)
51
+ rack-proxy (0.7.0)
50
52
  rack
51
53
  rack-test (1.1.0)
52
54
  rack (>= 1.0, < 3)
@@ -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.4)
61
+ actionpack (= 6.1.4)
62
+ activesupport (= 6.1.4)
61
63
  method_source
62
- rake (>= 0.8.7)
63
- thor (>= 0.20.3, < 2.0)
64
+ rake (>= 0.13)
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.6)
68
+ regexp_parser (2.1.1)
69
+ rexml (3.2.5)
70
+ rubocop (1.18.3)
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.7.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.8.0)
80
+ parser (>= 3.0.1.1)
81
+ rubocop-performance (1.11.4)
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.5)
86
+ rubocop (= 1.18.3)
87
+ rubocop-performance (= 1.11.4)
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
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  [![CircleCI](https://circleci.com/gh/testdouble/static-rails.svg?style=svg)](https://circleci.com/gh/testdouble/static-rails)
4
4
 
5
+ ## ⛔ DEPRECATED ⛔
6
+
7
+ static-rails is deprecated and unmaintained.
8
+
9
+ We have no plans to hand off the package or resurrect it, but you are of course
10
+ welcome to fork it.
11
+
5
12
  ## Build and serve your static sites from your Rails app
6
13
 
7
14
  **tl;dr in development, static-rails runs your static site generators &
@@ -63,7 +70,7 @@ app](/example) right in this repo!
63
70
 
64
71
  **(Want to dive right in? The generated initializer [enumerates every
65
72
  option](/lib/generators/templates/static.rb) and the [example app's
66
- config](https://github.com/testdouble/static-rails/blob/master/example/config/initializers/static.rb)
73
+ config](https://github.com/testdouble/static-rails/blob/main/example/config/initializers/static.rb)
67
74
  sets up 4 sites.)**
68
75
 
69
76
  ### Top-level configuration
@@ -163,7 +170,7 @@ To tell the gem about your static sites, assign an array of hashes as `sites`
163
170
  Assuming you won't be mounting your static site to your app's root `/` path,
164
171
  you'll probably need to configure its base URL path somehow. Here are
165
172
  some tips (and if your tool of choice isn't listed, we'd love a [pull
166
- request](https://github.com/testdouble/static-rails/edit/master/README.md)!):
173
+ request](https://github.com/testdouble/static-rails/edit/main/README.md)!):
167
174
 
168
175
  ### Using Jekyll
169
176
 
@@ -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.2.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,13 @@
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.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2020-09-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: railties
@@ -38,7 +37,6 @@ dependencies:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0.6'
41
- description:
42
40
  email:
43
41
  - searls@gmail.com
44
42
  executables: []
@@ -89,7 +87,6 @@ licenses:
89
87
  - MIT
90
88
  metadata:
91
89
  homepage_uri: https://github.com/testdouble/static-rails
92
- post_install_message:
93
90
  rdoc_options: []
94
91
  require_paths:
95
92
  - lib
@@ -97,15 +94,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
94
  requirements:
98
95
  - - ">="
99
96
  - !ruby/object:Gem::Version
100
- version: 2.3.0
97
+ version: 2.5.0
101
98
  required_rubygems_version: !ruby/object:Gem::Requirement
102
99
  requirements:
103
100
  - - ">="
104
101
  - !ruby/object:Gem::Version
105
102
  version: '0'
106
103
  requirements: []
107
- rubygems_version: 3.1.2
108
- signing_key:
104
+ rubygems_version: 4.0.21
109
105
  specification_version: 4
110
106
  summary: Build & serve static sites (e.g. Jekyll, Hugo) from your Rails app
111
107
  test_files: []