ietfbib 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +3 -0
- data/.rubocop.yml +9 -3
- data/Gemfile.lock +5 -5
- data/lib/ietfbib/scrapper.rb +11 -6
- data/lib/ietfbib/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f028455f472c235f63c378332f13e3e48576e0d3b8cc04d539e52aa16e5d5234
|
4
|
+
data.tar.gz: 4d1bde360ad2bc9fb6b55c1f233d13bb80ecfc67a7396e75f1bc1c51d5b87594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c28daa4afa7c3a2623680ec40ac76e8e67d74c94d1eacdfdacc3130f5086763011bd026ae8e4ecee886d43262fbe55ba2306060ad985068dcfe885e2fae0356
|
7
|
+
data.tar.gz: 382dfb7888ea963c0570c9bfa248914ac61545053a1ce210d8429f22649782fffb86b887e08d8911a6f01e65d7912df52b8e7df319dec09986bb0d51e2c7e9cd
|
data/.hound.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
+
# This project follows the Ribose OSS style guide.
|
2
|
+
# https://github.com/riboseinc/oss-guides
|
3
|
+
# All project-specific additions and overrides should be specified in this file.
|
4
|
+
|
5
|
+
inherit_from:
|
6
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
1
7
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
3
|
-
|
4
|
-
|
8
|
+
TargetRubyVersion: 2.3
|
9
|
+
Rails:
|
10
|
+
Enabled: true
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ietfbib (0.4.
|
4
|
+
ietfbib (0.4.4)
|
5
5
|
iso-bib-item (~> 0.4.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,17 +13,17 @@ GEM
|
|
13
13
|
docile (1.3.1)
|
14
14
|
equivalent-xml (0.6.0)
|
15
15
|
nokogiri (>= 1.4.3)
|
16
|
-
iso-bib-item (0.4.
|
16
|
+
iso-bib-item (0.4.4)
|
17
17
|
isoics (~> 0.1.6)
|
18
18
|
nokogiri (~> 1.8.4)
|
19
19
|
ruby_deep_clone (~> 0.8.0)
|
20
20
|
isoics (0.1.7)
|
21
21
|
json (2.1.0)
|
22
|
-
method_source (0.9.
|
22
|
+
method_source (0.9.2)
|
23
23
|
mini_portile2 (2.3.0)
|
24
24
|
nokogiri (1.8.5)
|
25
25
|
mini_portile2 (~> 2.3.0)
|
26
|
-
pry (0.
|
26
|
+
pry (0.12.2)
|
27
27
|
coderay (~> 1.1.0)
|
28
28
|
method_source (~> 0.9.0)
|
29
29
|
pry-byebug (3.6.0)
|
@@ -63,4 +63,4 @@ DEPENDENCIES
|
|
63
63
|
simplecov
|
64
64
|
|
65
65
|
BUNDLED WITH
|
66
|
-
1.
|
66
|
+
1.17.1
|
data/lib/ietfbib/scrapper.rb
CHANGED
@@ -34,15 +34,20 @@ module IETFBib
|
|
34
34
|
end
|
35
35
|
|
36
36
|
uri = uri.gsub("CODE", ref)
|
37
|
-
|
38
|
-
|
37
|
+
begin
|
38
|
+
res = Net::HTTP.get_response(URI(uri))
|
39
|
+
if res.code != "200"
|
40
|
+
warn "No document found at #{uri}"
|
41
|
+
return
|
42
|
+
end
|
43
|
+
doc = Nokogiri::HTML Net::HTTP.get(URI(uri))
|
44
|
+
@reference = doc.at('//reference')
|
45
|
+
return unless @reference
|
46
|
+
bib_item
|
47
|
+
rescue
|
39
48
|
warn "No document found at #{uri}"
|
40
49
|
return
|
41
50
|
end
|
42
|
-
doc = Nokogiri::HTML Net::HTTP.get(URI(uri))
|
43
|
-
@reference = doc.at('//reference')
|
44
|
-
return unless @reference
|
45
|
-
bib_item
|
46
51
|
end
|
47
52
|
|
48
53
|
private
|
data/lib/ietfbib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ietfbib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.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-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,6 +117,7 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".gitignore"
|
120
|
+
- ".hound.yml"
|
120
121
|
- ".rspec"
|
121
122
|
- ".rubocop.yml"
|
122
123
|
- ".travis.yml"
|