updated readme, changelog, gemspec. bumped to 0.1.6

This commit is contained in:
Javan Makhmali 2009-03-05 17:58:23 -08:00
parent c4989147be
commit 841c5a4a4a
4 changed files with 17 additions and 11 deletions

View File

@ -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]

View File

@ -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,21 +72,23 @@ 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
Whenever was created for use at Inkling (http://inklingmarkets.com) where I work. Their take on it: http://blog.inklingmarkets.com/2009/02/whenever-easy-way-to-do-cron-jobs-from.html

View File

@ -2,7 +2,7 @@ module Whenever
module VERSION #:nodoc:
MAJOR = 0
MINOR = 1
TINY = 5
TINY = 6
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@ -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"]