| 1 |
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) |
| 2 |
|
| 3 |
require "bundler" |
| 4 |
require "thor/rake_compat" |
| 5 |
|
| 6 |
class Default < Thor |
| 7 |
include Thor::RakeCompat |
| 8 |
Bundler::GemHelper.install_tasks |
| 9 |
|
| 10 |
desc "build", "Build thor-#{Thor::VERSION}.gem into the pkg directory" |
| 11 |
def build |
| 12 |
Rake::Task["build"].execute |
| 13 |
end |
| 14 |
|
| 15 |
desc "install", "Build and install thor-#{Thor::VERSION}.gem into system gems" |
| 16 |
def install |
| 17 |
Rake::Task["install"].execute |
| 18 |
end |
| 19 |
|
| 20 |
desc "release", "Create tag v#{Thor::VERSION} and build and push thor-#{Thor::VERSION}.gem to Rubygems" |
| 21 |
def release |
| 22 |
Rake::Task["release"].invoke |
| 23 |
end |
| 24 |
|
| 25 |
desc "spec", "Run RSpec code examples" |
| 26 |
def spec |
| 27 |
exec "bundle exec rspec spec" |
| 28 |
end |
| 29 |
end |