Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Handle categories not used
Browse files Browse the repository at this point in the history
  • Loading branch information
danmcp committed Sep 17, 2013
1 parent 76c72f6 commit a256f66
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions controller/app/models/application.rb
Expand Up @@ -2672,7 +2672,11 @@ def calculate_configure_order(comp_specs)

# enforce system order of components (web_framework first etc)
system_order = []
['web_framework','service','plugin'].each { |c| categories[c].each { |ci| system_order << ci if ci and not system_order.include?(ci) } }
['web_framework','service','plugin'].each { |c|
if categories[c]
categories[c].each { |ci| system_order << ci if ci and not system_order.include?(ci) }
end
}
configure_order.add_component_order(system_order)

#calculate configure order using tsort
Expand Down Expand Up @@ -2728,7 +2732,11 @@ def calculate_component_orders

# enforce system order of components (web_framework first etc)
system_order = []
['web_framework','service','plugin'].each { |c| categories[c].each { |ci| system_order << ci if ci and not system_order.include?(ci) } }
['web_framework','service','plugin'].each { |c|
if categories[c]
categories[c].each { |ci| system_order << ci if ci and not system_order.include?(ci) }
end
}
start_order.add_component_order(system_order)
stop_order.add_component_order(system_order.dup)

Expand Down

0 comments on commit a256f66

Please sign in to comment.