pupcap 0.0.2 → 0.0.3
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/lib/pupcap/action/cook.rb +1 -1
- data/lib/pupcap/action/prepare.rb +1 -1
- data/lib/pupcap/action/ssh.rb +1 -1
- data/lib/pupcap/action/ssh/Capfile +5 -3
- data/lib/pupcap/cli.rb +1 -2
- data/lib/pupcap/version.rb +1 -1
- metadata +1 -1
data/lib/pupcap/action/cook.rb
CHANGED
@@ -17,7 +17,7 @@ class Pupcap::Action::Cook < Pupcap::Action::Base
|
|
17
17
|
unless @parsed_options
|
18
18
|
options = default_options.dup
|
19
19
|
OptionParser.new do |opts|
|
20
|
-
opts.banner = "Usage: #{File.basename($0)} [options] <role>
|
20
|
+
opts.banner = "Usage: #{File.basename($0)} cook [options] <role>"
|
21
21
|
|
22
22
|
opts.on("-f", "--file FILE", "A recipe file to load") do |file|
|
23
23
|
options[:file] = File.expand_path(file)
|
@@ -22,7 +22,7 @@ class Pupcap::Action::Prepare < Pupcap::Action::Base
|
|
22
22
|
unless @parsed_options
|
23
23
|
options = default_options.dup
|
24
24
|
OptionParser.new do |opts|
|
25
|
-
opts.banner = "Usage: #{File.basename($0)} [options] <role>
|
25
|
+
opts.banner = "Usage: #{File.basename($0)} prepare [options] <role>"
|
26
26
|
|
27
27
|
opts.on("-h", "--help", "Displays this help info") do
|
28
28
|
puts opts
|
data/lib/pupcap/action/ssh.rb
CHANGED
@@ -17,7 +17,7 @@ class Pupcap::Action::Ssh < Pupcap::Action::Base
|
|
17
17
|
unless @parsed_options
|
18
18
|
options = default_options.dup
|
19
19
|
OptionParser.new do |opts|
|
20
|
-
opts.banner = "Usage: #{File.basename($0)} [options] <role>
|
20
|
+
opts.banner = "Usage: #{File.basename($0)} [options] ssh <role>"
|
21
21
|
|
22
22
|
opts.on("-f", "--file FILE", "A recipe file to load") do |file|
|
23
23
|
options[:file] = File.expand_path(file)
|
@@ -1,9 +1,11 @@
|
|
1
1
|
namespace :ssh do
|
2
2
|
task :default do
|
3
3
|
server = find_servers_for_task(current_task).first
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
if server
|
5
|
+
host = Pupcap::Command.server_host(self, server)
|
6
|
+
port = Pupcap::Command.server_port(self, server)
|
7
|
+
exec "ssh #{host} -t -p #{port} -i #{ssh_options[:keys]} '${SHELL} -l'"
|
8
|
+
end
|
7
9
|
end
|
8
10
|
end
|
9
11
|
|
data/lib/pupcap/cli.rb
CHANGED
@@ -4,13 +4,12 @@ require 'pupcap'
|
|
4
4
|
class Pupcap::CLI
|
5
5
|
class << self
|
6
6
|
def start
|
7
|
-
action = ARGV.
|
7
|
+
action = ARGV.shift
|
8
8
|
if !action || !valid_actions.include?(action)
|
9
9
|
$stderr.puts "Please specify a action to run: #{valid_actions.join("|")}"
|
10
10
|
exit 1
|
11
11
|
end
|
12
12
|
|
13
|
-
ARGV.pop
|
14
13
|
require "pupcap/action/#{action}"
|
15
14
|
klass = Pupcap::Action.const_get(action.capitalize)
|
16
15
|
inst = klass.new
|
data/lib/pupcap/version.rb
CHANGED