bc-cap-recipes 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Manifest +1 -0
  2. data/bc-cap-recipes.gemspec +1 -1
  3. data/lib/crontab.rb +14 -0
  4. metadata +2 -1
data/Manifest CHANGED
@@ -5,3 +5,4 @@ cap-recipes.gemspec
5
5
  lib/apache.rb
6
6
  lib/base.rb
7
7
  lib/cap-recipes.rb
8
+ lib/crontab.rb
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.description = %q{Common capistrano tasks}
9
9
  s.email = %q{info@byclosure.com}
10
10
  #s.extra_rdoc_files = ["README.rdoc", "lib/uniquify.rb"]
11
- s.files = ["Manifest", "README", "lib/base.rb", "lib/apache.rb", "lib/bc-cap-recipes.rb", "bc-cap-recipes.gemspec"]
11
+ s.files = ["Manifest", "README", "lib/base.rb", "lib/apache.rb", "lib/bc-cap-recipes.rb", "lib/crontab.rb", "bc-cap-recipes.gemspec"]
12
12
  s.has_rdoc = false
13
13
  s.homepage = %q{http://byclosure.com}
14
14
  #s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Uniquify", "--main", "README.rdoc"]
data/lib/crontab.rb ADDED
@@ -0,0 +1,14 @@
1
+ configuration = Capistrano::Configuration.respond_to?(:instance) ?
2
+ Capistrano::Configuration.instance(:must_exist) :
3
+ Capistrano.configuration(:must_exist)
4
+
5
+ configuration.load do
6
+ namespace :crontab do
7
+ desc "Update the crontab file"
8
+ task :update, :roles => :db do
9
+ run "cd #{release_path} && RAILS_ENV=#{rails_env} whenever --update-crontab #{application}"
10
+ end
11
+ end
12
+ # this must be done by hand, because 'whenever' doesn't support all crontab options
13
+ # after "deploy:symlink", "crontab:update"
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bc-cap-recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Byclosure
@@ -27,6 +27,7 @@ files:
27
27
  - lib/base.rb
28
28
  - lib/apache.rb
29
29
  - lib/bc-cap-recipes.rb
30
+ - lib/crontab.rb
30
31
  - bc-cap-recipes.gemspec
31
32
  has_rdoc: true
32
33
  homepage: http://byclosure.com