pandocomatic 0.2.0.2 → 0.2.0.3

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: 653f8e6c1f7f11317cb4c866f56e93eb724b5f66
4
- data.tar.gz: 25b56957a923d4a9a5d5d5f70a566fbbc106d0d4
3
+ metadata.gz: 3d2709f2c2749f23899e6f950673b58fe1982dd0
4
+ data.tar.gz: e0a943a880a4403d6a1435867e0cf2e46e6595bd
5
5
  SHA512:
6
- metadata.gz: 4988f18e8e4f5a836e56582e0bafd23faaac1ecf7bed8a7821ca94053f4099d742e55e9cbb9a8d47a3479049932b287618ee4b5a293c38a385ea0ce2ce1047ff
7
- data.tar.gz: 21fa2d133ade10f877ab730fda87f1c813d11e05e374e582a5588a18dccf51bd95d90864ff22b6aafddb3f0d7b9fa97772c74cb5158c7e3a293bebe59fdc20d4
6
+ metadata.gz: 20b21cf6c12f8e770b25eb8e8a124910c8d0fbfe530b9d1294982984b6e88f40fc6526fe4779fa4dbd0c6c9650b297c3480eb628f69e78749f794eda2b390213
7
+ data.tar.gz: ac6eede225266eb2f60da753b26bbec7fb4a70b56df9cbda1e0169171381bf7f2d32d92501b39cb5c4e53dca02eefe748fb7561c58b9e01047939492728804ce
@@ -66,12 +66,15 @@ module Pandocomatic
66
66
  @config = config
67
67
  @src = src
68
68
  @dst = dst
69
-
69
+
70
70
  if template_name.nil? or template_name.empty?
71
71
  @template_name = @config.determine_template @src
72
72
  else
73
73
  @template_name = template_name
74
74
  end
75
+
76
+ @metadata = PandocMetadata.load_file @src
77
+ @dst = @config.set_extension @dst, @template_name, @metadata
75
78
 
76
79
  @errors.push IOError.new(:file_does_not_exist, nil, @src) unless File.exist? @src
77
80
  @errors.push IOError.new(:file_is_not_a_file, nil, @src) unless File.file? @src
@@ -93,8 +96,7 @@ module Pandocomatic
93
96
  private
94
97
 
95
98
  def convert_file
96
- metadata = PandocMetadata.load_file @src
97
- pandoc_options = metadata.pandoc_options || {}
99
+ pandoc_options = @metadata.pandoc_options || {}
98
100
  template = {}
99
101
 
100
102
  # Determine the actual options and settings to use when converting this
@@ -106,7 +108,7 @@ module Pandocomatic
106
108
  pandoc_options = Configuration.extend_value(pandoc_options, template['pandoc'])
107
109
  end
108
110
 
109
- template = Configuration.extend_value(metadata.pandocomatic, template) if metadata.has_pandocomatic?
111
+ template = Configuration.extend_value(@metadata.pandocomatic, template) if @metadata.has_pandocomatic?
110
112
 
111
113
  # Run setup scripts
112
114
  setup template
@@ -127,8 +129,8 @@ module Pandocomatic
127
129
  output = postprocess input, template
128
130
 
129
131
  # Write out the results of the conversion process to file.
130
- if @dst.to_s.empty? and metadata.pandoc_options.has_key? 'output'
131
- @dst = metadata.pandoc_options['output']
132
+ if @dst.to_s.empty? and @metadata.pandoc_options.has_key? 'output'
133
+ @dst = @metadata.pandoc_options['output']
132
134
  end
133
135
 
134
136
  begin
@@ -50,7 +50,7 @@ module Pandocomatic
50
50
  ERROR_STATUS = 1266 # This is the sum of the ascii values of the characters in 'pandocomatic'
51
51
 
52
52
  # Pandocomatic's current version
53
- VERSION = [0, 2, 0, 2]
53
+ VERSION = [0, 2, 0, 3]
54
54
 
55
55
  # Pandocomatic's default configuration file
56
56
  CONFIG_FILE = 'pandocomatic.yaml'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandocomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.2
4
+ version: 0.2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-20 00:00:00.000000000 Z
11
+ date: 2017-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paru
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - pandoc, a universal document converer <http://pandoc.org>
156
156
  rubyforge_project:
157
- rubygems_version: 2.6.11
157
+ rubygems_version: 2.5.2
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Automating the use of pandoc