Module: Cucumber::Chef::Utility::ChefHelper
- Included in:
- Cucumber::Chef::Utility
- Defined in:
- lib/cucumber/chef/utility/chef_helper.rb
Instance Method Summary collapse
- #chef_identity ⇒ Object
- #chef_pre_11 ⇒ Object
- #chef_repo ⇒ Object
- #chef_user ⇒ Object
- #in_chef_repo? ⇒ Boolean
Instance Method Details
#chef_identity ⇒ Object
45 46 47 48 49 |
# File 'lib/cucumber/chef/utility/chef_helper.rb', line 45 def chef_identity result = File.join(provider_dir, "#{chef_user}.pem") ensure_directory(result) result end |
#chef_pre_11 ⇒ Object
28 29 30 31 |
# File 'lib/cucumber/chef/utility/chef_helper.rb', line 28 def chef_pre_11 return false if (Cucumber::Chef::Config.chef[:version].downcase == "latest") (Cucumber::Chef::Config.chef[:version].to_f < 11.0) end |
#chef_repo ⇒ Object
33 34 35 |
# File 'lib/cucumber/chef/utility/chef_helper.rb', line 33 def chef_repo (Cucumber::Chef.locate_parent(".chef") rescue nil) end |
#chef_user ⇒ Object
41 42 43 |
# File 'lib/cucumber/chef/utility/chef_helper.rb', line 41 def chef_user Cucumber::Chef::Config.user end |
#in_chef_repo? ⇒ Boolean
37 38 39 |
# File 'lib/cucumber/chef/utility/chef_helper.rb', line 37 def in_chef_repo? ((chef_repo && File.exists?(chef_repo) && File.directory?(chef_repo)) ? true : false) end |