yorobot 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89c9982012e1437df536bb0e063b5858862e0c94
4
- data.tar.gz: c7f0784616e3b51b52ddf2282923dea5c69f7a06
3
+ metadata.gz: 847505c5153a9538c83b411771c985f37af24244
4
+ data.tar.gz: 65de3568ced94876da73ec17b76399604437efb6
5
5
  SHA512:
6
- metadata.gz: 21b7d37cd4161c10f3c6d37b844bce291d652a9803bf04a23f399c270bb488f8a96d4f09be135756b0ffbaff0c32be7ba91e9b5040c05d7aa5265ed060a07bce
7
- data.tar.gz: 56528994071f6775450b4e7444cc255e665fb633dfc227c511ff8f4eaf2a82ca55a03d68344b9f4ad0360559aa62f2887079678c9f9e330cf4d97673795cd3cf
6
+ metadata.gz: 4a9345178932c3ac2d4901a240f88b95d75992d7e024efcf608fa5e535a598df40f42b83ade976bc760b0a1c2ed6c19e7931c92c67474ef3c6f0d7cc40538249
7
+ data.tar.gz: f92929a759988a35020c5ae225c74186f9b29bc3f7c04a9f4c3e01a403bf76f4475375a58341fd3264c6b5f4271ad4f60bbdae9ec026fe039642ff43c8445967
@@ -23,26 +23,32 @@ class Setup < Step
23
23
  ##############
24
24
  ## setup ssh
25
25
 
26
- ssh_key = ENV['SSH_KEY']
26
+ ssh_key = ENV['SSH_KEY']
27
+
27
28
  if ssh_key.nil?
28
29
  STDERR.puts "!! ERROR - required SSH_KEY env(ironment) variable missing"
29
30
  exit 1
30
31
  end
31
- if File.exist?( '~/.ssh/id_rsa' )
32
- STDERR.puts "!! ERROR - ssh key >~/.ssh/id_rsa< already exists"
32
+
33
+ ssh_path = File.expand_path( '~/.ssh' )
34
+
35
+ if File.exist?( "#{ssh_path}/id_rsa" )
36
+ STDERR.puts "!! ERROR - ssh key >#{ssh_path}/id_rsa< already exists"
33
37
  exit 1
34
38
  end
35
39
 
36
40
  ## make sure path exists
37
- FileUtils.mkdir_p( '~/.ssh' ) unless Dir.exist?( '~/.ssh' )
38
- File.open( '~/.ssh/id_rsa', 'w:utf-8' ) do |f|
41
+ FileUtils.mkdir_p( ssh_path ) unless Dir.exist?( ssh_path )
42
+ puts "--> writing ssh key to >#{ssh_path}/id_rsa<..."
43
+ File.open( "#{ssh_path}/id_rsa", 'w:utf-8' ) do |f|
39
44
  f.write( ssh_key )
40
45
  end
41
46
  ## note: ssh key must be "private" only access by owner (otherwise) WILL NOT work
42
- res = File.chmod( 0600, '~/.ssh/id_rsa' )
43
- puts res ## returns number of files processed; should be 1 - assert - why? why not?
47
+ ## res = File.chmod( 0600, "#{ssh_path}/id_rsa" )
48
+ ## puts res ## returns number of files processed; should be 1 - assert - why? why not?
49
+ Computer::Shell.run( %Q{chmod 600 #{ssh_path}/id_rsa} )
44
50
 
45
- Computer::Shell.run( %Q{ls -la ~/.ssh} )
51
+ Computer::Shell.run( %Q{ls -la #{ssh_path}} )
46
52
  # ssh -vT git@github.com
47
53
 
48
54
 
@@ -6,7 +6,7 @@
6
6
  module YorobotCore ## todo/check: rename GittiBase or GittiMeta or such - why? why not?
7
7
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
8
8
  MINOR = 2
9
- PATCH = 1
9
+ PATCH = 2
10
10
  VERSION = [MAJOR,MINOR,PATCH].join('.')
11
11
 
12
12
  def self.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yorobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer