isobib 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isobib.gemspec +1 -1
- data/lib/isobib/hit.rb +5 -5
- data/lib/isobib/scrapper.rb +3 -2
- data/lib/isobib/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a4d7771718c2cea89d18f813622b33efc6f975
|
4
|
+
data.tar.gz: eb81b6f43e4eea5136ae4cf19c11969d11751aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18faf55840125c1e02fb2bba25eea238717b00e751a575d248fef1cd972e475f9a2f4032746a25164b7527023da3e82b69314084f73e7bb59325af7eb5d1bd06
|
7
|
+
data.tar.gz: 43b205fb82e7555f2a6337b5278f2d4f2d64e13c3188bc597dfaeac815381c68d02135282ef86757e308e6e633441535e0f94f4f58ee7c9a95b8c38faa2e44a0
|
data/isobib.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'simplecov'
|
33
33
|
|
34
34
|
spec.add_dependency 'algoliasearch'
|
35
|
-
spec.add_dependency 'iso-bib-item'
|
35
|
+
spec.add_dependency 'iso-bib-item', '~> 0.1.2'
|
36
36
|
# spec.add_dependency 'isoics'
|
37
37
|
# spec.add_dependency 'nokogiri'
|
38
38
|
# spec.add_dependency "capybara"
|
data/lib/isobib/hit.rb
CHANGED
@@ -41,15 +41,15 @@ module Isobib
|
|
41
41
|
end
|
42
42
|
|
43
43
|
# @return [String]
|
44
|
-
def to_xml(
|
45
|
-
if builder
|
46
|
-
fetch.to_xml builder, opts
|
47
|
-
else
|
44
|
+
def to_xml(opts = {})
|
45
|
+
#if builder
|
46
|
+
#fetch.to_xml builder, opts
|
47
|
+
#else
|
48
48
|
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
|
49
49
|
fetch.to_xml xml, opts
|
50
50
|
end
|
51
51
|
builder.doc.root.to_xml
|
52
|
-
end
|
52
|
+
#end
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
data/lib/isobib/scrapper.rb
CHANGED
@@ -252,8 +252,9 @@ module Isobib
|
|
252
252
|
# @param title [String]
|
253
253
|
# @return [String]
|
254
254
|
def fetch_type(title)
|
255
|
-
type_match = title.match(%r{^(ISO|IWA|IEC)(
|
256
|
-
|
255
|
+
type_match = title.match(%r{^(ISO|IWA|IEC)(?:(/IEC|/IEEE|/PRF|
|
256
|
+
/NP)*\s|/)(TS|TR|PAS|AWI|CD|FDIS|NP|DIS|WD|R|Guide|(?=\d+))}x)
|
257
|
+
#return "international-standard" if type_match.nil?
|
257
258
|
if TYPES[type_match[2]]
|
258
259
|
TYPES[type_match[2]]
|
259
260
|
elsif type_match[1] == 'ISO'
|
data/lib/isobib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isobib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
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-
|
11
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: iso-bib-item
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.1.2
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.1.2
|
111
111
|
description: 'IsoBib: retrieve ISO Standards for bibliographic use using the BibliographicItem
|
112
112
|
model'
|
113
113
|
email:
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.6.
|
169
|
+
rubygems_version: 2.6.14
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: 'IsoBib: retrieve ISO Standards for bibliographic use using the BibliographicItem
|