Class: Fastlane::Actions::RustoreDeveloperAuthAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



21
22
23
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 21

def self.authors
  ["RimiX2"]
end

.available_optionsObject



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 34

def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :company_id,
                                   env_name: "RUSTORE_COMPANY_ID",
                                   description: "Company ID",
                                   optional: false,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :key_path,
                                   env_name: "RUSTORE_PRIVATE_KEY_PATH",
                                   description: "Path for the company's private key (PEM)",
                                   optional: false,
                                   default_value: './private_key.pem',
                                   type: String)
  ]
end

.descriptionObject



17
18
19
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 17

def self.description
  "RUSTORE: Get authorization token"
end

.detailsObject



29
30
31
32
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 29

def self.details
  # Optional:
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


50
51
52
53
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 50

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

.return_valueObject



25
26
27
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 25

def self.return_value
  "Access token"
end

.run(params) ⇒ Object



11
12
13
14
15
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb', line 11

def self.run(params)
  token = Helper::RustoreDeveloperHelper.getAccessToken(params[:company_id], params[:key_path])
  Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_ACCESS_TOKEN] = token
  return token
end