Moved gemspec from Rakefile to separate file
This commit is contained in:
parent
dd1bf6c797
commit
4cd559cd43
46
Rakefile
46
Rakefile
@ -6,37 +6,6 @@ require 'rake/testtask'
|
||||
require 'rake/gempackagetask'
|
||||
require 'rake/contrib/rubyforgepublisher'
|
||||
|
||||
GEM = "mongo"
|
||||
GEM_VERSION = '0.1.2'
|
||||
SUMMARY = 'Simple pure-Ruby driver for the 10gen Mongo DB'
|
||||
DESCRIPTION = 'This is a simple pure-Ruby driver for the 10gen Mongo DB. For more information about Mongo, see http://www.mongodb.org.'
|
||||
AUTHOR = 'Jim Menard'
|
||||
EMAIL = 'jimm@io.com'
|
||||
HOMEPAGE = 'http://www.mongodb.org'
|
||||
RUBYFORGE_USER = 'jimm'
|
||||
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = GEM
|
||||
s.version = GEM_VERSION
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.summary = SUMMARY
|
||||
s.description = DESCRIPTION
|
||||
|
||||
s.require_paths = ['lib']
|
||||
|
||||
s.files = FileList['bin/*', 'lib/**/*.rb', 'tests/**/*.rb', '[A-Z]*'].to_a
|
||||
|
||||
s.bindir = 'bin'
|
||||
s.executables = %w( mongo_console )
|
||||
s.has_rdoc = true
|
||||
|
||||
s.author = AUTHOR
|
||||
s.email = EMAIL
|
||||
s.homepage = HOMEPAGE
|
||||
|
||||
s.rubyforge_project = GEM # GitHub bug, gem isn't being build when this miss
|
||||
end
|
||||
|
||||
# NOTE: some of the tests assume Mongo is running
|
||||
Rake::TestTask.new do |t|
|
||||
t.test_files = FileList['tests/test*.rb']
|
||||
@ -67,25 +36,14 @@ end
|
||||
|
||||
namespace :gem do
|
||||
|
||||
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/#{GEM}-#{GEM_VERSION}}
|
||||
sh %{sudo gem install mongo-ruby-driver.gemspec}
|
||||
end
|
||||
|
||||
desc "Install the gem locally with ruby 1.9"
|
||||
task :'install19' => [:package] do
|
||||
sh %{sudo gem19 install pkg/#{GEM}-#{GEM_VERSION}}
|
||||
end
|
||||
|
||||
desc "Create a gemspec file"
|
||||
task :make_spec do
|
||||
File.open("#{GEM}.gemspec", "w") do |file|
|
||||
file.puts spec.to_ruby
|
||||
end
|
||||
sh %{sudo gem19 install mongo-ruby-driver.gemspec}
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user