Implement `has_env' condition keyword
This commit is contained in:
@@ -16,6 +16,8 @@ module Producer
|
||||
end
|
||||
end
|
||||
|
||||
define_test :has_env, Tests::HasEnv
|
||||
|
||||
attr_accessor :tests
|
||||
|
||||
def initialize(env, &block)
|
||||
|
11
lib/producer/core/tests/has_env.rb
Normal file
11
lib/producer/core/tests/has_env.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module Producer
|
||||
module Core
|
||||
class Tests
|
||||
class HasEnv < Test
|
||||
def success?
|
||||
env.remote.environment.has_key? arguments.first.to_s.upcase
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user