Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (31 sloc) 0.782 kb
require 'rake'
require 'fileutils'
def gemspec
@gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec')
end
desc "Build the gem"
task :gem=>:gemspec do
sh "gem build .gemspec"
FileUtils.mkdir_p 'pkg'
FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
end
desc "Install the gem locally"
task :install => :gem do
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
end
desc "Generate the gemspec"
task :generate do
puts gemspec.to_ruby
end
desc "Validate the gemspec"
task :gemspec do
gemspec.validate
end
desc 'Run tests'
task :test do |t|
# workaround jruby 1.6.7 bug
sh 'bundle exec ruby -Ilib spec/runner_spec.rb'
# ENV['RUBYLIB'] = ['lib', ENV['RUBYLIB']].compact.join(':')
# sh 'testrb spec/*_spec.rb'
end
task :default => :test
Jump to Line
Something went wrong with that request. Please try again.