zenweb 3.10.1 → 3.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +3 -2
- data/History.txt +32 -0
- data/Rakefile +2 -2
- data/lib/zenweb/config.rb +12 -2
- data/lib/zenweb/plugins/erb.rb +5 -2
- data/lib/zenweb/site.rb +14 -3
- data/lib/zenweb/tasks.rake +7 -4
- data/lib/zenweb.rb +1 -1
- data/test/test_zenweb_config.rb +1 -1
- data/test/test_zenweb_plugins_erb.rb +2 -1
- data/test/test_zenweb_site.rb +16 -0
- data.tar.gz.sig +0 -0
- metadata +49 -43
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 21c85d185e152fb057384c1defe583ab0f535a5c705f34976976f5a55506dff7
|
4
|
+
data.tar.gz: e5091b07884222fdfa2b724b8d54fcbc31e82543db52e61c5574bc2b4c243e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ea058ede3f2d836a3f86f0551538f4380575653660da686e9b81c6c5d0f8c025730d368f985374fe6e36141e4978088ccc7d673c6502885750d1d350ecf1b76
|
7
|
+
data.tar.gz: e7365a35018a899fecc62d73307d3c3b854524c257a596ad480345d8709676645fefb0b94087f84239e602f23728b93f678800a2860eaa8490a116a28670f60e
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
r,�\k@H_?b
|
2
|
+
w�"�p���LH{ -$��P����f|Խk&'����N7�ߞ�#.���6a�g��[�
|
3
|
+
:X-kbu&��m)��7E�zA��8
|
data/History.txt
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
=== 3.10.5 / 2022-01-04
|
2
|
+
|
3
|
+
* 1 bug fix:
|
4
|
+
|
5
|
+
* ruby 3.1: Fixed YAML.load issue with loading Time instances.
|
6
|
+
|
7
|
+
=== 3.10.4 / 2019-12-14
|
8
|
+
|
9
|
+
* 1 minor enhancement:
|
10
|
+
|
11
|
+
* Bumped rake dependency to < 15.
|
12
|
+
|
13
|
+
* 1 bug fix:
|
14
|
+
|
15
|
+
* Fixed debug task to fail more gracefully when page not found. (kejadlen)
|
16
|
+
|
17
|
+
=== 3.10.3 / 2019-09-24
|
18
|
+
|
19
|
+
* 1 bug fix:
|
20
|
+
|
21
|
+
* Fixed an ERB deprecation warning in ruby 2.6+.
|
22
|
+
|
23
|
+
=== 3.10.2 / 2018-03-16
|
24
|
+
|
25
|
+
* 5 bug fixes:
|
26
|
+
|
27
|
+
* Argh! Fixed logic error in inherited config lookup.
|
28
|
+
* Fix subpages after time pruning in categories.
|
29
|
+
* Fixed Site#fix_subpages from duplicating pages. Now idempotent.
|
30
|
+
* Fixed double-loading warnings from plugins if you're testing against local.
|
31
|
+
* Fixed filtering of pre-dated pages. (thagomizer)
|
32
|
+
|
1
33
|
=== 3.10.1 / 2016-11-16
|
2
34
|
|
3
35
|
* 1 bug fix:
|
data/Rakefile
CHANGED
@@ -9,11 +9,11 @@ Hoe.plugin :isolate
|
|
9
9
|
Hoe.spec 'zenweb' do
|
10
10
|
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
|
11
11
|
|
12
|
-
dependency "rake", [">= 0.9", "<
|
12
|
+
dependency "rake", [">= 0.9", "< 15"]
|
13
13
|
dependency "makerakeworkwell", "~> 1.0"
|
14
14
|
dependency "less", "~> 2.0"
|
15
15
|
dependency "coderay", "~> 1.0"
|
16
|
-
dependency "kramdown", "~> 1.4"
|
16
|
+
dependency "kramdown", "~> 1.4" # TODO: 1.17.0 -> 2.1.0
|
17
17
|
end
|
18
18
|
|
19
19
|
# vim: syntax=ruby
|
data/lib/zenweb/config.rb
CHANGED
@@ -48,7 +48,7 @@ module Zenweb
|
|
48
48
|
# Access value at +k+. The value can be inherited from the parent configs.
|
49
49
|
|
50
50
|
def [] k
|
51
|
-
h[k.to_s]
|
51
|
+
h.key?(k.to_s) ? h[k.to_s] : parent[k]
|
52
52
|
end
|
53
53
|
|
54
54
|
def key? k
|
@@ -94,13 +94,23 @@ module Zenweb
|
|
94
94
|
@h ||= begin
|
95
95
|
thing = File.file?(path) ? path : site.pages[path]
|
96
96
|
config, _ = self.class.split thing
|
97
|
-
|
97
|
+
maybe_load_yaml(config) || {}
|
98
98
|
end
|
99
99
|
rescue => e
|
100
100
|
warn "#{self.path}: #{e}"
|
101
101
|
raise
|
102
102
|
end
|
103
103
|
|
104
|
+
def maybe_load_yaml config
|
105
|
+
if config then
|
106
|
+
if YAML.respond_to? :safe_load_file then
|
107
|
+
YAML.safe_load config, permitted_classes: [Time]
|
108
|
+
else
|
109
|
+
YAML.load config
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
104
114
|
def inspect # :nodoc:
|
105
115
|
if Rake.application.options.trace then
|
106
116
|
hash = h.sort.map { |k,v| "#{k.inspect} => #{v.inspect}" }.join ", "
|
data/lib/zenweb/plugins/erb.rb
CHANGED
@@ -33,11 +33,14 @@ class Zenweb::Page
|
|
33
33
|
gsub(/%\}/, "%>").
|
34
34
|
gsub(/\\([{}%])/, '\1')
|
35
35
|
|
36
|
-
@erb =
|
36
|
+
@erb = if RUBY_VERSION >= "2.6.0" then
|
37
|
+
ERB.new(content, trim_mode:"-")
|
38
|
+
else
|
39
|
+
ERB.new(content, nil, "-")
|
40
|
+
end
|
37
41
|
end
|
38
42
|
|
39
43
|
@erb.filename = source.inspect
|
40
44
|
@erb.result binding
|
41
45
|
end
|
42
46
|
end # erb
|
43
|
-
|
data/lib/zenweb/site.rb
CHANGED
@@ -34,7 +34,11 @@ module Zenweb
|
|
34
34
|
# Loads all files matching "zenweb/plugins/*.rb".
|
35
35
|
|
36
36
|
def self.load_plugins
|
37
|
+
seen = {}
|
37
38
|
Gem.find_files("zenweb/plugins/*.rb").each do |path|
|
39
|
+
file = File.basename path
|
40
|
+
next if seen[file]
|
41
|
+
seen[file] = true
|
38
42
|
require path
|
39
43
|
end
|
40
44
|
end
|
@@ -67,6 +71,9 @@ module Zenweb
|
|
67
71
|
end
|
68
72
|
end
|
69
73
|
|
74
|
+
time_prune
|
75
|
+
fix_subpages
|
76
|
+
|
70
77
|
pages.each do |url, page|
|
71
78
|
dir = url.split(/\//).first
|
72
79
|
next unless File.directory? dir and dir !~ /^_/
|
@@ -201,11 +208,15 @@ module Zenweb
|
|
201
208
|
$website = self # HACK
|
202
209
|
task(:virtual_pages).invoke
|
203
210
|
|
211
|
+
time_prune
|
212
|
+
|
213
|
+
fix_subpages
|
214
|
+
end
|
215
|
+
|
216
|
+
def time_prune
|
204
217
|
t = Time.now
|
205
218
|
@pages.reject! { |path, page| page.date && page.date > t } unless
|
206
219
|
ENV["ALL"]
|
207
|
-
|
208
|
-
fix_subpages
|
209
220
|
end
|
210
221
|
|
211
222
|
def self.binary_files
|
@@ -250,7 +261,7 @@ module Zenweb
|
|
250
261
|
|
251
262
|
@pages.values.each do |p|
|
252
263
|
unless p.subpages.empty? then
|
253
|
-
sorted = p.subpages.sort_by(&:clean_url)
|
264
|
+
sorted = p.subpages.sort_by(&:clean_url).uniq
|
254
265
|
p.subpages.replace sorted
|
255
266
|
end
|
256
267
|
end
|
data/lib/zenweb/tasks.rake
CHANGED
@@ -182,17 +182,20 @@ end
|
|
182
182
|
|
183
183
|
website if ENV['DEBUG']
|
184
184
|
|
185
|
-
desc "Debug the generation of a file. Takes a
|
186
|
-
task :debug
|
185
|
+
desc "Debug the generation of a file. Takes a F=path arg or defaults to index.html.erb."
|
186
|
+
task :debug do
|
187
187
|
site = website
|
188
188
|
|
189
189
|
path = ENV['PAGE'] || ENV['F'] || ENV['FILE'] || "index.html.erb"
|
190
190
|
|
191
|
-
|
192
|
-
|
191
|
+
page = site.pages[path]
|
192
|
+
|
193
|
+
if page
|
193
194
|
page.generate
|
194
195
|
|
195
196
|
puts
|
196
197
|
puts File.read page.url_path
|
198
|
+
else
|
199
|
+
fail "Could not find F=%p" % [path]
|
197
200
|
end
|
198
201
|
end
|
data/lib/zenweb.rb
CHANGED
data/test/test_zenweb_config.rb
CHANGED
@@ -51,7 +51,7 @@ class TestZenwebConfig < Minitest::Test
|
|
51
51
|
'"layout" => "post"]',
|
52
52
|
'"title" => "Example Page 1"]'].join ", "
|
53
53
|
|
54
|
-
|
54
|
+
refute Rake.application.options.trace
|
55
55
|
Rake.application.options.trace = true
|
56
56
|
assert_equal exp, config.inspect
|
57
57
|
ensure
|
@@ -54,7 +54,8 @@ class TestZenwebPageErb < Minitest::Test
|
|
54
54
|
page.erb "this is {{ 1 + }} content", page
|
55
55
|
end
|
56
56
|
|
57
|
-
|
57
|
+
# in 2.5 this changes from concat to <<, but the syntax error stays
|
58
|
+
assert_includes e.message, "(( 1 + ).to_s)"
|
58
59
|
assert e.backtrace.grep('Page["blog/2012-01-02-page1.html.md"]:1')
|
59
60
|
end
|
60
61
|
end
|
data/test/test_zenweb_site.rb
CHANGED
@@ -50,6 +50,22 @@ class TestZenwebSite < Minitest::Test
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def test_fix_subpages
|
54
|
+
top = setup_complex_website
|
55
|
+
|
56
|
+
site.fix_subpages
|
57
|
+
site.fix_subpages
|
58
|
+
# ...
|
59
|
+
|
60
|
+
sp = site.pages
|
61
|
+
exp = [[sp["blog/index.html.md"],
|
62
|
+
[[sp["blog/2014-01-01-first.html.md"], []],
|
63
|
+
[sp["blog/2014-02-02-second.html.md"], []],
|
64
|
+
[sp["blog/2014-03-03-third.html.md"], []]]]]
|
65
|
+
|
66
|
+
assert_equal exp, top.all_subpages
|
67
|
+
end
|
68
|
+
|
53
69
|
def test_config
|
54
70
|
assert_equal "_config.yml", site.config.path
|
55
71
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBBjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTIxMTIyMzIzMTkwNFoXDTIyMTIyMzIzMTkwNFowRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -20,122 +20,127 @@ cert_chain:
|
|
20
20
|
oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
|
21
21
|
GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
|
-
gBEfoTEGr7Zii72cx+
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
fO6tdKQc/5RfA8oQEkg8hrxA5PQSz4TOFJGLpFvIapEk6tMruQ0bHgkhr9auXg==
|
23
|
+
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
|
+
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
+
AQCKB5jfsuSnKb+t/Wrh3UpdkmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
|
26
|
+
x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
|
27
|
+
zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
|
28
|
+
lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
|
29
|
+
JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
|
30
|
+
YsuyUzsMz6GQA4khyaMgKNSD
|
32
31
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
32
|
+
date: 2022-01-05 00:00:00.000000000 Z
|
34
33
|
dependencies:
|
35
34
|
- !ruby/object:Gem::Dependency
|
36
35
|
name: rake
|
37
36
|
requirement: !ruby/object:Gem::Requirement
|
38
37
|
requirements:
|
39
|
-
- -
|
38
|
+
- - ">="
|
40
39
|
- !ruby/object:Gem::Version
|
41
40
|
version: '0.9'
|
42
|
-
- - <
|
41
|
+
- - "<"
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
version: '
|
43
|
+
version: '15'
|
45
44
|
type: :runtime
|
46
45
|
prerelease: false
|
47
46
|
version_requirements: !ruby/object:Gem::Requirement
|
48
47
|
requirements:
|
49
|
-
- -
|
48
|
+
- - ">="
|
50
49
|
- !ruby/object:Gem::Version
|
51
50
|
version: '0.9'
|
52
|
-
- - <
|
51
|
+
- - "<"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
53
|
+
version: '15'
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: makerakeworkwell
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
|
-
- - ~>
|
58
|
+
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '1.0'
|
62
61
|
type: :runtime
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
|
-
- - ~>
|
65
|
+
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '1.0'
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
69
|
name: less
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
|
-
- - ~>
|
72
|
+
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '2.0'
|
76
75
|
type: :runtime
|
77
76
|
prerelease: false
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
|
-
- - ~>
|
79
|
+
- - "~>"
|
81
80
|
- !ruby/object:Gem::Version
|
82
81
|
version: '2.0'
|
83
82
|
- !ruby/object:Gem::Dependency
|
84
83
|
name: coderay
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
|
-
- - ~>
|
86
|
+
- - "~>"
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: '1.0'
|
90
89
|
type: :runtime
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
|
-
- - ~>
|
93
|
+
- - "~>"
|
95
94
|
- !ruby/object:Gem::Version
|
96
95
|
version: '1.0'
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
97
|
name: kramdown
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
|
-
- - ~>
|
100
|
+
- - "~>"
|
102
101
|
- !ruby/object:Gem::Version
|
103
102
|
version: '1.4'
|
104
103
|
type: :runtime
|
105
104
|
prerelease: false
|
106
105
|
version_requirements: !ruby/object:Gem::Requirement
|
107
106
|
requirements:
|
108
|
-
- - ~>
|
107
|
+
- - "~>"
|
109
108
|
- !ruby/object:Gem::Version
|
110
109
|
version: '1.4'
|
111
110
|
- !ruby/object:Gem::Dependency
|
112
111
|
name: rdoc
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
114
113
|
requirements:
|
115
|
-
- -
|
114
|
+
- - ">="
|
116
115
|
- !ruby/object:Gem::Version
|
117
116
|
version: '4.0'
|
117
|
+
- - "<"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '7'
|
118
120
|
type: :development
|
119
121
|
prerelease: false
|
120
122
|
version_requirements: !ruby/object:Gem::Requirement
|
121
123
|
requirements:
|
122
|
-
- -
|
124
|
+
- - ">="
|
123
125
|
- !ruby/object:Gem::Version
|
124
126
|
version: '4.0'
|
127
|
+
- - "<"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '7'
|
125
130
|
- !ruby/object:Gem::Dependency
|
126
131
|
name: hoe
|
127
132
|
requirement: !ruby/object:Gem::Requirement
|
128
133
|
requirements:
|
129
|
-
- - ~>
|
134
|
+
- - "~>"
|
130
135
|
- !ruby/object:Gem::Version
|
131
|
-
version: '3.
|
136
|
+
version: '3.23'
|
132
137
|
type: :development
|
133
138
|
prerelease: false
|
134
139
|
version_requirements: !ruby/object:Gem::Requirement
|
135
140
|
requirements:
|
136
|
-
- - ~>
|
141
|
+
- - "~>"
|
137
142
|
- !ruby/object:Gem::Version
|
138
|
-
version: '3.
|
143
|
+
version: '3.23'
|
139
144
|
description: |-
|
140
145
|
Zenweb is a set of classes/tools for organizing and formating a
|
141
146
|
website. It is website oriented rather than webpage oriented, unlike
|
@@ -166,7 +171,7 @@ extra_rdoc_files:
|
|
166
171
|
- example-site/blog/_tmp/not_yet.html.md
|
167
172
|
- example-site/pages/nonblogpage.html.md
|
168
173
|
files:
|
169
|
-
- .autotest
|
174
|
+
- ".autotest"
|
170
175
|
- History.txt
|
171
176
|
- Manifest.txt
|
172
177
|
- README.txt
|
@@ -230,27 +235,28 @@ files:
|
|
230
235
|
homepage: https://github.com/seattlerb/zenweb
|
231
236
|
licenses:
|
232
237
|
- MIT
|
233
|
-
metadata:
|
234
|
-
|
238
|
+
metadata:
|
239
|
+
homepage_uri: https://github.com/seattlerb/zenweb
|
240
|
+
bug_tracker_uri: https://github.com/seattlerb/zenweb/issues
|
241
|
+
post_install_message:
|
235
242
|
rdoc_options:
|
236
|
-
- --main
|
243
|
+
- "--main"
|
237
244
|
- README.txt
|
238
245
|
require_paths:
|
239
246
|
- lib
|
240
247
|
required_ruby_version: !ruby/object:Gem::Requirement
|
241
248
|
requirements:
|
242
|
-
- -
|
249
|
+
- - ">="
|
243
250
|
- !ruby/object:Gem::Version
|
244
251
|
version: '0'
|
245
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
253
|
requirements:
|
247
|
-
- -
|
254
|
+
- - ">="
|
248
255
|
- !ruby/object:Gem::Version
|
249
256
|
version: '0'
|
250
257
|
requirements: []
|
251
|
-
|
252
|
-
|
253
|
-
signing_key:
|
258
|
+
rubygems_version: 3.3.3
|
259
|
+
signing_key:
|
254
260
|
specification_version: 4
|
255
261
|
summary: Zenweb is a set of classes/tools for organizing and formating a website
|
256
262
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|