lifer 0.12.0 → 0.12.3
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/.github/workflows/main.yml +2 -2
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +64 -59
- data/lib/lifer/dev/response.rb +57 -9
- data/lib/lifer/utilities.rb +2 -2
- data/lib/lifer/version.rb +1 -1
- data/lifer.gemspec +1 -0
- metadata +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71407123cb005d99c9ffc1cde0c263921d0c45c22936c95b0ccced6bc189cb54
|
|
4
|
+
data.tar.gz: 2b4a5ba58c99283e8df136e492c653bd04761c0b07ea643e7de7ed00216bfb37
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4dfed0a714043b38b861c0dbdae8f12d22c0b3fb4dda11f494dfed56cb346e6abcdfb87ce270dd9b17b2259751ef99b05516eee039c933b2d4b53c45897c9456
|
|
7
|
+
data.tar.gz: 42a12372430de5c6a2e96ddeb211b82e9c82fde78be316d4cc4b5fbbdfaa87877fce7940e32dfb49bbc69ceb0e64a4b57f228a6a53ba536c017e3c92aa06a83e
|
data/.github/workflows/main.yml
CHANGED
|
@@ -7,11 +7,11 @@ jobs:
|
|
|
7
7
|
name: Run RSpec test suite
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
10
|
+
- uses: actions/checkout@v6
|
|
11
11
|
- name: Set up Ruby
|
|
12
12
|
uses: ruby/setup-ruby@v1
|
|
13
13
|
with:
|
|
14
|
-
ruby-version: 3.
|
|
14
|
+
ruby-version: 3.4
|
|
15
15
|
bundler-cache: true
|
|
16
16
|
- name: Run the default task
|
|
17
17
|
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
## Next
|
|
2
2
|
|
|
3
|
+
## v0.12.3
|
|
4
|
+
|
|
5
|
+
This release just resolves some issues I was having with the platform in
|
|
6
|
+
the gem specification being set wrong. Unfortunately, it was set wrong for
|
|
7
|
+
both the 0.12.1 and 0.12.2 releases. So, this release is just a resolution
|
|
8
|
+
to this little issue.
|
|
9
|
+
|
|
10
|
+
## v0.12.2
|
|
11
|
+
|
|
12
|
+
This release makes minor improvements to the development server by adding
|
|
13
|
+
additional servable MIME types. That's all.
|
|
14
|
+
|
|
15
|
+
## v0.12.1
|
|
16
|
+
|
|
17
|
+
This patch release resolves a couple of issues that may affect users:
|
|
18
|
+
|
|
19
|
+
- This release makes the implicit dependency on `base64` explicit. This
|
|
20
|
+
is necessary because as of Ruby 3.4, `base64` is no longer part of Ruby's
|
|
21
|
+
standard library.
|
|
22
|
+
- Resolves errors when `Lifer::Utilities#stringify_keys` or `#symbolize_keys`
|
|
23
|
+
are passed `nil` or an empty hash.
|
|
24
|
+
|
|
3
25
|
## v0.12.0
|
|
4
26
|
|
|
5
27
|
This release adds a new `#render` method that can be used in any ERB files being
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
lifer (0.12.
|
|
4
|
+
lifer (0.12.3)
|
|
5
|
+
base64
|
|
5
6
|
i18n (< 2)
|
|
6
7
|
kramdown (~> 2.4)
|
|
7
8
|
liquid (~> 5.6, < 6)
|
|
@@ -14,9 +15,10 @@ PATH
|
|
|
14
15
|
GEM
|
|
15
16
|
remote: https://rubygems.org/
|
|
16
17
|
specs:
|
|
17
|
-
addressable (2.8.
|
|
18
|
-
public_suffix (>= 2.0.2, <
|
|
19
|
-
|
|
18
|
+
addressable (2.8.8)
|
|
19
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
20
|
+
base64 (0.3.0)
|
|
21
|
+
bigdecimal (4.0.1)
|
|
20
22
|
bump (0.10.0)
|
|
21
23
|
capybara (3.40.0)
|
|
22
24
|
addressable
|
|
@@ -27,96 +29,99 @@ GEM
|
|
|
27
29
|
rack-test (>= 0.6.3)
|
|
28
30
|
regexp_parser (>= 1.5, < 3.0)
|
|
29
31
|
xpath (~> 3.2)
|
|
30
|
-
concurrent-ruby (1.3.
|
|
31
|
-
|
|
32
|
+
concurrent-ruby (1.3.6)
|
|
33
|
+
date (3.5.1)
|
|
34
|
+
debug (1.11.1)
|
|
32
35
|
irb (~> 1.10)
|
|
33
36
|
reline (>= 0.3.8)
|
|
34
|
-
diff-lcs (1.
|
|
35
|
-
|
|
36
|
-
ffi (1.17.
|
|
37
|
-
|
|
38
|
-
i18n (1.14.7)
|
|
37
|
+
diff-lcs (1.6.2)
|
|
38
|
+
erb (6.0.1)
|
|
39
|
+
ffi (1.17.3)
|
|
40
|
+
i18n (1.14.8)
|
|
39
41
|
concurrent-ruby (~> 1.0)
|
|
40
|
-
io-console (0.
|
|
41
|
-
irb (1.
|
|
42
|
+
io-console (0.8.2)
|
|
43
|
+
irb (1.16.0)
|
|
44
|
+
pp (>= 0.6.0)
|
|
42
45
|
rdoc (>= 4.0.0)
|
|
43
46
|
reline (>= 0.4.2)
|
|
44
|
-
kramdown (2.5.
|
|
45
|
-
rexml (>= 3.
|
|
46
|
-
language_server-protocol (3.17.0.
|
|
47
|
-
liquid (5.
|
|
47
|
+
kramdown (2.5.2)
|
|
48
|
+
rexml (>= 3.4.4)
|
|
49
|
+
language_server-protocol (3.17.0.5)
|
|
50
|
+
liquid (5.11.0)
|
|
48
51
|
bigdecimal
|
|
49
52
|
strscan (>= 3.1.1)
|
|
50
|
-
listen (3.
|
|
53
|
+
listen (3.10.0)
|
|
54
|
+
logger
|
|
51
55
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
52
56
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
53
|
-
logger (1.
|
|
54
|
-
matrix (0.4.
|
|
57
|
+
logger (1.7.0)
|
|
58
|
+
matrix (0.4.3)
|
|
55
59
|
mini_mime (1.1.5)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
racc (~> 1.4)
|
|
61
|
-
nokogiri (1.16.7-x86_64-linux)
|
|
60
|
+
mini_portile2 (2.8.9)
|
|
61
|
+
nio4r (2.7.5)
|
|
62
|
+
nokogiri (1.19.0)
|
|
63
|
+
mini_portile2 (~> 2.8.2)
|
|
62
64
|
racc (~> 1.4)
|
|
63
|
-
parallel (1.
|
|
64
|
-
parallel_tests (
|
|
65
|
+
parallel (1.27.0)
|
|
66
|
+
parallel_tests (5.5.0)
|
|
65
67
|
parallel
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
pp (0.6.3)
|
|
69
|
+
prettyprint
|
|
70
|
+
prettyprint (0.2.0)
|
|
71
|
+
prism (1.9.0)
|
|
72
|
+
psych (5.3.1)
|
|
73
|
+
date
|
|
68
74
|
stringio
|
|
69
|
-
public_suffix (
|
|
70
|
-
puma (6.6.
|
|
75
|
+
public_suffix (7.0.2)
|
|
76
|
+
puma (6.6.1)
|
|
71
77
|
nio4r (~> 2.0)
|
|
72
78
|
racc (1.8.1)
|
|
73
|
-
rack (3.
|
|
74
|
-
rack-test (2.
|
|
79
|
+
rack (3.2.4)
|
|
80
|
+
rack-test (2.2.0)
|
|
75
81
|
rack (>= 1.3)
|
|
76
|
-
rake (13.
|
|
82
|
+
rake (13.3.1)
|
|
77
83
|
rb-fsevent (0.11.2)
|
|
78
84
|
rb-inotify (0.11.1)
|
|
79
85
|
ffi (~> 1.0)
|
|
80
|
-
rbs (3.
|
|
86
|
+
rbs (3.10.3)
|
|
81
87
|
logger
|
|
82
|
-
|
|
88
|
+
tsort
|
|
89
|
+
rdoc (7.1.0)
|
|
90
|
+
erb
|
|
83
91
|
psych (>= 4.0.0)
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
tsort
|
|
93
|
+
regexp_parser (2.11.3)
|
|
94
|
+
reline (0.6.3)
|
|
86
95
|
io-console (~> 0.5)
|
|
87
|
-
rexml (3.4.
|
|
88
|
-
rspec (3.13.
|
|
96
|
+
rexml (3.4.4)
|
|
97
|
+
rspec (3.13.2)
|
|
89
98
|
rspec-core (~> 3.13.0)
|
|
90
99
|
rspec-expectations (~> 3.13.0)
|
|
91
100
|
rspec-mocks (~> 3.13.0)
|
|
92
|
-
rspec-core (3.13.
|
|
101
|
+
rspec-core (3.13.6)
|
|
93
102
|
rspec-support (~> 3.13.0)
|
|
94
|
-
rspec-expectations (3.13.
|
|
103
|
+
rspec-expectations (3.13.5)
|
|
95
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
96
105
|
rspec-support (~> 3.13.0)
|
|
97
|
-
rspec-mocks (3.13.
|
|
106
|
+
rspec-mocks (3.13.7)
|
|
98
107
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
99
108
|
rspec-support (~> 3.13.0)
|
|
100
|
-
rspec-support (3.13.
|
|
101
|
-
rss (0.3.
|
|
109
|
+
rspec-support (3.13.7)
|
|
110
|
+
rss (0.3.2)
|
|
102
111
|
rexml
|
|
103
|
-
ruby-lsp (0.
|
|
112
|
+
ruby-lsp (0.26.5)
|
|
104
113
|
language_server-protocol (~> 3.17.0)
|
|
105
|
-
prism (
|
|
106
|
-
rbs (>= 3, <
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
strscan (3.1.5)
|
|
114
|
+
prism (>= 1.2, < 2.0)
|
|
115
|
+
rbs (>= 3, < 5)
|
|
116
|
+
stringio (3.2.0)
|
|
117
|
+
strscan (3.1.7)
|
|
118
|
+
tsort (0.2.0)
|
|
111
119
|
xpath (3.2.0)
|
|
112
120
|
nokogiri (~> 1.8)
|
|
113
|
-
yard (0.9.
|
|
121
|
+
yard (0.9.38)
|
|
114
122
|
|
|
115
123
|
PLATFORMS
|
|
116
|
-
|
|
117
|
-
x86_64-darwin-21
|
|
118
|
-
x86_64-darwin-22
|
|
119
|
-
x86_64-linux
|
|
124
|
+
ruby
|
|
120
125
|
|
|
121
126
|
DEPENDENCIES
|
|
122
127
|
bump
|
|
@@ -131,4 +136,4 @@ DEPENDENCIES
|
|
|
131
136
|
yard
|
|
132
137
|
|
|
133
138
|
BUNDLED WITH
|
|
134
|
-
2.
|
|
139
|
+
2.6.9
|
data/lib/lifer/dev/response.rb
CHANGED
|
@@ -21,9 +21,7 @@ module Lifer::Dev
|
|
|
21
21
|
# 3. The HTTP body response.
|
|
22
22
|
#
|
|
23
23
|
# @return [Array] A Rack-compatible response.
|
|
24
|
-
def build
|
|
25
|
-
[status, {"Content-Type": content_type}, contents]
|
|
26
|
-
end
|
|
24
|
+
def build = [status, {"Content-Type": content_type}, contents]
|
|
27
25
|
|
|
28
26
|
private
|
|
29
27
|
|
|
@@ -33,28 +31,78 @@ module Lifer::Dev
|
|
|
33
31
|
[File.read(path)]
|
|
34
32
|
end
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
|
|
35
|
+
# The MIME type for the current path. Because Lifer only offers a server
|
|
36
|
+
# for development mode, this is just a simple map based on common known
|
|
37
|
+
# MIME types. We recommend submitting a patch or monkey-patching this
|
|
38
|
+
# method if it does not suit your needs in development. For more
|
|
39
|
+
# information:
|
|
40
|
+
#
|
|
41
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
|
|
42
|
+
#
|
|
43
|
+
# @fixme It would be very nice to not manually manage this list of
|
|
37
44
|
# content types. Is there a nice, dependency-free way to do this?
|
|
38
45
|
#
|
|
46
|
+
# @return [String] The MIME type for the current path's file extension.
|
|
39
47
|
def content_type
|
|
40
48
|
case File.extname(path)
|
|
49
|
+
when ".aac" then "audio/aac"
|
|
50
|
+
when ".apng" then "image/apng"
|
|
51
|
+
when ".avi" then "video/x-msvideo"
|
|
52
|
+
when ".avif" then "image/avif"
|
|
53
|
+
when ".bin" then "application/octet-stream"
|
|
54
|
+
when ".bmp" then "image/bmp"
|
|
41
55
|
when ".css" then "text/css"
|
|
56
|
+
when ".csv" then "text/csv"
|
|
57
|
+
when ".epub" then "application/epub+zip"
|
|
58
|
+
when ".gz" then "application/gzip"
|
|
59
|
+
when ".gif" then "image/gif"
|
|
42
60
|
when ".html" then "text/html"
|
|
43
61
|
when ".ico" then "image/ico"
|
|
62
|
+
when ".ics" then "text/calendar"
|
|
63
|
+
when ".jpeg", ".jpg" then "image/jpg"
|
|
44
64
|
when ".js" then "text/javascript"
|
|
65
|
+
when ".json" then "application/json"
|
|
66
|
+
when ".jsonld" then "application/ld+json"
|
|
67
|
+
when ".mid", ".midi" then "audio/midi"
|
|
45
68
|
when ".map" then "application/json"
|
|
69
|
+
when ".mpkg" then "application/vnd.apple.installer+xml"
|
|
70
|
+
when ".mp3" then "audio/mpeg"
|
|
71
|
+
when ".mp4" then "video/mp4"
|
|
72
|
+
when ".mpeg" then "video/mpeg"
|
|
73
|
+
when ".oga" then "audio/ogg"
|
|
74
|
+
when ".ogv" then "video/ogg"
|
|
75
|
+
when ".ogx" then "application/ogg"
|
|
76
|
+
when ".opus" then "audio/ogg"
|
|
77
|
+
when ".otf" then "font/otf"
|
|
78
|
+
when ".pdf" then "application/pdf"
|
|
79
|
+
when ".png" then "image/png"
|
|
80
|
+
when ".rar" then "application/vnd.rar"
|
|
81
|
+
when ".rtf" then "application/rtf"
|
|
82
|
+
when ".sh" then "application/x-sh"
|
|
83
|
+
when ".svg" then "image/svg+xml"
|
|
84
|
+
when ".tar" then "application/x-tar"
|
|
85
|
+
when ".tif", ".tiff" then "image/tiff"
|
|
86
|
+
when ".ttf" then "font/tff"
|
|
46
87
|
when ".txt" then "text/plain"
|
|
47
|
-
when ".
|
|
48
|
-
when ".
|
|
88
|
+
when ".wav" then "audio/wav"
|
|
89
|
+
when ".weba" then "audio/webm"
|
|
90
|
+
when ".webm" then "video/webm"
|
|
91
|
+
when ".webmanifest" then "application/manifest+json"
|
|
92
|
+
when ".webp" then "image/webp"
|
|
93
|
+
when ".woff", ".woff2" then "application/font-woff2"
|
|
94
|
+
when ".xml" then "application/xml"
|
|
95
|
+
when ".xhtml" then "application/xhtml+xml"
|
|
49
96
|
when ".xml" then "application/xml"
|
|
97
|
+
when ".xul" then "application/vnd.mozilla.xul+xml"
|
|
98
|
+
when ".zip" then "application/zip"
|
|
99
|
+
when ".7z" then "application/x-7z-compressed"
|
|
50
100
|
else
|
|
51
101
|
raise NotImplementedError,
|
|
52
102
|
I18n.t("dev.router.content_type_not_implemented", path:)
|
|
53
103
|
end
|
|
54
104
|
end
|
|
55
105
|
|
|
56
|
-
def status
|
|
57
|
-
File.exist?(path) ? 200 : 404
|
|
58
|
-
end
|
|
106
|
+
def status = File.exist?(path) ? 200 : 404
|
|
59
107
|
end
|
|
60
108
|
end
|
data/lib/lifer/utilities.rb
CHANGED
|
@@ -101,7 +101,7 @@ module Lifer::Utilities
|
|
|
101
101
|
def stringify_keys(hash)
|
|
102
102
|
stringified_hash = {}
|
|
103
103
|
|
|
104
|
-
hash
|
|
104
|
+
hash&.each do |key, value|
|
|
105
105
|
stringified_hash[(key.to_s rescue key) || key] =
|
|
106
106
|
value.is_a?(Hash) ? stringify_keys(value) : value
|
|
107
107
|
|
|
@@ -119,7 +119,7 @@ module Lifer::Utilities
|
|
|
119
119
|
def symbolize_keys(hash)
|
|
120
120
|
symbolized_hash = {}
|
|
121
121
|
|
|
122
|
-
hash
|
|
122
|
+
hash&.each do |key, value|
|
|
123
123
|
symbolized_hash[(key.to_sym rescue key) || key] =
|
|
124
124
|
value.is_a?(Hash) ? symbolize_keys(value) : value
|
|
125
125
|
|
data/lib/lifer/version.rb
CHANGED
data/lifer.gemspec
CHANGED
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.files.grep(%r{\Abin/}) { |bin_file| File.basename(bin_file) }
|
|
37
37
|
spec.require_paths = ["lib"]
|
|
38
38
|
|
|
39
|
+
spec.add_dependency "base64"
|
|
39
40
|
spec.add_dependency "i18n", "< 2"
|
|
40
41
|
spec.add_dependency "kramdown", "~> 2.4"
|
|
41
42
|
spec.add_dependency "liquid", ["~> 5.6", "< 6"]
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lifer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- benjamin wil
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: base64
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: i18n
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -210,8 +224,8 @@ licenses:
|
|
|
210
224
|
- MIT
|
|
211
225
|
metadata:
|
|
212
226
|
allowed_push_host: https://rubygems.org
|
|
213
|
-
homepage_uri: https://github.com/benjaminwil/lifer/blob/v0.12.
|
|
214
|
-
source_code_uri: https://github.com/benjaminwil/lifer/tree/v0.12.
|
|
227
|
+
homepage_uri: https://github.com/benjaminwil/lifer/blob/v0.12.3/README.md
|
|
228
|
+
source_code_uri: https://github.com/benjaminwil/lifer/tree/v0.12.3
|
|
215
229
|
changelog_uri: https://github.com/benjaminwil/lifer/blob/main/CHANGELOG.md
|
|
216
230
|
post_install_message:
|
|
217
231
|
rdoc_options: []
|
|
@@ -228,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
228
242
|
- !ruby/object:Gem::Version
|
|
229
243
|
version: '0'
|
|
230
244
|
requirements: []
|
|
231
|
-
rubygems_version: 3.5.
|
|
245
|
+
rubygems_version: 3.5.22
|
|
232
246
|
signing_key:
|
|
233
247
|
specification_version: 4
|
|
234
248
|
summary: Minimal static weblog generator.
|