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 +4 -4
- data/.standard.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +53 -52
- data/README.md +9 -2
- data/lib/static-rails/gets_csrf_token.rb +4 -0
- data/lib/static-rails/site_plus_csrf_middleware.rb +2 -2
- data/lib/static-rails/validates_csrf_token.rb +4 -0
- data/lib/static-rails/version.rb +1 -1
- data/script/test +4 -3
- data/static-rails.gemspec +1 -1
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8633797890f1b85a04483b7b3c3927d838c2b92e26284a74981a76d89cb7b2a2
|
|
4
|
+
data.tar.gz: c738b9e9cff83c79b6f5deaf44cda66e951bc1aeaa8c2bd6e95d240b14f4c4c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 371675f3265c33c8662819fbe3ee6f198dab1c1fe170703fece75ecfd36906769e31def30e20e7d35ab7c206d24f22a25290175a5344ef798d5e3e4327b0bac0
|
|
7
|
+
data.tar.gz: cdcde5698a32cf31775620842ccea02c0685c2658a53298ed19e270778c20e9e51a608643594d961da15c9e054bae591e37ab554df98639626dab880a232c6da
|
data/.standard.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
static-rails (0.0
|
|
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.
|
|
12
|
-
actionview (= 6.
|
|
13
|
-
activesupport (= 6.
|
|
14
|
-
rack (~> 2.0, >= 2.0.
|
|
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.
|
|
19
|
-
activesupport (= 6.
|
|
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.
|
|
24
|
+
activesupport (6.1.4)
|
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
26
|
-
i18n (>=
|
|
27
|
-
minitest (
|
|
28
|
-
tzinfo (~>
|
|
29
|
-
zeitwerk (~> 2.
|
|
30
|
-
ast (2.4.
|
|
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.
|
|
32
|
+
concurrent-ruby (1.1.9)
|
|
33
33
|
crass (1.0.6)
|
|
34
|
-
erubi (1.
|
|
35
|
-
i18n (1.8.
|
|
34
|
+
erubi (1.10.0)
|
|
35
|
+
i18n (1.8.10)
|
|
36
36
|
concurrent-ruby (~> 1.0)
|
|
37
|
-
loofah (2.
|
|
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.
|
|
42
|
-
minitest (5.14.
|
|
43
|
-
nokogiri (1.
|
|
44
|
-
mini_portile2 (~> 2.
|
|
45
|
-
|
|
46
|
-
|
|
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.
|
|
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.
|
|
59
|
-
actionpack (= 6.
|
|
60
|
-
activesupport (= 6.
|
|
60
|
+
railties (6.1.4)
|
|
61
|
+
actionpack (= 6.1.4)
|
|
62
|
+
activesupport (= 6.1.4)
|
|
61
63
|
method_source
|
|
62
|
-
rake (>= 0.
|
|
63
|
-
thor (
|
|
64
|
+
rake (>= 0.13)
|
|
65
|
+
thor (~> 1.0)
|
|
64
66
|
rainbow (3.0.0)
|
|
65
|
-
rake (13.0.
|
|
66
|
-
regexp_parser (1.
|
|
67
|
-
rexml (3.2.
|
|
68
|
-
rubocop (
|
|
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 (>=
|
|
72
|
+
parser (>= 3.0.0.0)
|
|
71
73
|
rainbow (>= 2.2.2, < 4.0)
|
|
72
|
-
regexp_parser (>= 1.
|
|
74
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
73
75
|
rexml
|
|
74
|
-
rubocop-ast (>=
|
|
76
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
|
75
77
|
ruby-progressbar (~> 1.7)
|
|
76
|
-
unicode-display_width (>= 1.4.0, <
|
|
77
|
-
rubocop-ast (
|
|
78
|
-
parser (>=
|
|
79
|
-
rubocop-performance (1.
|
|
80
|
-
rubocop (>=
|
|
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.
|
|
83
|
-
standard (
|
|
84
|
-
rubocop (=
|
|
85
|
-
rubocop-performance (= 1.
|
|
86
|
-
thor (1.0
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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.
|
|
104
|
+
2.2.15
|
data/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[](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/
|
|
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/
|
|
173
|
+
request](https://github.com/testdouble/static-rails/edit/main/README.md)!):
|
|
167
174
|
|
|
168
175
|
### Using Jekyll
|
|
169
176
|
|
|
@@ -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
|
|
data/lib/static-rails/version.rb
CHANGED
data/script/test
CHANGED
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.
|
|
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
|
|
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:
|
|
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.
|
|
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:
|
|
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: []
|