Adding a Gem Package rake (rake package) task, along with rake install (to install the gem after building)
This commit is contained in:
parent
abd19f7b68
commit
c3e34fc989
11
Rakefile
11
Rakefile
|
@ -35,7 +35,7 @@ spec = Gem::Specification.new do |s|
|
|||
end
|
||||
|
||||
|
||||
desc "create .gemspec file (useful for github)"
|
||||
desc "Create .gemspec file (useful for github)"
|
||||
task :gemspec do
|
||||
filename = "#{spec.name}.gemspec"
|
||||
File.open(filename, "w") do |f|
|
||||
|
@ -43,6 +43,15 @@ task :gemspec do
|
|||
end
|
||||
end
|
||||
|
||||
Rake::GemPackageTask.new(spec) do |pkg|
|
||||
pkg.gem_spec = spec
|
||||
end
|
||||
|
||||
desc "Install the gem locally"
|
||||
task :install => [:package] do
|
||||
sh %{sudo gem install pkg/couchrest-#{CouchRest::VERSION}}
|
||||
end
|
||||
|
||||
desc "Run all specs"
|
||||
Spec::Rake::SpecTask.new('spec') do |t|
|
||||
t.spec_files = FileList['spec/**/*_spec.rb']
|
||||
|
|
Loading…
Reference in a new issue