oneblackbear-obbistrano 1.0.12 → 1.0.13

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.
@@ -1,17 +1,10 @@
1
1
  Capistrano::Configuration(:must_exist).load do
2
2
 
3
- desc "Setup Application Config"
3
+ #### Performs the initial setup for tasks ####
4
4
  task :config_setup do
5
- # options = YAML.load(File.read("config.yml"))
6
- # set :working_server, h rescue nil
7
- # set :working_app, a rescue nil
8
5
  set :root_pass, root rescue nil
9
6
  end
10
- #
11
- # task :config_write do
12
- # File.open('config.yml', 'w') { |f| f.puts options.to_yaml }
13
- # #puts "Hello I'm about to mangle your config file"
14
- # end
7
+
15
8
 
16
9
  namespace :slicehost do
17
10
 
@@ -67,39 +60,6 @@ Capistrano::Configuration(:must_exist).load do
67
60
 
68
61
  end
69
62
 
70
-
71
-
72
-
73
- namespace :host do
74
-
75
- desc "Checks we have information to proceed with server operations"
76
- task :config_check do
77
- config_setup
78
- "#{working_server}" rescue @parent.logger.log 0,"You need to specify a host to run the operation on. Use cap task -s h=yourhost"
79
- @use_applications = [ ]
80
- options["apps"].each do |app, settings|
81
- @use_applications << app if settings["server"]==working_server
82
- end
83
- end
84
-
85
-
86
- desc "Performs a local backup of the applications and databases on the server"
87
- task :backup do
88
- config_check
89
- @use_applications.each do |app|
90
- set :working_app, app
91
- @parent.app.backup
92
- end
93
- end
94
-
95
- desc "Backs up the local backup folder to remote Amazon S3 storage"
96
- task :s3backup do
97
- config_check
98
- end
99
-
100
-
101
-
102
- end
103
63
 
104
64
  namespace :app do
105
65
 
@@ -170,6 +130,7 @@ Capistrano::Configuration(:must_exist).load do
170
130
  run "cd wax && git pull origin master"
171
131
  end
172
132
  run "cd wax && git checkout #{phpwax}"
133
+ run "cd wax && git pull origin #{phpwax}"
173
134
  end
174
135
 
175
136
  ####### ##############
@@ -218,7 +179,6 @@ Capistrano::Configuration(:must_exist).load do
218
179
  upload_only_backup
219
180
  end
220
181
  else
221
- puts "No repository for #{application}"
222
182
  standard_mysql_backup
223
183
  simple_fs_backup
224
184
  end
@@ -401,6 +361,23 @@ Capistrano::Configuration(:must_exist).load do
401
361
  end
402
362
 
403
363
  end
364
+
365
+ task :crontab_configuration do
366
+ # setup crontab file
367
+ crontab_file = render :template => <<-EOF
368
+ # WARNING: this file has been automatically setup by the Capistrano script
369
+
370
+ # this task will run every hour:
371
+ # * */1 * * * root ruby #{deploy_to}/current/script/runner -e production 'Class.method(example)'
372
+ EOF
373
+
374
+ put crontab_file, "#{deploy_to}/crontab_setup"
375
+
376
+ # deploy it by copying over one that exists
377
+ run "crontab ./crontab_setup"
378
+
379
+ end
380
+
404
381
 
405
382
  # =============================================================================
406
383
  # +MIGRATING+ APPLICATIONS
data/obbistrano.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{obbistrano}
5
- s.version = "1.0.12"
5
+ s.version = "1.0.13"
6
6
  s.authors = ["Ross Riley", "One Black Bear"]
7
7
  s.date = Time.now
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneblackbear-obbistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-03-16 00:00:00 -07:00
13
+ date: 2009-04-02 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency