relaton-bib 1.7.3 → 1.7.4

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: 07750266e9e75d4b5d8069cb6dcf9dc5b1239ea3d061f7e4fa1ef1d61a5787da
4
- data.tar.gz: 9526f5ba1b726e5718ff6c34987657160f5515a5e5ae033dccb027ce33b8e42a
3
+ metadata.gz: 4b6bd4bd9de5c3300f0e9e765b2e87f6f979be9bb1cc4860a5cb9e0bf26af2d0
4
+ data.tar.gz: c5ffd10e31eef03986e76e0d52e17e3a88bf4b157400be867d19893bcac700ad
5
5
  SHA512:
6
- metadata.gz: e6e9fc023872ca9a815f45c8ce4e583a34987b2d5f8aba95c7996cf6dd0866ffca74d04a08fc22eb24eb2e171daf71ad3981ada668051708e3da9150b7fe9966
7
- data.tar.gz: 1e169e1e28b231c0ee0a226efda69bb48b1408027d42a2f9ba6b599b2a6307aab586567fe8b0a845fb55f41fa391955ca67d87eb1ca01b5f591e6304749755b2
6
+ metadata.gz: 8dfad60d8cd0f3e092ddd7b09fc0c9f40e770a63fd7b5cd4ed6024e5150500d303ebe5a86c878963761f4da8e2bf65b148148f0dacc0525e284fbadb101acf01
7
+ data.tar.gz: ec92a3eff1a3c24c1e2e2e9c17c94a96188bbd53af56135c155037f2319d0ff747e4345fcb1599ca56cdb8f0760dff25b2122e8ae4e8c8b9812b353ea6ec238d
data/README.adoc CHANGED
@@ -363,11 +363,7 @@ hash = YAML.load_file 'spec/examples/bib_item.yml'
363
363
  => {"id"=>"ISO/TC211",
364
364
  ...
365
365
 
366
- bib_hash = RelatonBib::HashConverter.hash_to_bib hash
367
- => {:id=>"ISO/TC211",
368
- ...
369
-
370
- RelatonBib::BibliographicItem.new bib_hash
366
+ RelatonBib::BibliographicItem.from_hash hash
371
367
  => #<RelatonBib::BibliographicItem:0x007ff1524f8c88
372
368
  ...
373
369
  ----
@@ -257,6 +257,13 @@ module RelatonBib
257
257
  # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
258
258
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
259
259
 
260
+ # @param hash [Hash]
261
+ # @return [RelatonBipm::BipmBibliographicItem]
262
+ def self.from_hash(hash)
263
+ item_hash = ::RelatonBib::HashConverter.hash_to_bib(hash)
264
+ new **item_hash
265
+ end
266
+
260
267
  # @param lang [String] language code Iso639
261
268
  # @return [RelatonBib::FormattedString, Array<RelatonBib::FormattedString>]
262
269
  def abstract(lang: nil)
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.7.3".freeze
2
+ VERSION = "1.7.4".freeze
3
3
  end
data/relaton-bib.gemspec CHANGED
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
24
24
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
25
25
 
26
26
  spec.add_development_dependency "byebug"
27
- spec.add_development_dependency "debase" if RUBY_VERSION < "3" # , "~> 0.2.5.beta"
27
+ # ec.add_development_dependency "debase"
28
28
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
29
- spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rake", "~> 13.0"
30
30
  spec.add_development_dependency "rspec", "~> 3.0"
31
- spec.add_development_dependency "ruby-debug-ide"
31
+ # spec.add_development_dependency "ruby-debug-ide"
32
32
  spec.add_development_dependency "ruby-jing"
33
33
  spec.add_development_dependency "simplecov"
34
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.3
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: ruby-debug-ide
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: ruby-jing
85
71
  requirement: !ruby/object:Gem::Requirement