deliver/lib/deliver/upload_metadata.rb
# Loads the metadata files and stores them into the options object
Loads the metadata files and stores them into the options object
Loads the metadata files and stores them into the options object
def load_from_filesystem(options)
      return if options[:skip_metadata]
      Loader.language_folders(options[:metadata_path]).each do |lng_folder|
        language = File.basename(lng_folder)
        (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
          path = File.join(lng_folder, "#{key}.txt")
          next unless File.exist?(path)
          UI.message("Loading '#{path}'...")
          options[key] ||= {}
          options[key][language] ||= File.read(path)
        end
      end
      (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES).each do |key|
        path = File.join(options[:metadata_path], "#{key}.txt")
        next unless File.exist?(path)
        UI.message("Loading '#{path}'...")
        options[key] ||= File.read(path)
      end
      options[:trade_representative_contact_information] ||= {}
      TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.values.each do |option_name|
        path = File.join(options[:metadata_path], TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR, "#{option_name}.txt")
        next unless File.exist?(path)
        next if options[:trade_representative_contact_information][option_name].to_s.length > 0
        UI.message("Loading '#{path}'...")
        options[:trade_representative_contact_information][option_name] ||= File.read(path)
      end
      options[:app_review_information] ||= {}
      REVIEW_INFORMATION_VALUES.values.each do |option_name|
        path = File.join(options[:metadata_path], REVIEW_INFORMATION_DIR, "#{option_name}.txt")
        next unless File.exist?(path)
        next if options[:app_review_information][option_name].to_s.length > 0
        UI.message("Loading '#{path}'...")
        options[:app_review_information][option_name] ||= File.read(path)
      end
    end
def load_from_filesystem ( options ) return if options [ :skip_metadata ] Loader . language_folders ( options [ :metadata_path ] ) . each do | lng_folder | language = File . basename ( lng_folder ) ( LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES ) . each do | key | path = File . join ( lng_folder , "#{key}.txt" ) next unless File . exist? ( path ) UI . message ( "Loading '#{path}'..." ) options [ key ] ||= { } options [ key ] [ language ] ||= File . read ( path ) end end ( NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES ) . each do | key | path = File . join ( options [ :metadata_path ] , "#{key}.txt" ) next unless File . exist? ( path ) UI . message ( "Loading '#{path}'..." ) options [ key ] ||= File . read ( path ) end options [ :trade_representative_contact_information ] ||= { } TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES . values . each do | option_name | path = File . join ( options [ :metadata_path ] , TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR , "#{option_name}.txt" ) next unless File . exist? ( path ) next if options [ :trade_representative_contact_information ] [ option_name ] . to_s . length > 0 UI . message ( "Loading '#{path}'..." ) options [ :trade_representative_contact_information ] [ option_name ] ||= File . read ( path ) end options [ :app_review_information ] ||= { } REVIEW_INFORMATION_VALUES . values . each do | option_name | path = File . join ( options [ :metadata_path ] , REVIEW_INFORMATION_DIR , "#{option_name}.txt" ) next unless File . exist? ( path ) next if options [ :app_review_information ] [ option_name ] . to_s . length > 0 UI . message ( "Loading '#{path}'..." ) options [ :app_review_information ] [ option_name ] ||= File . read ( path ) end end
Loads the metadata files and stores them into the options object
Loads the metadata files and stores them into the options object
# Load localised data # Load non localised data # Load trade representative contact information # Load review information
options
<not_specific>