soaring 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/soaring/detailer.rb +11 -9
- data/lib/soaring/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: 2553d9d3ceadf27c748db47a4f8d0f87cd2932fc
|
|
4
|
+
data.tar.gz: 60c92e246cc64e156d9b30760ad55973cac8a896
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 698c7400bb38cf1288c42f7d5a537c882d70dbd8ad79e6f730a0af676f585d638a3345fe482ce5afd0e093683a86b6493026936b25145127ce6c586c1bb5b01d
|
|
7
|
+
data.tar.gz: da121f079abfa2b9ee2c6a192a3b55213212dba9e1c3a5915c66fa2758c30067621fa130fe5d514fd7dae2c12c27566147871d70ce08fb3418a3f7521c63efe5
|
data/lib/soaring/detailer.rb
CHANGED
|
@@ -9,19 +9,21 @@ module Soaring
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def detail
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
uri = URI.parse(@options[:url])
|
|
13
|
+
args = {}
|
|
14
|
+
uri.query = URI.encode_www_form(args)
|
|
15
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
16
|
+
http.use_ssl = true if uri.is_a?(URI::HTTPS)
|
|
17
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
|
18
|
+
response = http.request(request)
|
|
17
19
|
|
|
18
|
-
if '200' !=
|
|
19
|
-
$stderr.puts "Failed to connect with http error code #{
|
|
20
|
+
if '200' != response.code
|
|
21
|
+
$stderr.puts "Failed to connect with http error code #{response.code}"
|
|
20
22
|
exit 1
|
|
21
23
|
end
|
|
22
24
|
|
|
23
|
-
puts JSON.parse(
|
|
24
|
-
print JSON.parse(
|
|
25
|
+
puts JSON.parse(response.body) if 'json' == @options[:format]
|
|
26
|
+
print JSON.parse(response.body).to_yaml if 'yaml' == @options[:format]
|
|
25
27
|
|
|
26
28
|
rescue StandardError => exception
|
|
27
29
|
message = "#{exception.class}: #{exception.message}"
|
data/lib/soaring/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soaring
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Barney de Villiers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-10-
|
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|