lib/gemfury/tasks/release.rake in gemfury-0.4.17 vs lib/gemfury/tasks/release.rake in gemfury-0.4.18
- old
+ new
@@ -1,6 +1,6 @@
-require 'rubygems/builder'
+require 'rubygems/package'
require 'gemfury'
require 'gemfury/command'
namespace 'fury' do
desc "Build gem and push it to Gemfury"
@@ -11,10 +11,17 @@
if gemspec.nil? || !File.exist?(gemspec)
puts "No gemspec found"
else
puts "Building #{File.basename(gemspec)}"
spec = Gem::Specification.load(gemspec)
- Gem::Builder.new(spec).build
+
+ if Gem::Package.respond_to?(:build)
+ Gem::Package.build(spec)
+ else
+ require 'rubygems/builder'
+ Gem::Builder.new(spec).build
+ end
+
gemfile = File.basename(spec.cache_file)
Gemfury::Command::App.start(['push', gemfile])
end
end
end
\ No newline at end of file