bergamasco 0.3.8 → 0.3.9

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: 945bd3854bba6cc9504370a73c52f1ea8cb3bd1f
4
- data.tar.gz: 234740b428bcfe53759ef9f9d536dd7e9bed4132
3
+ metadata.gz: 400f38ed59f5b732866c952da0c79b5f1bd5d339
4
+ data.tar.gz: 42dcc0d7d4fa12d69415ac0bd8c3a6d8735f9bd9
5
5
  SHA512:
6
- metadata.gz: ebc3607eca3a2f04baf81390dff3183c35c668dbe8bbd06a8b75ed4ad17c1f7ec26fd338da6acc88f26e9053e791552d961187ce4fb0738a20ce65a3c3df6d1d
7
- data.tar.gz: 77e10d2d3ea74e9b79cebc09eb1ac71732eb072f504c8c4f3061cbde437585c37e01f08b1799eeab17a829c2cfeb2f09104ff67d007e2cca7c601c7981702649
6
+ metadata.gz: dbfc6174b39dda4980a4213dc80a86a9014f24657831b37eef4e7026bc9231345b5cce7fdbbd69585a9ffc0232a9ef4745472ec3637029458ebc5dd0b1f1f0d3
7
+ data.tar.gz: a484fe56539a49d72ec177ae2d34e586941c47c59f51fc8ac7a94cdb3e567eec1aa395a29568b625f2191291e83bd9b03a47db165f04fb9abf8a0162cbba3e35
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.3.8)
4
+ bergamasco (0.3.9)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  addressable (~> 2.3.8)
7
7
  builder (~> 3.2, >= 3.2.2)
@@ -39,18 +39,10 @@ module Bergamasco
39
39
  csl = File.expand_path("../jats.csl", __FILE__)
40
40
 
41
41
  options = options.merge(template: template, to: to, csl: csl)
42
- options = options.merge(metadata: options[:metadata]) if options[:metadata].present?
43
42
 
44
43
  convert(text, options)
45
44
  end
46
45
 
47
- def self.write_jats(input_path, output_path, options={})
48
- file = IO.read(input_path)
49
- xml = convert_to_jats(file, options)
50
- IO.write(output_path, xml)
51
- output_path
52
- end
53
-
54
46
  def self.write_bibliograpy_to_yaml(bib_path, yaml_path)
55
47
  yaml = `pandoc-citeproc --bib2yaml #{bib_path} 2>&1`
56
48
  return nil if $?.exitstatus > 0
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
data/spec/pandoc_spec.rb CHANGED
@@ -20,16 +20,6 @@ describe Bergamasco::Pandoc do
20
20
  expect(article_id.values.first).to eq("doi")
21
21
  end
22
22
 
23
- it 'should write jats xml' do
24
- input_path = fixture_path + 'cool-dois.html.md'
25
- output_path = fixture_path + 'cool-dois.xml'
26
- xml_path = subject.write_jats(input_path, output_path, skip_yaml_header: true, csl: 'spec/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
27
- doc = File.open(xml_path) { |f| Nokogiri::XML(f) }
28
- article_id = doc.at_xpath("//article-id")
29
- expect(article_id.text).to eq("10.5072/0000-03VC")
30
- expect(article_id.values.first).to eq("doi")
31
- end
32
-
33
23
  it 'should write bibliography to yaml' do
34
24
  bib_path = fixture_path + 'references.bib'
35
25
  yaml_path = fixture_path + 'references.yaml'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bergamasco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner