briard 2.8.0 → 2.8.1

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
  SHA256:
3
- metadata.gz: 6be06ae87915ce9307275bea4fec8176dd9e93f38cdd99d89522cac4e29cb7a1
4
- data.tar.gz: 4f9907cc3f4c9ef7885e88d635f1667be1699c1db1d51f742a09ecc14eddc358
3
+ metadata.gz: debbaf7e340fa77df735b4443f7bf7120842908f9223250ce905e398c4754df5
4
+ data.tar.gz: fb782cc48aeaa3435ef4b9eb4004de44786ea3dbb257c653ce62213e55ab6612
5
5
  SHA512:
6
- metadata.gz: 9da37799aafb46e13c97c6b67befe4b9566e9ec0aae892b082f5dd09f78a678819f28c5538a91d575379f65e01055456aa1eb1d83015829c10ce0f32dac596a9
7
- data.tar.gz: cf09273fa22a240fb578785c0f9719fde52d3beeb767c360b2a548dd82c017e782b9af5e29e1277e4719718dfc0eeea911d0b2571742c45dc2a7216e33759888
6
+ metadata.gz: dd60f155303d1e52ec8acf01ae8b648cc4625a10e52473f613a1aa34ed0b7f8b4f7af42dff2938f7b35bfdfd8c62bc0ae1e58e17a799d816470c0743df945118
7
+ data.tar.gz: 056d24ffef47ed0a3f04a5222464a507b18a00b1f573e437ac10c8de2dd89b581da7ae507528b23039f5c7a7ead79c042b566b9d37bf259482ac59f104cdcec3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.8.0](https://github.com/front-matter/briard/tree/v2.8.0) (2022-11-22)
4
+
5
+ [Full Changelog](https://github.com/front-matter/briard/compare/v2.6.5...v2.8.0)
6
+
3
7
  ## [v2.6.5](https://github.com/front-matter/briard/tree/v2.6.5) (2022-10-04)
4
8
 
5
9
  [Full Changelog](https://github.com/front-matter/briard/compare/v2.6.4...v2.6.5)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- briard (2.8.0)
4
+ briard (2.8.1)
5
5
  activesupport (>= 4.2.5, < 8.0)
6
6
  base32-url (>= 0.5.0, < 1)
7
7
  benchmark_methods (~> 0.7)
@@ -18,26 +18,7 @@ module Briard
18
18
  id = normalize_id(options[:input], options)
19
19
  ra = nil
20
20
 
21
- if id.present?
22
- @from = options[:from] || find_from_format(id: id)
23
-
24
- # mEDRA, KISTI, JaLC and OP DOIs are found in the Crossref index
25
- case @from
26
- when 'medra'
27
- ra = 'mEDRA'
28
- when 'kisti'
29
- ra = 'KISTI'
30
- when 'jalc'
31
- ra = 'JaLC'
32
- when 'op'
33
- ra = 'OP'
34
- end
35
-
36
- # generate name for method to call dynamically
37
- hsh = @from.present? ? send("get_#{@from}", id: id, **options) : {}
38
- string = hsh.fetch('string', nil)
39
-
40
- elsif options[:input].present? && File.exist?(options[:input])
21
+ if options[:input].present? && File.exist?(options[:input])
41
22
  filename = File.basename(options[:input])
42
23
  ext = File.extname(options[:input])
43
24
  if %w[.bib .ris .xml .json .cff].include?(ext)
@@ -59,6 +40,24 @@ module Briard
59
40
  warn "File type #{ext} not supported"
60
41
  exit 1
61
42
  end
43
+ elsif id.present?
44
+ @from = options[:from] || find_from_format(id: id)
45
+
46
+ # mEDRA, KISTI, JaLC and OP DOIs are found in the Crossref index
47
+ case @from
48
+ when 'medra'
49
+ ra = 'mEDRA'
50
+ when 'kisti'
51
+ ra = 'KISTI'
52
+ when 'jalc'
53
+ ra = 'JaLC'
54
+ when 'op'
55
+ ra = 'OP'
56
+ end
57
+
58
+ # generate name for method to call dynamically
59
+ hsh = @from.present? ? send("get_#{@from}", id: id, **options) : {}
60
+ string = hsh.fetch('string', nil)
62
61
  else
63
62
  hsh = {
64
63
  'url' => options[:url],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Briard
4
- VERSION = '2.8.0'
4
+ VERSION = '2.8.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner