diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index d67eb20..7867a97 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -1,9 +1,13 @@ -== 0.1.1 / February 16th, 2009 +== 0.1.2 / February 16th, 2009 * Added 'rake' helper for defining scheduled rake tasks. [Javan Makhmali] * Renamed :cron_environment and :cron_path to :enviroment and :path for better (word) compatibility with rake tasks. [Javan Makhmali] +* Improved test load paths so tests can be run individually. [Javan Makhmali] + +* Got rid of already initialized constant warning. [Javan Makhmali] + == 0.1.0 / February 15th, 2009 diff --git a/README.rdoc b/README.rdoc index 58ce563..52f7b32 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.1' :source => 'http://gems.github.com' + config.gem 'javan-whenever', :lib => false, :version => '>= 0.1.2' :source => 'http://gems.github.com' end To install this gem (and all other missing gem dependencies), run rake gems:install (use sudo if necessary). diff --git a/Rakefile b/Rakefile index 50ca4c2..8974076 100644 --- a/Rakefile +++ b/Rakefile @@ -1,14 +1,16 @@ +require './lib/version' + require 'rubygems' require 'rake' require 'echoe' -require 'lib/base' -Echoe.new('whenever', Whenever::VERSION) do |p| - p.description = "Provides (clean) ruby syntax for defining (messy) cron jobs and running them Whenever." +WHENEVER_VERSION = Whenever::VERSION::STRING.dup + +Echoe.new('whenever', WHENEVER_VERSION) do |p| + p.changelog = "CHANGELOG.rdoc" + p.description = "Provides clean ruby syntax for defining messy cron jobs and running them Whenever." p.url = "http://github.com/javan/whenever" p.author = "Javan Makhmali" p.email = "javan@javan.us" p.dependencies = ["chronic", "activesupport"] - p.ignore_pattern = ["tmp/*", "script/*"] - p.development_dependencies = [] end \ No newline at end of file diff --git a/bin/whenever b/bin/whenever index 4e8b733..141f17c 100644 --- a/bin/whenever +++ b/bin/whenever @@ -9,7 +9,7 @@ task = "whenever:output_cron" OptionParser.new do |opts| opts.banner = "Usage: whenever [options]" opts.on('-c', '--write-crontab') { task = "whenever:write_cron" } - opts.on('-v', '--version') { puts "Whenever v#{Whenever::VERSION}"; exit } + opts.on('-v', '--version') { puts "Whenever v#{WHENEVER_VERSION}"; exit } end.parse! Rake::Task[task].invoke \ No newline at end of file diff --git a/lib/base.rb b/lib/base.rb index f6a13d7..d68f51f 100644 --- a/lib/base.rb +++ b/lib/base.rb @@ -1,5 +1,4 @@ module Whenever - VERSION = '0.1.1' def self.cron(options) Whenever::JobList.new(options).generate_cron_output @@ -12,4 +11,5 @@ module Whenever ::RAILS_ROOT end end + end \ No newline at end of file diff --git a/lib/version.rb b/lib/version.rb new file mode 100644 index 0000000..34278ab --- /dev/null +++ b/lib/version.rb @@ -0,0 +1,9 @@ +module Whenever + module VERSION #:nodoc: + MAJOR = 0 + MINOR = 1 + TINY = 2 + + STRING = [MAJOR, MINOR, TINY].join('.') + end +end \ No newline at end of file diff --git a/lib/whenever.rb b/lib/whenever.rb index 6d2cb28..35dea3d 100644 --- a/lib/whenever.rb +++ b/lib/whenever.rb @@ -14,7 +14,6 @@ unless defined?(Whenever) rescue LoadError => e nil end - end diff --git a/test/cron_test.rb b/test/cron_test.rb index e8e3a33..d9b99ca 100644 --- a/test/cron_test.rb +++ b/test/cron_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require File.expand_path(File.dirname(__FILE__) + "/test_helper") class CronTest < Test::Unit::TestCase diff --git a/test/output_command_test.rb b/test/output_command_test.rb index 35ad617..413d5be 100644 --- a/test/output_command_test.rb +++ b/test/output_command_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require File.expand_path(File.dirname(__FILE__) + "/test_helper") class OutputCommandTest < Test::Unit::TestCase diff --git a/test/output_env_test.rb b/test/output_env_test.rb index 1c643f4..997c53c 100644 --- a/test/output_env_test.rb +++ b/test/output_env_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require File.expand_path(File.dirname(__FILE__) + "/test_helper") class OutputEnvTest < Test::Unit::TestCase diff --git a/test/output_rake_test.rb b/test/output_rake_test.rb index 4e56d5f..e1a1767 100644 --- a/test/output_rake_test.rb +++ b/test/output_rake_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require File.expand_path(File.dirname(__FILE__) + "/test_helper") class OutputRakeTest < Test::Unit::TestCase diff --git a/test/output_runner_test.rb b/test/output_runner_test.rb index 3acc17d..70dfbd6 100644 --- a/test/output_runner_test.rb +++ b/test/output_runner_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require File.expand_path(File.dirname(__FILE__) + "/test_helper") class OutputRunnerTest < Test::Unit::TestCase diff --git a/test/test_helper.rb b/test/test_helper.rb index 1f0db0e..04128f5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,8 @@ require 'rubygems' require 'test/unit' +require File.expand_path(File.dirname(__FILE__) + "/../lib/whenever") + begin require 'shoulda' rescue LoadError @@ -17,7 +19,6 @@ rescue LoadError exit(1) end -require 'whenever' module TestExtensions diff --git a/whenever.gemspec b/whenever.gemspec index 5f5cd3b..faf1aa6 100644 --- a/whenever.gemspec +++ b/whenever.gemspec @@ -2,23 +2,23 @@ Gem::Specification.new do |s| s.name = %q{whenever} - s.version = "0.1.1" + s.version = "0.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= s.authors = ["Javan Makhmali"] s.date = %q{2009-02-16} - s.description = %q{Provides (clean) ruby syntax for defining (messy) cron jobs and running them Whenever.} + s.description = %q{Provides clean ruby syntax for defining messy cron jobs and running them Whenever.} s.email = %q{javan@javan.us} s.executables = ["whenever", "wheneverize"] - s.extra_rdoc_files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/tasks/whenever.rake", "lib/whenever.rb", "README.rdoc"] - s.files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/tasks/whenever.rake", "lib/whenever.rb", "Manifest", "Rakefile", "README.rdoc", "test/cron_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb", "whenever.gemspec"] + s.extra_rdoc_files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/tasks/whenever.rake", "lib/version.rb", "lib/whenever.rb", "README.rdoc"] + s.files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/tasks/whenever.rake", "lib/version.rb", "lib/whenever.rb", "Manifest", "Rakefile", "README.rdoc", "test/cron_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb", "whenever.gemspec"] s.has_rdoc = true s.homepage = %q{http://github.com/javan/whenever} s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Whenever", "--main", "README.rdoc"] s.require_paths = ["lib"] s.rubyforge_project = %q{whenever} s.rubygems_version = %q{1.3.1} - s.summary = %q{Provides (clean) ruby syntax for defining (messy) cron jobs and running them Whenever.} + s.summary = %q{Provides clean ruby syntax for defining messy cron jobs and running them Whenever.} s.test_files = ["test/cron_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb"] if s.respond_to? :specification_version then