relaton-itu 0.3.11 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/itubib.gemspec CHANGED
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "simplecov"
37
37
  spec.add_development_dependency "vcr", "~> 5.0.0"
38
38
  spec.add_development_dependency "webmock"
39
+ spec.add_development_dependency "ruby-jing"
39
40
 
40
- spec.add_dependency "relaton-iso-bib", "~> 0.3.0"
41
+ spec.add_dependency "relaton-iso-bib", "~> 0.4.0"
41
42
  end
data/lib/relaton_itu.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "relaton_itu/version"
2
2
  require "relaton_itu/itu_bibliography"
3
+ require "digest/md5"
3
4
 
4
5
  # if defined? Relaton
5
6
  # require_relative "relaton/processor"
@@ -8,5 +9,13 @@ require "relaton_itu/itu_bibliography"
8
9
 
9
10
  module RelatonItu
10
11
  class Error < StandardError; end
11
- # Your code goes here...
12
+
13
+ # Returns hash of XML reammar
14
+ # @return [String]
15
+ def self.grammar_hash
16
+ gem_path = File.expand_path "..", __dir__
17
+ grammars_path = File.join gem_path, "grammars", "*"
18
+ grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
19
+ Digest::MD5.hexdigest grammars
20
+ end
12
21
  end
@@ -29,5 +29,11 @@ module RelatonItu
29
29
  item_hash = ::RelatonItu::HashConverter.hash_to_bib(hash)
30
30
  ::RelatonItu::ItuBibliographicItem.new item_hash
31
31
  end
32
+
33
+ # Returns hash of XML grammar
34
+ # @return [String]
35
+ def grammar_hash
36
+ @grammar_hash ||= ::RelatonItu.grammar_hash
37
+ end
32
38
  end
33
39
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "0.3.11".freeze
2
+ VERSION = "0.4.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,20 +150,34 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: ruby-jing
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: relaton-iso-bib
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - "~>"
158
172
  - !ruby/object:Gem::Version
159
- version: 0.3.0
173
+ version: 0.4.0
160
174
  type: :runtime
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - "~>"
165
179
  - !ruby/object:Gem::Version
166
- version: 0.3.0
180
+ version: 0.4.0
167
181
  description: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
168
182
  model'
169
183
  email:
@@ -185,6 +199,12 @@ files:
185
199
  - Rakefile
186
200
  - bin/console
187
201
  - bin/setup
202
+ - grammars/basicdoc.rng
203
+ - grammars/biblio.rng
204
+ - grammars/isodoc.rng
205
+ - grammars/isostandard.rng
206
+ - grammars/itu.rng
207
+ - grammars/reqt.rng
188
208
  - itubib.gemspec
189
209
  - lib/relaton_itu.rb
190
210
  - lib/relaton_itu/editorial_group.rb