Rakefile in timeliness-0.2.0 vs Rakefile in timeliness-0.3.0

- old
+ new

@@ -1,31 +1,12 @@ require 'rubygems' require 'rake/rdoctask' -require 'rake/gempackagetask' require 'rubygems/specification' require 'rspec/core/rake_task' -require 'lib/timeliness/version' GEM_NAME = "timeliness" -GEM_VERSION = Timeliness::VERSION -spec = Gem::Specification.new do |s| - s.name = GEM_NAME - s.version = GEM_VERSION - s.platform = Gem::Platform::RUBY - s.rubyforge_project = "timeliness" - s.has_rdoc = true - s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc"] - s.summary = %q{Control time (parsing), quickly.} - s.description = %q{Fast date/time parser with customisable formats and I18n support.} - s.author = "Adam Meehan" - s.email = "adam.meehan@gmail.com" - s.homepage = "http://github.com/adzap/timeliness" - s.require_path = 'lib' - s.files = %w(timeliness.gemspec LICENSE CHANGELOG.rdoc README.rdoc Rakefile) + Dir.glob("{lib,spec}/**/*") -end - desc 'Default: run specs.' task :default => :spec desc "Run specs" RSpec::Core::RakeTask.new do |t| @@ -45,20 +26,9 @@ rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README') rdoc.rdoc_files.include('lib/**/*.rb') end -Rake::GemPackageTask.new(spec) do |pkg| - pkg.gem_spec = spec -end - -desc "Install the gem locally" -task :install => [:package] do - sh %{gem install pkg/#{GEM_NAME}-#{GEM_VERSION}} -end - desc "Create a gemspec file" -task :make_spec do - File.open("#{GEM_NAME}.gemspec", "w") do |file| - file.puts spec.to_ruby - end +task :build do + `gem build #{GEM_NAME}.gemspec` end