webgen 1.7.0 → 1.7.1

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
  SHA256:
3
- metadata.gz: 0c2b90d29a4e3ddf583052496505ee5e903beac7a460c2b9fb19180540fe8e59
4
- data.tar.gz: '06109f7ce0df6dce4095287907be396c816fcaf8f3c26767420f41af80a00965'
3
+ metadata.gz: 1754f53e6bf21861fe5ede0bdc46d9ec59b5e38a0f011037b19a218f3b1ba642
4
+ data.tar.gz: 766b0d8e4ba1b5ad86d9ad7655e9c92cac3ba43dbeff2747c8a83cbec6f1cd33
5
5
  SHA512:
6
- metadata.gz: e4bc1e38d4cb27cbaeeda92b0775f65a44c8c4a048b4da6c661f8b502a9fe031b5d8476e62a9811f383be1c8dd152a3b59ed31e7466d116d02acf984d39c8184
7
- data.tar.gz: '08e4498259a4e83f7623729082637f9ef7a8f78912d07808e65a62aa498cf672149c71a368bf909a80e62d45432ac844f9ae710a754304d451133e6431da8e02'
6
+ metadata.gz: 2a05b2c6b2ea95ce22c58d57d6145e92fbdec870f27f750fc847fa372c96b9bf2ea751d6cacabe8bf344e3a1cdf08a8ea2d78b28966d864cd666b3ad378e0162
7
+ data.tar.gz: c3724710f6745d87dd92531f8b2f6a06a82be518af9057b46c9b4d62e94cbc9831c24b8b670c3525168dd2e999f67c37807e3c600d0737d93d1db2f547a68d3d
data/Rakefile CHANGED
@@ -109,16 +109,16 @@ EOF
109
109
 
110
110
  s.add_dependency('cmdparse', '~> 3.0', '>= 3.0.1')
111
111
  s.add_dependency('systemu', '~> 2.5')
112
- s.add_dependency('kramdown', '~> 1.3')
112
+ s.add_dependency('kramdown', '~> 2.3')
113
113
  s.add_development_dependency('rake', '>= 0.8.3')
114
114
  s.add_development_dependency('minitest', '~> 5.0')
115
115
  s.add_development_dependency('diff-lcs', '~> 1.0')
116
116
  s.add_development_dependency('maruku', '~> 0.7')
117
117
  s.add_development_dependency('RedCloth', '~> 4.1')
118
- s.add_development_dependency('haml', '~> 4.0')
118
+ s.add_development_dependency('haml', '~> 5.0')
119
119
  s.add_development_dependency('sass', '~> 3.2')
120
120
  s.add_development_dependency('builder', '~> 2.1')
121
- s.add_development_dependency('rdoc', '~> 4.0')
121
+ s.add_development_dependency('rdoc', '~> 6.0')
122
122
  s.add_development_dependency('coderay', '~> 1.0')
123
123
  s.add_development_dependency('erubis', '~> 2.6')
124
124
  s.add_development_dependency('rdiscount', '~> 1.3')
@@ -128,11 +128,9 @@ EOF
128
128
  s.files = PKG_FILES.to_a
129
129
  s.require_path = 'lib'
130
130
  s.executables = ['webgen']
131
- s.default_executable = 'webgen'
132
131
 
133
132
  #### Documentation
134
133
 
135
- s.has_rdoc = true
136
134
  s.rdoc_options = ['--line-numbers', '--main', 'API.rdoc']
137
135
  s.extra_rdoc_files = ['API.rdoc']
138
136
 
data/THANKS CHANGED
@@ -17,3 +17,4 @@ Thanks for donations to:
17
17
  * Mateusz Szczap
18
18
  * Michael Franzl
19
19
  * Roger Pack
20
+ * Damien Robert
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.7.1
@@ -5,7 +5,7 @@
5
5
  context.node.sitemap_entries.each do |item|
6
6
  %>
7
7
  <url>
8
- <loc><%= URI.escape(item.url) %></loc>
8
+ <loc><%= ERB::Util.url_encode(item.url) %></loc>
9
9
  <lastmod><%= item['modified_at'].iso8601 %></lastmod>
10
10
  <changefreq><%= item['change_freq'] || context.node['default_change_freq'] %></changefreq>
11
11
  <% if priority = item['priority'] || context.node['default_priority'] %>
@@ -65,7 +65,7 @@ content_processor.register('Blocks')
65
65
  content_processor.register('Builder')
66
66
  content_processor.register('CSSMinify', :name => 'cssminify')
67
67
  content_processor.register('Erb')
68
- option('content_processor.erb.trim_mode', '', &is_string)
68
+ option('content_processor.erb.trim_mode', nil, &is_string)
69
69
 
70
70
  content_processor.register('Erubis')
71
71
  option('content_processor.erubis.use_pi', false, &true_or_false)
@@ -13,7 +13,7 @@ module Webgen
13
13
 
14
14
  # Process the Ruby statements embedded in the content of +context+.
15
15
  def self.call(context)
16
- erb = ERB.new(context.content, nil, context.website.config['content_processor.erb.trim_mode'])
16
+ erb = ERB.new(context.content, trim_mode: context.website.config['content_processor.erb.trim_mode'])
17
17
  erb.filename = context.ref_node.alcn
18
18
  context.content = erb.result(binding)
19
19
  context
@@ -92,7 +92,6 @@ module Webgen
92
92
  rdoc.options = rdoc_options(options)
93
93
  rdoc.store = rdoc_store(rdoc.options, cache_dir)
94
94
 
95
- rdoc.exclude = rdoc.options.exclude
96
95
  rdoc.last_modified.replace(rdoc.setup_output_dir(cache_dir, false))
97
96
 
98
97
  if !(rdoc.parse_files(rdoc.options.files)).empty?
@@ -38,7 +38,7 @@ module Webgen
38
38
  def paths
39
39
  if !defined?(@paths)
40
40
  stream = open(@uri)
41
- stream = Zlib::GzipReader.new(stream) if @uri =~ /(\.tar\.gz|\.tgz)$/
41
+ stream = Zlib::GzipReader.new(stream) if @uri.to_s =~ /(\.tar\.gz|\.tgz)$/
42
42
  Archive::Tar::Minitar::Input.open(stream) do |input|
43
43
  @paths = input.collect do |entry|
44
44
  path = entry.full_name
@@ -97,6 +97,7 @@ module Webgen
97
97
 
98
98
  def initialize(website) # :nodoc:
99
99
  super()
100
+ @parser = nil
100
101
  website.blackboard.add_listener(:website_initialized, 'tag') do
101
102
  @parser = Webgen::Utils::TagParser.new(website.config['tag.prefix'])
102
103
  end
@@ -3,6 +3,6 @@
3
3
  module Webgen
4
4
 
5
5
  # The version of webgen.
6
- VERSION = '1.7.0'
6
+ VERSION = '1.7.1'
7
7
 
8
8
  end
@@ -13,13 +13,13 @@ class TestBuilder < Minitest::Test
13
13
  cp = Webgen::ContentProcessor::Builder
14
14
 
15
15
  @context.content = "xml.div(:path => context.node.alcn) { xml.strong('test'); " +
16
- "context.website; context; context.ref_node; context.dest_node }"
16
+ "context.website; context.ref_node; context.dest_node }"
17
17
  assert_equal("<div path=\"/test\">\n <strong>test</strong>\n</div>\n", cp.call(@context).content)
18
18
 
19
- @context.content = "xml.div do \n5+5\n+=+6\nend"
20
- assert_error_on_line(SyntaxError, 3) { cp.call(@context) }
19
+ @context.content = "xml.div do \n=+6\nend"
20
+ assert_error_on_line(SyntaxError, 2) { cp.call(@context) }
21
21
 
22
- @context.content = "xml.div do \n5+5\nunknown\n++6\nend"
22
+ @context.content = "xml.div do \nx=5+5\nunknown\n+6\nend"
23
23
  assert_error_on_line(NameError, 3) { cp.call(@context) }
24
24
  end
25
25
 
@@ -12,7 +12,7 @@ class TestHaml < Minitest::Test
12
12
  cp = Webgen::ContentProcessor::Haml
