Class: Fhcap::CLI::Cli

Inherits:
ThorBase show all
Defined in:
lib/fhcap/cli.rb

Instance Attribute Summary

Attributes inherited from ThorBase

#config, #thor

Instance Method Summary collapse

Methods inherited from ThorBase

add_shared_option, chef_server_names, cluster_template_names, config_key_collection, exit_on_failure?, #initialize, provider_names, provider_names_for, repo_names, run_cmd, run_knife_cmd, shared_options

Methods included from ReposHelper

#find_cluster, #find_cluster_pwds, #find_cluster_pwds_with_repo, #find_cluster_with_repo, #find_data_bag, #find_data_bag_item, #find_environment, #find_repo_item, #find_role, #get_cookbook_deps, #get_cookbook_meta, #get_cookbook_versions, #get_cookbooks, #get_dirty_cookbooks, #get_entry_dependencies, #get_modified_cookbooks, #git_diff, #is_dirty?, #modified?, #repo_cfg, #repo_clusters_dir, #repo_cookbook_paths, #repo_dir, #repo_names, #repo_paths, #repos_config, #repos_dir, #run_inside_repo_dir

Methods included from ProvidersHelper

#provider_availability_zones, #provider_config, #provider_credentials, #provider_for, #provider_names, #provider_names_for, #provider_regions, #provider_type, #providers_config

Methods included from Thor::Actions

#run

Constructor Details

This class inherits a constructor from Fhcap::ThorBase

Instance Method Details

#cleanObject



37
38
39
40
# File 'lib/fhcap/cli.rb', line 37

def clean
  require "fhcap/tasks/clean"
  Tasks::Clean.new(task_options(options.dup)).run
end

#infoObject



44
45
46
47
48
49
# File 'lib/fhcap/cli.rb', line 44

def info
  say "Config file: #{config.config_file}", :green
  Fhcap::CLI::Repo.new.invoke(:list)
  Fhcap::CLI::Provider.new.invoke(:list)
  Fhcap::CLI::Knife.new.invoke(:list)
end

#setupObject



30
31
32
33
# File 'lib/fhcap/cli.rb', line 30

def setup
  require "fhcap/tasks/setup"
  Tasks::Setup.new(task_options(options.dup)).run
end

#versionObject



79
80
81
# File 'lib/fhcap/cli.rb', line 79

def version
  puts "FHCAP Cli version #{Fhcap::VERSION}"
end