Class: Fastlane::Actions::RemoveItemFromKeychainAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::RemoveItemFromKeychainAction
- Defined in:
- lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
22 23 24 |
# File 'lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb', line 22 def self. ["Daniel Jankowski"] end |
.available_options ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb', line 26 def self. [ FastlaneCore::ConfigItem.new(key: :item_name, env_name: "SECRET_KEEPER_ITEM_NAME", description: "Item name to be removed from the keychain", optional: false, type: String) ] end |
.description ⇒ Object
18 19 20 |
# File 'lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb', line 18 def self.description "Removes the credentials from the keychain on behalf of the user" end |
.is_supported?(platform) ⇒ Boolean
36 37 38 |
# File 'lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb', line 36 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fastlane/plugin/secret_keeper/actions/remove_item_from_keychain_action.rb', line 6 def self.run(params) item_name = params[:item_name] success = Security::InternetPassword.delete(server: item_name) if success UI.success("Sucessfully removed an item from the keychain 🎉") else UI.error("Could not remove an item from the keychain ❌") UI.user_error!("Could not remove an item from the keychain. This can happen if an item you are trying to remove could not be found in the keychain.") end end |