relaton-ieee 1.11.1 → 1.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -20
- data/lib/relaton_ieee/hit_collection.rb +14 -5
- data/lib/relaton_ieee/version.rb +1 -1
- data/relaton_ieee.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: 1800d96213b4f4cbf64e1bf47a8732ec74106abcb258d5fec1c1e6256020798d
|
4
|
+
data.tar.gz: cc66f85a0cab494810427d1e3f4b000917ce92bb1a3de36ecdb8b522deab5a7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d49794139d3fc000d8fa2ca1a6c546e7d8ee4a2d92a1362637853bb8ca8c018fe6a60fcf2fabf8892fa77a2b3845d4968dedcfd47692a44a9fb646f3fa3cac7
|
7
|
+
data.tar.gz: 27b007e4586be65492e9579ae9bbe18036211420a20b9469ebc7456d158e97b1252c9224ae6aa264ad349c115e7cf8bc7a805423d68b72e2bbea8a4ac2fd79e9
|
data/.github/workflows/rake.yml
CHANGED
@@ -10,23 +10,4 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
rake:
|
13
|
-
|
14
|
-
runs-on: ${{ matrix.os }}
|
15
|
-
continue-on-error: ${{ matrix.experimental }}
|
16
|
-
strategy:
|
17
|
-
fail-fast: false
|
18
|
-
matrix:
|
19
|
-
ruby: [ '3.0', '2.7', '2.6' ]
|
20
|
-
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
|
-
experimental: [ false ]
|
22
|
-
steps:
|
23
|
-
- uses: actions/checkout@v2
|
24
|
-
with:
|
25
|
-
submodules: true
|
26
|
-
|
27
|
-
- uses: ruby/setup-ruby@v1
|
28
|
-
with:
|
29
|
-
ruby-version: ${{ matrix.ruby }}
|
30
|
-
bundler-cache: true
|
31
|
-
|
32
|
-
- run: bundle exec rake
|
13
|
+
uses: relaton/support/.github/workflows/rake.yml@master
|
@@ -20,13 +20,22 @@ module RelatonIeee
|
|
20
20
|
query = reference.gsub("/", " ")
|
21
21
|
resp = Faraday.post url, { action: "ieee_cloudsearch", q: query }
|
22
22
|
json = JSON.parse resp.body
|
23
|
-
html = Nokogiri::HTML json["html"]
|
24
|
-
@array = html.xpath("//h4/a").reduce([]) do |s, hit|
|
25
|
-
|
26
|
-
|
23
|
+
# html = Nokogiri::HTML json["html"]
|
24
|
+
# @array = html.xpath("//h4/a").reduce([]) do |s, hit|
|
25
|
+
@array = json["results"]["hits"]["hit"].reduce([]) do |s, hit|
|
26
|
+
flds = hit["fields"]
|
27
|
+
# ref = hit.text.strip
|
28
|
+
# /^(?:\w+\s)?(?<code2>[A-Z\d.]+)(?:-(?<year>\d{4}))?/ =~ ref
|
29
|
+
/^(?:\w+\s)?(?<code2>[A-Z\d.]+)(?:-(?<year>\d{4}))?/ =~ flds["meta_designation_l"]
|
27
30
|
next s unless code2 && code1 =~ %r{^#{code2}}
|
28
31
|
|
29
|
-
hit_data = {
|
32
|
+
hit_data = {
|
33
|
+
ref: flds["meta_designation_l"],
|
34
|
+
# title: flds["meta_title_t"],
|
35
|
+
# abstract: flds["meta_description_l"],
|
36
|
+
year: year.to_i,
|
37
|
+
url: flds["doc_id_l"],
|
38
|
+
}
|
30
39
|
s << Hit.new(hit_data, self)
|
31
40
|
end.sort_by { |h| h.hit[:year].to_s + h.hit[:url] }.reverse
|
32
41
|
end
|
data/lib/relaton_ieee/version.rb
CHANGED
data/relaton_ieee.gemspec
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "vcr"
|
38
38
|
spec.add_development_dependency "webmock"
|
39
39
|
|
40
|
-
spec.add_dependency "faraday", "~>
|
40
|
+
spec.add_dependency "faraday", "~> 2.2"
|
41
41
|
spec.add_dependency "relaton-bib", "~> 1.11.0"
|
42
42
|
spec.add_dependency "rubyzip", "~> 2.3.0"
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.2
|
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-05-
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.2'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: relaton-bib
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|