webgen 1.7.1 → 1.7.2

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: 1754f53e6bf21861fe5ede0bdc46d9ec59b5e38a0f011037b19a218f3b1ba642
4
- data.tar.gz: 766b0d8e4ba1b5ad86d9ad7655e9c92cac3ba43dbeff2747c8a83cbec6f1cd33
3
+ metadata.gz: c6697ca3880193603f4c4d88579cc87bafb3826646f1aa062c62c2db21ffe3af
4
+ data.tar.gz: 509d1c0b3868faef7805ac47c69216df4c855f7b98595a653f6ca523a66daefd
5
5
  SHA512:
6
- metadata.gz: 2a05b2c6b2ea95ce22c58d57d6145e92fbdec870f27f750fc847fa372c96b9bf2ea751d6cacabe8bf344e3a1cdf08a8ea2d78b28966d864cd666b3ad378e0162
7
- data.tar.gz: c3724710f6745d87dd92531f8b2f6a06a82be518af9057b46c9b4d62e94cbc9831c24b8b670c3525168dd2e999f67c37807e3c600d0737d93d1db2f547a68d3d
6
+ metadata.gz: 999375fd6b0fa4640bb7185e674e36d5f77a51f08e5bfe1d10f6acfb328de69526fe3fef7edf8f758d61a818dcdaffd52cfa9947cbfbe699879f8a5e82b288ae
7
+ data.tar.gz: fd21ea49579e6e89d790cc54110584de387d49633db1662dc7bbc394d5ca9c1579615a66ab42eabb52fa6dfed7769d5ee474cb66281dc1c9cb8a4337771dcdb7
data/README.md CHANGED
@@ -5,6 +5,11 @@ files (which can be written in any markup language). It can generate
5
5
  dynamic content like menus on the fly and comes with many powerful
6
6
  extensions.
7
7
 
8
+ Sponsors:
9
+
10
+ * **GROSSWEBER** provides <a href="http://grossweber.com/b/kramdown" target="_blank">software
11
+ development consulting and training services</a>.
12
+
8
13
 
9
14
  ## Contact & Help
10
15
 
data/Rakefile CHANGED
@@ -105,7 +105,7 @@ EOF
105
105
 
106
106
  #### Dependencies, requirements and files
107
107
 
108
- s.required_ruby_version = '>= 2.0.0'
108
+ s.required_ruby_version = '>= 2.6.0'
109
109
 
110
110
  s.add_dependency('cmdparse', '~> 3.0', '>= 3.0.1')
111
111
  s.add_dependency('systemu', '~> 2.5')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.1
1
+ 1.7.2
@@ -13,7 +13,11 @@ 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, trim_mode: context.website.config['content_processor.erb.trim_mode'])
16
+ erb = if RUBY_VERSION < '2.6'
17
+ ERB.new(context.content, nil, context.website.config['content_processor.erb.trim_mode'] || '')
18
+ else
19
+ ERB.new(context.content, trim_mode: context.website.config['content_processor.erb.trim_mode'])
20
+ end
17
21
  erb.filename = context.ref_node.alcn
18
22
  context.content = erb.result(binding)
19
23
  context
@@ -84,9 +84,10 @@ module Webgen
84
84
  @@languages = {}
85
85
  started = nil
86
86
  data = File.readlines(__FILE__).each do |l|
87
- next if !started && (started = (l == '__END__'))
87
+ next unless (started ||= (l == "aar||aa|Afar|afar\n"))
88
88
  data = l.chomp.split('|').collect {|f| f.empty? ? nil : f}
89
89
  lang = Language.new(data[0..2], data[3])
90
+ @@languages[lang] = lang
90
91
  @@languages[lang.code2chars] ||= lang unless lang.code2chars.nil?
91
92
  @@languages[lang.code3chars] ||= lang unless lang.code3chars.nil?
92
93
  @@languages[lang.code3chars_alternative] ||= lang unless lang.code3chars_alternative.nil?
@@ -37,7 +37,7 @@ module Webgen
37
37
  # Return all paths in the tar archive available at #uri.
38
38
  def paths
39
39
  if !defined?(@paths)
40
- stream = open(@uri)
40
+ stream = (RUBY_VERSION < '2.5' ? open(@uri) : URI.open(@uri))
41
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|
@@ -3,6 +3,6 @@
3
3
  module Webgen
4
4
 
5
5
  # The version of webgen.
6
- VERSION = '1.7.1'
6
+ VERSION = '1.7.2'
7
7
 
8
8
  end
@@ -4,6 +4,7 @@
4
4
  require 'stringio'
5
5
  require 'fileutils'
6
6
  require 'ostruct'
7
+ require 'date'
7
8
 
8
9
  # Requirements for Website
9
10
  require 'webgen/core_ext'
@@ -37,6 +37,7 @@ class TestContentProcessorTags < Minitest::Test
37
37
  assert_nil(params)
38
38
  assert_equal('', body)
39
39
  assert_equal(@context, local_context)
40
+ ''
40
41
  end
41
42
  cp.call(@context)
42
43
  end
@@ -39,7 +39,8 @@ class TestContentProcessorTikz < Minitest::Test
39
39
  'content_processor.tikz.transparent' => trans,
40
40
  'content_processor.tikz.libraries' => libs,
41
41
  'content_processor.tikz.opts' => opts,
42
- 'content_processor.tikz.template' => '/template')
42
+ 'content_processor.tikz.template' => '/template',
43
+ 'content_processor.tikz.engine' => 'pdflatex')
43
44
  Webgen::ContentProcessor::Tikz.call(@context)
44
45
  end
45
46
 
@@ -7,6 +7,7 @@ class TestLanguages < Minitest::Test
7
7
 
8
8
  def test_get_language
9
9
  assert_nil(Webgen::LanguageManager.language_for_code(nil))
10
+ assert_nil(Webgen::LanguageManager.language_for_code('__END__'))
10
11
 
11
12
  lang1 = Webgen::LanguageManager.language_for_code('ger')
12
13
  lang2 = Webgen::LanguageManager.language_for_code('deu')
@@ -111,6 +111,7 @@ class TestTag < Minitest::Test
111
111
  assert_equal('test', tag)
112
112
  assert_equal({'param' => 'value'}, params)
113
113
  assert_equal('', body)
114
+ ''
114
115
  end
115
116
  end
116
117
 
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.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-21 00:00:00.000000000 Z
11
+ date: 2021-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cmdparse
@@ -509,14 +509,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
509
509
  requirements:
510
510
  - - ">="
511
511
  - !ruby/object:Gem::Version
512
- version: 2.0.0
512
+ version: 2.6.0
513
513
  required_rubygems_version: !ruby/object:Gem::Requirement
514
514
  requirements:
515
515
  - - ">="
516
516
  - !ruby/object:Gem::Version
517
517
  version: '0'
518
518
  requirements: []
519
- rubygems_version: 3.0.3
519
+ rubygems_version: 3.2.3
520
520
  signing_key:
521
521
  specification_version: 4
522
522
  summary: webgen is a fast, powerful, and extensible static website generator.