Sha256: cf4520274cf67a72d97e9ceee778c783c88bed56416898f787b37e41905f656f

Contents?: true

Size: 880 Bytes

Versions: 23

Compression:

Stored size: 880 Bytes

Contents

# encoding: utf-8

module FIR
  module Info

    def info(*args, options)
      file_path = File.absolute_path(args.first.to_s)
      is_all    = !options[:all].blank?

      check_file_exist file_path
      check_supported_file file_path

      file_type = File.extname(file_path).delete('.')

      logger.info "Analyzing #{file_type} file......"
      logger_info_dividing_line

      app_info = send("#{file_type}_info", file_path, full_info: is_all)
      app_info.each { |k, v| logger.info "#{k}: #{v}" }

      logger_info_blank_line
    end

    def ipa_info(ipa_path, options = {})
      ipa  = FIR::Parser::Ipa.new(ipa_path)
      app  = ipa.app
      info = app.full_info(options)
      ipa.cleanup
      info
    end

    def apk_info(apk_path, options = {})
      apk  = FIR::Parser::Apk.new(apk_path)
      info = apk.full_info(options)
      info
    end
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
fir-cli-xsl-2.0.3 lib/fir/util/info.rb
fir-cli-xsl-2.0.2 lib/fir/util/info.rb
fir-cli-1.7.4.1 lib/fir/util/info.rb
fir-cli-1.7.4 lib/fir/util/info.rb
fir-cli-1.7.3 lib/fir/util/info.rb
fir-cli-xsl-2.0.1 lib/fir/util/info.rb
fir-cli-xsl-2.0.0 lib/fir/util/info.rb
fir-cli-xsl-1.0.4 lib/fir/util/info.rb
fir-cli-x-1.7.2.1 lib/fir/util/info.rb
fir-cli-1.7.2 lib/fir/util/info.rb
fir-cli-1.7.1 lib/fir/util/info.rb
fir-cli-1.7.0 lib/fir/util/info.rb
fir-cli-1.6.13 lib/fir/util/info.rb
fir-cli-1.6.12 lib/fir/util/info.rb
fir-cli-1.6.11 lib/fir/util/info.rb
fir-cli-1.6.10 lib/fir/util/info.rb
fir-cli-1.6.9 lib/fir/util/info.rb
fir-cli-1.6.8 lib/fir/util/info.rb
fir-cli-1.6.7.beta lib/fir/util/info.rb
fir-cli-1.6.7.alpha lib/fir/util/info.rb