zenweb 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +23 -0
- data/lib/zenweb.rb +1 -1
- data/lib/zenweb/config.rb +3 -0
- data/lib/zenweb/extensions.rb +10 -0
- data/lib/zenweb/page.rb +180 -5
- data/lib/zenweb/plugins/markdown.rb +12 -5
- data/lib/zenweb/site.rb +12 -5
- data/test/test_zenweb_page.rb +135 -2
- metadata +15 -15
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc755e676f07eae47d4e65f3a785fbf5ccb7176b
|
4
|
+
data.tar.gz: e5e47a35122be41500fe61d135210f75556778f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46fa0dc8ba97b3dc62e5e427f78599df368c844a5b7ff0964b85c97ecaa7b7f7559e190351d915eb95aeb8ad621aded52a6372f4f5ed1d8dd73e23b67a0c99fd
|
7
|
+
data.tar.gz: f24ab230786bd0f2c86b8152487a242d860a22f1f87a2f04bd86b98797f5ee1dc116d5df2db59d224317a5616eb861e6d206cb86370801977291a7805161063e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
=== 3.6.0 / 2014-12-09
|
2
|
+
|
3
|
+
* 12 minor enhancements:
|
4
|
+
|
5
|
+
* Add debugging help when config blows on bad yaml.
|
6
|
+
* Added Enumerable#multi_group_by
|
7
|
+
* Added GeneratedIndex subclass of FakePage.
|
8
|
+
* Added Page#all_subpages_by_level that returns all subpages paired with their depth.
|
9
|
+
* Added Page#tag_list.
|
10
|
+
* Added TagIndex, TagDetail, MonthlyPage, YearlyPage, SeriesPage
|
11
|
+
* Extended Page#dated_path? to include yearly/monthly index pages.
|
12
|
+
* Page#all_subpages now partitioned by #dated_path?
|
13
|
+
* Page#all_subpages takes a reversed arg to reverse (only) dated pages.
|
14
|
+
* Page#dated_path? now returns true for yearly/monthly index.html pages.
|
15
|
+
* Page#sitemap now takes a demote arg in case your subpages are N levels deep.
|
16
|
+
* Page#sitemap reverse-sorts dated pages.
|
17
|
+
|
18
|
+
* 3 bug fixes:
|
19
|
+
|
20
|
+
* Fixed Site#fix_subpages to index via url, not path, so virtual pages work.
|
21
|
+
* Page#all_subpages incorrectly filtered out no_index pages. All means all.
|
22
|
+
* Site#fix_subpages no longer reverse sorts... that's someone else's job.
|
23
|
+
|
1
24
|
=== 3.5.0 / 2014-06-17
|
2
25
|
|
3
26
|
* 3 minor enhancements:
|
data/lib/zenweb.rb
CHANGED
data/lib/zenweb/config.rb
CHANGED
data/lib/zenweb/extensions.rb
CHANGED
@@ -27,6 +27,16 @@ module Enumerable
|
|
27
27
|
|
28
28
|
result
|
29
29
|
end unless [].respond_to? :chunk
|
30
|
+
|
31
|
+
def multi_group_by
|
32
|
+
r = Hash.new { |h,k| h[k] = [] }
|
33
|
+
each do |o|
|
34
|
+
Array(yield(o)).each do |k|
|
35
|
+
r[k] << o
|
36
|
+
end
|
37
|
+
end
|
38
|
+
r
|
39
|
+
end
|
30
40
|
end
|
31
41
|
|
32
42
|
class Array # :nodoc:
|
data/lib/zenweb/page.rb
CHANGED
@@ -65,10 +65,21 @@ module Zenweb
|
|
65
65
|
end
|
66
66
|
|
67
67
|
##
|
68
|
-
# All pages below this page, recursively.
|
68
|
+
# All pages below this page, possibly +reversed+, recursively.
|
69
69
|
|
70
|
-
def all_subpages
|
71
|
-
subpages.
|
70
|
+
def all_subpages reversed = false
|
71
|
+
dated, normal = subpages.partition(&:dated_path?)
|
72
|
+
dated = dated.reverse if reversed
|
73
|
+
|
74
|
+
(normal + dated).map { |p| [p, p.all_subpages(reversed)] }
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# All pages below this page, possibly +reversed+, recursively,
|
79
|
+
# with the depth of each subpage relative to the current page.
|
80
|
+
|
81
|
+
def all_subpages_by_level reversed = false
|
82
|
+
self.all_subpages(reversed).deep_each.map { |n, p| [(n-1)/2, p] }
|
72
83
|
end
|
73
84
|
|
74
85
|
##
|
@@ -145,6 +156,7 @@ module Zenweb
|
|
145
156
|
end
|
146
157
|
|
147
158
|
def date_from_path # :nodoc:
|
159
|
+
# TODO: test
|
148
160
|
date = path[/\d\d\d\d-\d\d-\d\d/]
|
149
161
|
Time.local(*date.split(/-/).map(&:to_i)) if date
|
150
162
|
end
|
@@ -165,7 +177,7 @@ module Zenweb
|
|
165
177
|
# Is this a dated page? (ie, does it have YYYY-MM-DD in the path?)
|
166
178
|
|
167
179
|
def dated_path?
|
168
|
-
path[/\d\d\d\d
|
180
|
+
path[/\d\d\d\d[-\/]\d\d[-\/]\d\d/] || path[/\d\d\d\d(?:[-\/]\d\d)?\/index/]
|
169
181
|
end
|
170
182
|
|
171
183
|
def change_frequency
|
@@ -361,7 +373,7 @@ module Zenweb
|
|
361
373
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
|
362
374
|
})();
|
363
375
|
</script>
|
364
|
-
|
376
|
+
EOM
|
365
377
|
end
|
366
378
|
|
367
379
|
##
|
@@ -391,6 +403,12 @@ module Zenweb
|
|
391
403
|
@url_path ||= File.join(".site", self.url)
|
392
404
|
end
|
393
405
|
|
406
|
+
def tag_list
|
407
|
+
self.tags.map { |tag|
|
408
|
+
"<a href=\"/blog/tags/#{tag.downcase.gsub(/\W/, '')}.html\">#{tag}</a>"
|
409
|
+
}.join ", "
|
410
|
+
end
|
411
|
+
|
394
412
|
##
|
395
413
|
# Wire up this page to the rest of the rake dependencies. If you
|
396
414
|
# have extra dependencies for this file (ie, an index page that
|
@@ -448,4 +466,161 @@ module Zenweb
|
|
448
466
|
attr_accessor :content
|
449
467
|
attr_accessor :date
|
450
468
|
end
|
469
|
+
|
470
|
+
##
|
471
|
+
# Generates a virtual page with an index of all tags on the given pages.
|
472
|
+
# You must subclass and provide a content method.
|
473
|
+
|
474
|
+
class GeneratedIndex < FakePage
|
475
|
+
attr_accessor :pages
|
476
|
+
|
477
|
+
def self.collate_by pages, key, default=nil
|
478
|
+
pages.multi_group_by { |page| page.config[key] || default }
|
479
|
+
end
|
480
|
+
|
481
|
+
def self.generate_all site, dir, pages
|
482
|
+
raise NotImplementedError, "Implement #{self}#generate_all"
|
483
|
+
end
|
484
|
+
|
485
|
+
def self.page_url page # TODO: hard to do helpers on class methods
|
486
|
+
"[#{page.title}](#{page.clean_url})"
|
487
|
+
end
|
488
|
+
|
489
|
+
def initialize site, path, pages
|
490
|
+
super site, path
|
491
|
+
|
492
|
+
self.pages = pages.select(&:html?)
|
493
|
+
self.date = Time.now
|
494
|
+
|
495
|
+
site.pages[path] = self
|
496
|
+
end
|
497
|
+
|
498
|
+
def content
|
499
|
+
raise NotImplementedError, "Implement #{self.class}#content"
|
500
|
+
end
|
501
|
+
|
502
|
+
def wire
|
503
|
+
super
|
504
|
+
self.depends_on pages
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
class TagIndex < GeneratedIndex
|
509
|
+
def self.tags_for pages
|
510
|
+
collate_by pages, :tags, "None"
|
511
|
+
end
|
512
|
+
|
513
|
+
def self.generate_all site, dir, pages
|
514
|
+
self.new site, "#{dir}/index.html.md.erb", pages
|
515
|
+
end
|
516
|
+
|
517
|
+
def self.tag_list tag, pages
|
518
|
+
r = []
|
519
|
+
r << "### #{tag}"
|
520
|
+
r << "#{pages.size} pages"
|
521
|
+
r << ""
|
522
|
+
r << pages.map { |page| "* #{page.date.date} #{page_url page}" }
|
523
|
+
r << ""
|
524
|
+
r.join "\n"
|
525
|
+
end
|
526
|
+
|
527
|
+
def index
|
528
|
+
self.class.tags_for(pages).sort_by { |t,_| t.to_s.downcase }.map { |t, p|
|
529
|
+
self.class.tag_list t, p
|
530
|
+
}.join "\n"
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
##
|
535
|
+
# Generates a virtual page with an index for a given tag on the given pages.
|
536
|
+
# You must subclass and provide a content method.
|
537
|
+
|
538
|
+
class TagDetail < TagIndex
|
539
|
+
attr_accessor :tag
|
540
|
+
|
541
|
+
def self.generate_all site, dir, pages
|
542
|
+
tags_for(pages).sort.each do |tag, pgs|
|
543
|
+
path = tag.downcase.gsub(/\W+/, '')
|
544
|
+
generate site, "#{dir}/#{path}.html.md.erb", pgs, tag
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
def self.generate site, path, pages, tag
|
549
|
+
self.new site, path, pages, tag
|
550
|
+
end
|
551
|
+
|
552
|
+
def initialize site, path, pages, tag
|
553
|
+
super site, path, pages
|
554
|
+
self.tag = tag
|
555
|
+
end
|
556
|
+
|
557
|
+
def index
|
558
|
+
self.class.tag_list tag, pages
|
559
|
+
end
|
560
|
+
end
|
561
|
+
|
562
|
+
class SeriesPage < GeneratedIndex
|
563
|
+
attr_accessor :series
|
564
|
+
|
565
|
+
def self.series_for pages
|
566
|
+
collate_by pages, :series
|
567
|
+
end
|
568
|
+
|
569
|
+
def self.generate_all site, dir, pages
|
570
|
+
series_for(pages).sort.each do |series, pgs|
|
571
|
+
next unless series
|
572
|
+
path = series.downcase.gsub(/\W/, '-')
|
573
|
+
generate site, "#{dir}/#{path}.html.md.erb", pgs, series
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
def self.generate site, path, pages, series
|
578
|
+
self.new site, path, pages, series
|
579
|
+
end
|
580
|
+
|
581
|
+
def initialize sate, path, pages, series
|
582
|
+
super site, path, pages
|
583
|
+
self.series = series
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
##
|
588
|
+
# Generates a virtual page with monthly index pages.
|
589
|
+
# You must subclass and provide a content method.
|
590
|
+
|
591
|
+
class MonthlyPage < GeneratedIndex
|
592
|
+
def self.generate_all site, dir, pages
|
593
|
+
pages.find_all(&:dated?).group_by { |page|
|
594
|
+
[page.date.year, page.date.month]
|
595
|
+
}.each do |(year, month), subpages|
|
596
|
+
path = "#{dir}/%4d/%02d/index.html.md.erb" % [year, month]
|
597
|
+
self.new site, path, subpages, year, month
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
601
|
+
def initialize site, path, pages, year, month
|
602
|
+
super site, path, pages
|
603
|
+
self.date = Time.local(year, month)
|
604
|
+
end
|
605
|
+
end
|
606
|
+
|
607
|
+
##
|
608
|
+
# Generates a virtual page with yearly index pages.
|
609
|
+
# You must subclass and provide a content method.
|
610
|
+
|
611
|
+
class YearlyPage < GeneratedIndex
|
612
|
+
def self.generate_all site, dir, pages
|
613
|
+
pages.find_all(&:dated?).group_by { |page|
|
614
|
+
page.date.year
|
615
|
+
}.each do |year, subpages|
|
616
|
+
path = "#{dir}/%4d/index.html.md.erb" % [year]
|
617
|
+
self.new site, path, subpages, year
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
def initialize site, path, pages, year
|
622
|
+
super site, path, pages
|
623
|
+
self.date = Time.local(year)
|
624
|
+
end
|
625
|
+
end
|
451
626
|
end
|
@@ -49,9 +49,10 @@ class Zenweb::Page
|
|
49
49
|
# whether the pages are ordered (dated) or not or a combination of
|
50
50
|
# the two.
|
51
51
|
|
52
|
-
def sitemap title_dated = true
|
53
|
-
self.
|
54
|
-
level
|
52
|
+
def sitemap title_dated = true, demote = 0
|
53
|
+
self.all_subpages_by_level(true).chunk { |n, p| n }.map { |level, a|
|
54
|
+
level -= demote
|
55
|
+
|
55
56
|
level = 0 if level < 0
|
56
57
|
|
57
58
|
dated, normal = a.map(&:last).reject(&:no_index?).partition(&:dated?)
|
@@ -60,7 +61,7 @@ class Zenweb::Page
|
|
60
61
|
|
61
62
|
dated = dated_map(dated) { |month, ps2|
|
62
63
|
x = date_sorted_map(ps2) { |p|
|
63
|
-
page_sitemap_url p, level + 1
|
64
|
+
page_sitemap_url p, level + (title_dated ? 1 : 0)
|
64
65
|
}
|
65
66
|
x.unshift "#{" " * level}* #{month}:" if title_dated
|
66
67
|
x
|
@@ -70,8 +71,14 @@ class Zenweb::Page
|
|
70
71
|
}.join "\n"
|
71
72
|
end
|
72
73
|
|
74
|
+
def page_url page
|
75
|
+
"[#{page.title}](#{page.clean_url})"
|
76
|
+
end
|
77
|
+
|
78
|
+
module_function :page_url
|
79
|
+
|
73
80
|
def page_sitemap_url page, depth # :nodoc:
|
74
|
-
"#{" " * (depth)}*
|
81
|
+
"#{" " * (depth)}* #{page_url page}"
|
75
82
|
end
|
76
83
|
|
77
84
|
def date_sorted_map a, &b # :nodoc:
|
data/lib/zenweb/site.rb
CHANGED
@@ -207,17 +207,25 @@ module Zenweb
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def fix_subpages # :nodoc:
|
210
|
+
# TODO: push most of this down to page
|
210
211
|
parents = {}
|
212
|
+
|
211
213
|
@pages.values.select(&:index?).each do |p|
|
212
|
-
parents[
|
214
|
+
parents[p.url] = p
|
213
215
|
end
|
214
216
|
|
215
217
|
@pages.values.each do |p|
|
216
|
-
path =
|
217
|
-
|
218
|
+
path = p.parent_url
|
219
|
+
|
220
|
+
parent = nil
|
221
|
+
begin
|
222
|
+
path = File.join File.dirname(path), "index.html"
|
223
|
+
parent = parents[path]
|
224
|
+
path = File.dirname path
|
225
|
+
end until parent or path == "/"
|
218
226
|
|
219
|
-
parent = parents[path]
|
220
227
|
next unless parent and parent != p and p.url =~ /html$/
|
228
|
+
|
221
229
|
p.parent = parent
|
222
230
|
parent.subpages << p
|
223
231
|
end
|
@@ -225,7 +233,6 @@ module Zenweb
|
|
225
233
|
@pages.values.each do |p|
|
226
234
|
unless p.subpages.empty? then
|
227
235
|
sorted = p.subpages.sort_by(&:clean_url)
|
228
|
-
sorted = sorted.reverse if sorted.first.dated_path?
|
229
236
|
p.subpages.replace sorted
|
230
237
|
end
|
231
238
|
end
|
data/test/test_zenweb_page.rb
CHANGED
@@ -30,6 +30,139 @@ class TestZenwebPage < Minitest::Test
|
|
30
30
|
return p1, p2
|
31
31
|
end
|
32
32
|
|
33
|
+
def setup_complex_website
|
34
|
+
self.site = Zenweb::Site.new
|
35
|
+
|
36
|
+
pages = %w[
|
37
|
+
index.html.md
|
38
|
+
blog/index.html.md
|
39
|
+
blog/2014-01-01-first.html.md
|
40
|
+
blog/2014-02-02-second.html.md
|
41
|
+
blog/2014-03-03-third.html.md
|
42
|
+
]
|
43
|
+
|
44
|
+
build_fake_site(*pages)
|
45
|
+
|
46
|
+
site.pages["index.html.md"]
|
47
|
+
end
|
48
|
+
|
49
|
+
def setup_complex_website2 skip_monthly = false
|
50
|
+
self.site = Zenweb::Site.new
|
51
|
+
|
52
|
+
pages = %w[
|
53
|
+
index.html.md
|
54
|
+
ruby/index.html.md
|
55
|
+
ruby/notes.html.md
|
56
|
+
ruby/quickref.html.md
|
57
|
+
blog/2014/index.html.md
|
58
|
+
blog/2014/01/index.html.md
|
59
|
+
blog/2014-01-01-first.html.md
|
60
|
+
blog/2014/02/index.html.md
|
61
|
+
blog/2014-02-02-second.html.md
|
62
|
+
blog/2014/03/index.html.md
|
63
|
+
blog/2014-03-03-third.html.md
|
64
|
+
blog/index.html.md
|
65
|
+
]
|
66
|
+
|
67
|
+
pages.reject! { |s| s =~ /blog.2.*index/ } if skip_monthly
|
68
|
+
|
69
|
+
build_fake_site(*pages)
|
70
|
+
|
71
|
+
site.pages["index.html.md"]
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_all_subpages
|
75
|
+
top = setup_complex_website2
|
76
|
+
sp = site.pages
|
77
|
+
exp = [[sp["blog/index.html.md"],
|
78
|
+
[[sp["blog/2014/index.html.md"],
|
79
|
+
[[sp["blog/2014/01/index.html.md"],
|
80
|
+
[[sp["blog/2014-01-01-first.html.md"], []]]],
|
81
|
+
[sp["blog/2014/02/index.html.md"],
|
82
|
+
[[sp["blog/2014-02-02-second.html.md"], []]]],
|
83
|
+
[sp["blog/2014/03/index.html.md"],
|
84
|
+
[[sp["blog/2014-03-03-third.html.md"], []]]]]]]],
|
85
|
+
[sp["ruby/index.html.md"],
|
86
|
+
[[sp["ruby/notes.html.md"], []],
|
87
|
+
[sp["ruby/quickref.html.md"], []]]]]
|
88
|
+
|
89
|
+
assert_equal exp, top.all_subpages
|
90
|
+
end
|
91
|
+
|
92
|
+
make_my_diffs_pretty!
|
93
|
+
|
94
|
+
def test_all_subpages_reversed
|
95
|
+
top = setup_complex_website2
|
96
|
+
sp = site.pages
|
97
|
+
|
98
|
+
exp = [[sp["blog/index.html.md"],
|
99
|
+
[[sp["blog/2014/index.html.md"],
|
100
|
+
[[sp["blog/2014/03/index.html.md"],
|
101
|
+
[[sp["blog/2014-03-03-third.html.md"], []]]],
|
102
|
+
[sp["blog/2014/02/index.html.md"],
|
103
|
+
[[sp["blog/2014-02-02-second.html.md"], []]]],
|
104
|
+
[sp["blog/2014/01/index.html.md"],
|
105
|
+
[[sp["blog/2014-01-01-first.html.md"], []]]]]]]],
|
106
|
+
[sp["ruby/index.html.md"],
|
107
|
+
[[sp["ruby/notes.html.md"], []],
|
108
|
+
[sp["ruby/quickref.html.md"], []]]]]
|
109
|
+
|
110
|
+
assert_equal exp, top.all_subpages(true)
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_all_subpages_complex_reversed
|
114
|
+
top = setup_complex_website2
|
115
|
+
sp = site.pages
|
116
|
+
|
117
|
+
exp = [[sp["blog/index.html.md"],
|
118
|
+
[[sp["blog/2014/index.html.md"],
|
119
|
+
[[sp["blog/2014/03/index.html.md"],
|
120
|
+
[[sp["blog/2014-03-03-third.html.md"], []]]],
|
121
|
+
[sp["blog/2014/02/index.html.md"],
|
122
|
+
[[sp["blog/2014-02-02-second.html.md"], []]]],
|
123
|
+
[sp["blog/2014/01/index.html.md"],
|
124
|
+
[[sp["blog/2014-01-01-first.html.md"], []]]]]]]],
|
125
|
+
[sp["ruby/index.html.md"],
|
126
|
+
[[sp["ruby/notes.html.md"], []],
|
127
|
+
[sp["ruby/quickref.html.md"], []]]]]
|
128
|
+
assert_equal exp, top.all_subpages(true)
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_sitemap_complex_no_dates # TODO: move to markdown tests
|
132
|
+
top = setup_complex_website2
|
133
|
+
|
134
|
+
exp = "* [Title for blog/index.html.md](/blog/)
|
135
|
+
* [Title for blog/2014/index.html.md](/blog/2014/)
|
136
|
+
* [Title for blog/2014/03/index.html.md](/blog/2014/03/)
|
137
|
+
* [Title for blog/2014-03-03-third.html.md](/blog/2014/03/03/third.html)
|
138
|
+
* [Title for blog/2014/02/index.html.md](/blog/2014/02/)
|
139
|
+
* [Title for blog/2014-02-02-second.html.md](/blog/2014/02/02/second.html)
|
140
|
+
* [Title for blog/2014/01/index.html.md](/blog/2014/01/)
|
141
|
+
* [Title for blog/2014-01-01-first.html.md](/blog/2014/01/01/first.html)
|
142
|
+
* [Title for ruby/index.html.md](/ruby/)
|
143
|
+
* [Title for ruby/notes.html.md](/ruby/notes.html)
|
144
|
+
* [Title for ruby/quickref.html.md](/ruby/quickref.html)"
|
145
|
+
|
146
|
+
assert_equal exp, top.sitemap(false)
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_sitemap_title_dated_no_monthlies # TODO: move to markdown tests
|
150
|
+
top = setup_complex_website2 :skip_monthly
|
151
|
+
|
152
|
+
exp = "* [Title for blog/index.html.md](/blog/)
|
153
|
+
* 2014-03:
|
154
|
+
* [Title for blog/2014-03-03-third.html.md](/blog/2014/03/03/third.html)
|
155
|
+
* 2014-02:
|
156
|
+
* [Title for blog/2014-02-02-second.html.md](/blog/2014/02/02/second.html)
|
157
|
+
* 2014-01:
|
158
|
+
* [Title for blog/2014-01-01-first.html.md](/blog/2014/01/01/first.html)
|
159
|
+
* [Title for ruby/index.html.md](/ruby/)
|
160
|
+
* [Title for ruby/notes.html.md](/ruby/notes.html)
|
161
|
+
* [Title for ruby/quickref.html.md](/ruby/quickref.html)"
|
162
|
+
|
163
|
+
assert_equal exp, top.sitemap(:title_dated)
|
164
|
+
end
|
165
|
+
|
33
166
|
def test_body
|
34
167
|
assert_equal "Not really much here to see.", page.body
|
35
168
|
end
|
@@ -279,9 +412,9 @@ class TestZenwebPage < Minitest::Test
|
|
279
412
|
|
280
413
|
page = site.pages["blog/index.html.erb"]
|
281
414
|
act = page.subpages
|
282
|
-
exp = [site.pages["blog/2012-01-
|
415
|
+
exp = [site.pages["blog/2012-01-02-page1.html.md"],
|
283
416
|
site.pages["blog/2012-01-03-page2.html.md"],
|
284
|
-
site.pages["blog/2012-01-
|
417
|
+
site.pages["blog/2012-01-04-page3.html.md"]]
|
285
418
|
|
286
419
|
assert_equal exp, act
|
287
420
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
|
26
|
+
FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
|
27
|
+
hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
|
28
|
+
zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
|
29
|
+
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
|
+
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-
|
32
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rake
|
@@ -113,14 +113,14 @@ dependencies:
|
|
113
113
|
requirements:
|
114
114
|
- - ~>
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '5.
|
116
|
+
version: '5.4'
|
117
117
|
type: :development
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - ~>
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '5.
|
123
|
+
version: '5.4'
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: rdoc
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,14 +141,14 @@ dependencies:
|
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '3.
|
144
|
+
version: '3.13'
|
145
145
|
type: :development
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - ~>
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '3.
|
151
|
+
version: '3.13'
|
152
152
|
description: |-
|
153
153
|
Zenweb is a set of classes/tools for organizing and formating a
|
154
154
|
website. It is website oriented rather than webpage oriented, unlike
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.
|
262
|
+
rubygems_version: 2.4.1
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: Zenweb is a set of classes/tools for organizing and formating a website
|
metadata.gz.sig
CHANGED
Binary file
|