prospectus 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prospectus/modules/gemnasium.rb +8 -1
- data/lib/prospectus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4d851bb14d8090f16dc6f84c3ee32482cae511
|
4
|
+
data.tar.gz: 97fc113c3a059a288e7ff59d4312512e0e25bb46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7c0ff713f400c9ac790a03771225d8429af96866e5deadda82a25d2d01ef239fe22e310ff0f5dc4c8f435475514414c4d9284b02353882cff0cdd9f1edf3ee4
|
7
|
+
data.tar.gz: e5687c1ef515fd0b35bc9c5267795b2593f097e68638f3097dcbe96763722b8d7a0ff58fe7da10e8ae19fc575bd0fb13403fb7b89a32dbeae40a0549626df51e
|
@@ -26,12 +26,19 @@ module LogCabin
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def api_data
|
29
|
-
@
|
29
|
+
return @api_data if @api_data
|
30
|
+
resp = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
|
30
31
|
request = Net::HTTP::Get.new uri.request_uri
|
31
32
|
request.basic_auth(*creds)
|
32
33
|
response = http.request(request)
|
33
34
|
JSON.parse(response.body)
|
34
35
|
end
|
36
|
+
@api_data = validate_response(resp)
|
37
|
+
end
|
38
|
+
|
39
|
+
def validate_response(resp)
|
40
|
+
return resp if resp.is_a? Array
|
41
|
+
fail("API lookup on gemnasium failed: #{resp['message']}")
|
35
42
|
end
|
36
43
|
|
37
44
|
def creds
|
data/lib/prospectus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prospectus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|