sprinkle 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/lib/sprinkle/actors/ssh.rb
CHANGED
@@ -16,6 +16,18 @@ module Sprinkle
|
|
16
16
|
# end
|
17
17
|
#
|
18
18
|
#
|
19
|
+
# == Use ssh key file
|
20
|
+
#
|
21
|
+
# deployment do
|
22
|
+
# delivery :ssh do
|
23
|
+
# user "sprinkle"
|
24
|
+
# keys "/path/to/ssh/key/file" # passed directly to Net::SSH as :keys option
|
25
|
+
#
|
26
|
+
# role :app, "app.myserver.com"
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
#
|
19
31
|
# == Working thru a gateway
|
20
32
|
#
|
21
33
|
# If you're behind a firewall and need to use a SSH gateway that's fine.
|
@@ -87,6 +99,10 @@ module Sprinkle
|
|
87
99
|
@options[:password] = password
|
88
100
|
end
|
89
101
|
|
102
|
+
def keys(keys)
|
103
|
+
@options[:keys] = keys
|
104
|
+
end
|
105
|
+
|
90
106
|
# Set this to true to prepend 'sudo' to every command.
|
91
107
|
def use_sudo(value=true)
|
92
108
|
@options[:use_sudo] = value
|
@@ -175,7 +191,7 @@ module Sprinkle
|
|
175
191
|
if res != 0
|
176
192
|
fail=SSHCommandFailure.new
|
177
193
|
fail.details = @log_recorder.hash.merge(:hosts => host)
|
178
|
-
raise fail
|
194
|
+
raise fail
|
179
195
|
end
|
180
196
|
end
|
181
197
|
true
|
@@ -243,7 +259,7 @@ module Sprinkle
|
|
243
259
|
if @gateway
|
244
260
|
gateway.ssh(host, @options[:user])
|
245
261
|
else
|
246
|
-
@connection_cache.start(host, @options[:user],:password => @options[:password])
|
262
|
+
@connection_cache.start(host, @options[:user],:password => @options[:password], :keys => @options[:keys])
|
247
263
|
end
|
248
264
|
end
|
249
265
|
|
data/lib/sprinkle/version.rb
CHANGED
@@ -16,7 +16,13 @@ describe Sprinkle::Installers::User do
|
|
16
16
|
it "should invoke add user" do
|
17
17
|
@installer = create_user 'bob'
|
18
18
|
@install_commands = @installer.send :install_commands
|
19
|
-
@install_commands.should == "adduser
|
19
|
+
@install_commands.should == "adduser --gecos ,,, bob"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should merge flags" do
|
23
|
+
@installer = create_user 'bob', :flags => "-x"
|
24
|
+
@install_commands = @installer.send :install_commands
|
25
|
+
@install_commands.should == "adduser -x --gecos ,,, bob"
|
20
26
|
end
|
21
27
|
|
22
28
|
it "should use actual gecos options if passed" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprinkle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|