bonethug 0.0.71 → 0.0.72

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -188,7 +188,7 @@ backup.*
188
188
 
189
189
 
190
190
 
191
- **Trigger a Sync to or from the Remote Sync Location**
191
+ **Trigger a Sync to or from the Remote Sync Backup Location**
192
192
 
193
193
  *This wraps mina and runs rsync on the remote server. It uses the info defined
194
194
  in the local copy of config/cnf.yml under backup.rsync. If you have already set
@@ -199,12 +199,33 @@ as it keeps the password out of the log files.*
199
199
  BE CAREFUL USING SYNC-TO - if there are no files in the source location it will
200
200
  wipe the files from your deploy copy.
201
201
 
202
- `thug sync-from {develoment|staging|production}`
202
+ `thug sync-backup-from {develoment|staging|production}`
203
203
 
204
- `thug sync-to {develoment|staging|production}`
204
+ `thug sync-backup-to {develoment|staging|production}`
205
205
 
206
206
 
207
207
 
208
+ **Trigger an application state sync from one environment to another**
209
+
210
+
211
+ *Sync local application state from another application environment*
212
+
213
+ `thug sync-local-from {local-environment} {environment-to-pull-data-from}`
214
+
215
+ *Sync another application's state in another environment to the local application state*
216
+
217
+ `thug sync-local-to {local-environment} {environment-to-push-data-to}`
218
+
219
+
220
+ *Sync remote application state with the application state environment - this wraps mina to trigger the sync actions above on a remote server*
221
+
222
+ `thug sync-remote-from {environment-to-pull-data-from} {environment-to-push-data-to}`
223
+
224
+ *Sync another application's state in another environment to the local application state*
225
+
226
+ `thug sync-backup-to {environment-to-push-data-to} {environment-to-pull-data-from}`
227
+
228
+
208
229
  Example Workflow
209
230
  ----------------
210
231
 
data/config/deploy.rb CHANGED
@@ -30,7 +30,10 @@ cnf = conf.to_hash
30
30
 
31
31
  # pull config from environment vars
32
32
  env = ENV['to']
33
- raise 'could not find deployment environment' unless conf.get('deploy.environments').has_key? env
33
+ unless conf.get('deploy.environments').has_key? env
34
+ puts'could not find deployment environment'
35
+ exit
36
+ end
34
37
 
35
38
  # build config
36
39
  deploy = conf.node_merge('deploy.common','deploy.environments.'+env)
@@ -178,11 +181,27 @@ end
178
181
 
179
182
  desc "Syncs application state between two remote environments"
180
183
  task :sync_remote_from => :environment do
184
+
185
+ remote_env = ENV['remote_env']
186
+
187
+ unless conf.get('deploy.environments').has_key? remote_env
188
+ puts 'could not find remote deployment environment'
189
+ exit
190
+ end
191
+
181
192
  queue! %[cd #{deploy_to}/current && bundle exec thug sync-local-from #{env} #{remote_env}]
182
193
  end
183
194
 
184
195
  desc "Syncs application state between two remote environments"
185
196
  task :sync_remote_to => :environment do
197
+
198
+ remote_env = ENV['remote_env']
199
+
200
+ unless conf.get('deploy.environments').has_key? remote_env
201
+ puts 'could not find remote deployment environment'
202
+ exit
203
+ end
204
+
186
205
  queue! %[cd #{deploy_to}/current && bundle exec thug sync-local-to #{env} #{remote_env}]
187
206
  end
188
207
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bonethug
3
- VERSION = "0.0.71"
4
- BUILD_DATE = "2014-03-17 12:30:16 +1300"
3
+ VERSION = "0.0.72"
4
+ BUILD_DATE = "2014-03-17 13:01:51 +1300"
5
5
  end
6
6
 
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.71
4
+ version: 0.0.72
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: 2014-03-16 00:00:00.000000000 Z
12
+ date: 2014-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -505,7 +505,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
505
505
  version: '0'
506
506
  segments:
507
507
  - 0
508
- hash: -3367511845365029782
508
+ hash: 2332034097731833014
509
509
  required_rubygems_version: !ruby/object:Gem::Requirement
510
510
  none: false
511
511
  requirements:
@@ -514,7 +514,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
514
514
  version: '0'
515
515
  segments:
516
516
  - 0
517
- hash: -3367511845365029782
517
+ hash: 2332034097731833014
518
518
  requirements: []
519
519
  rubyforge_project:
520
520
  rubygems_version: 1.8.23