fastlane-plugin-json 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 171f876162ae4aa8045970d6375243fcb2a4f05c8effb677806ca5634e3ca359
|
4
|
+
data.tar.gz: 499dea3eb82ee7cd6390260d13d0218eb347c467f9c6f0544b36aa5b8a12e0be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc2c2ac056904781c571dbdd3f5c92bc0d50d0f6d46556efd3e8d4491b5fb86148debee6400fbd7df3c9a26e1d8250e15588d193054e0cc0bba04e757b209ba9
|
7
|
+
data.tar.gz: 84c7f37783ee3933209c546ff64df6e08df0517879813c199895899fbb93a30d48c9067edfcb252fbad74ef7aa19cd0b7eb9ed61ed1e3b18d4826361386b52fe
|
@@ -7,16 +7,27 @@ module Fastlane
|
|
7
7
|
class ReadJsonAction < Action
|
8
8
|
def self.run(params)
|
9
9
|
json_path = params[:json_path]
|
10
|
+
json_string = params[:json_string]
|
10
11
|
@is_verbose = params[:verbose]
|
11
12
|
|
13
|
+
if json_path.nil? && json_string.nil?
|
14
|
+
put_error!("You need to provide a json_path (file to path) or json_string (json as string) ❌")
|
15
|
+
return nil
|
16
|
+
end
|
17
|
+
|
12
18
|
print_params(params) if @is_verbose
|
13
19
|
|
14
|
-
|
15
|
-
|
16
|
-
|
20
|
+
json_content = json_string
|
21
|
+
|
22
|
+
unless json_path.nil?
|
23
|
+
unless File.file?(json_path)
|
24
|
+
put_error!("File at path #{json_path} does not exist. Verify that the path is correct ❌")
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
|
28
|
+
json_content = File.read(json_path)
|
17
29
|
end
|
18
30
|
|
19
|
-
json_content = File.read(json_path)
|
20
31
|
begin
|
21
32
|
JSON.parse(json_content, symbolize_names: true)
|
22
33
|
rescue
|
@@ -42,10 +53,11 @@ module Fastlane
|
|
42
53
|
FastlaneCore::ConfigItem.new(key: :json_path,
|
43
54
|
description: "Path to json file",
|
44
55
|
is_string: true,
|
45
|
-
optional:
|
46
|
-
|
47
|
-
|
48
|
-
|
56
|
+
optional: true),
|
57
|
+
FastlaneCore::ConfigItem.new(key: :json_string,
|
58
|
+
description: "A json as string",
|
59
|
+
is_string: true,
|
60
|
+
optional: true),
|
49
61
|
FastlaneCore::ConfigItem.new(key: :verbose,
|
50
62
|
description: "verbose",
|
51
63
|
optional: true,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Gonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
|
-
rubygems_version: 3.0.3
|
173
|
+
rubygems_version: 3.0.3.1
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: actions related to json files
|