bonethug 0.0.22 → 0.0.23
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.
- data/config/deploy.rb +16 -8
- data/lib/bonethug/installer.rb +1 -1
- data/lib/bonethug/version.rb +1 -1
- metadata +2 -2
data/config/deploy.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# - implement a cleanup task when a deploy fails - its not good if the apache conf gets malformed
|
4
4
|
# - review directory permissions
|
5
5
|
# - passenger executes rails as the user that owns evironment.rb - if root owns it it runs as nobody
|
6
|
+
# - certain parts break if it can't find the config entries - should just check for them and skip if it can't find them
|
6
7
|
|
7
8
|
# Requires
|
8
9
|
# ---------------------------------------------------------------
|
@@ -39,7 +40,7 @@ use_composer = ['silverstripe','silverstripe3','drupal','php'].include? deploy.g
|
|
39
40
|
|
40
41
|
# directories we need to track
|
41
42
|
resources += ['backups']
|
42
|
-
resources.push 'vendor' if use_composer
|
43
|
+
# resources.push 'vendor' if use_composer
|
43
44
|
|
44
45
|
# logs
|
45
46
|
log_dirs.push 'log' unless log_dirs.include? 'log'
|
@@ -124,21 +125,28 @@ task :backup => :environment do
|
|
124
125
|
end
|
125
126
|
|
126
127
|
desc "Syncs files to a location"
|
127
|
-
task :
|
128
|
+
task :sync_from => :environment do
|
128
129
|
if rsync = conf.get('backup.rsync')
|
129
|
-
|
130
|
-
|
131
|
-
queue! %[
|
130
|
+
path = deploy.get('project_slug') + "_" + env + "_sync"
|
131
|
+
ssh_pass = rsync.get('pass') ? "sshpass -p #{rsync.get('pass')}" : ""
|
132
|
+
queue! %[#{ssh_pass} ssh #{rsync.get('user')}@#{rsync.get('host')} mkdir -p #{path}]
|
133
|
+
(resources + log_dirs).each do |item|
|
134
|
+
queue! %[cd #{deploy_to}/current && rsync -r -a -v -e "#{ssh_pass} ssh -l #{rsync.get('user')}" --delete --copy-dirlinks ./#{item} #{rsync.get('host')}:#{path}/]
|
135
|
+
end
|
132
136
|
else
|
133
137
|
raise 'no rsync conf'
|
134
138
|
end
|
135
139
|
end
|
136
140
|
|
137
141
|
desc "Restores files from a location"
|
138
|
-
task :
|
142
|
+
task :sync_to => :environment do
|
139
143
|
if rsync = conf.get('backup.rsync')
|
140
|
-
path = deploy.get('project_slug') + "_" + env + "
|
141
|
-
|
144
|
+
path = deploy.get('project_slug') + "_" + env + "_sync"
|
145
|
+
ssh_pass = rsync.get('pass') ? "sshpass -p #{rsync.get('pass')}" : ""
|
146
|
+
queue! %[#{ssh_pass} ssh #{rsync.get('user')}@#{rsync.get('host')} mkdir -p #{path}]
|
147
|
+
(resources + log_dirs).each do |item|
|
148
|
+
queue! %[cd #{deploy_to}/current && rsync -r -a -v -e "#{ssh_pass} ssh -l #{rsync.get('user')}" --delete --copy-dirlinks #{rsync.get('host')}:#{path}/#{item} ./]
|
149
|
+
end
|
142
150
|
else
|
143
151
|
raise 'no rsync conf'
|
144
152
|
end
|
data/lib/bonethug/installer.rb
CHANGED
data/lib/bonethug/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonethug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
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: 2013-09-
|
12
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|