Skip to content

Commit

Permalink
Updated gem:create task for Rubygems 2.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
djberg96 committed Oct 9, 2014
1 parent e0603c1 commit 6ef4e48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Rakefile
Expand Up @@ -8,13 +8,18 @@ namespace :gem do
desc 'Build the notation gem'
task :create => [:clean] do
spec = eval(IO.read('notation.gemspec'))
Gem::Builder.new(spec).build
if Gem::VERSION.to_f < 2.0
Gem::Builder.new(spec).build
else
require 'rubygems/package'
Gem::Package.build(spec)
end
end

desc 'Install the notation library as a gem'
task :install => [:create] do
file = Dir["*.gem"].first
sh "gem install #{file}"
sh "gem install -l #{file}"
end
end

Expand Down

0 comments on commit 6ef4e48

Please sign in to comment.