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 +4 -4
- data/Gemfile.lock +5 -5
- data/README.adoc +1 -1
- data/lib/relaton_gb/gb_bibliography.rb +1 -1
- data/lib/relaton_gb/scrapper.rb +4 -4
- data/lib/relaton_gb/t_scrapper.rb +2 -2
- data/lib/relaton_gb/version.rb +1 -1
- data/relaton_gb.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87629d5d68e9798b8e251cdfd3c5248676cc93dd
|
4
|
+
data.tar.gz: 94c3a025a0db145fb4433fe12259cd8001ffdd9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
4
|
+
relaton-gb (0.6.0)
|
5
5
|
cnccs (~> 0.1.1)
|
6
6
|
gb-agencies (~> 0.0.1)
|
7
|
-
relaton-iso-bib (~> 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.
|
39
|
+
relaton-bib (0.3.0)
|
40
40
|
addressable
|
41
41
|
nokogiri (~> 1.10)
|
42
|
-
relaton-iso-bib (0.
|
42
|
+
relaton-iso-bib (0.3.0)
|
43
43
|
isoics (~> 0.1.6)
|
44
|
-
relaton-bib (~> 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.
|
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.
|
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
|
data/lib/relaton_gb/scrapper.rb
CHANGED
@@ -17,15 +17,15 @@ module RelatonGb
|
|
17
17
|
{
|
18
18
|
committee: get_committee(doc),
|
19
19
|
docid: get_docid(doc),
|
20
|
-
|
21
|
-
|
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
|
-
|
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,
|
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
|
-
|
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
|
-
|
66
|
+
date: get_dates(doc),
|
67
67
|
language: ["zh"],
|
68
68
|
script: ["Hans"],
|
69
69
|
structuredidentifier: fetch_structuredidentifier(doc),
|
data/lib/relaton_gb/version.rb
CHANGED
data/relaton_gb.gemspec
CHANGED
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.
|
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-
|
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.
|
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.
|
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:
|