lib/wire/commands/spec_command.rb
# given an appgroup object, this generates spec
# for it.
# params:
# +zone_name+  name of zone (needed for erb context)
# +appgroup_name+  name of appgroup (needed for erb context)
# +appgroup_data+  appgroup details
# rubocop:disable Lint/UnusedMethodArgument   Lint/UselessAssignment
# :reek:UnusedParameters
given an appgroup object, this generates spec
for it.
given an appgroup object this generates spec for it .
def run_on_appgroup_in_zone(zone_name, appgroup_name, appgroup_data)
      $log.debug("Creating specs for appgroup #{appgroup_name}")
      controller_data = appgroup_data[:controller]
      if controller_data[:type] == 'fig'
        figfile_part = controller_data[:file] || "#{zone_name}/fig.yaml"
        figfile = File.join(File.expand_path(@target_dir), figfile_part)
        template = SpecTemplatesContainers.build_template__fig_file_is_valid
        erb = ERB.new(template, nil, '%')
        @spec_code << erb.result(binding)
        template = SpecTemplatesContainers.build_template__fig_containers_are_up
        erb = ERB.new(template, nil, '%')
        @spec_code << erb.result(binding)
      end
      $log.debug("Done for appgroup #{appgroup_name}")
    end
def run_on_appgroup_in_zone ( zone_name , appgroup_name , appgroup_data ) $log . debug ( "Creating specs for appgroup #{appgroup_name}" ) controller_data = appgroup_data [ :controller ] if controller_data [ :type ] == 'fig' figfile_part = controller_data [ :file ] || "#{zone_name}/fig.yaml" figfile = File . join ( File . expand_path ( @target_dir ) , figfile_part ) template = SpecTemplatesContainers . build_template__fig_file_is_valid erb = ERB . new ( template , nil , '%' ) @spec_code << erb . result ( binding ) template = SpecTemplatesContainers . build_template__fig_containers_are_up erb = ERB . new ( template , nil , '%' ) @spec_code << erb . result ( binding ) end $log . debug ( "Done for appgroup #{appgroup_name}" ) end
given an appgroup object, this generates spec
for it.
given an appgroup object this generates spec for it .
# check controller # get fig file name
zone_name
<not_specific>
appgroup_name
<not_specific>
appgroup_data
<not_specific>