Class: Fastlane::Actions::PropertyFileReadAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::PropertyFileReadAction
- Defined in:
- lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
16 17 18 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 16 def self. ["Peter Turza"] end |
.available_options ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 29 def self. [ FastlaneCore::ConfigItem.new(key: :file, env_name: "PROPERTY_FILE_READ_FILE", description: "Property file to read", optional: false, type: String) ] end |
.description ⇒ Object
12 13 14 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 12 def self.description "Reads property file into dictionary" end |
.details ⇒ Object
24 25 26 27 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 24 def self.details # Optional: "Reads property file into dictionary. Used mostly in Android development as configuration files for gradle builds." end |
.is_supported?(platform) ⇒ Boolean
39 40 41 42 43 44 45 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 39 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
20 21 22 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 20 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb', line 4 def self.run(params) properties = {} IO.foreach(params[:file]) do |line| properties[$1.strip] = $2 if line =~ %r{([^=]*)=(.*)\/\/(.*)} || line =~ /([^=]*)=(.*)/ end properties end |