ona 0.1.0 → 0.1.1
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.
- data/VERSION +1 -1
- data/bin/ona +1 -1
- data/lib/ona_cli.rb +9 -2
- data/lib/ona_server.rb +9 -0
- data/ona.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/bin/ona
CHANGED
data/lib/ona_cli.rb
CHANGED
@@ -25,7 +25,8 @@ module Ona
|
|
25
25
|
help # show this help
|
26
26
|
|
27
27
|
ls # short list for available servers
|
28
|
-
|
28
|
+
show 1 # detailed info for a specific server
|
29
|
+
show 1 2 3 # detailed info for servers 1 3 and 3
|
29
30
|
|
30
31
|
deploy 1 # Deploy a specific server
|
31
32
|
deploy 1 2 3 # Deploy servers with ids: 1 2 and 3
|
@@ -38,7 +39,7 @@ module Ona
|
|
38
39
|
"
|
39
40
|
end
|
40
41
|
|
41
|
-
def
|
42
|
+
def show string
|
42
43
|
selected_servers(string).each do |server|
|
43
44
|
puts server.to_s
|
44
45
|
end
|
@@ -50,6 +51,12 @@ module Ona
|
|
50
51
|
end
|
51
52
|
end
|
52
53
|
|
54
|
+
def ssh string
|
55
|
+
selected_servers(string).each do |server|
|
56
|
+
system server.to_ssh
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
53
60
|
def deploy string
|
54
61
|
selected_servers(string).each do |server|
|
55
62
|
system server.deploy
|
data/lib/ona_server.rb
CHANGED
@@ -21,6 +21,15 @@ module Ona
|
|
21
21
|
"rake cook server=root@#{ip} dna=#{dna} instance_role=#{role}"
|
22
22
|
end
|
23
23
|
|
24
|
+
def to_ssh
|
25
|
+
"osascript 2>/dev/null <<EOF
|
26
|
+
tell application \"Terminal\"
|
27
|
+
activate
|
28
|
+
do script with command \"ssh root@#{ip}\"
|
29
|
+
end tell
|
30
|
+
EOF"
|
31
|
+
end
|
32
|
+
|
24
33
|
def to_short_s
|
25
34
|
"#{id}".ljust(5) + "#{desc}"
|
26
35
|
end
|
data/ona.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ona
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kazuyoshi tlacaelel
|