asciidoctor-templates-compiler 0.3.0 → 0.4.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
- SHA1:
3
- metadata.gz: 51590b253d877005f5760f154c14346665e1722c
4
- data.tar.gz: 9d98b848da5104228aa0c8918e9646b12ec06805
2
+ SHA256:
3
+ metadata.gz: a871c4486a6f7daf6489b3c4a786aaae8e0f1442cf5b9771f56b067b598ad93a
4
+ data.tar.gz: 6f08a085708017bed938f507959c91a5b6e625c165b61c8b1d930d4efd82fa41
5
5
  SHA512:
6
- metadata.gz: 3c6d38f6a691c349843ca8fd9d9569e6ac125bc81cb3732a45d3af1c4b651d7d953b8d759151823dbb6f1f3cb7802330719bab51e472fa04e0529674ca5c638a
7
- data.tar.gz: 675c48c88d2c797049857cc70bedb7e3e56f9ec666ae8f2fa3181aafdfea67cc51fb949cd31f20240f27867d899b1dac0cfeb4b752188a026562c7104e1d667f
6
+ metadata.gz: 88065711be47ad019d589abf5b8190d4e7e83a716cd854d23fd7df9d47f78397f2a9df732015ab52f952990a174b6b3c1c01d335f7ce53416b1e6f819fe158e1
7
+ data.tar.gz: 4e72ce6e1413cf88ba2299c69c8f37f5d454ea77d762544d7c12fd3dec6a78c0d97b05ed042b34e014752065fa3460b2335abcd9829faf5ab688865365cc43ad
@@ -2,7 +2,7 @@
2
2
  :source-language: ruby
3
3
  // custom
4
4
  :gem-name: asciidoctor-templates-compiler
5
- :gem-version: 0.3.0
5
+ :gem-version: 0.4.0
6
6
  :gh-name: jirutka/{gem-name}
7
7
  :gh-branch: master
8
8
  :codacy-id: b23b8c6503474ea5b13537eaef0c73d5
@@ -44,7 +44,7 @@ $ bundle install
44
44
  The main entry point is method `Asciidoctor::TemplatesCompiler::Slim#compile_converter` (for Slim) that accepts the following keyword arguments.
45
45
 
46
46
  backend_info::
47
- A hash of keys for `backend_info`: `basebackend`, `outfilesuffix`, `filetype`, `htmlsyntax`.
47
+ A hash of keys for `backend_info`: `basebackend`, `outfilesuffix`, `filetype`, `htmlsyntax`, `supports_templates` (requires Asciidoctor ≥ 1.5.7).
48
48
 
49
49
  class_name::
50
50
  Full name of the converter class to generate (e.g. `My::HTML::Converter`).
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.add_runtime_dependency 'corefines', '~> 1.2'
20
20
  s.add_runtime_dependency 'docopt', '~> 0.6'
21
21
  s.add_runtime_dependency 'slim', '>= 2.1', '< 4.0'
22
- s.add_runtime_dependency 'ruby-beautify', '~> 0.97'
22
+ s.add_runtime_dependency 'ruby-beautify2', '~> 0.98'
23
23
 
24
24
  s.add_development_dependency 'rake', '~> 12.0'
25
25
  s.add_development_dependency 'rspec', '~> 3.6'
@@ -22,7 +22,8 @@ HELP_MSG = <<-EOF.unindent
22
22
 
23
23
  Options:
24
24
  -b --backend-info KEY=VAL[,...] Parameters for backend_info: basebackend, outfilesuffix,
25
- filetype, and htmlsyntax.
25
+ filetype, htmlsyntax, and supports_templates (requires
26
+ Asciidoctor >= 1.5.7).
26
27
 
27
28
  -n --class-name NAME Full name of the converter class to generate (e.g.
28
29
  My::HTML::Converter) [default: Converter].
@@ -36,7 +36,7 @@ module Asciidoctor::TemplatesCompiler
36
36
  # @param register_for [Array<String>] an array of backend names that the generated converter
37
37
  # should be registered for to handle. Default is empty.
38
38
  # @param backend_info [Hash] a hash of parameters for +backend_info+: +basebackend+,
39
- # +outfilesuffix+, +filetype+, +htmlsyntax+. Default is empty.
39
+ # +outfilesuffix+, +filetype+, +htmlsyntax+, +supports_templates+. Default is empty.
40
40
  # @param delegate_backend [String, nil] name of the backend (converter) to use as a fallback
41
41
  # for AST nodes not supported by the generated converter. If not specified, no fallback will
42
42
  # be used and converter will raise +NoMethodError+ when it try to convert unsupported node.
@@ -109,7 +109,9 @@ module Asciidoctor::TemplatesCompiler
109
109
 
110
110
  def initialization_code
111
111
  setup_backend_info = if !@backend_info.empty?
112
- @backend_info.map { |k, v| " #{k} #{v.inspect}" }.join("\n")
112
+ @backend_info.map { |key, value|
113
+ " #{key}" + (value == true ? '' : " #{value.inspect}")
114
+ }.join("\n")
113
115
  end
114
116
 
115
117
  if !@register_for.empty?
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require 'asciidoctor'
2
3
  require 'asciidoctor/converter'
3
4
  require 'asciidoctor/converter/template'
4
5
  require 'asciidoctor/templates_compiler/version'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module TemplatesCompiler
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-templates-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Jirutka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -73,19 +73,19 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '4.0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: ruby-beautify
76
+ name: ruby-beautify2
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.97'
81
+ version: '0.98'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.97'
88
+ version: '0.98'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rake
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.6.13
185
+ rubygems_version: 2.7.7
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Compile templates-based Asciidoctor converter (backend) into a single Ruby