bergamasco 0.3.3 → 0.3.4

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: 4c9fd041fa952b8ce0d759d55f1a5ea9fbb0eeba
4
- data.tar.gz: 2fabed95db18a9ab876e1d6843fe01ca9d645c88
3
+ metadata.gz: b858c35490e3ef94e77e86b1775428a2cd3b91f8
4
+ data.tar.gz: e79ed812193d9a1321ad5b90032bc35f84b135b1
5
5
  SHA512:
6
- metadata.gz: c073e07cb08e34c90c5afdfd36ac11fb88fc341a26f7d892d7bd9c5aed6e90632f5e937f8bcfa015e40e2c191b076ff38707c365faa2da5e91e289fa143bb7a9
7
- data.tar.gz: 1855153f47914dae465a7db87cfe2910eb53fa95bec68e7defaa8e764929bf4cb946109c15b52c0243da1c5d476bdcfc9566589be925ad8ff5784b8abd941ea5
6
+ metadata.gz: db83b571cad17256f1c8fa9e459bd8a5220c3d3acca96c429d1dc3eb2563846ce8f74624811934f86d2336c4a9c81c35f7455c4a8efe80e3d42bf97d664e9cf6
7
+ data.tar.gz: ff9f6d5e8761ba7f138d0dc84001dd3ee853cc7bc73ca22bb58ad24e833c83385a3ea8276d03574f98662e63e454454f7977bfb348d8fca73135bdfe3ee592bc
data/.travis.yml CHANGED
@@ -8,9 +8,6 @@ before_install:
8
8
  - wget https://github.com/jgm/pandoc/releases/download/1.15.2/pandoc-1.15.2-1-amd64.deb
9
9
  - sudo dpkg -i pandoc-1.15.2-1-amd64.deb
10
10
  - rm pandoc-1.15.2-1-amd64.deb
11
- - sudo add-apt-repository ppa:kalakris/cmake -y
12
- - sudo apt-get update -q
13
- - sudo apt-get install cmake -y
14
11
 
15
12
  install:
16
13
  - travis_retry bundle install
data/Gemfile.lock CHANGED
@@ -1,11 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.3.3)
4
+ bergamasco (0.3.4)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  addressable (~> 2.3.8)
7
7
  builder (~> 3.2, >= 3.2.2)
8
- commonmarker (~> 0.14.0)
9
8
  loofah (~> 2.0, >= 2.0.3)
10
9
  multi_json (~> 1.11.2)
11
10
  nokogiri (~> 1.6.7)
@@ -26,8 +25,6 @@ GEM
26
25
  builder (3.2.2)
27
26
  codeclimate-test-reporter (1.0.3)
28
27
  simplecov
29
- commonmarker (0.14.0)
30
- ruby-enum (~> 0.4)
31
28
  diff-lcs (1.2.5)
32
29
  docile (1.1.5)
33
30
  i18n (0.7.0)
@@ -55,8 +52,6 @@ GEM
55
52
  diff-lcs (>= 1.2.0, < 2.0)
56
53
  rspec-support (~> 3.5.0)
57
54
  rspec-support (3.5.0)
58
- ruby-enum (0.6.0)
59
- i18n
60
55
  safe_yaml (1.0.4)
61
56
  simplecov (0.12.0)
62
57
  docile (~> 1.1.0)
data/bergamasco.gemspec CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'nokogiri', '~> 1.6.7'
22
22
  s.add_dependency 'loofah', '~> 2.0', '>= 2.0.3'
23
23
  s.add_dependency 'pandoc-ruby', '~> 2.0', '>= 2.0.0'
24
- s.add_dependency 'commonmarker', '~> 0.14.0'
25
24
  s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
26
25
  s.add_dependency 'multi_json', '~> 1.11.2'
27
26
  s.add_dependency 'oj', '~> 2.13.1'
data/lib/bergamasco.rb CHANGED
@@ -5,7 +5,6 @@ require 'yaml'
5
5
  require 'safe_yaml/load'
6
6
  require 'loofah'
7
7
  require 'pandoc-ruby'
8
- require 'commonmarker'
9
8
  require 'pathname'
10
9
  require 'time'
11
10
  require 'addressable/uri'
@@ -23,7 +23,7 @@ module Bergamasco
23
23
  ALLOWED_OPTIONS = AVAILABLE_OPTIONS + ALIAS_OPTIONS
24
24
 
25
25
  def self.convert(text, options={})
