Sha256: 27dd6dbb13c56e2f0f42cf2a2808e49d1c94f5dfba4927855a51d462f7fc53ae

Contents?: true

Size: 677 Bytes

Versions: 1

Compression:

Stored size: 677 Bytes

Contents

module Deliver
  class DetectValues
    def run!(options)
      find_app(options)
      find_folders(options)
    end

    def find_app(options)
      search_by = options[:app_identifier]
      search_by = options[:app] if search_by.to_s.length == 0
      options[:app] = Spaceship::Application.find(search_by)
    end

    def find_folders(options)
      containing = Helper.fastlane_enabled? ? './fastlane' : '.'
      options[:screenshots_path] ||= File.join(containing, 'screenshots')
      options[:metadata_path] ||= File.join(containing, 'metadata')

      FileUtils.mkdir_p(options[:screenshots_path])
      FileUtils.mkdir_p(options[:metadata_path])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deliver-1.0.0.beta3 lib/deliver/detect_values.rb