Class: Fastlane::Actions::ParseJsonAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::ParseJsonAction
- Defined in:
- lib/fastlane/plugin/parse_json/actions/parse_json_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
14 15 16 |
# File 'lib/fastlane/plugin/parse_json/actions/parse_json_action.rb', line 14 def self. ["KrauseFx"] end |
.available_options ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/fastlane/plugin/parse_json/actions/parse_json_action.rb', line 22 def self. [ 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 ⇒ Object
10 11 12 |
# File 'lib/fastlane/plugin/parse_json/actions/parse_json_action.rb', line 10 def self.description "Parse a JSON file" end |
.is_supported?(platform) ⇒ Boolean
35 36 37 |
# File 'lib/fastlane/plugin/parse_json/actions/parse_json_action.rb', line 35 def self.is_supported?(platform) true end |
.return_value ⇒ Object
18 19 20 |
# 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) ⇒ Object
4 5 6 7 8 |
# 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 |