capistrano-psw 1.0.0.pre17 → 1.0.0.pre18

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: 3f3a1a48b849ee4b1ec7e83e1b23dcbd132f88a9
4
- data.tar.gz: 3ee950684c97c014ce7660b6e073416a3b731d23
3
+ metadata.gz: 7015a11ed484a4b7291d6c12efe3d95c8bd15d62
4
+ data.tar.gz: 6633aae1170116ab9b986f9be8d9a78455e3ef51
5
5
  SHA512:
6
- metadata.gz: 53522940a4d83dccaf8f0b18a3ec8c765d16687334d45502273acb9919f88861e5cff7d9b588aac0671a6b96d666b652781f1eff2ab502c883fa982fbf91c7f1
7
- data.tar.gz: c55b21be245f5bf7dbe371db20a406c8104b944f707e7916f14fa8a18bbb0ab8ce0b2ac1e9e61b3a82cdb5259d67febfea8a57c92bbf530aded39361ce621a3a
6
+ metadata.gz: 0af75761d384b3c30c56a4a4bc893e8d3fdeeac0e18fbcb37c80bfc2e44170559e6750481a533001dbddd088424b53e6d332c09d6ab3c03e32509ab87f8cdf0a
7
+ data.tar.gz: 7d11466a59e3393029d8c0f9526955e435d16c635a56e34d98aa0ff3958bb0ce16dea12ea709c984cc01fb612ac22057b5181a76d36fcd33b211975ac1cb7c87
@@ -11,6 +11,7 @@
11
11
  module PepprAppDeployFileUtils
12
12
  PEPPR_RELATIVE_LOG_DIR = "/log"
13
13
  PEPPR_RELATIVE_SRC_DIR = "/source"
14
+ PEPPR_RELATIVE_SRC_MIRROR_DIR = "/source-mirror"
14
15
  PEPPR_RELATIVE_SCRIPTS_DIR = "/scripts"
15
16
  PEPPR_RELATIVE_TMP_DIR = "/tmp"
16
17
  PEPPR_RELATIVE_ENVIRONMENTS_DIR = "/environments"
@@ -26,6 +27,7 @@ module PepprAppDeployFileUtils
26
27
  info "Creating deployment directories on locally..."
27
28
  execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_log_dir
28
29
  execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_src_dir
30
+ execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_src_mirror_dir
29
31
  execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_scripts_dir
30
32
  execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_tmp_dir
31
33
  execute :mkdir, '-p', PepprAppDeployFileUtils::Local::get_deployment_environments_dir
@@ -52,6 +54,13 @@ module PepprAppDeployFileUtils
52
54
  PepprAppDeployFileUtils::Local::get_deployment_dir(PEPPR_RELATIVE_SRC_DIR)
53
55
  end
54
56
 
57
+ # Method for retrieving the Peppr application deployment source directory
58
+ #
59
+ # @return [String] the fully-qualified local source mirror directory
60
+ def self.get_deployment_src_mirror_dir
61
+ PepprAppDeployFileUtils::Local::get_deployment_dir(PEPPR_RELATIVE_SRC_MIRROR_DIR)
62
+ end
63
+
55
64
  # Method for retrieving the Peppr application deployment temp directory
56
65
  #
57
66
  # @return [String] the fully-qualified local temp directory
@@ -96,6 +105,7 @@ module PepprAppDeployFileUtils
96
105
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_dir
97
106
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_log_dir
98
107
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_src_dir
108
+ execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_src_mirror_dir
99
109
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_scripts_dir
100
110
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_tmp_dir
101
111
  execute :mkdir, '-p', PepprAppDeployFileUtils::Remote::get_deployment_environments_dir
@@ -124,10 +134,10 @@ module PepprAppDeployFileUtils
124
134
 
125
135
  # Method for retrieving the Peppr application deployment source directory
126
136
  #
127
- # @return [String] the fully-qualified remote source directory
128
- def self.get_deployment_src_dir_as_file
129
- "file://#{PepprAppDeployFileUtils::Remote::get_deployment_dir(PEPPR_RELATIVE_SRC_DIR)}"
130
- end
137
+ # @return [String] the fully-qualified local source mirror directory
138
+ def self.get_deployment_src_mirror_dir
139
+ PepprAppDeployFileUtils::Remote::get_deployment_dir(PEPPR_RELATIVE_SRC_MIRROR_DIR)
140
+ end
131
141
 
132
142
  # Method for retrieving the Peppr application deployment temp directory
133
143
  #
@@ -10,6 +10,6 @@
10
10
 
11
11
  module Capistrano
12
12
  module Psw
13
- VERSION = "1.0.0.pre17"
13
+ VERSION = "1.0.0.pre18"
14
14
  end
15
15
  end
@@ -54,8 +54,8 @@ namespace :psw_peppr_app_deploy do
54
54
  desc 'Upload application source repository to remote server'
55
55
  task :upload_app_source_repo do
56
56
  on roles(:all) do |host|
57
- local_src_dir = PepprAppDeployFileUtils::Local::get_deployment_src_dir
58
- remote_src_dir = PepprAppDeployFileUtils::Remote::get_deployment_src_dir
57
+ local_src_dir = PepprAppDeployFileUtils::Local::get_deployment_src_mirror_dir
58
+ remote_src_dir = PepprAppDeployFileUtils::Remote::get_deployment_src_mirror_dir
59
59
 
60
60
  info "Uploading #{local_src_dir} (local) to #{remote_src_dir} on remote server #{host}..."
61
61
  PepprAppDeployFileUtils::upload_compressed_local_dir(local_src_dir, remote_src_dir)
@@ -109,7 +109,15 @@ namespace :psw_peppr_app_deploy do
109
109
  end
110
110
  end
111
111
 
112
+ desc 'Remove existing Capistrano source repo'
113
+ task :remove_existing_source_repo do
114
+ on roles(:all) do |host|
115
+ info "Removing existing Capistrano repo (#{fetch(:repo_path)}), in order to update to the new source mirror location (#{fetch(:repo_url)})..."
116
+ execute :rm, '-rf', "#{fetch(:repo_path)}"
117
+ end
118
+ end
119
+
112
120
  desc "Deploy private repository to remote server(s)"
113
- task default: [:'create_deployment_directories', :'upload_app_source_repo', :'upload_environment_files'] do
114
- end
121
+ task default: [:'create_deployment_directories', :'upload_app_source_repo', :'upload_environment_files', :'remove_existing_source_repo'] do
122
+ end
115
123
  end
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.pre17
4
+ version: 1.0.0.pre18
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-03-05 00:00:00.000000000 Z
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler