Class: Fastlane::Actions::DotenvVaultAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



21
22
23
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 21

def self.authors
  ["mileszim", "motdotla"]
end

.available_optionsObject



34
35
36
37
38
39
40
41
42
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 34

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :vault_path,
                            env_name: "DOTENV_VAULT_PATH",
                         description: "Path to .env.vault file (default is ./.env.vault)",
                       default_value: ".env.vault",
                                type: String)
  ]
end

.descriptionObject



17
18
19
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 17

def self.description
  "Decrypt .env.vault file."
end

.detailsObject



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

def self.details
  # Optional:
  "Extends the proven & trusted foundation of dotenv, with a .env.vault file."
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
47
48
49
50
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 44

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



25
26
27
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 25

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

.run(params) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/fastlane/plugin/dotenv_vault/actions/dotenv_vault_action.rb', line 9

def self.run(params)
  params.values

  if defined?(::DotenvVault)
    ::DotenvVault.load(params[:vault_path])
  end
end