zenweb 3.4.0 → 3.5.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
- checksums.yaml.gz.sig +0 -0
- data/.autotest +8 -5
- data/History.txt +8 -0
- data/lib/zenweb/page.rb +5 -1
- data/lib/zenweb/plugins/markdown.rb +1 -1
- data/lib/zenweb.rb +1 -1
- data/test/test_zenweb_plugins_markdown.rb +20 -0
- data.tar.gz.sig +0 -0
- metadata +5 -5
- 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: bd4e60e046e26c4c52060e136115c18c9a67dd39
|
4
|
+
data.tar.gz: a07920ba086b1627aab87550053f6b2d7a0d9ade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40dfbb58356ae34e309c0a9d90fa8a23afdc7eb1b6e9e940b49e32ebc70ae8baae92943cd9859bdfdc77f4e7d8d1996883ce1e7ca3c41dead9746bb180579dce
|
7
|
+
data.tar.gz: 64a2699353dc48793df8ff6c354522a613cd5cfdb78ea205bc2bc59ca23da5ee95fda738ed5a2289d34846985268b8564efbfc916848eced9a7565d941f96091
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.autotest
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
|
3
|
-
require
|
4
|
-
|
5
|
-
|
3
|
+
require "rbconfig"
|
4
|
+
version = RbConfig::CONFIG["ruby_version"]
|
5
|
+
|
6
|
+
# require "autotest/restart"
|
7
|
+
# require "autotest/isolate"
|
8
|
+
# require "autotest/rcov" if ENV["RCOV"]
|
6
9
|
|
7
10
|
Autotest.add_hook :initialize do |at|
|
8
|
-
at.
|
11
|
+
at.add_exception(/isolate/)
|
9
12
|
|
10
|
-
|
13
|
+
ENV["GEM_PATH"] = "tmp/isolate/ruby-#{version}"
|
11
14
|
|
12
15
|
at.extra_class_map["Zenweb::Site"] = "lib/zenweb/site.rb"
|
13
16
|
at.extra_class_map["Zenweb::Page"] = "lib/zenweb/page.rb"
|
data/History.txt
CHANGED
data/lib/zenweb/page.rb
CHANGED
@@ -68,7 +68,7 @@ module Zenweb
|
|
68
68
|
# All pages below this page, recursively.
|
69
69
|
|
70
70
|
def all_subpages
|
71
|
-
subpages.map { |p| [p, p.all_subpages] }
|
71
|
+
subpages.reject(&:no_index?).map { |p| [p, p.all_subpages] }
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
@@ -315,6 +315,10 @@ module Zenweb
|
|
315
315
|
end
|
316
316
|
end
|
317
317
|
|
318
|
+
def no_index?
|
319
|
+
config["no_index"]
|
320
|
+
end
|
321
|
+
|
318
322
|
##
|
319
323
|
# Render this page as a whole. This includes rendering the page's
|
320
324
|
# content into a layout if one has been specified via config.
|
@@ -54,7 +54,7 @@ class Zenweb::Page
|
|
54
54
|
level = (depth-1)/2
|
55
55
|
level = 0 if level < 0
|
56
56
|
|
57
|
-
dated, normal = a.map(&:last).partition(&:dated?)
|
57
|
+
dated, normal = a.map(&:last).reject(&:no_index?).partition(&:dated?)
|
58
58
|
|
59
59
|
normal = normal.sort_by(&:url).map { |p| page_sitemap_url p, level }
|
60
60
|
|
data/lib/zenweb.rb
CHANGED
@@ -140,6 +140,26 @@ class TestZenwebPageMarkdown < MarkdownTest
|
|
140
140
|
assert_equal exp, act
|
141
141
|
end
|
142
142
|
|
143
|
+
def test_sitemap_multidir_excluded
|
144
|
+
build_fake_site %w[a/index.html.md
|
145
|
+
a/b/index.html.md
|
146
|
+
a/b/p1.html
|
147
|
+
a/b/p2.html
|
148
|
+
a/b/p3.html]
|
149
|
+
|
150
|
+
site.pages["a/b/p1.html"].config.h["no_index"] = true
|
151
|
+
|
152
|
+
page = site.pages["a/index.html.md"]
|
153
|
+
act = page.sitemap
|
154
|
+
exp = <<-END.cleanup
|
155
|
+
* [Title for a/b/index.html.md](/a/b/)
|
156
|
+
* [Title for a/b/p2.html](/a/b/p2.html)
|
157
|
+
* [Title for a/b/p3.html](/a/b/p3.html)
|
158
|
+
END
|
159
|
+
|
160
|
+
assert_equal exp, act
|
161
|
+
end
|
162
|
+
|
143
163
|
def test_sitemap_subdir
|
144
164
|
build_fake_site %w[a/index.html
|
145
165
|
a/b/index.html.md
|
data.tar.gz.sig
CHANGED
Binary file
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
|
30
30
|
xx3n58i0lQkBE1EpKE0lFu/y
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-
|
32
|
+
date: 2014-06-17 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rake
|
@@ -141,14 +141,14 @@ dependencies:
|
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '3.
|
144
|
+
version: '3.12'
|
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.12'
|
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
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
- !ruby/object:Gem::Version
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
|
-
rubyforge_project:
|
261
|
+
rubyforge_project:
|
262
262
|
rubygems_version: 2.2.1
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
metadata.gz.sig
CHANGED
Binary file
|