isobib 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -6
- data/bin/safe_yaml +29 -0
- data/isobib.gemspec +2 -0
- data/lib/isobib/iso_bibliography.rb +7 -1
- data/lib/isobib/version.rb +1 -1
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb188b7999037bc7fbe19ccf2420a9c0c41f7db5d30b236eb2f4419ee1a49c1b
|
4
|
+
data.tar.gz: 3e9867807d2eb0aa52ef1b58c8df7ffa8062f6f06f7b0c3245db3e07a69f735f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be443f01d099a9091c0177b43286727b9eb0a8f383901b6b55937b0fe3c7f0af37e63b337dee2172c8b4a8ca22cddcf88d945860e14c4634162056394563aefd
|
7
|
+
data.tar.gz: c28d898c76d13cec0bcde8336a77fe7420bfa25e6a1772bbe4562e607e83c3dd134401ee3a89d22b0f4f3f2393ed32fdd1dd5936e00764c1be4d5537eb640f05
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
isobib (0.4.
|
4
|
+
isobib (0.4.3)
|
5
5
|
algoliasearch
|
6
6
|
iecbib (~> 0.2.1)
|
7
7
|
iso-bib-item (~> 0.4.2)
|
@@ -11,17 +11,20 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
addressable (2.5.2)
|
13
13
|
public_suffix (>= 2.0.2, < 4.0)
|
14
|
-
algoliasearch (1.
|
14
|
+
algoliasearch (1.25.2)
|
15
15
|
httpclient (~> 2.8, >= 2.8.3)
|
16
16
|
json (>= 1.5.1)
|
17
17
|
byebug (10.0.2)
|
18
18
|
coderay (1.1.2)
|
19
|
+
crack (0.4.3)
|
20
|
+
safe_yaml (~> 1.0.0)
|
19
21
|
diff-lcs (1.3)
|
20
22
|
docile (1.3.1)
|
21
23
|
equivalent-xml (0.6.0)
|
22
24
|
nokogiri (>= 1.4.3)
|
25
|
+
hashdiff (0.3.8)
|
23
26
|
httpclient (2.8.3)
|
24
|
-
iecbib (0.2.
|
27
|
+
iecbib (0.2.2)
|
25
28
|
addressable
|
26
29
|
iso-bib-item (~> 0.4.2)
|
27
30
|
iso-bib-item (0.4.4)
|
@@ -30,11 +33,11 @@ GEM
|
|
30
33
|
ruby_deep_clone (~> 0.8.0)
|
31
34
|
isoics (0.1.7)
|
32
35
|
json (2.1.0)
|
33
|
-
method_source (0.9.
|
36
|
+
method_source (0.9.2)
|
34
37
|
mini_portile2 (2.3.0)
|
35
38
|
nokogiri (1.8.5)
|
36
39
|
mini_portile2 (~> 2.3.0)
|
37
|
-
pry (0.
|
40
|
+
pry (0.12.2)
|
38
41
|
coderay (~> 1.1.0)
|
39
42
|
method_source (~> 0.9.0)
|
40
43
|
pry-byebug (3.6.0)
|
@@ -56,11 +59,17 @@ GEM
|
|
56
59
|
rspec-support (~> 3.8.0)
|
57
60
|
rspec-support (3.8.0)
|
58
61
|
ruby_deep_clone (0.8.0)
|
62
|
+
safe_yaml (1.0.4)
|
59
63
|
simplecov (0.16.1)
|
60
64
|
docile (~> 1.1)
|
61
65
|
json (>= 1.8, < 3)
|
62
66
|
simplecov-html (~> 0.10.0)
|
63
67
|
simplecov-html (0.10.2)
|
68
|
+
vcr (4.0.0)
|
69
|
+
webmock (3.5.1)
|
70
|
+
addressable (>= 2.3.6)
|
71
|
+
crack (>= 0.3.2)
|
72
|
+
hashdiff
|
64
73
|
|
65
74
|
PLATFORMS
|
66
75
|
ruby
|
@@ -74,6 +83,8 @@ DEPENDENCIES
|
|
74
83
|
rake (~> 10.0)
|
75
84
|
rspec (~> 3.0)
|
76
85
|
simplecov
|
86
|
+
vcr
|
87
|
+
webmock
|
77
88
|
|
78
89
|
BUNDLED WITH
|
79
|
-
1.17.
|
90
|
+
1.17.3
|
data/bin/safe_yaml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'safe_yaml' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("safe_yaml", "safe_yaml")
|
data/isobib.gemspec
CHANGED
@@ -32,6 +32,8 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
33
|
spec.add_development_dependency 'simplecov'
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
35
|
+
spec.add_development_dependency 'vcr'
|
36
|
+
spec.add_development_dependency 'webmock'
|
35
37
|
|
36
38
|
spec.add_dependency 'algoliasearch'
|
37
39
|
spec.add_dependency 'iso-bib-item', '~> 0.4.2'
|
@@ -15,7 +15,7 @@ module Isobib
|
|
15
15
|
begin
|
16
16
|
HitPages.new text
|
17
17
|
rescue
|
18
|
-
warn "Could not access http://www.iso.
|
18
|
+
warn "Could not access http://www.iso.org"
|
19
19
|
[]
|
20
20
|
end
|
21
21
|
end
|
@@ -35,7 +35,13 @@ module Isobib
|
|
35
35
|
code += '-1' if opts[:all_parts]
|
36
36
|
return Iecbib::IecBibliography.get(code, year, opts) if %r[^ISO/IEC DIR].match code
|
37
37
|
ret = isobib_get1(code, year, opts)
|
38
|
+
if ret.nil? && code =~ %r[^ISO\s]
|
39
|
+
c = code.gsub "ISO", "ISO/IEC"
|
40
|
+
warn "Attempting ISO/IEC retrieval"
|
41
|
+
ret = isobib_get1(c, year, opts)
|
42
|
+
end
|
38
43
|
return nil if ret.nil?
|
44
|
+
|
39
45
|
ret.to_most_recent_reference unless year || opts[:keep_year]
|
40
46
|
ret.to_all_parts if opts[:all_parts]
|
41
47
|
ret
|
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.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,34 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.6'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: algoliasearch
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,6 +208,7 @@ files:
|
|
180
208
|
- bin/pry
|
181
209
|
- bin/rake
|
182
210
|
- bin/rspec
|
211
|
+
- bin/safe_yaml
|
183
212
|
- bin/setup
|
184
213
|
- isobib.gemspec
|
185
214
|
- lib/isobib.rb
|