Class: Composer::Verify::Config
- Inherits:
-
Object
- Object
- Composer::Verify::Config
- Defined in:
- lib/composer/verify/config.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Config
constructor
A new instance of Config.
- #verify_heirloom ⇒ Object
- #verify_simple_deploy ⇒ Object
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_heirloom ⇒ Object
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_deploy ⇒ Object
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 |