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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 844ccdbd633679401dc6ba625b42a18560574ef009341814c7fb2508903e5e5c
4
- data.tar.gz: 2f49faa1f4a7e2b41f169a7385fd59e930112f2716bc8e7dc750cce42a21f003
3
+ metadata.gz: 1800d96213b4f4cbf64e1bf47a8732ec74106abcb258d5fec1c1e6256020798d
4
+ data.tar.gz: cc66f85a0cab494810427d1e3f4b000917ce92bb1a3de36ecdb8b522deab5a7e
5
5
  SHA512:
6
- metadata.gz: e6fab839b40e4941fc38167e2e282b2d446489a4c30a359c988aa18407cc1dd2f508b3bb8ae8bf05dbc4c7c8975de1cd047e9ae9f56e836bdd7759deea9e2244
7
- data.tar.gz: 0656d69a5562a394252c6a2b504642b6c046b850243760195ab6ab5f81a5c996cfc344b222b867d398287e0cf6b8e15967b0bd53c81efcbfab68f451e5fa64f0
6
+ metadata.gz: 8d49794139d3fc000d8fa2ca1a6c546e7d8ee4a2d92a1362637853bb8ca8c018fe6a60fcf2fabf8892fa77a2b3845d4968dedcfd47692a44a9fb646f3fa3cac7
7
+ data.tar.gz: 27b007e4586be65492e9579ae9bbe18036211420a20b9469ebc7456d158e97b1252c9224ae6aa264ad349c115e7cf8bc7a805423d68b72e2bbea8a4ac2fd79e9
@@ -10,23 +10,4 @@ on:
10
10
 
11
11
  jobs:
12
12
  rake:
13
- name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
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
- ref = hit.text.strip
26
- /^(?:\w+\s)?(?<code2>[A-Z\d.]+)(?:-(?<year>\d{4}))?/ =~ ref
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 = { ref: ref, year: year.to_i, url: hit[:href] }
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
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.11.1".freeze
2
+ VERSION = "1.11.2".freeze
3
3
  end
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", "~> 1.1"
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.1
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 00:00:00.000000000 Z
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: '1.1'
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: '1.1'
96
+ version: '2.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: relaton-bib
99
99
  requirement: !ruby/object:Gem::Requirement