provider/core.rb
# rubocop:disable Metrics/MethodLength
# Generates all 6 network data files for a object.
# This includes all combinations of seeds [0-2] and title == / != name
# Each data file is a YAML file with all properties possible on an object.
#
# @config.test_data lists all files that are written by hand and will not
# be generated.
#
# Requires:
#  object: The Api::Resource used as basis for the network data.
#  data: A hash with values:
#    output_folder: root folder for generated module
disable Metrics/MethodLength
Generates all 6 network data files for a object.
This includes all combinations of seeds [0-2] and title == / != name
Each data file is a YAML file with all properties possible on an object.
disable Metrics / MethodLength Generates all 6 network data files for a object . This includes all combinations of seeds [ 0 - 2 ] and title == / ! = name Each data file is a YAML file with all properties possible on an object .
def generate_network_datas(data, object)
      target_folder = File.join(data[:output_folder],
                                'spec', 'data', 'network', object.out_name)
      FileUtils.mkpath target_folder
      manual = list_manual_network_data
      3.times.each do |id|
        %w[name title].each do |name|
          out_file = File.join(target_folder, "success#{id + 1}~#{name}.yaml")
          next if manual.include? out_file
          next if true?(Google::HashUtils.navigate(data[:config], %w[manual]))
          generate_network_data data.clone.merge(
            out_file: File.join(target_folder, "success#{id + 1}~#{name}.yaml"),
            id: id,
            title: name,
            object: object
          )
        end
      end
    end
def generate_network_datas ( data , object ) target_folder = File . join ( data [ :output_folder ] , 'spec' , 'data' , 'network' , object . out_name ) FileUtils . mkpath target_folder manual = list_manual_network_data 3 . times . each do | id | %w[ name title ] . each do | name | out_file = File . join ( target_folder , "success#{id + 1}~#{name}.yaml" ) next if manual . include? out_file next if true? ( Google :: HashUtils . navigate ( data [ :config ] , %w[ manual ] ) ) generate_network_data data . clone . merge ( out_file : File . join ( target_folder , "success#{id + 1}~#{name}.yaml" ) , id : id , title : name , object : object ) end end end
rubocop:disable Metrics/MethodLength
Generates all 6 network data files for a object.
rubocop : disable Metrics / MethodLength Generates all 6 network data files for a object .
# Create list of compiled network data
data
<not_specific>
object
<not_specific>
config.test_data
lists all files that are written by hand and will not be generated. Requires: object: The Api::Resource used as basis for the network data. data: A hash with values: output_folder: root folder for generated module
lists all files that are written by hand and will not be generated . Requires : object : The Api :: Resource used as basis for the network data . data : A hash with values : output_folder : root folder for generated module