remy 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Remy
2
2
  class Bootstrap
3
3
  include ::Remy::Shell
4
4
 
5
- attr_reader :ip_address, :ruby_version, :password, :gems
5
+ attr_reader :ip_address, :ruby_version, :password, :gems, :public_ssh_key
6
6
 
7
7
  def initialize(options = { })
8
8
  @ip_address = options[:ip_address]
@@ -10,6 +10,7 @@ module Remy
10
10
  options = (Remy::Config::Chef.bootstrap || {}).merge(options).symbolize_keys
11
11
  @ruby_version = options[:ruby_version] || '1.8.7'
12
12
  @gems = options[:gems] || {}
13
+ @public_ssh_key = options[:public_ssh_key]
13
14
  @quiet = options[:quiet] || false
14
15
  end
15
16
 
@@ -61,9 +62,9 @@ module Remy
61
62
  raise "ssh-copy-id is not installed locally! On the Mac, do 'brew install ssh-copy-id'" unless is_ssh_copy_id_installed_locally?
62
63
  is_ssh_key_in_local_known_hosts_file = `grep "#{ip_address}" ~/.ssh/known_hosts`.length > 0
63
64
  if is_ssh_key_in_local_known_hosts_file
64
- execute %Q{expect -c 'spawn ssh-copy-id #{user}@#{ip_address}; expect assword ; send "#{password}\\n" ; interact'}
65
+ execute %Q{expect -c 'spawn ssh-copy-id -i $env(HOME)/.ssh/#{public_ssh_key} #{user}@#{ip_address}; expect assword ; send "#{password}\\n" ; interact'}
65
66
  else
66
- execute %Q{expect -c 'spawn ssh-copy-id #{user}@#{ip_address}; expect continue; send "yes\\n"; expect assword ; send "#{password}\\n" ; interact'}
67
+ execute %Q{expect -c 'spawn ssh-copy-id -i $env(HOME)/.ssh/#{public_ssh_key} #{user}@#{ip_address}; expect continue; send "yes\\n"; expect assword ; send "#{password}\\n" ; interact'}
67
68
  end
68
69
  end
69
70
 
data/lib/remy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Remy
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-30 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n