iecbib 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/iecbib.gemspec +1 -0
- data/lib/iecbib/hit_collection.rb +2 -1
- data/lib/iecbib/iec_bibliography.rb +2 -2
- data/lib/iecbib/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feecc825cdc434c2f25252e3f5ef250ab76698d19eefba1a64cd88dc37706239
|
4
|
+
data.tar.gz: c72f802c87d13f1dc07e9ceac088efd43260cd84c445ca591f575355cf15e13b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943b393a77f6966f666ae8f0aef6508dc89d80442541d24a56db40ad04aa811d3c68f34313365e1e85c231a632908c0576d88c70e394bb7e6f3eedc6f2a8a127
|
7
|
+
data.tar.gz: d36bf454ee3a68f7486f0b9a2e343651e5fc61632c2bfb54ebf79986f77b59c7ac0281831e142e208c8396a61749a28ac7089a2ca6d6686eadd71769b77b3fe6
|
data/Gemfile.lock
CHANGED
@@ -2,6 +2,7 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
iecbib (0.1.1)
|
5
|
+
addressable
|
5
6
|
iso-bib-item (~> 0.3.0)
|
6
7
|
|
7
8
|
GEM
|
@@ -18,7 +19,7 @@ GEM
|
|
18
19
|
equivalent-xml (0.6.0)
|
19
20
|
nokogiri (>= 1.4.3)
|
20
21
|
hashdiff (0.3.7)
|
21
|
-
iso-bib-item (0.3.
|
22
|
+
iso-bib-item (0.3.1)
|
22
23
|
isoics (~> 0.1.6)
|
23
24
|
nokogiri (~> 1.8.4)
|
24
25
|
ruby_deep_clone (~> 0.8.0)
|
data/iecbib.gemspec
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'iecbib/hit'
|
4
|
+
require "addressable/uri"
|
4
5
|
|
5
6
|
module Iecbib
|
6
7
|
# Page of hit collection.
|
@@ -28,7 +29,7 @@ module Iecbib
|
|
28
29
|
to = from.next_year.prev_day
|
29
30
|
end
|
30
31
|
url = "#{DOMAIN}/searchkey&RefNbr=#{ref_nbr}&From=#{from}&To=#{to}&start=1"
|
31
|
-
doc = Nokogiri::HTML OpenURI.open_uri(Addressable::URI.parse(url).normalize)
|
32
|
+
doc = Nokogiri::HTML OpenURI.open_uri(::Addressable::URI.parse(url).normalize)
|
32
33
|
hits = doc.css('ul.search-results > li').map do |h|
|
33
34
|
link = h.at('a[@href!="#"]')
|
34
35
|
code = link.text.tr [194, 160].pack('c*').force_encoding('UTF-8'), ''
|
@@ -29,9 +29,9 @@ module Iecbib
|
|
29
29
|
code += '-1' if opts[:all_parts]
|
30
30
|
ret = iecbib_get1(code, year, opts)
|
31
31
|
return nil if ret.nil?
|
32
|
-
ret.to_most_recent_reference unless year
|
32
|
+
ret.to_most_recent_reference unless year || opts[:keep_year]
|
33
33
|
ret.to_all_parts if opts[:all_parts]
|
34
|
-
ret
|
34
|
+
ret
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
data/lib/iecbib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iecbib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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: 2018-09-
|
11
|
+
date: 2018-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 0.3.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: addressable
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: 'IsoBib: retrieve ISO Standards for bibliographic use using the BibliographicItem
|
140
154
|
model'
|
141
155
|
email:
|