class Fastlane::Actions::TestDemoAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 17
def self.authors
  ["StephenCurry30"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 25
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                            env_name: "TEST_DEMO_PATH",
                         description: "Path to the JSON file",
                            optional: false,
                            verify_block: proc do | value |
                              UI.user_error!("Couldn't not find given file") unless File.exist?(value)                                      
                            end,
                                type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 13
def self.description
  "A test demo of fastlane plugin"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 38
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_value() click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 21
def self.return_value
  "The content of JSON file"
end
run(params) click to toggle source
# File lib/fastlane/plugin/test_demo/actions/test_demo_action.rb, line 7
def self.run(params)
  file_path = params[:path]
  file_content = File.read(file_path)
  return JSON.parse(file_content)
end