Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Tasks.unless_installing_dependencies

  • Loading branch information...
commit 07d17d66f1bd11029b3ef0cadcbd3c1eafd8f250 1 parent 359e3f7
Nikolai Weibull authored
View
8 Rakefile
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-require 'lookout/rake-3.0'
-
$:.unshift File.expand_path('../lib', __FILE__)
require 'inventory/rake-1.0'
@@ -10,4 +8,8 @@ Inventory::Rake::Tasks.define Inventory::Rake::Version, :gem => proc{ |_, s|
s.email = 'now@bitwi.se'
s.homepage = 'https://github.com/now/inventory-rake'
}
-Lookout::Rake::Tasks::Test.new
+
+Inventory::Rake::Tasks.unless_installing_dependencies do
+ require 'lookout/rake-3.0'
+ Lookout::Rake::Tasks::Test.new
+end
View
8 lib/inventory/rake/tasks.rb
@@ -15,5 +15,13 @@ def define(inventory, options = {})
Inventory.new(:inventory => inventory)
Gem.new(:inventory => inventory, &(options.fetch(:gem, proc{ })))
end
+
+ def unless_installing_dependencies
+ yield if (%w'deps:install
+ deps:install:user
+ gem:deps:install
+ gem:deps:install:user' &
+ Rake.application.top_level_tasks).empty?
+ end
end
end
View
4 lib/inventory/rake/version.rb
@@ -3,9 +3,11 @@
require 'inventory-1.0'
module Inventory::Rake
- Version = Inventory.new(1, 2, 0){
+ Version = Inventory.new(1, 3, 0){
def dependencies
super + Inventory::Dependencies.new{
+ development 'lookout', 3, 0, 0
+ development 'lookout-rake', 3, 0, 0
optional 'rake', 0, 9, 2
}
end
Please sign in to comment.
Something went wrong with that request. Please try again.