relaton-gb 0.5.2 → 0.6.0

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
  SHA1:
3
- metadata.gz: 8264ad43f3cc416b50c8fc59d179008c131fe5d8
4
- data.tar.gz: c8d6d6f995b3210cd379acf5f4e20d1017560923
3
+ metadata.gz: 87629d5d68e9798b8e251cdfd3c5248676cc93dd
4
+ data.tar.gz: 94c3a025a0db145fb4433fe12259cd8001ffdd9c
5
5
  SHA512:
6
- metadata.gz: 4a1037ef083efc92bce338a10d3b53fdd11ee6e658ee657800a2c6ef61a95b77895ecb26a2c3a4949a07b8748a203f3dbed3ee0a79d812d75f49a5aac5cac8af
7
- data.tar.gz: 0c21e04af2a1da10985deb699e6137d66a6c8c3f2b570c3b958a68dec3eef7fdfa0510e3c36377530af45970ffbc8d3dfbd7f0c2aba988bf97cd2a6d4d6a9cfa
6
+ metadata.gz: 553214749bbd2b4ba9e046f7e4a3d36201a219bb90c865ea42c2d09c995f7291281a249812a589984a8a713b8a2996d1819a911e96618534debf468c10040667
7
+ data.tar.gz: 2282a0d505cdd6a7499d0ab5e9ae91e8a1bbf8b2ab0ab8342331b14e9cb9d13a5d6b34bf4a7af76cfd861abfe2c63b489951329eec728aae92610bfc8bc70a51
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-gb (0.5.2)
4
+ relaton-gb (0.6.0)
5
5
  cnccs (~> 0.1.1)
6
6
  gb-agencies (~> 0.0.1)
7
- relaton-iso-bib (~> 0.2.0)
7
+ relaton-iso-bib (~> 0.3.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -36,12 +36,12 @@ GEM
36
36
  pry (~> 0.10)
37
37
  public_suffix (3.1.1)
38
38
  rake (10.5.0)
39
- relaton-bib (0.2.5)
39
+ relaton-bib (0.3.0)
40
40
  addressable
41
41
  nokogiri (~> 1.10)
42
- relaton-iso-bib (0.2.4)
42
+ relaton-iso-bib (0.3.0)
43
43
  isoics (~> 0.1.6)
44
- relaton-bib (~> 0.2.0)
44
+ relaton-bib (~> 0.3.0)
45
45
  ruby_deep_clone (~> 0.8.0)
46
46
  rspec (3.8.0)
47
47
  rspec-core (~> 3.8.0)
data/README.adoc CHANGED
@@ -104,7 +104,7 @@ hit_collection.first.fetch.title
104
104
  @title=#<RelatonBib::FormattedString:0x007f9757146158 @content="Cotton linter", @format="text/plain", @language=["en"], @script=["Latn"]>,
105
105
  @type="main">]
106
106
 
107
- hit_collection.first.fetch.dates
107
+ hit_collection.first.fetch.date
108
108
  => [#<RelatonBib::BibliographicDate:0x007f975a0207d0 @from=nil, @on=2006-03-10 00:00:00 +0100, @to=nil, @type="published">]
109
109
  ----
110
110
 
@@ -115,7 +115,7 @@ module RelatonGb
115
115
  fetch_pages(s, 3).each_with_index do |r, i|
116
116
  return { ret: r } if !year
117
117
 
118
- r.dates.select { |d| d.type == "published" }.each do |d|
118
+ r.date.select { |d| d.type == "published" }.each do |d|
119
119
  return { ret: r } if year.to_i == d.on.year
120
120
 
121
121
  missed_years << d.on.year
@@ -17,15 +17,15 @@ module RelatonGb
17
17
  {
18
18
  committee: get_committee(doc),
19
19
  docid: get_docid(doc),
20
- titles: get_titles(doc),
21
- contributors: get_contributors(doc),
20
+ title: get_titles(doc),
21
+ contributor: get_contributors(doc),
22
22
  type: get_type(doc),
23
23
  docstatus: get_status(doc),
24
24
  gbtype: get_gbtype(doc),
25
25
  ccs: get_ccs(doc),
26
26
  ics: get_ics(doc),
27
27
  link: [{ type: "src", content: src }],
28
- dates: get_dates(doc),
28
+ date: get_dates(doc),
29
29
  language: ["zh"],
30
30
  script: ["Hans"],
31
31
  structuredidentifier: fetch_structuredidentifier(doc),
@@ -73,7 +73,7 @@ module RelatonGb
73
73
  { language: "en", content: gb_en.standard_agency1(gbtype[:scope], name, gbtype[:mandate]) },
74
74
  { language: "zh", content: gb_zh.standard_agency1(gbtype[:scope], name, gbtype[:mandate]) },
75
75
  ]
76
- [{ entity: entity, roles: ["publisher"] }]
76
+ [{ entity: entity, role: ["publisher"] }]
77
77
  end
78
78
 
79
79
  # @param doc [Nokogiri::HTML::Document]
@@ -56,14 +56,14 @@ module RelatonGb
56
56
  {
57
57
  committee: get_committee(doc),
58
58
  docid: get_docid(doc, docid_xpt),
59
- titles: get_titles(doc),
59
+ title: get_titles(doc),
60
60
  type: "international-standard",
61
61
  docstatus: get_status(doc, status_xpt),
62
62
  gbtype: gbtype,
63
63
  ccs: get_ccs(doc),
64
64
  ics: get_ics(doc),
65
65
  link: [{ type: "src", content: src }],
66
- dates: get_dates(doc),
66
+ date: get_dates(doc),
67
67
  language: ["zh"],
68
68
  script: ["Hans"],
69
69
  structuredidentifier: fetch_structuredidentifier(doc),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonGb
4
- VERSION = "0.5.2"
4
+ VERSION = "0.6.0"
5
5
  end
data/relaton_gb.gemspec CHANGED
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
 
36
36
  spec.add_dependency "cnccs", "~> 0.1.1"
37
37
  spec.add_dependency "gb-agencies", "~> 0.0.1"
38
- spec.add_dependency "relaton-iso-bib", "~> 0.2.0"
38
+ spec.add_dependency "relaton-iso-bib", "~> 0.3.0"
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.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-07-22 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.2.0
159
+ version: 0.3.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.2.0
166
+ version: 0.3.0
167
167
  description: 'RelatonGb: retrieve Chinese GB Standards for bibliographic use using
168
168
  the BibliographicItem model.'
169
169
  email: