zenweb 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f1ce6d301a838ed6be4b2bc6a0565a373955c87
4
- data.tar.gz: 6e5283bf5788568ec6f6c13bcb74c07eed25f201
3
+ metadata.gz: bd4e60e046e26c4c52060e136115c18c9a67dd39
4
+ data.tar.gz: a07920ba086b1627aab87550053f6b2d7a0d9ade
5
5
  SHA512:
6
- metadata.gz: 3a4f65e5649314d122693b83e7e0a9ef78730501cebb524c2a622a680e573efb02c083588485df81a6176a625f98273eb95d3b3721396d9f11b1d0fb9757ac5b
7
- data.tar.gz: 3d89f8b69e6b8df948a25d901334ec5da1db9ab25d03acfca70a4545648f7155f70f4a2aef4097c627e2abd45cb02e4719c69c242c89df05766094432914ae3b
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 'autotest/restart'
4
- require 'autotest/isolate'
5
- require 'autotest/rcov' if ENV['RCOV']
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.testlib = "minitest/autorun"
11
+ at.add_exception(/isolate/)
9
12
 
10
- at.add_exception /isolate/
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
@@ -1,3 +1,11 @@
1
+ === 3.5.0 / 2014-06-17
2
+
3
+ * 3 minor enhancements:
4
+
5
+ * Added Page#no_index?
6
+ * Markdown's sitemap excludes any #no_index? page.
7
+ * Page#all_subpages excludes #no_index? pages.
8
+
1
9
  === 3.4.0 / 2014-03-24
2
10
 
3
11
  * 4 minor enhancements:
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
@@ -6,7 +6,7 @@ require "time"
6
6
 
7
7
  module Zenweb
8
8
  # duh
9
- VERSION = "3.4.0"
9
+ VERSION = "3.5.0"
10
10
  end
11
11
 
12
12
  require "zenweb/site"
@@ -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.0
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-03-25 00:00:00.000000000 Z
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.9'
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.9'
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: zenweb
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