Class: Fastlane::ActionCollector
- Inherits:
-
FastlaneCore::ToolCollector
- Object
- FastlaneCore::ToolCollector
- Fastlane::ActionCollector
- Defined in:
- fastlane/lib/fastlane/action_collector.rb
Instance Attribute Summary
Attributes inherited from FastlaneCore::ToolCollector
Class Method Summary collapse
Instance Method Summary collapse
- #determine_version(name) ⇒ Object
-
#is_official?(name) ⇒ Boolean
Is this an official fastlane action, that is bundled with fastlane?.
- #name_to_track(name) ⇒ Object
- #show_message ⇒ Object
Methods inherited from FastlaneCore::ToolCollector
#create_analytic_event_body, #did_crash, #did_finish, #did_launch_action, #did_raise_error, #did_show_message?, #event_for_completion, #event_for_count, #event_for_web_onboarding, #initialize, #launches, #oauth_app_name, #secondary_target_string, #versions
Constructor Details
This class inherits a constructor from FastlaneCore::ToolCollector
Class Method Details
.determine_version(name) ⇒ Object
e.g.
:gym
:xcversion
"fastlane-plugin-my_plugin/xcversion"
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'fastlane/lib/fastlane/action_collector.rb', line 38 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 |
Instance Method Details
#determine_version(name) ⇒ Object
30 31 32 |
# File 'fastlane/lib/fastlane/action_collector.rb', line 30 def determine_version(name) self.class.determine_version(name) end |
#is_official?(name) ⇒ Boolean
Is this an official fastlane action, that is bundled with fastlane?
6 7 8 9 |
# File 'fastlane/lib/fastlane/action_collector.rb', line 6 def is_official?(name) return true if name == :lane_switch Actions.get_all_official_actions.include?(name) end |
#name_to_track(name) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'fastlane/lib/fastlane/action_collector.rb', line 11 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 |
#show_message ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'fastlane/lib/fastlane/action_collector.rb', line 21 def UI.("Sending Crash/Success information. Learn more at https://docs.fastlane.tools/#metrics") UI.("No personal/sensitive data is sent. Only sharing the following:") UI.(launches) UI.(@error) if @error UI.("This information is used to fix failing actions and improve integrations that are often used.") UI.("You can disable this by adding `opt_out_usage` at the top of your Fastfile") end |