Class: Fastlane::Actions::ImportFromUrlAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::ImportFromUrlAction
- Defined in:
- lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb
Instance Attribute Summary collapse
-
#download_path ⇒ Object
readonly
Returns the value of attribute download_path.
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#url_address ⇒ Object
readonly
Returns the value of attribute url_address.
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .run(params) ⇒ Object
Instance Method Summary collapse
- #import ⇒ Object
-
#initialize(params) ⇒ ImportFromUrlAction
constructor
A new instance of ImportFromUrlAction.
Constructor Details
#initialize(params) ⇒ ImportFromUrlAction
Returns a new instance of ImportFromUrlAction.
66 67 68 69 70 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 66 def initialize(params) @url_address = params[:url] @download_path = params[:path] @file_name = params[:file_name] end |
Instance Attribute Details
#download_path ⇒ Object (readonly)
Returns the value of attribute download_path.
10 11 12 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 10 def download_path @download_path end |
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
10 11 12 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 10 def file_name @file_name end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
10 11 12 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 10 def file_path @file_path end |
#url_address ⇒ Object (readonly)
Returns the value of attribute url_address.
10 11 12 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 10 def url_address @url_address end |
Class Method Details
.authors ⇒ Object
45 46 47 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 45 def ["Doruk Kangal"] end |
.available_options ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 17 def [ FastlaneCore::ConfigItem.new( key: :url, env_name: "IMPORT_FROM_URL", description: "The url address of the Fastfile to use its lanes", optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :file_name, env_name: "IMPORT_FROM_FILE_NAME", description: "The name of the file to be downloaded", optional: true, type: String ), FastlaneCore::ConfigItem.new( key: :path, env_name: "IMPORT_FROM_FILE_NAME", description: "The path of the file to be downloaded", optional: true, type: String ) ] end |
.description ⇒ Object
49 50 51 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 49 def description "Import another Fastfile from given url to use its lanes" end |
.details ⇒ Object
53 54 55 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 53 def details "This is useful if you have shared lanes across multiple apps and you want to store a Fastfile in a url" end |
.example_code ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 57 def example_code "import_from_url( url: '<the url of the Fastfile to be downloaded>', # Required and cannot be empty, path: '<the path of the Fastfile to be downloaded>', # Optional and default is fastlane/.cache file_name: '<the name of the Fastfile to be downloaded>' # Optional and default is DownloadedFastfile )" end |
.run(params) ⇒ Object
13 14 15 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 13 def run(params) new(params).import end |
Instance Method Details
#import ⇒ Object
72 73 74 75 76 77 |
# File 'lib/fastlane/plugin/import_from_url/actions/import_from_url_action.rb', line 72 def import return UI.user_error!("The url address #{url_address} is not valid.") unless url_valid? download_fast_file import_to_fastlane end |