lib/wire/model/appgroup_validation.rb
# ensures that all application groups have a known controller
ensures that all application groups have a known controller
ensures that all application groups have a known controller
def controllers_valid?
      @project.get_element('appgroups').each do |appgroup_name, appgroup_data|
        controller_data = appgroup_data[:controller]
        type = 'appgroup'
        name = appgroup_name
        if !controller_data
          mark('Appgroup is not attached to a zone', type, name)
        else
          type = controller_data[:type]
          mark('Appgroup controller does not have a type', type, name) unless type && type.size > 0
          known_types = %w(fig)
          mark('Appgroup controller has an unkown type (#{type})',
               type, name) unless known_types.include?(type)
        end
      end
    end
def controllers_valid? @project . get_element ( 'appgroups' ) . each do | appgroup_name , appgroup_data | controller_data = appgroup_data [ :controller ] type = 'appgroup' name = appgroup_name if ! controller_data mark ( 'Appgroup is not attached to a zone' , type , name ) else type = controller_data [ :type ] mark ( 'Appgroup controller does not have a type' , type , name ) unless type && type . size > 0 known_types = %w( fig ) mark ( 'Appgroup controller has an unkown type (#{type})' , type , name ) unless known_types . include? ( type ) end end end
ensures that all application groups have a known controller
ensures that all application groups have a known controller