13
13
 
14
14
  @context.content = "#content\n %h1 Hallo\n = [context.node.alcn, context.ref_node.alcn, context.dest_node.alcn].join"
15
- assert_equal("<div id='content'>\n <h1>Hallo</h1>\n /test/test/test\n</div>\n", cp.call(@context).content)
15
+ assert_equal("<div id='content'>\n<h1>Hallo</h1>\n/test/test/test\n</div>\n", cp.call(@context).content)
16
16
 
17
17
  @context.content = "#cont\n % = + unknown"
18
18
  assert_error_on_line(Webgen::RenderError, 2) { cp.call(@context) }
@@ -14,10 +14,10 @@ class TestContentProcessorRuby < Minitest::Test
14
14
  @context.content = "context.content = context.dest_node.alcn"
15
15
  assert_equal(@context.dest_node.alcn, cp.call(@context).content)
16
16
 
17
- @context.content = "5+5\n+=+6\n"
17
+ @context.content = "x = 5+5\n+=+6\n"
18
18
  assert_error_on_line(SyntaxError, 2) { cp.call(@context) }
19
19
 
20
- @context.content = "5+5\nunknown\n++6"
20
+ @context.content = "x = 5+5\nunknown\n++6"
21
21
  assert_error_on_line(NameError, 2) { cp.call(@context) }
22
22
  end
23
23
 
@@ -14,7 +14,7 @@ class TestSass < Minitest::Test
14
14
  @website.config['content_processor.sass.options'] = {}
15
15
  cp = Webgen::ContentProcessor::Sass
16
16
 
17
- @context.content = "#main\n :background-color #000"
17
+ @context.content = "#main\n background-color: #000"
18
18
  result = "#main {\n background-color: #000; }\n"
19
19
  assert_equal(result, cp.call(@context).content)
20
20
 
@@ -8,7 +8,8 @@ class TestNodeMetaInfo < Minitest::Test
8
8
  def setup
9
9
  @website = Object.new
10
10
  @node = node = Object.new
11
- @node.define_singleton_method(:meta_info) { {'key' => 'value'} }
11
+ @meta_info_data = meta_info_data = {'key' => 'value'}
12
+ @node.define_singleton_method(:meta_info) { meta_info_data }
12
13
  @website.define_singleton_method(:tree) { {'alcn' => node} }
13
14
  @obj = Webgen::ItemTracker::NodeMetaInfo.new(@website)
14
15
  end
@@ -25,11 +26,10 @@ class TestNodeMetaInfo < Minitest::Test
25
26
  assert_equal('value', @obj.item_data('alcn', 'key'))
26
27
  refute_same(@node.meta_info['key'], @obj.item_data('alcn', 'key'))
27
28
 
28
- @node.define_singleton_method(:meta_info) { {'key' => 'value', 'modified_at' => 5} }
29
+ @meta_info_data['modified_at'] = 5
29
30
  assert_equal({'key' => 'value'}, @obj.item_data('alcn'))
30
- @node.define_singleton_method(:meta_info) do
31
- {'key' => 'value', 'modified_at' => 5, 'modified_at_in_dest_path' => true}
32
- end
31
+ @meta_info_data['modified_at_in_dest_path'] = true
32
+
33
33
  assert_equal({'key' => 'value', 'modified_at' => 5, 'modified_at_in_dest_path' => true},
34
34
  @obj.item_data('alcn'))
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2020-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cmdparse
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.3'
53
+ version: '2.3'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.3'
60
+ version: '2.3'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '4.0'
137
+ version: '5.0'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '4.0'
144
+ version: '5.0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: sass
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '4.0'
179
+ version: '6.0'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '4.0'
186
+ version: '6.0'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: coderay
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -516,8 +516,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
516
516
  - !ruby/object:Gem::Version
517
517
  version: '0'
518
518
  requirements: []
519
- rubyforge_project:
520
- rubygems_version: 2.7.3
519
+ rubygems_version: 3.0.3
521
520
  signing_key:
522
521
  specification_version: 4
523
522
  summary: webgen is a fast, powerful, and extensible static website generator.