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 CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/ona CHANGED
@@ -16,7 +16,7 @@ loop do
16
16
  end
17
17
  cli.ls if line == 'ls'
18
18
  cli.help if line == 'help'
19
- cli.list line if line =~ /list/
19
+ cli.show line if line =~ /show/
20
20
  cli.setup line if line =~ /setup/
21
21
  cli.deploy line if line =~ /deploy/
22
22
  end
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
- list # detailed list for available servers
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 list string
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ona}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["kazuyoshi tlacaelel"]
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - kazuyoshi tlacaelel