bergamasco 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 631806685632b53839df673be224cff0eff1d0e8
4
- data.tar.gz: aa02ad230280df749772004ed5974c832c67b55b
3
+ metadata.gz: b2d0f9240402129c78c23144ac147a6a53ae5999
4
+ data.tar.gz: e1bf0d0595088ebbab265a14132ae65620b5b629
5
5
  SHA512:
6
- metadata.gz: 6ef912a5b7bcf17a8c594ee321ab40394dd5c1ada2a4ae9b544b820ecff53524b51308594dc95f72789efd43028bfac09f170de83ee65c4c7ab6566bea85399d
7
- data.tar.gz: 58362a4955a320b0a2c4f74607e38c8a507d19fe5f7910da74773081a582a733e64e976ec56c7e387489b3e95f3e52ae84d16a09bbfcf154e470d97b5301c949
6
+ metadata.gz: 12b3e327c61272c94dbd66fd16d1cfe34dd69dde73af0088bff6544cbc810b0b956e6df6222c6554d9db93c88a1157ebb0b6f4c0ae212351a4a1f48084a15542
7
+ data.tar.gz: b8bd3d49e48e8a1bea266de8f7f21e275425e4a7a628f93694d210a3469934c4b539d6932d63c6be4871742775defe7a0cee8ff2cef1edf7c94d6838b6c034a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.3.6)
4
+ bergamasco (0.3.7)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  addressable (~> 2.3.8)
7
7
  builder (~> 3.2, >= 3.2.2)
@@ -74,4 +74,4 @@ DEPENDENCIES
74
74
  simplecov
75
75
 
76
76
  BUNDLED WITH
77
- 1.12.5
77
+ 1.13.6
@@ -42,12 +42,11 @@ module Bergamasco
42
42
  convert(text, options)
43
43
  end
44
44
 
45
- def self.write_jats(filepath, options={})
46
- file = IO.read(filepath)
47
- xml_path = File.join(File.dirname(filepath), File.basename(filepath, ".html.md")) + ".xml"
45
+ def self.write_jats(input_path, output_path, options={})
46
+ file = IO.read(input_path)
48
47
  xml = convert_to_jats(file, options)
49
- IO.write(xml_path, xml)
50
- xml_path
48
+ IO.write(output_path, xml)
49
+ output_path
51
50
  end
52
51
 
53
52
  def self.write_bibliograpy_to_yaml(bib_path, yaml_path)
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
data/spec/pandoc_spec.rb CHANGED
@@ -21,8 +21,9 @@ describe Bergamasco::Pandoc do
21
21
  end
22
22
 
23
23
  it 'should write jats xml' do
24
- filepath = fixture_path + 'cool-dois.html.md'
25
- xml_path = subject.write_jats(filepath, skip_yaml_header: true, csl: 'spec/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
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')
26
27
  doc = File.open(xml_path) { |f| Nokogiri::XML(f) }
27
28
  article_id = doc.at_xpath("//article-id")
28
29
  expect(article_id.text).to eq("10.5072/0000-03VC")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bergamasco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-01 00:00:00.000000000 Z
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri