Class: StashKnifePlugin::StashProjects
- Inherits:
-
BaseStashCommand
- Object
- Chef::Knife
- BaseStashCommand
- StashKnifePlugin::StashProjects
- Defined in:
- lib/chef/knife/stash_projects.rb
Instance Method Summary collapse
Methods inherited from BaseStashCommand
#display_stash_error, #get_all_values, get_common_options, #get_config, #get_repo_https_url, #get_repo_ssh_url, #get_stash_connection
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/chef/knife/stash_projects.rb', line 17 def run stash = get_stash_connection url = "projects" response = stash.get url if response.success? get_all_values stash,url,response do |values| values.each do |project| ui.info "#{project['key']}: #{project['name']}" end end else display_stash_error "Could not list Stash projects!", response exit 1 end end |