spurious 0.1.0 → 0.2.0
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/spurious/app.rb +6 -2
- data/lib/spurious/command/ports.rb +8 -5
- data/lib/spurious/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: bdedd43a1cfc7f8e986c49b569d2c31beee13c05
|
4
|
+
data.tar.gz: 43c7ec6444583803bef3b08b16cce73c3290f93b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2fb5574563f6837b47faaf23d292317287f6da15a96b92de586b6d406ae59bde3a725bbc357a6ff99657bc3db890ef3d0601447c130d7dca85c5b5bd7c82472
|
7
|
+
data.tar.gz: 8dea00654be0c4c30ebf579c2133bb809bce38b47d3b68943c774aeca94465c826751a587112be3550dfe83f77eb259c29b7c6e1de464223bd836095064e2f56
|
data/lib/spurious/app.rb
CHANGED
@@ -29,10 +29,14 @@ module Spurious
|
|
29
29
|
|
30
30
|
state_methods
|
31
31
|
|
32
|
+
method_option :'json', :type => :boolean, :default => false, :desc => 'Prints out ports as a json string'
|
32
33
|
desc "ports", "List ports for the spurious containers"
|
33
34
|
def ports
|
34
|
-
|
35
|
-
|
35
|
+
|
36
|
+
if server_available? then
|
37
|
+
EventMachine.run do
|
38
|
+
EventMachine::connect options[:server_ip], options[:server_port], Spurious::Command::Ports, :ports, self
|
39
|
+
end
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
@@ -19,12 +19,15 @@ module Spurious
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
app.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
if app.options[:json]
|
23
|
+
app.say JSON.generate(parsed_data['response'])
|
24
|
+
else
|
25
|
+
app.say "\n"
|
26
|
+
app.print_table(
|
27
|
+
build_table(['Service', 'Guest port', 'Host port'], data)
|
28
|
+
) unless parsed_data['response'].empty?
|
27
29
|
|
30
|
+
end
|
28
31
|
EventMachine.stop_event_loop if parsed_data['close']
|
29
32
|
|
30
33
|
end
|
data/lib/spurious/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spurious
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -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.
|
169
|
+
rubygems_version: 2.0.3
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Spurious is a cli tool that interacts with the spurious server
|