Skip to content

Commit

Permalink
Use bundler gem tasks instead of custom tasks.
Browse files Browse the repository at this point in the history
rake release was raising 'Circular dependency detected' errors.
  • Loading branch information
bethesque committed Mar 20, 2015
1 parent 089ea55 commit f87b53b
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions Rakefile
@@ -1,5 +1,4 @@
require 'rubygems'
require 'rubygems/package_task'
require "bundler/gem_tasks"

begin
require 'yard'
Expand All @@ -11,26 +10,12 @@ begin
rescue LoadError
end

def gemspec
$webmachine_gemspec ||= Gem::Specification.load("webmachine.gemspec")
desc "Validate the gemspec file."
task :validate_gemspec do
Gem::Specification.load("webmachine.gemspec").validate
end

Gem::PackageTask.new(gemspec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end

task :gem => :gemspec

desc %{Validate the gemspec file.}
task :gemspec do
gemspec.validate
end

desc %{Release the gem to RubyGems.org}
task :release => :gem do
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
end
task :build => :validate_gemspec

desc "Cleans up white space in source files"
task :clean_whitespace do
Expand Down

0 comments on commit f87b53b

Please sign in to comment.