class Fastlane::Actions::PropertyFileReadAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb, line 16
def self.authors
  ["Peter Turza"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/property_file_read/actions/property_file_read_action.rb, line 29
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :file,
                            env_name: "PROPERTY_FILE_READ_FILE",
                         description: "Property file to read",
                            optional: false,
                                type: String)
  ]
end
description() click to toggle source
# 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() click to toggle source
# 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) click to toggle source
# 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() click to toggle source
# 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) click to toggle source
# 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