fastlane-plugin-farol 0.4.2 → 0.4.3

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
  SHA1:
3
- metadata.gz: af4a7a42c77bcb8f4d3fc47e99a31b12f0bce533
4
- data.tar.gz: cf95b262959eb2de56d05645f7e8a5b40508bd5d
3
+ metadata.gz: b87bd3cb956aba298e8620fa458076b213dd22a0
4
+ data.tar.gz: 0d694cb3500f88380b1da7f9e069d5977bfb9db2
5
5
  SHA512:
6
- metadata.gz: 8e3bbe7b3906fdf32f2fa203230de25ef52a0257c4394b88bf20d79df140670caa641440bd12113675dd1a3576819884659ea8d82e007bb8a7c922d2b47b2968
7
- data.tar.gz: 3cea979a6d2dde7945bbb878da041df702d43ae40cd0e7f47843db07193eed2a94666d78d9d30d905b0f7f1dc66b5990d36708fe867ae9c183244978594ff0f1
6
+ metadata.gz: 67d2f44e1f0bb5e9e1f545bdc745d4b8eb1ac3ac11fcfa43004cc629fd693884e677ca8e19b7981e847a49fdd12d931595552627da963625a8ecb13bcc98a442
7
+ data.tar.gz: e373f03edec01a607043cf9ea12b75da26c9f0e93fb8905ccced8cd9d239010987cab186378941639bcf038a69039b0ef88e736340839cf27d813fc1a1cfbcb5
@@ -27,7 +27,7 @@ module Fastlane
27
27
  response = http.request request # Net::HTTPResponse object
28
28
  case response
29
29
  when Net::HTTPSuccess
30
- if response.read_body
30
+ if valid_json(response.read_body)
31
31
  return JSON.parse response.read_body
32
32
  else
33
33
  return true
@@ -42,6 +42,14 @@ module Fastlane
42
42
  return false
43
43
  end
44
44
  end
45
+
46
+ # Check if the parameter is a valid JSON string
47
+ def valid_json(json)
48
+ JSON.parse(json)
49
+ return true
50
+ rescue JSON::ParserError => e
51
+ return false
52
+ end
45
53
  end
46
54
  end
47
55
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Farol
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-farol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Plets