relaton-gb 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_gb/hit.rb +1 -9
- data/lib/relaton_gb/hit_collection.rb +3 -34
- 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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dcdabd1b722b0ba76bbd8be2c3925920b2081a7d775e1e02f43f198796dbe1c
|
4
|
+
data.tar.gz: c4a92af3aad9e678571aed485efe3875069db3fb353bacfb5481cc3a49844623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfac8c58345f32fa9f5211b5883f85f4e13fe2955cf426d934fa584aa3b07994303b7bfb1d7ee71bcbaede64294cff1593a411f4cde41c196793fc0292a87ae5
|
7
|
+
data.tar.gz: e82420161d12134e51fcbd40bcfe84450eddea234e2215defb95fe3226a1d3054eb725df993b9d8bd439f1179e6fadf750224269780ffe92f01cf73c547beddf
|
data/lib/relaton_gb/hit.rb
CHANGED
@@ -2,10 +2,7 @@
|
|
2
2
|
|
3
3
|
module RelatonGb
|
4
4
|
# Hit.
|
5
|
-
class Hit
|
6
|
-
# @return [Isobib::HitCollection]
|
7
|
-
attr_reader :hit_collection
|
8
|
-
|
5
|
+
class Hit < RelatonBib::Hit
|
9
6
|
# @return [String]
|
10
7
|
attr_reader :pid, :docref
|
11
8
|
|
@@ -39,11 +36,6 @@ module RelatonGb
|
|
39
36
|
@fetch ||= scrapper.scrape_doc self
|
40
37
|
end
|
41
38
|
|
42
|
-
# @return [String]
|
43
|
-
def to_s
|
44
|
-
inspect
|
45
|
-
end
|
46
|
-
|
47
39
|
# @return [String]
|
48
40
|
def inspect
|
49
41
|
"<#{self.class}:#{format('%#.14x', object_id << 1)} "\
|
@@ -2,44 +2,13 @@
|
|
2
2
|
|
3
3
|
module RelatonGb
|
4
4
|
# Page of hit collection
|
5
|
-
class HitCollection <
|
6
|
-
# @return [TrueClass, FalseClass]
|
7
|
-
attr_reader :fetched
|
8
|
-
|
9
|
-
# @return [Isobib::HitPages]
|
10
|
-
attr_reader :hit_pages
|
11
|
-
|
12
|
-
# @return [RelatonGb::GbScrapper, RelatonGb::SecScrapper, RelatonGb::TScrapper]
|
13
|
-
attr_reader :scrapper
|
14
|
-
|
5
|
+
class HitCollection < RelatonBib::HitCollection
|
15
6
|
# @param hits [Array<Hash>]
|
16
7
|
# @param hit_pages [Integer]
|
17
8
|
# @param scrapper [RelatonGb::GbScrapper, RelatonGb::SecScrapper, RelatonGb::TScrapper]
|
18
|
-
def initialize(hits = []
|
19
|
-
|
9
|
+
def initialize(hits = [])
|
10
|
+
@array = hits
|
20
11
|
@fetched = false
|
21
|
-
@hit_pages = hit_pages
|
22
|
-
end
|
23
|
-
|
24
|
-
# @return [RelatonGb::HitCollection]
|
25
|
-
# def fetch
|
26
|
-
# workers = RelatonBib::WorkersPool.new 4
|
27
|
-
# workers.worker(&:fetch)
|
28
|
-
# each do |hit|
|
29
|
-
# workers << hit
|
30
|
-
# end
|
31
|
-
# workers.end
|
32
|
-
# workers.result
|
33
|
-
# @fetched = true
|
34
|
-
# self
|
35
|
-
# end
|
36
|
-
|
37
|
-
def to_s
|
38
|
-
inspect
|
39
|
-
end
|
40
|
-
|
41
|
-
def inspect
|
42
|
-
"<#{self.class}:#{format('%#.14x', object_id << 1)} @fetched=#{@fetched}>"
|
43
12
|
end
|
44
13
|
end
|
45
14
|
end
|
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.11.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: 2020-02-
|
11
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.
|
187
|
+
version: 0.8.0
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.
|
194
|
+
version: 0.8.0
|
195
195
|
description: 'RelatonGb: retrieve Chinese GB Standards for bibliographic use using
|
196
196
|
the BibliographicItem model.'
|
197
197
|
email:
|