relaton-bipm 1.14.7 → 1.14.9

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: fca66f613215d88c2a6211038fa877a18c3239a6dc967058935d656f93a38bbf
4
- data.tar.gz: 973ef9e8f3ae01e4a993c5b1fa5499cecd41c070b1ece0ec45b947d07e6bc009
3
+ metadata.gz: 0b0e032eaf9d9a650ce244375a26cdc085fd11fd2b47ee06989ed2bc4fa53539
4
+ data.tar.gz: 13bc2a98dba427df1fbf4e0d47745b062e17212fa7b6f9942418bfeb7bee2255
5
5
  SHA512:
6
- metadata.gz: '0387b51f65c91b25c0957ee23d4781de82914bf8e6e32fd03ec7aa6cfb0506648983cf724cfed09a061e3e01967863d24a2948c074b76e83a6cab852ee452028'
7
- data.tar.gz: 9cec1161eb66bb984ae573b0b880da67b4085b574acae5c6f44c80669a2f57f10ab422bbd7a54e419f65c159925ccf1815f08ac1ace269e2ac0808cce1e10791
6
+ metadata.gz: 45929b083ec8b3b7656e29245c42405c086cc21a72031e88181ee5ad80f2e1e0ac3e118cdac0f03f3e423a89333d0b97944f23747affeff75db1a7401074bc6b
7
+ data.tar.gz: 80ced073ec6d0527b7b2fe495abde01957c8e37ed98b79c646eb21fdcb0aee7516a72f64b1288e70061b7240c1e714b8417171d6fbefb3c8b765b5ef3fb9ab82
@@ -3,6 +3,7 @@ require "mechanize"
3
3
  module RelatonBipm
4
4
  class BipmBibliography
5
5
  GH_ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-bipm/master/".freeze
6
+ INDEX_FILE = "index2.yaml".freeze
6
7
 
7
8
  class << self
8
9
  # @param text [String]
@@ -44,7 +45,6 @@ module RelatonBipm
44
45
  # @return [RelatonBipm::BipmBibliographicItem]
45
46
  def get_bipm(reference, agent) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
46
47
  ref_id = Id.new reference
47
- index = Relaton::Index.find_or_create :BIPM, url: "#{GH_ENDPOINT}index2.zip", file: "index2.yaml"
48
48
  rows = index.search { |r| ref_id == r[:id] }
49
49
  return unless rows.any?
50
50
 
@@ -58,6 +58,10 @@ module RelatonBipm
58
58
  BipmBibliographicItem.new(**bib_hash)
59
59
  end
60
60
 
61
+ def index
62
+ Relaton::Index.find_or_create :BIPM, url: "#{GH_ENDPOINT}index2.zip", file: INDEX_FILE
63
+ end
64
+
61
65
  # def match_item(ids, ref_id)
62
66
  # ids.find { |id| Id.new(id) == ref_id }
63
67
  # end
@@ -59,7 +59,8 @@ module RelatonBipm
59
59
  "Recommandation" => "REC",
60
60
  "Decision" => "DECN",
61
61
  "Décision" => "DECN",
62
- "Declaration" => "Déclaration",
62
+ "Declaration" => "DECL",
63
+ "Déclaration" => "DECL",
63
64
  "Réunion" => "Meeting",
64
65
  "Action" => "ACT",
65
66
  }.freeze
@@ -51,5 +51,12 @@ module RelatonBipm
51
51
  def grammar_hash
52
52
  @grammar_hash ||= ::RelatonBipm.grammar_hash
53
53
  end
54
+
55
+ #
56
+ # Remove index file
57
+ #
58
+ def remove_index_file
59
+ Relaton::Index.find_or_create(:BIPM, url: true, file: BipmBibliography::INDEX_FILE).remove_file
60
+ end
54
61
  end
55
62
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.14.7".freeze
2
+ VERSION = "1.14.9".freeze
3
3
  end
data/relaton_bipm.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
38
38
  spec.add_dependency "mechanize", "~> 2.8.0"
39
39
  spec.add_dependency "parslet", "~> 2.0.0"
40
40
  spec.add_dependency "relaton-bib", "~> 1.14.0"
41
- spec.add_dependency "relaton-index", "~> 0.1.0"
41
+ spec.add_dependency "relaton-index", "~> 0.2.0"
42
42
  spec.add_dependency "rubyzip", "~> 2.3.0"
43
43
  spec.add_dependency "serrano", "~> 1.0"
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.7
4
+ version: 1.14.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-09 00:00:00.000000000 Z
11
+ date: 2023-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.1.0
89
+ version: 0.2.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.1.0
96
+ version: 0.2.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubyzip
99
99
  requirement: !ruby/object:Gem::Requirement