From 2a89d79a2835120e1ed37238cd0d4302b2e7bad8 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Sun, 6 Mar 2011 21:32:49 -0500 Subject: [PATCH] Ditched Jeweler in favor of a self-managed gemspec with the Bundler helpers. --- Gemfile | 4 ++ Rakefile | 36 +++----------- lib/whenever/command_line.rb | 2 +- lib/whenever/version.rb | 4 +- whenever.gemspec | 95 ++++++------------------------------ 5 files changed, 29 insertions(+), 112 deletions(-) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..dfefa4c --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "http://rubygems.org" + +# Specify your gem's dependencies in newever.gemspec +gemspec \ No newline at end of file diff --git a/Rakefile b/Rakefile index 445b1ef..6578157 100644 --- a/Rakefile +++ b/Rakefile @@ -1,35 +1,11 @@ -require 'rubygems' -require 'rake' - -require File.expand_path(File.dirname(__FILE__) + "/lib/whenever/version") - -begin - require 'jeweler' - Jeweler::Tasks.new do |gemspec| - gemspec.name = "whenever" - gemspec.version = Whenever::VERSION - gemspec.summary = "Write your cron jobs in ruby." - gemspec.description = "Clean ruby syntax for writing and deploying cron jobs." - gemspec.email = "javan@javan.us" - gemspec.homepage = "http://github.com/javan/whenever" - gemspec.authors = ["Javan Makhmali"] - gemspec.add_dependency 'aaronh-chronic', '>= 0.3.9' - gemspec.add_dependency 'activesupport', '>= 2.3.4' - gemspec.add_development_dependency 'shoulda', '>= 2.1.1' - gemspec.add_development_dependency 'mocha', '>= 0.9.5' - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org" -end +require 'bundler' +Bundler::GemHelper.install_tasks require 'rake/testtask' Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/{functional,unit}/**/*_test.rb' - test.verbose = true - end - -task :test => :check_dependencies + test.libs << 'lib' << 'test' + test.pattern = 'test/{functional,unit}/**/*_test.rb' + test.verbose = true +end task :default => :test \ No newline at end of file diff --git a/lib/whenever/command_line.rb b/lib/whenever/command_line.rb index bae7aa7..d098f32 100644 --- a/lib/whenever/command_line.rb +++ b/lib/whenever/command_line.rb @@ -39,7 +39,7 @@ module Whenever write_crontab(whenever_cron) else puts Whenever.cron(@options) - puts "[message] Above your schedule file converted to cron syntax; your crontab file was not updated." + puts "[message] Above is your schedule file converted to cron syntax; your crontab file was not updated." puts "[message] Run `whenever --help' for more options." exit(0) end diff --git a/lib/whenever/version.rb b/lib/whenever/version.rb index 6faf6a1..b4a419e 100644 --- a/lib/whenever/version.rb +++ b/lib/whenever/version.rb @@ -1,3 +1,3 @@ module Whenever - VERSION = '0.6.2' -end unless defined?(Whenever::VERSION) \ No newline at end of file + VERSION = '0.6.5' +end \ No newline at end of file diff --git a/whenever.gemspec b/whenever.gemspec index f566780..da4dfd2 100644 --- a/whenever.gemspec +++ b/whenever.gemspec @@ -1,85 +1,22 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command # -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +require "whenever/version" Gem::Specification.new do |s| - s.name = %q{whenever} - s.version = "0.6.2" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Javan Makhmali"] - s.date = %q{2010-10-26} + s.name = "whenever" + s.version = Whenever::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["Javan Makhmali"] + s.email = ["javan@javan.us"] + s.homepage = "" + s.summary = %q{Cron jobs in ruby.} s.description = %q{Clean ruby syntax for writing and deploying cron jobs.} - s.email = %q{javan@javan.us} - s.executables = ["whenever", "wheneverize"] - s.extra_rdoc_files = [ - "README.md" - ] - s.files = [ - ".gitignore", - "CHANGELOG.md", - "README.md", - "Rakefile", - "bin/whenever", - "bin/wheneverize", - "lib/whenever.rb", - "lib/whenever/capistrano.rb", - "lib/whenever/command_line.rb", - "lib/whenever/cron.rb", - "lib/whenever/job.rb", - "lib/whenever/job_list.rb", - "lib/whenever/output_redirection.rb", - "lib/whenever/setup.rb", - "lib/whenever/version.rb", - "test/functional/command_line_test.rb", - "test/functional/output_at_test.rb", - "test/functional/output_default_defined_jobs_test.rb", - "test/functional/output_defined_job_test.rb", - "test/functional/output_env_test.rb", - "test/functional/output_redirection_test.rb", - "test/test_helper.rb", - "test/unit/cron_test.rb", - "test/unit/job_test.rb", - "whenever.gemspec" - ] - s.homepage = %q{http://github.com/javan/whenever} - s.rdoc_options = ["--charset=UTF-8"] + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- test/{functional,unit}/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.rubygems_version = %q{1.3.7} - s.summary = %q{Write your cron jobs in ruby.} - s.test_files = [ - "test/functional/command_line_test.rb", - "test/functional/output_at_test.rb", - "test/functional/output_default_defined_jobs_test.rb", - "test/functional/output_defined_job_test.rb", - "test/functional/output_env_test.rb", - "test/functional/output_redirection_test.rb", - "test/test_helper.rb", - "test/unit/cron_test.rb", - "test/unit/job_test.rb" - ] - - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, [">= 0.3.9"]) - s.add_runtime_dependency(%q, [">= 2.3.4"]) - s.add_development_dependency(%q, [">= 2.1.1"]) - s.add_development_dependency(%q, [">= 0.9.5"]) - else - s.add_dependency(%q, [">= 0.3.9"]) - s.add_dependency(%q, [">= 2.3.4"]) - s.add_dependency(%q, [">= 2.1.1"]) - s.add_dependency(%q, [">= 0.9.5"]) - end - else - s.add_dependency(%q, [">= 0.3.9"]) - s.add_dependency(%q, [">= 2.3.4"]) - s.add_dependency(%q, [">= 2.1.1"]) - s.add_dependency(%q, [">= 0.9.5"]) - end + s.add_runtime_dependency(%q, [">= 0.3.9"]) + s.add_runtime_dependency(%q, [">= 2.3.4"]) + s.add_development_dependency(%q, [">= 2.1.1"]) + s.add_development_dependency(%q, [">= 0.9.5"]) end -