Skip to content

Commit

Permalink
Got rid of already initialized constant warning. Improved version cod…
Browse files Browse the repository at this point in the history
…e. Improved test load paths. Bumped to 0.1.2
  • Loading branch information
javan committed Feb 17, 2009
1 parent d567196 commit bf9fb1d
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 21 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rdoc
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
12 changes: 7 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
p.dependencies = ["chronic", "activesupport"]
p.ignore_pattern = ["tmp/*", "script/*"]
p.development_dependencies = []
end
2 changes: 1 addition & 1 deletion bin/whenever
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/base.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Whenever
VERSION = '0.1.1'

def self.cron(options)
Whenever::JobList.new(options).generate_cron_output
Expand All @@ -12,4 +11,5 @@ def self.path
::RAILS_ROOT
end
end

end
9 changes: 9 additions & 0 deletions lib/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Whenever
module VERSION #:nodoc:
MAJOR = 0
MINOR = 1
TINY = 2

STRING = [MAJOR, MINOR, TINY].join('.')
end
end
1 change: 0 additions & 1 deletion lib/whenever.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
rescue LoadError => e
nil
end

end


Expand Down
2 changes: 1 addition & 1 deletion test/cron_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class CronTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/output_command_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class OutputCommandTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/output_env_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class OutputEnvTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/output_rake_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class OutputRakeTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/output_runner_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class OutputRunnerTest < Test::Unit::TestCase

Expand Down
3 changes: 2 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'rubygems'
require 'test/unit'

require File.expand_path(File.dirname(__FILE__) + "/../lib/whenever")

begin
require 'shoulda'
rescue LoadError
Expand All @@ -17,7 +19,6 @@
exit(1)
end

require 'whenever'

module TestExtensions

Expand Down
10 changes: 5 additions & 5 deletions whenever.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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{[email protected]}
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
Expand Down

0 comments on commit bf9fb1d

Please sign in to comment.