Class: Fastlane::Actions::ToolOpenFinderAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



19
20
21
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 19

def self.authors
  ["GJ"]
end

.available_optionsObject



32
33
34
35
36
37
38
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 32

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                         description: "传入要打开的路径",
                                type: String)
  ]
end

.descriptionObject



15
16
17
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 15

def self.description
  "tool"
end

.detailsObject



27
28
29
30
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 27

def self.details
  # Optional:
  "tool"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
43
44
45
46
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 40

def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end

.return_valueObject



23
24
25
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 23

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/tool_open_finder/actions/tool_open_finder_action.rb', line 7

def self.run(params)
  path = params[:path]
  
  system("open #{path}")

  Fastlane::Helper::ToolOpenFinderHelper.show_message
end