Class: Fastlane::Actions::InstallSaucectlAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



31
32
33
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 31

def self.authors
  ["Ian Hamilton"]
end

.available_optionsObject



22
23
24
25
26
27
28
29
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 22

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :version,
                                 description: "Set the tag of saucectl you wish to install",
                                 optional: true,
                                 type: String)
  ]
end

.categoryObject



35
36
37
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 35

def self.category
  :testing
end

.descriptionObject



14
15
16
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 14

def self.description
  "Installs the Sauce Labs saucectl cli binary"
end

.detailsObject



18
19
20
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 18

def self.details
  "Optionally set the tag of the version you wish to install. If not tag is set, the latest tag will be downloaded. See: https://github.com/saucelabs/saucectl/tags "
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 39

def self.is_supported?(platform)
  [:ios, :android].include?(platform)
end

.run(version = nil) ⇒ Object



7
8
9
10
11
12
# File 'lib/fastlane/plugin/saucectl/actions/install_saucectl_action.rb', line 7

def self.run(version = nil)
  version_message = version[:version].nil? ? 'Installing with latest version of saucectl' : "Installing saucectl with version #{version[:version]}"
  UI.message("#{version_message} 🤖 🚀")
  installer = Saucectl::Installer.new
  installer.install(version)
end