Rakefile in static-0.1.3 vs Rakefile in static-1.0.0

- old
+ new

@@ -1,15 +1,44 @@ -# -*- ruby -*- +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib')) -require 'rubygems' -require 'hoe' -require './lib/static.rb' +require "rake" +require 'rake/clean' +require "static/version" -Hoe.new('static', Static::VERSION) do |p| - p.rubyforge_name = 'static' - # p.summary = 'FIX' - # p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n") - # p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1] - p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") +task :default => :build + +desc "Run specs" +task :spec => ["bundler:install", "test:spec"] + +task :build do + sh "gem build static.gemspec" end -# vim: syntax=Ruby +task :install => :build do + sh "gem install --local static-#{Static::Cmd::VERSION}.gem" +end + +task :uninstall do + sh "gem uninstall static" +end + +task :reinstall => [:uninstall, :install] + +task :release => :build do + sh "gem push static-#{Static::Cmd::VERSION}.gem" +end + +namespace "bundler" do + task "install" do + sh("bundle install") + end +end + +namespace "test" do + task "spec" do |t| + sh("cd spec && bundle exec rake spec") + end +end + +CLEAN.include [ + '.bundle', 'Gemfile.lock', '*.gem' +]