zenweb 3.11.0 → 3.11.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84df6337b405ae77d3a2ed5fb1c6aa940ce2ad08ba6dd904a9b3cde365a47623
4
- data.tar.gz: bc471952a820c258e6704dc1e73039c16978edf51b7016ee12db27514e9eeb2e
3
+ metadata.gz: f8864678bb1d4420008d2289a77fcc9f14389c54c293ad1bebef6690e23d5b2e
4
+ data.tar.gz: 5ddaa8d510daccc1b189258c409c68f5418ec59424015c8373ee9ac4237eb5bf
5
5
  SHA512:
6
- metadata.gz: '08fbb2f23c3ebb0ca4323a5a79d0604f84d61f5904c3c758e2c3ef2e5956fc2044cf1eec66b3a3a93b18b914e12fa47247b4bcc7e3a6498750c7201b9d5fa8b7'
7
- data.tar.gz: 26452812d1d9459a0413ca40b8fa9a394372b7c4f2cdcacc6ce7cef7b85bb8a69b4c78e3e7def7e9356ed6f1af2ac584434d9da4465b8b8c861e8c1ea729229d
6
+ metadata.gz: 8a59ab5a91b985b16346bdf03d8f058ce6910aae7e6986c4cbaccdecbd4f23482a3f4628692f0d1ed0cda08d09306197ec98bc1afdfc3626ebfccf1cb82dc25b
7
+ data.tar.gz: 20ec7695d083ffe7f069349bc1f512e86d6a655e120935a90596b6a49ea84e289e069970b812c8b9c729c212c865d8742bf5a34c65cfa470179aa03d9640554c
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ === 3.11.1 / 2024-08-22
2
+
3
+ * 4 bug fixes:
4
+
5
+ * Deleted long dead (~2.0) code.
6
+ * Fixed 2.7 (only?!) frozen string literal bug.
7
+ * Modified 'rake run' task to regenerate more consistently.
8
+ * Removed ancient Enumerable#chunk implementation.
9
+
1
10
  === 3.11.0 / 2023-09-28
2
11
 
3
12
  * 1 minor enhancement:
data/lib/zenweb/config.rb CHANGED
@@ -55,8 +55,7 @@ module Zenweb
55
55
  h.key?(k.to_s) or parent.key?(k)
56
56
  end
57
57
 
58
- UTF_BOM = "\xEF\xBB\xBF"
59
- UTF_BOM.force_encoding "binary" if File::RUBY19
58
+ UTF_BOM = "\xEF\xBB\xBF".b
60
59
 
61
60
  ##
62
61
  # Splits a file and returns the yaml header and body, as applicable.
@@ -75,7 +74,7 @@ module Zenweb
75
74
 
76
75
  yaml_file = File.extname(path) == ".yml"
77
76
 
78
- body.force_encoding "utf-8" if File::RUBY19
77
+ body.force_encoding Encoding::UTF_8
79
78
  else
80
79
  body = path.content
81
80
  end
@@ -10,24 +10,6 @@ def File.each_parent dir, file
10
10
  end
11
11
 
12
12
  module Enumerable
13
- def chunk
14
- bin, result, prev = [], [], Object.new
15
-
16
- each do |o|
17
- curr = yield o
18
-
19
- if prev != curr then
20
- bin = []
21
- result << [curr, bin]
22
- prev = curr
23
- end
24
-
25
- bin << o
26
- end
27
-
28
- result
29
- end unless [].respond_to? :chunk
30
-
31
13
  def multi_group_by
32
14
  r = Hash.new { |h,k| h[k] = [] }
33
15
  each do |o|
@@ -54,20 +36,6 @@ class Array # :nodoc:
54
36
  end
55
37
  end
56
38
 
57
- class File # :nodoc:
58
- RUBY19 = "<3".respond_to? :encoding # :nodoc:
59
-
60
- class << self
61
- alias :binread :read unless RUBY19
62
- end
63
- end
64
-
65
- class String # :nodoc:
66
- def valid_encoding? # :nodoc:
67
- true
68
- end unless File::RUBY19
69
- end
70
-
71
39
  class Time # :nodoc:
72
40
  ##
73
41
  # Format as YYYY-MM-DD
