depengine 3.0.10 → 3.0.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1973af1ae5ec0c527e493873a7d7c4d9d8f77cd8
4
- data.tar.gz: ea5525a0662d01b95b7451601a7c195be4e0981a
3
+ metadata.gz: 699d0a17010d5fa884d2f5b49b56647a4c31eaa0
4
+ data.tar.gz: e1554472b1b379b8c556ed600cc26e95abb34b2b
5
5
  SHA512:
6
- metadata.gz: 2b49ab018be3c446ff28fa5472fab70af05fee5237f7ab0c204b920c69b8bf8929b9e4abd803e24d4ec0d813d8bb32178d684dd8badd8d519d801388807d564e
7
- data.tar.gz: 6ca99c2654ee22fea1885dc2629a7ee245f630439ea47d3f5698264cf3e9303e7532eb9180cecadac93c08a48de7d333008d1a5da2c2637d5088e6c618853157
6
+ metadata.gz: 0a0ec9e982df1c7b7c15b873e226acb884b23e754354661c166778b6adb815cc95ab02878c3b76570efb28873855314a5b73506cbcfde794f79e37350afad836
7
+ data.tar.gz: 9d536acdaf7a4c80d8a96ff855a86ff3b60063463944b1938c859412270618d456b4f46ddd7361db4032e3c159ded0e024fe80185264cc2dbf84d2f99e76ec83
@@ -25,11 +25,10 @@ module Deployment
25
25
  publisher = ::Publisher::Sftp.new
26
26
  publisher.remote_host = options[:remote_host] || @cdb['remote_host']
27
27
  publisher.remote_user = options[:remote_user] || @cdb['remote_user']
28
- if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
29
- publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
30
- else
31
- publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
32
- end
28
+ publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
29
+
30
+ publisher.ssh_key_file = File.join(File.dirname($exec_file_path), \
31
+ publisher.ssh_key_file)
33
32
 
34
33
  Helper.validates_presence_of publisher.remote_host, "Remote host not set"
35
34
  Helper.validates_presence_of publisher.remote_user, "Remote user not set"
@@ -46,11 +45,13 @@ module Deployment
46
45
  publisher = ::Publisher::Sftp.new
47
46
  publisher.remote_host = options[:remote_host] || @cdb['remote_host']
48
47
  publisher.remote_user = options[:remote_user] || @cdb['remote_user']
49
- if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
50
- publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
51
- else
52
- publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
53
- end
48
+ publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
49
+
50
+ publisher.ssh_key_file = File.join(File.dirname($exec_file_path), \
51
+ publisher.ssh_key_file)
52
+
53
+ Helper.validates_presence_of publisher.remote_host, "Remote host not set"
54
+ Helper.validates_presence_of publisher.remote_user, "Remote user not set"
54
55
 
55
56
  publisher.chmod(path, permissions, options)
56
57
  end
@@ -9,12 +9,7 @@ module Deployment
9
9
  publisher = ::Publisher::Ssh.new
10
10
  publisher.remote_host = options[:remote_host] || @cdb['remote_host']
11
11
  publisher.remote_user = options[:remote_user] || @cdb['remote_user']
12
- if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
13
- publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
14
- else
15
- publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
16
- end
17
-
12
+ publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
18
13
  publisher.remote_execute(command)
19
14
  end
20
15
 
@@ -28,11 +23,10 @@ module Deployment
28
23
  publisher = ::Publisher::Rsync.new
29
24
  publisher.remote_host = options[:remote_host] || @cdb['remote_host']
30
25
  publisher.remote_user = options[:remote_user] || @cdb['remote_user']
31
- if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
32
- publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
33
- else
34
- publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
35
- end
26
+ publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
27
+
28
+ # publisher.ssh_key_file = File.join(File.dirname($exec_file_path), \
29
+ # publisher.ssh_key_file)
36
30
 
37
31
  if options[:local].nil? or options[:local] == false
38
32
  Helper.validates_presence_of publisher.remote_host, "Remote host not set"
@@ -56,11 +50,7 @@ module Deployment
56
50
  publisher = ::Publisher::Ssh.new
57
51
  publisher.remote_host = options[:remote_host] || @cdb['remote_host']
58
52
  publisher.remote_user = options[:remote_user] || @cdb['remote_user']
59
- if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
60
- publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
61
- else
62
- publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
63
- end
53
+ publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
64
54
  publisher.remove_old_releases(path, num_of_releases_to_keep, release_name_shema)
65
55
  end
66
56
 
@@ -1,24 +1,28 @@
1
1
  module Publisher
2
2
  class Ssh
3
- attr_accessor :remote_user, :remote_host, :ssh_key_file
3
+ attr_accessor :remote_user
4
+ attr_accessor :remote_host
5
+ attr_accessor :ssh_key_file
4
6
 
5
7
  def remote_execute(command)
6
- Helper.validates_presence_of @remote_user, "Remote User not set"
7
- Helper.validates_presence_of @remote_host, "Remote Host not set"
8
- Helper.validates_presence_of @ssh_key_file, "SSH keyfile not set"
8
+ Helper.validates_presence_of remote_user, "Remote User not set"
9
+ Helper.validates_presence_of remote_host, "Remote Host not set"
10
+ Helper.validates_presence_of ssh_key_file, "SSH keyfile not set"
9
11
  Helper.validates_presence_of command, "No valid remote command given"
10
12
 
11
- result = ''
13
+ result = ''
14
+ # joined_filename = File.join(File.dirname($exec_file_path), ssh_key_file)
15
+ # ssh_key_file = joined_filename
12
16
 
13
- if not File.file? @ssh_key_file
14
- $log.writer.error "Can not find SSH keyfile #{@ssh_key_file}"
17
+ if not File.file? ssh_key_file
18
+ $log.writer.error "Can not find SSH keyfile #{ssh_key_file}"
15
19
  exit 1
16
20
  end
17
21
 
18
22
  Net::SSH.start(remote_host, remote_user, \
19
23
  :auth_methods => ['publickey'], \
20
24
  :forward_agent => true, \
21
- :keys => @ssh_key_file, \
25
+ :keys => ssh_key_file, \
22
26
  :timeout => 30 ) do |session|
23
27
  session.open_channel do |ch|
24
28
  ch.exec command do |ch, success|
@@ -1,3 +1,3 @@
1
1
  module Depengine
2
- VERSION = "3.0.10"
2
+ VERSION = "3.0.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.10
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Automatisierung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json