class Fastlane::Actions::LoadJsonAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/load_json/actions/load_json_action.rb, line 23 def self.available_options [ FastlaneCore::ConfigItem.new(key: :json_path, env_name: "LOAD_JSON_JSON_PATH", description: "The relative path to the JSON file", optional: false, type: String, verify_block: proc do |value| value = File.expand_path(value) UI.user_error!("Couldn't find JSON at path '#{value}'") unless File.exist?(value) end) ] end
description()
click to toggle source
# File lib/fastlane/plugin/load_json/actions/load_json_action.rb, line 11 def self.description "Loads a local JSON file and parses it" end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/load_json/actions/load_json_action.rb, line 37 def self.is_supported?(platform) true end
return_value()
click to toggle source
# File lib/fastlane/plugin/load_json/actions/load_json_action.rb, line 19 def self.return_value "Content of the JSON file to load" end
run(params)
click to toggle source
# File lib/fastlane/plugin/load_json/actions/load_json_action.rb, line 4 def self.run(params) require 'json' data = File.read(params[:json_path]) return JSON.parse(data) end