relaton-ecma 1.13.0 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,10 +17,12 @@ module RelatonEcma
17
17
  private
18
18
 
19
19
  # @param url [String]
20
- # @retrurn [RelatonBib::BibliographicItem]
20
+ # @retrurn [RelatonEcma::BibliographicItem]
21
21
  def parse_page(url)
22
22
  doc = OpenURI.open_uri url
23
- RelatonBib::BibliographicItem.from_hash YAML.safe_load(doc)
23
+ hash = YAML.safe_load(doc)
24
+ hash["fetched"] = Date.today.to_s
25
+ BibliographicItem.from_hash hash
24
26
  end
25
27
  end
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonEcma
2
- VERSION = "1.13.0".freeze
2
+ VERSION = "1.14.0".freeze
3
3
  end
@@ -0,0 +1,13 @@
1
+ module RelatonEcma
2
+ class XMLParser < RelatonBib::XMLParser
3
+ class << self
4
+ private
5
+
6
+ # @param item_hash [Hash]
7
+ # @return [RelatonEcma::BibliographicItem]
8
+ def bib_item(item_hash)
9
+ BibliographicItem.new(**item_hash)
10
+ end
11
+ end
12
+ end
13
+ end
data/lib/relaton_ecma.rb CHANGED
@@ -3,6 +3,9 @@ require "open-uri"
3
3
  require "yaml"
4
4
  require "relaton_bib"
5
5
  require "relaton_ecma/version"
6
+ require "relaton_ecma/bibliographic_item"
7
+ require "relaton_ecma/xml_parser"
8
+ require "relaton_ecma/hash_converter"
6
9
  require "relaton_ecma/scrapper"
7
10
  require "relaton_ecma/ecma_bibliography"
8
11
 
data/relaton_ecma.gemspec CHANGED
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
37
37
  spec.add_development_dependency "vcr"
38
38
  spec.add_development_dependency "webmock"
39
39
 
40
- spec.add_dependency "relaton-bib", "~> 1.13.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.14.0"
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ecma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.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: 2022-08-21 00:00:00.000000000 Z
11
+ date: 2022-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.13.0
117
+ version: 1.14.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.13.0
124
+ version: 1.14.0
125
125
  description: "RelatonEcma: retrieve ECMA Standards for bibliographic use \nusing the
126
126
  BibliographicItem model.\n"
127
127
  email:
@@ -131,6 +131,7 @@ extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
133
  - ".github/workflows/rake.yml"
134
+ - ".github/workflows/release.yml"
134
135
  - ".gitignore"
135
136
  - ".rspec"
136
137
  - ".rubocop.yml"
@@ -141,14 +142,18 @@ files:
141
142
  - bin/rspec
142
143
  - bin/setup
143
144
  - grammars/basicdoc.rng
145
+ - grammars/biblio-standoc.rng
144
146
  - grammars/biblio.rng
145
- - grammars/isodoc.rng
146
- - grammars/reqt.rng
147
+ - grammars/relaton-ecma-compile.rng
148
+ - grammars/relaton-ecma.rng
147
149
  - lib/relaton_ecma.rb
150
+ - lib/relaton_ecma/bibliographic_item.rb
148
151
  - lib/relaton_ecma/ecma_bibliography.rb
152
+ - lib/relaton_ecma/hash_converter.rb
149
153
  - lib/relaton_ecma/processor.rb
150
154
  - lib/relaton_ecma/scrapper.rb
151
155
  - lib/relaton_ecma/version.rb
156
+ - lib/relaton_ecma/xml_parser.rb
152
157
  - relaton_ecma.gemspec
153
158
  homepage: https://github.com/metanorma/relaton-ecma
154
159
  licenses: