Got rid of already initialized constant warning. Improved version code. Improved test load paths. Bumped to 0.1.2

This commit is contained in:
Javan Makhmali 2009-02-16 18:32:55 -08:00
parent d56719658d
commit bf9fb1d6c1
14 changed files with 36 additions and 21 deletions

View File

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

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.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).

View File

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

View File

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

View File

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

9
lib/version.rb Normal file
View File

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

View File

@ -14,7 +14,6 @@ unless defined?(Whenever)
rescue LoadError => e
nil
end
end

View File

@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
class CronTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
class OutputCommandTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
class OutputEnvTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
class OutputRakeTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
class OutputRunnerTest < Test::Unit::TestCase

View File

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

View File

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