data/lib/zenweb/page.rb CHANGED
@@ -311,8 +311,7 @@ module Zenweb
311
311
  end
312
312
  @layout
313
313
  rescue => e
314
- e.message.concat " for page #{path.inspect}"
315
- raise e
314
+ raise e.exception "%s for page %p" % [e.message, path]
316
315
  end
317
316
 
318
317
  ##
@@ -3,7 +3,7 @@ require 'zenweb'
3
3
  task :default => :generate
4
4
 
5
5
  def website
6
- return $website if defined?($website)
6
+ return $website if defined?($website) && $website
7
7
  $website = Zenweb::Site.new
8
8
  $website.scan
9
9
  $website.wire
@@ -153,19 +153,17 @@ task :run do
153
153
 
154
154
  warn "NOTE: No file found for #{url}" unless task
155
155
 
156
- newer = task && task.needed?
156
+ if task then
157
+ if task.needed? then
158
+ unless system "#{Gem.ruby} -S rake -q clean generate" then
159
+ warn "WARNING: couldn't run 'rake clean generate' properly, exited: %p" % [$?]
160
+ end
161
+ end
157
162
 
158
- if newer then
159
- system "rake clean generate"
160
- end
161
-
162
- if task && newer then
163
- @@site = nil
163
+ @@site = $website = nil
164
164
  Rake.application = Rake::Application.new # reset
165
165
  end
166
166
 
167
- task.clear_timestamp if task && target_path =~ /(html|css|js)$/
168
-
169
167
  super
170
168
  end
171
169
  end
data/lib/zenweb.rb CHANGED
@@ -6,7 +6,7 @@ require "time"
6
6
 
7
7
  module Zenweb
8
8
  # duh
9
- VERSION = "3.11.0"
9
+ VERSION = "3.11.1"
10
10
  end
11
11
 
12
12
  require "zenweb/site"
@@ -366,8 +366,8 @@ class TestZenwebPage < Minitest::Test
366
366
  e = assert_raises NoMethodError do
367
367
  assert_nil page.render_wtf
368
368
  end
369
- err = "undefined method `render_wtf' for Page"
370
- assert_includes e.message, err
369
+
370
+ assert_match(/undefined method `render_wtf' for.*?Zenweb::Page/, e.message)
371
371
  end
372
372
 
373
373
  def test_layout_nil_string
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.11.0
4
+ version: 3.11.1
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
- MIIDPjCCAiagAwIBAgIBBzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+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G97a6DNm+Fr
25
+ AQCygvpmncmkiSs9r/Kceo4bBPDszhTv6iBi4LwMReqnFrpNLMOWJw7xi8x+3eL2
26
+ XS09ZPNOt2zm70KmFouBMgOysnDY4k2dE8uF6B8JbZOO8QfalW+CoNBliefOTcn2
27
+ bg5IOP7UoGM5lC174/cbDJrJnRG9bzig5FAP0mvsgA8zgTRXQzIUAZEo92D5K7p4
28
+ B4/O998ho6BSOgYBI9Yk1ttdCtti6Y+8N9+fZESsjtWMykA+WXWeGUScHqiU+gH8
29
+ S7043fq9EbQdBr2AXdj92+CDwuTfHI6/Hj5FVBDULufrJaan4xUgL70Hvc6pTTeW
30
+ deKfBjgVAq7EYHu1AczzlUly
31
31
  -----END CERTIFICATE-----
32
- date: 2023-09-29 00:00:00.000000000 Z
32
+ date: 2024-08-22 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
@@ -161,14 +161,14 @@ dependencies:
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: '4.0'
164
+ version: '4.2'
165
165
  type: :development
166
166
  prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '4.0'
171
+ version: '4.2'
172
172
  description: |-
173
173
  Zenweb is a set of classes/tools for organizing and formating a
174
174
  website. It is website oriented rather than webpage oriented, unlike
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
283
  - !ruby/object:Gem::Version
284
284
  version: '0'
285
285
  requirements: []
286
- rubygems_version: 3.4.10
286
+ rubygems_version: 3.5.15
287
287
  signing_key:
288
288
  specification_version: 4
289
289
  summary: Zenweb is a set of classes/tools for organizing and formating a website
metadata.gz.sig CHANGED
Binary file