Class: Composer::Verify::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/composer/verify/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Config

Returns a new instance of Config.



4
5
6
7
# File 'lib/composer/verify/config.rb', line 4

def initialize(args)
  @config = args[:config]
  @logger = @config.logger
end

Instance Method Details

#verify_heirloomObject



9
10
11
12
13
# File 'lib/composer/verify/config.rb', line 9

def verify_heirloom
  if File.exists? "#{ENV['HOME']}/.heirloom.yml"
    raise HeirloomConfigExists.new "#{ENV['HOME']}/.heirloom.yml already exists."
  end
end

#verify_simple_deployObject



15
16
17
18
19
# File 'lib/composer/verify/config.rb', line 15

def verify_simple_deploy
  if File.exists? "#{ENV['HOME']}/.simple_deploy.yml"
    raise SimpleDeployConfigExists.new "#{ENV['HOME']}/.simple_deploy.yml already exists."
  end
end