bergamasco 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: c262d6f244868421fee1374c2bba65bc56ffd3d9
4
- data.tar.gz: 8e9a13b9c80ac8cfb0f3a2fadc0258b95f6345a9
3
+ metadata.gz: da851e868923db31de5b7fc89bb91f9b36a3ab83
4
+ data.tar.gz: 0596c056ed1cf7d4c4ed4ccd6cc7ee262965dce4
5
5
  SHA512:
6
- metadata.gz: b63c233540b52391ceb09fa6e7409754d34ba6f859c9e1abb993303d6f752afe5e31c3cc9a7916857c269b0250a75a28c7078cc5f083a4a1b3cd769c7568f54c
7
- data.tar.gz: 097034351b04c41224369002826f741c10eadcc9cbf7c2f55d08d35d723ef8e9c2ce598e86114931fae0563128d5979c8b2ad1d2a1f8a930e9a5cab84f34f955
6
+ metadata.gz: 9c04a737a3eb7354e94a7a18eb07dab2f0bd5759470447dbf97ceb449c3486baf4c933335fb236bd06a6f35f551b54d9d5b5134504a49d4431cfc3f32cbd296d
7
+ data.tar.gz: fce246a7884d0ad071c1cdc07bb3fc0026d88f258eec855e3d0f99947b5778f46b6229c60057c92a43b9e71b483cc04e15242a802bf1e56002fb370d89d13aea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.2.1)
4
+ bergamasco (0.2.2)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  addressable (~> 2.3.8)
7
7
  builder (~> 3.2, >= 3.2.2)
@@ -79,4 +79,4 @@ DEPENDENCIES
79
79
  simplecov
80
80
 
81
81
  BUNDLED WITH
82
- 1.13.6
82
+ 1.12.5
@@ -69,6 +69,7 @@ module Bergamasco
69
69
  CommonMarker.render_html(text, :default)
70
70
  end
71
71
 
72
+ # expects a references list generated by pandoc
72
73
  def self.extract_references(html, options={})
73
74
  doc = Nokogiri::HTML(html)
74
75
  doc.xpath('//div[@id="refs"]/div/@id').map do |ref|
@@ -83,7 +84,7 @@ module Bergamasco
83
84
  end
84
85
 
85
86
  {
86
- id: id,
87
+ value: id,
87
88
  related_identifier_type: type,
88
89
  relation_type: "references"
89
90
  }
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -53,10 +53,10 @@ describe Bergamasco::Markdown do
53
53
  filepath = fixture_path + 'cool-dois.html.md'
54
54
  separator = "READMORE"
55
55
  metadata = subject.read_yaml_for_doi_metadata(filepath, separator: separator, csl: 'spec/apa.csl', bibliography: 'spec/references.bib')
56
- expect(metadata["related_identifiers"]).to eq([{:id=>"https://www.w3.org/Provider/Style/URI",
56
+ expect(metadata["related_identifiers"]).to eq([{:value=>"https://www.w3.org/Provider/Style/URI",
57
57
  :related_identifier_type=>"URL",
58
58
  :relation_type=>"references"},
59
- { :id=>"10.1371/JOURNAL.PONE.0115253",
59
+ { :value=>"10.1371/JOURNAL.PONE.0115253",
60
60
  :related_identifier_type=>"DOI",
61
61
  :relation_type=>"references" }])
62
62
  end
@@ -89,10 +89,10 @@ describe Bergamasco::Markdown do
89
89
  file = IO.read(filepath)
90
90
  html = subject.render_html(file, skip_yaml_header: true, csl: 'spec/apa.csl', bibliography: 'spec/references.bib')
91
91
  refs = subject.extract_references(html, skip_yaml_header: true, csl: 'spec/apa.csl', bibliography: 'spec/references.bib')
92
- expect(refs).to eq([{:id=>"https://www.w3.org/Provider/Style/URI",
92
+ expect(refs).to eq([{:value=>"https://www.w3.org/Provider/Style/URI",
93
93
  :related_identifier_type=>"URL",
94
94
  :relation_type=>"references"},
95
- { :id=>"10.1371/JOURNAL.PONE.0115253",
95
+ { :value=>"10.1371/JOURNAL.PONE.0115253",
96
96
  :related_identifier_type=>"DOI",
97
97
  :relation_type=>"references" }])
98
98
  end
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-17 00:00:00.000000000 Z
11
+ date: 2016-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri