bergamasco 0.2.5 → 0.2.6

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: bab2a523e6d708cc3f80f2f6a4a81f161d10a2ce
4
- data.tar.gz: 264b2d00c746d8ab174447639cd0d5c796263305
3
+ metadata.gz: aaa833ffb770d75838b831b557b42e8b57222212
4
+ data.tar.gz: c4d1df252794388585a78b6ade862df62fa73780
5
5
  SHA512:
6
- metadata.gz: abfa5c244bf6e5c0e5340c9009ad4c09585880227429262c40776fc3c6996f250c34f0a90f8e6c10a11ae66e058b6ca3b31dd9226c9d03187330ae27a8109101
7
- data.tar.gz: 206e78f00a3039ffdc8179f0d5044ab0a18e3af1ac13cfeb57979d60775031fee558aa854e6b3bd4f433cd3cc87033b47e54f0012b9a3efd7701173f2f7fa937
6
+ metadata.gz: 33107f5e4461710a78fffe2507a41cd577c471a669481cbfbd0ad5aec7a743c15f6b3dbf3be02376d031ccd7ce919d010e77ebdd942c4ca3423586d313b5b79d
7
+ data.tar.gz: 7077e2f957d95f41a649984c0daa4b3def8e12ac9309136a65a138fb9fccd2ea827a81b5f52727c60d3c0dc9ab499e84e31499a040514c3072b5f8f8e0266089
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.2.5)
4
+ bergamasco (0.2.6)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  addressable (~> 2.3.8)
7
7
  builder (~> 3.2, >= 3.2.2)
@@ -37,7 +37,7 @@ module Bergamasco
37
37
  end
38
38
 
39
39
  def self.read_yaml_for_doi_metadata(filepath, options={})
40
- keys = options[:keys] || ["title", "author", "date", "tags", "summary", "doi", "type", "version", "citation"]
40
+ keys = options[:keys] || ["title", "author", "date", "tags", "summary", "doi", "type", "version", "references"]
41
41
  unless File.exist?(filepath)
42
42
  parentdir = Pathname.new(filepath).parent
43
43
  FileUtils.mkdir_p parentdir
@@ -51,7 +51,7 @@ module Bergamasco
51
51
  content = YAML_FRONT_MATTER_REGEXP.match(file).post_match
52
52
  html = render_html(content, options)
53
53
  metadata["summary"] = Bergamasco::Summarize.summary_from_html(html, options)
54
- metadata["citation"] = extract_references(html)
54
+ metadata["references"] = extract_references(html)
55
55
  metadata["date"] = metadata["date"].iso8601
56
56
  metadata
57
57
  end
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -53,7 +53,7 @@ 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/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
56
- expect(metadata["citation"]).to eq(["https://www.w3.org/Provider/Style/URI", "https://doi.org/10.1371/journal.pone.0115253"])
56
+ expect(metadata["references"]).to eq(["https://www.w3.org/Provider/Style/URI", "https://doi.org/10.1371/journal.pone.0115253"])
57
57
  end
58
58
 
59
59
  it 'should write yaml' do
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.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner