Module: Fig::Command::Action::Role::ListWalkingDependencyTree
- Included in:
- ListDependencies::AllConfigs, ListDependencies::Default, ListDependencies::Graphviz, ListDependencies::GraphvizAllConfigs, ListDependencies::JSON, ListDependencies::JSONAllConfigs, ListDependencies::Tree, ListDependencies::TreeAllConfigs, ListDependencies::YAML, ListDependencies::YAMLAllConfigs, ListVariables::AllConfigs, ListVariables::Graphviz, ListVariables::GraphvizAllConfigs, ListVariables::JSON, ListVariables::JSONAllConfigs, ListVariables::Tree, ListVariables::TreeAllConfigs, ListVariables::YAML, ListVariables::YAMLAllConfigs
- Defined in:
- lib/fig/command/action/role/list_walking_dependency_tree.rb
Instance Method Summary collapse
- #configure(options) ⇒ Object
- #gather_package_dependency_configurations ⇒ Object
- #modifies_repository? ⇒ Boolean
- #walk_dependency_tree(base_package, config_names, include_block = nil, &package_block) ⇒ Object
Instance Method Details
#configure(options) ⇒ Object
28 29 30 |
# File 'lib/fig/command/action/role/list_walking_dependency_tree.rb', line 28 def configure() @descriptor = .descriptor end |
#gather_package_dependency_configurations ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/fig/command/action/role/list_walking_dependency_tree.rb', line 32 def gather_package_dependency_configurations() packages = {} starting_config_names = base_display_config_names() base_package = @execution_context.base_package if ! base_package.name.nil? packages[base_package] = starting_config_names.to_set end do_walk_dependency_tree(base_package, starting_config_names, nil, 0, nil) do |package, config_name, depth| if ( ! package.name.nil? \ && ! ( ! list_all_configs? \ && @descriptor \ && package.name == @descriptor.name ) ) packages[package] ||= Set.new packages[package] << config_name end end if ! list_all_configs? && @descriptor packages.reject! do |package, config_names| package.name == @descriptor.name end end return packages end |
#modifies_repository? ⇒ Boolean
14 15 16 |
# File 'lib/fig/command/action/role/list_walking_dependency_tree.rb', line 14 def modifies_repository?() return false end |
#walk_dependency_tree(base_package, config_names, include_block = nil, &package_block) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/fig/command/action/role/list_walking_dependency_tree.rb', line 18 def walk_dependency_tree( base_package, config_names, include_block = nil, &package_block ) do_walk_dependency_tree( base_package, config_names, nil, 0, include_block, &package_block ) return end |