26
- options = options.select { |k, v| ALLOWED_OPTIONS.include?(k.to_s.gsub('_', '-')) }
26
+ options = options.select { |k, v| ALLOWED_OPTIONS.include?(k.to_s.gsub('_', '-')) }.to_h
27
27
 
28
28
  options[:from] ||= :markdown
29
29
  options[:to] ||= :html
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -7,7 +7,7 @@ tags:
7
7
  - doi
8
8
  - featured
9
9
  image: https://blog.datacite.org/images/2016/12/cool-dois.png
10
- doi: 10.23725/0000-03VC
10
+ doi: 10.5072/0000-03VC
11
11
  ---
12
12
  In 1998 Tim Berners-Lee coined the term cool URIs [-@https://www.w3.org/Provider/Style/URI], that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot [@https://doi.org/10.1371/journal.pone.0115253] and making it hard or impossible to find the referenced resource.READMORE
13
13
 
@@ -4,7 +4,7 @@
4
4
  <article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" article-type="edtorial" dtd-version="1.1">
5
5
  <front>
6
6
  <article-meta>
7
- <article-id pub-id-type="doi">10.23725/0000-03VC</article-id>
7
+ <article-id pub-id-type="doi">10.5072/0000-03VC</article-id>
8
8
  <article-categories>
9
9
  <subj-group subj-group-type="categories">
10
10
  <subject>doi</subject>
@@ -14,10 +14,10 @@ describe Bergamasco::Markdown do
14
14
  it 'should update yaml frontmatter' do
15
15
  filepath = fixture_path + 'cool-dois.html.md'
16
16
  file = IO.read(filepath)
17
- new_metadata = { "doi" => "10.23725/0000-03VC"}
17
+ new_metadata = { "doi" => "10.5072/0000-03VC"}
18
18
  metadata, content = subject.split_yaml_frontmatter(file)
19
19
  metadata = subject.update_yaml_frontmatter(metadata, new_metadata)
20
- expect(metadata["doi"]).to eq("10.23725/0000-03VC")
20
+ expect(metadata["doi"]).to eq("10.5072/0000-03VC")
21
21
  end
22
22
 
23
23
  it 'should update yaml frontmatter remove attribute' do
@@ -66,9 +66,9 @@ describe Bergamasco::Markdown do
66
66
 
67
67
  it 'should update file' do
68
68
  filepath = fixture_path + 'cool-dois.html.md'
69
- new_metadata = { "doi" => "10.23725/0000-03VC"}
69
+ new_metadata = { "doi" => "10.5072/0000-03VC"}
70
70
  metadata = subject.update_file(filepath, new_metadata)
71
- expect(metadata["doi"]).to eq("10.23725/0000-03VC")
71
+ expect(metadata["doi"]).to eq("10.5072/0000-03VC")
72
72
  end
73
73
 
74
74
  it 'should convert markdown' do
data/spec/pandoc_spec.rb CHANGED
@@ -16,7 +16,7 @@ describe Bergamasco::Pandoc do
16
16
  xml = subject.convert_to_jats(file, skip_yaml_header: true, csl: 'spec/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
17
17
  doc = Nokogiri::XML(xml)
18
18
  article_id = doc.at_xpath("//article-id")
19
- expect(article_id.text).to eq("10.23725/0000-03VC")
19
+ expect(article_id.text).to eq("10.5072/0000-03VC")
20
20
  expect(article_id.values.first).to eq("doi")
21
21
  end
22
22
 
@@ -25,7 +25,7 @@ describe Bergamasco::Pandoc do
25
25
  xml_path = subject.write_jats(filepath, skip_yaml_header: true, csl: 'spec/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
26
26
  doc = File.open(xml_path) { |f| Nokogiri::XML(f) }
27
27
  article_id = doc.at_xpath("//article-id")
28
- expect(article_id.text).to eq("10.23725/0000-03VC")
28
+ expect(article_id.text).to eq("10.5072/0000-03VC")
29
29
  expect(article_id.values.first).to eq("doi")
30
30
  end
31
31
 
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.3
4
+ version: 0.3.4
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-22 00:00:00.000000000 Z
11
+ date: 2016-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -64,20 +64,6 @@ dependencies:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.0.0
67
- - !ruby/object:Gem::Dependency
68
- name: commonmarker
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: 0.14.0
74
- type: :runtime
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: 0.14.0
81
67
  - !ruby/object:Gem::Dependency
82
68
  name: builder
83
69
  requirement: !ruby/object:Gem::Requirement