relaton-jis 1.16.3 → 1.16.5

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: 1b3a731d5e0f676963ec89f4899c2d1bb8284373d42926fa99b62d6175ffde3d
4
- data.tar.gz: fd4571456406d7175da4c2b4e613a9c1ddac3cda715a54914bfd0d4b39d1bba9
3
+ metadata.gz: 75ba8661b92edbcf7482ef830d71a1e90ea9270d2ecbe3caa296a6aa05a2153c
4
+ data.tar.gz: a3a4fcbaa8e02c40edb389d82faaa7449020842a2cba027d98b7f353e7f6c3e5
5
5
  SHA512:
6
- metadata.gz: 6f304a961b00a79400f0b372122e24e136dd165b5d364c91d5a7221f1eabad76b4289c358b8da1a061f3d0dab7be5ddb27cf21d4e2a39d849cb83f369c4f38ad
7
- data.tar.gz: 79d9d7aac0fcb3b7e5686ac1c9c5cc367d958f60becca732fb3c0c945a9286698664004ce9b8f7e97fd1d6bce4717aa59f262c0e1abfb2ff450d69875579f911
6
+ metadata.gz: 2ea7dd9897e3e708537aa8f27fc3d3fa50579fe6bef442020763fd03ec791dcadc01c32fd17254cfebf4fdc311a8d9d6634c7eebfe785e3e5b9bf645d1b53c8e
7
+ data.tar.gz: b97cefaf0071ad3abb8d8e2dd01aa8ecf44915d99968f8ed688f110a4c2c55366f4644f07a9d19d67d6a40e55081c915a17d2d0a7e5f0901ecc3a685bb3c9fe1
data/README.adoc CHANGED
@@ -80,6 +80,29 @@ item.docidentifier[0].id
80
80
  => "JIS X 0208:1997"
81
81
  ----
82
82
 
83
+ === Fetch all parts of a standard
84
+
85
+ [source,ruby]
86
+ ----
87
+ item = RelatonJis::Bibliography.get "JIS B 0060 (all parts)"
88
+ [relaton-jis] (JIS B 0060 (all parts)) Fetching from webdesk.jsa.or.jp ...
89
+ [relaton-jis] (JIS B 0060 (all parts)) Found: `JIS B 0060 (all parts)`
90
+ => #<RelatonJis::BibliographicItem:0x000000010c3e2300
91
+ ...
92
+
93
+ item.docidentifier
94
+ => [#<RelatonBib::DocumentIdentifier:0x000000010c5905f8 @id="JIS B 0060 (all parts)", @language=nil, @primary=true, @scope=nil, @script=nil, @type="JIS">]
95
+
96
+ item = RelatonJis::Bibliography.get "JIS B 0060 (規格群)"
97
+ [relaton-jis] (JIS B 0060 (規格群)) Fetching from webdesk.jsa.or.jp ...
98
+ [relaton-jis] (JIS B 0060 (規格群)) Found: `JIS B 0060 (all parts)`
99
+ => #<RelatonJis::BibliographicItem:0x000000010c3ceb20
100
+ ...
101
+
102
+ item.docidentifier
103
+ => [#<RelatonBib::DocumentIdentifier:0x000000010c8d9b10 @id="JIS B 0060 (all parts)", @language=nil, @primary=true, @scope=nil, @script=nil, @type="JIS">]
104
+ ----
105
+
83
106
  === XML serialization
84
107
 
85
108
  Possible options:
@@ -14,12 +14,12 @@ module RelatonJis
14
14
  #
15
15
  def search(code, year = nil)
16
16
  agent = Mechanize.new
17
- resp = agent.post "#{SOURCE}0010/searchByKeyword", search_type: "JIS", keyword: code
17
+ resp = agent.post "#{SOURCE}0270/index", dantai: "JIS", bunsyo_id: code, searchtype2: "1", status_1: "1", status_2: "1"
18
18
  disp = JSON.parse resp.body
19
19
  # raise RelatonBib::RequestError, "No results found for #{code}" if disp["disp_screen"].nil?
20
- return if disp["disp_screen"].nil?
20
+ return unless disp["status"]
21
21
 
22
- result = agent.get "#{SOURCE}#{disp['disp_screen']}/index"
22
+ result = agent.get "#{SOURCE}0070/index"
23
23
  HitCollection.new code, year, result: result.xpath("//div[@class='blockGenaral']")
24
24
  end
25
25
 
@@ -7,7 +7,7 @@ module RelatonJis
7
7
  def initialize # rubocop:disable Lint/MissingSuper
8
8
  @short = :relaton_jis
9
9
  @prefix = "JIS"
10
- @defaultprefix = %r{^JIS\s}
10
+ @defaultprefix = %r{^(JIS|TR)\s}
11
11
  @idtype = "JIS"
12
12
  end
13
13
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonJis
4
- VERSION = "1.16.3"
4
+ VERSION = "1.16.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.3
4
+ version: 1.16.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize