Sha256: d77e3e2426c5620b7416339b39125bf5e950533e61b7ddcb85917ff755bb07c9

Contents?: true

Size: 1.78 KB

Versions: 136

Compression:

Stored size: 1.78 KB

Contents

require 'fastlane_core/tool_collector'

module Fastlane
  class ActionCollector < FastlaneCore::ToolCollector
    # Is this an official fastlane action, that is bundled with fastlane?
    def is_official?(name)
      return true if name == :lane_switch
      Actions.get_all_official_actions.include?(name)
    end

    def name_to_track(name)
      return name if is_official?(name)

      Fastlane.plugin_manager.plugin_references.each do |plugin_name, value|
        return "#{plugin_name}/#{name}" if value[:actions].include?(name)
      end

      return nil
    end

    def show_message
      UI.message("Sending Crash/Success information. More information on: https://github.com/fastlane/enhancer")
      UI.message("No personal/sensitive data is sent. Only sharing the following:")
      UI.message(launches)
      UI.message(@error) if @error
      UI.message("This information is used to fix failing actions and improve integrations that are often used.")
      UI.message("You can disable this by adding `opt_out_usage` to your Fastfile")
    end

    def determine_version(name)
      self.class.determine_version(name)
    end

    # e.g.
    #   :gym
    #   :xcversion
    #   "fastlane-plugin-my_plugin/xcversion"
    def self.determine_version(name)
      result = super(name)
      return result if result

      if name.to_s.include?(PluginManager.plugin_prefix)
        # That's an action from a plugin, we need to fetch its version number
        begin
          plugin_name = name.split("/").first.gsub(PluginManager.plugin_prefix, '')
          return Fastlane.const_get(plugin_name.fastlane_class)::VERSION
        rescue => ex
          UI.verbose(ex)
          return "undefined"
        end
      end

      return Fastlane::VERSION # that's the case for all built-in actions
    end
  end
end

Version data entries

136 entries across 136 versions & 1 rubygems

Version Path
fastlane-2.29.0.beta.20170508010014 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170507010054 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170506010047 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.9 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170505010029 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170504010033 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.8 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170503010035 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170502010055 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170501010050 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170430010051 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.7 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170429010036 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.6 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170428010037 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170427010043 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.5 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170426010043 fastlane/lib/fastlane/action_collector.rb
fastlane-2.28.4 fastlane/lib/fastlane/action_collector.rb
fastlane-2.29.0.beta.20170425010038 fastlane/lib/fastlane/action_collector.rb