remy 0.0.9 → 0.0.10

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.
@@ -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, :public_ssh_key
5
+ attr_reader :ip_address, :ruby_version, :password, :gems, :ssh_key
6
6
 
7
7
  def initialize(options = { })
8
8
  @ip_address = options[:ip_address]
@@ -10,7 +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
+ @ssh_key = options[:ssh_key]
14
14
  @quiet = options[:quiet] || false
15
15
  end
16
16
 
@@ -30,9 +30,8 @@ module Remy
30
30
  end
31
31
 
32
32
  def add_ssh_key_locally_if_necessary
33
- private_ssh_key = public_ssh_key.chomp(File.extname(public_ssh_key))
34
- unless `ssh-add -l`.match(/#{File.basename(private_ssh_key)}/)
35
- `ssh-add $HOME/.ssh/#{private_ssh_key}`
33
+ unless `ssh-add -l`.match(/#{File.basename(ssh_key)}/)
34
+ `ssh-add #{ssh_key}`
36
35
  end
37
36
  end
38
37
 
@@ -70,9 +69,9 @@ module Remy
70
69
  raise "ssh-copy-id is not installed locally! On the Mac, do 'brew install ssh-copy-id'" unless is_ssh_copy_id_installed_locally?
71
70
  is_ssh_key_in_local_known_hosts_file = `grep "#{ip_address}" ~/.ssh/known_hosts`.length > 0
72
71
  if is_ssh_key_in_local_known_hosts_file
73
- execute %Q{expect -c 'spawn ssh-copy-id -i $env(HOME)/.ssh/#{public_ssh_key} #{user}@#{ip_address}; expect assword ; send "#{password}\\n" ; interact'}
72
+ execute %Q{expect -c 'spawn ssh-copy-id -i #{ssh_key} #{user}@#{ip_address}; expect assword ; send "#{password}\\n" ; interact'}
74
73
  else
75
- 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'}
74
+ execute %Q{expect -c 'spawn ssh-copy-id -i #{ssh_key} #{user}@#{ip_address}; expect continue; send "yes\\n"; expect assword ; send "#{password}\\n" ; interact'}
76
75
  end
77
76
  end
78
77
 
@@ -1,3 +1,3 @@
1
1
  module Remy
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
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.9
4
+ version: 0.0.10
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-11-16 00:00:00.000000000 Z
12
+ date: 2012-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -196,12 +196,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  - - ! '>='
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
+ segments:
200
+ - 0
201
+ hash: 815515230505159834
199
202
  required_rubygems_version: !ruby/object:Gem::Requirement
200
203
  none: false
201
204
  requirements:
202
205
  - - ! '>='
203
206
  - !ruby/object:Gem::Version
204
207
  version: '0'
208
+ segments:
209
+ - 0
210
+ hash: 815515230505159834
205
211
  requirements: []
206
212
  rubyforge_project: remy
207
213
  rubygems_version: 1.8.24