From 841c5a4a4a13cb0f2ea81fe4817246eef33f1c7d Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Thu, 5 Mar 2009 17:58:23 -0800 Subject: [PATCH] updated readme, changelog, gemspec. bumped to 0.1.6 --- CHANGELOG.rdoc | 4 ++++ README.rdoc | 20 +++++++++++--------- lib/version.rb | 2 +- whenever.gemspec | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index aa29b12..3b29c76 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -1,3 +1,7 @@ +== 0.1.6 / March 5th, 2009 + +* Added ability to update the crontab file non-destuctively instead of only overwriting it. [Javan Makhmali -- Inspired by code submitted individually from: Tien Dung (tiendung), Tom Lea (cwninja), Kyle Maxwell (fizx), and Andrew Timberlake (andrewtimberlake) on github] + == 0.1.5 / February 19th, 2009 * Fixed load path so Whenever's files don't conflict with anything in Rails. Thanks Ryan Koopmans. [Javan Makhmali] diff --git a/README.rdoc b/README.rdoc index 6cea64c..7172332 100644 --- a/README.rdoc +++ b/README.rdoc @@ -14,7 +14,7 @@ In a Rails (2.1 or greater) application: in your "config/environment.rb" file: Rails::Initializer.run do |config| - config.gem 'javan-whenever', :lib => false, :version => '>= 0.1.5' :source => 'http://gems.github.com' + config.gem 'javan-whenever', :lib => false, :version => '>= 0.1.6' :source => 'http://gems.github.com' end To install this gem (and all other missing gem dependencies), run rake gems:install (use sudo if necessary). @@ -72,20 +72,22 @@ And you'll see your schedule.rb converted to cron sytax == Capistrano integration -in your "config/deploy.rb" file do something like: +In your "config/deploy.rb" file do something like: - after "deploy:symlink", "deploy:write_crontab" + after "deploy:symlink", "deploy:update_crontab" namespace :deploy do - desc "write the crontab file" - task :write_crontab, :roles => :app do - run "cd #{release_path} && whenever --write-crontab" + desc "Update the crontab file" + task :update_crontab, :roles => :db do + run "cd #{release_path} && whenever --update-crontab" end end - + +This will update your crontab file, leaving any existing entries unharmed. When using the "--update-crontab" option, Whenever will only update the entries in your crontab file related to the current schedule.rb file. This means you can use Whenever to deploy any number of apps to the same server and have them share a single crontab file peacefully. + +If you wish to simply overwrite your crontab file each time you deploy, use the "--write-crontab" option. This is ideal if you are only working with one app and every crontab entry is contained in a single schedule.rb file. + By mixing and matching the "--load-file" and "--user" options with your various :roles in Capistrano it is entirely possible to deploy different crontab schedules under different users to all your various servers. Get creative! - -USING THE "--write-crontab" OPTION WILL COMPLETELY OVERWRITE ANY EXISTING CRONTAB ENTRIES! == Credit diff --git a/lib/version.rb b/lib/version.rb index 7f618f7..e70d2be 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -2,7 +2,7 @@ module Whenever module VERSION #:nodoc: MAJOR = 0 MINOR = 1 - TINY = 5 + TINY = 6 STRING = [MAJOR, MINOR, TINY].join('.') end diff --git a/whenever.gemspec b/whenever.gemspec index 165a4f8..75f4c38 100644 --- a/whenever.gemspec +++ b/whenever.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{whenever} - s.version = "0.1.5" + s.version = "0.1.6" s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= s.authors = ["Javan Makhmali"]