class Fastlane::Actions::ParseJsonAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 14
def self.authors
  ["KrauseFx"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 22
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                            env_name: "PARSE_JSON_PATH",
                         description: "Path to the JSON file",
                            optional: false,
                            verify_block: proc do |value|
                              UI.user_error!("Couldn't find given file") unless File.exist?(value)
                            end,
                                type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 10
def self.description
  "Parse a JSON file"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 35
def self.is_supported?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 18
def self.return_value
  "The content of the JSON file"
end
run(params) click to toggle source
# File lib/fastlane/plugin/parse_json/actions/parse_json_action.rb, line 4
def self.run(params)
  file_path = params[:path]
  file_content = File.read(file_path)
  return JSON.parse(file_content)
end