Permalink
Browse files

clean up pom, Rakefilem gemspec

  • Loading branch information...
1 parent 99d6a83 commit 5fd87b04da3f0e997e8ce4f1faf7a913fc13900d @mkristian committed Jul 29, 2010
Showing with 18 additions and 24 deletions.
  1. +5 −3 Rakefile
  2. +0 −9 gemspec_to_pom.rb
  3. +6 −12 pom.xml
  4. +7 −0 rack-datamapper.gemspec
View
@@ -13,20 +13,22 @@ task :clean do
FileUtils.rm_rf(build_dir)
end
-desc 'package as a gem.'
+desc 'Package as a gem.'
task :package do
require 'fileutils'
gemspec = Dir['*.gemspec'].first
- sh "gem build #{gemspec}"
+ Kernel.system("#{RUBY} -S gem build #{gemspec}")
FileUtils.mkdir_p(build_dir)
gem = Dir['*.gem'].first
FileUtils.mv(gem, File.join(build_dir,"#{gem}"))
+ puts File.join(build_dir,"#{gem}")
end
desc 'Install the package as a gem.'
task :install => [:package] do
gem = Dir[File.join(build_dir, '*.gem')].first
- sh "gem install --local #{gem} --no-ri --no-rdoc"
+ extra = ENV['GEM_HOME'].nil? && ENV['GEM_PATH'].nil? ? "--user-install" : ""
+ Kernel.system("#{RUBY} -S gem install --local #{gem} --no-ri --no-rdoc #{extra}")
end
desc 'Run specifications'
View
@@ -1,9 +0,0 @@
-#!/bin/ruby
-require 'rubygems'
-
-raise "needs rubygems version >=1.3.6" if Gem::VERSION < "1.3.6"
-load '../jruby-maven-plugins/gem-proxy/src/main/resources/gem_artifacts.rb'
-m = Maven::LocalRepository.new
-File.open("pom.xml", "w") do |f|
- f << m.to_pomxml('rack_datamapper.gemspec')
-end
View
18 pom.xml
@@ -92,20 +92,14 @@
<version>${jruby.plugins.version}</version>
<extensions>true</extensions>
<configuration>
+ <date>2010-06-13</date>
+ <extraRdocFiles>History.txt,README.txt</extraRdocFiles>
+ <rdocOptions>--main,README.txt</rdocOptions>
+ <rubyforgeProject>rack-datamapper</rubyforgeProject>
+ <extraFiles>Rakefile</extraFiles>
<gemspecOverwrite>true</gemspecOverwrite>
</configuration>
- <executions>
- <execution>
- <id>gemspec</id>
- <goals><goal>package</goal></goals>
- <configuration>
- <date>2010-06-13</date>
- <extraRdocFiles>History.txt,README.txt</extraRdocFiles>
- <rdocOptions>--main,README.txt</rdocOptions>
- <rubyforgeProject>rack-datamapper</rubyforgeProject>
- <extra_files>Rakefile</extra_files>
- </configuration>
- </execution>
+ <executions>
<execution>
<id>version</id>
<phase>compile</phase>
View
@@ -12,6 +12,13 @@ Gem::Specification.new do |s|
s.files = Dir['MIT-LICENSE']
s.licenses << 'MIT-LICENSE'
+ s.date = '2010-06-13'
+ s.rubyforge_project = 'rack-datamapper'
+ s.files += Dir['History.txt']
+ s.files += Dir['README.txt']
+ s.extra_rdoc_files = ['History.txt','README.txt']
+ s.files += Dir['Rakefile']
+ s.rdoc_options = ['--main','README.txt']
s.files += Dir['lib/**/*']
s.files += Dir['spec/**/*']
s.test_files += Dir['spec/**/*_spec.rb']

0 comments on commit 5fd87b0

Please sign in to comment.