capistrano-psw 1.0.0.pre12 → 1.0.0.pre13
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 +4 -4
- data/lib/capistrano/psw/version.rb +1 -1
- data/resources/lib/capistrano/tasks/psw-peppr.cap +38 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f79ecd1499787fbc4d7676ef0b357bdfce0176a
|
4
|
+
data.tar.gz: c0abaf08ade68e50f8645e128bf406bf907eb714
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ec32198aafcfda7a9fb8498055874c3248131c3a5707599fe2f65b095443443c346c13ad3ee4522c4c3fcbb6272ff112ff2ae6de54830ec6667a3ab1f62d0cf
|
7
|
+
data.tar.gz: 7ea38d71efefa1ccb50f4d7d51ff4f86e11b9e0edfc9bd32e5f6e5c6df1531dadcd89742b121f9fe9650d5aa377547d6147e616e1c52d0ddbc56f9e05fc75ab1
|
@@ -34,39 +34,59 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
namespace :psw_peppr do
|
37
|
+
desc 'Copy application enviroment files to remote machine'
|
37
38
|
task :environment_files do
|
38
39
|
on roles(:app) do |host|
|
39
40
|
application_id = ENV['peppr_application_id'].to_i
|
40
41
|
application_deployment = ENV['peppr_application_deployment_id'].to_i
|
41
|
-
info "
|
42
|
-
info "
|
42
|
+
info "peppr_application_id: #{application_id}"
|
43
|
+
info "peppr_application_deployment: #{application_deployment}"
|
43
44
|
if application_id > 0 and application_deployment > 0
|
44
|
-
info
|
45
|
+
info 'Preparing to upload environment files if applicable...'
|
46
|
+
|
45
47
|
local_shared_files_path = "/tmp/peppr_deployments/applications/#{application_id}/deployments/#{application_deployment}/environments/#{fetch(:stage)}/shared_files"
|
46
48
|
|
47
|
-
|
48
|
-
|
49
|
-
|
49
|
+
if File.exist? local_shared_files_path
|
50
|
+
info "Uploading environment files..."
|
51
|
+
files = Find.find(local_shared_files_path)
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
absolute_path_files, shared_files = files.partition { |f| f.start_with? "#{local_shared_files_path}/.absolute_paths" }
|
54
|
+
|
55
|
+
info 'uploading shared files'
|
56
|
+
shared_files.each do |file|
|
57
|
+
relative_path = file.gsub("#{local_shared_files_path}/", '')
|
58
|
+
|
59
|
+
debug "Inspecting: #{relative_path}" if fetch(:peppr_debug)
|
60
|
+
|
61
|
+
if File.directory?(file) && relative_path.strip != ''
|
62
|
+
execute :mkdir, '-p', "#{shared_path}/#{relative_path}"
|
63
|
+
elsif relative_path.gsub(/\s+/, '') != '' and relative_path != '.' and relative_path != '..'
|
64
|
+
info "Uploading environment file #{relative_path}..."
|
65
|
+
upload! file, "#{shared_path}/#{relative_path}"
|
66
|
+
end
|
59
67
|
end
|
60
|
-
}
|
61
68
|
|
62
|
-
|
63
|
-
|
64
|
-
|
69
|
+
info 'uploading absolute path files'
|
70
|
+
absolute_path_files.each do |file|
|
71
|
+
relative_path = file.gsub("#{local_shared_files_path}/.absolute_paths", '')
|
72
|
+
|
73
|
+
debug "Inspecting: #{relative_path}" if fetch(:peppr_debug)
|
74
|
+
|
75
|
+
if File.directory?(file) && relative_path.strip != ''
|
76
|
+
execute :mkdir, '-p', relative_path
|
77
|
+
elsif relative_path.gsub(/\s+/, '') != '' and relative_path != '.' and relative_path != '..'
|
78
|
+
info "Uploading environment file #{relative_path}..."
|
79
|
+
upload! file, relative_path
|
80
|
+
end
|
81
|
+
end
|
82
|
+
else
|
83
|
+
info "The shared files path, #{local_shared_files_path} does not exist."
|
65
84
|
end
|
66
85
|
end
|
67
86
|
end
|
68
87
|
end
|
69
88
|
|
89
|
+
desc 'Delete shared files from remote machine'
|
70
90
|
task :clear_shared_files do
|
71
91
|
on roles(:app) do |host|
|
72
92
|
info "Deleting shared folder ..."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-psw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lexmark International Technology S.A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|