Rakefile in jdbc-derby-10.6.2.1-java vs Rakefile in jdbc-derby-10.8.2.2

- old
+ new

@@ -1,29 +1,18 @@ -MANIFEST = FileList["Manifest.txt", "Rakefile", "README.txt", "LICENSE.txt", "lib/**/*"] +require 'bundler/gem_helper' -file "Manifest.txt" => :manifest -task :manifest do - File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} } +name = Dir["*.gemspec"].first.sub('.gemspec', '') +gem_helper = Bundler::GemHelper.new(Dir.pwd, name) +def gem_helper.version_tag + "#{name}-#{version}" # override "v#{version}" end -Rake::Task['manifest'].invoke # Always regen manifest, so Hoe has up-to-date list of files -$LOAD_PATH << "lib" -require "jdbc/derby" -begin - require 'hoe' - Hoe.plugin :gemcutter - Hoe.spec("jdbc-derby") do |p| - p.version = Jdbc::Derby::VERSION - p.spec_extras[:platform] = Gem::Platform.new("java") - p.rubyforge_name = "jruby-extras" - p.url = "http://jruby-extras.rubyforge.org/ActiveRecord-JDBC" - p.author = "Nick Sieger, Ola Bini and JRuby contributors" - p.email = "nick@nicksieger.com, ola.bini@gmail.com" - p.summary = "Derby/JavaDB JDBC driver for Java and Derby/ActiveRecord-JDBC." - p.changes = "Updated to Derby version #{Jdbc::Derby::VERSION}." - p.description = "Install this gem and require 'derby' within JRuby to load the driver." - end.spec.dependencies.delete_if { |dep| dep.name == "hoe" } -rescue LoadError - puts "You really need Hoe installed to be able to package this gem" -rescue => e - puts "ignoring error while loading hoe: #{e.to_s}" -end +version = gem_helper.send(:version) +version_tag = gem_helper.version_tag +desc "Build #{name}-#{version}.gem into the pkg directory" +task('build') { gem_helper.build_gem } + +desc "Build and install #{name}-#{version}.gem into system gems" +task('install') { gem_helper.install_gem } + +desc "Create tag #{version_tag} build and push #{name}-#{version}.gem to Rubygems" +task('release') { gem_helper.release_gem }