fastlane-plugin-json 0.1.2 → 0.1.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
  SHA256:
3
- metadata.gz: 7a322af1714b480f2e163f6b1fbd7cc1ed54e07852e0db684abffb526a888cdc
4
- data.tar.gz: bff1e8ed76220e6a7e4ce6ae5eedaf91973ac8d52d5dbe6b42f787184b29e25c
3
+ metadata.gz: 2dfcdb6a3044272e9451d59fef9f49a0ee8120ee9c0f790d15b7c15ddccdc08b
4
+ data.tar.gz: c6576b58b55ba9c371355f78c7ed3c56bb2ce1f4502519c7d8dfe8064b36ea4b
5
5
  SHA512:
6
- metadata.gz: 65df970c792ec75c1e41baaa9a3f3a815e6138c96e2ad8dd0f9f79d690c8473b40967f5b112bd337cebc0ff5164f4452e9a19b9f5912a7b5ba2b0dab613a3017
7
- data.tar.gz: 33b204d134516933c17c1318ebcb9bc32938933b92b2c066e78d18876c1d2757c3e92097ad65b1fe2eb77ce3bad3f156cbdf4d7479a3eef8b062682503daf338
6
+ metadata.gz: 59fc9b843dbb0879a200c531aeac537d4c52277afa2b13b21653eb48c8d42dd8f18734c6ced32d9629cad4777df0b585ab0fa6b7b1b06f90c26331b8331ae748
7
+ data.tar.gz: 7f6a36f21aba3af6675a6b676b254165640db476a14625ade18ee594aaf701f0bdd62d97e8fa0851252ad7f2ad42c47fa5b2bf5201c118d55f375a8c1e8fd51c
data/README.md CHANGED
@@ -16,6 +16,11 @@ This plugin provide several actions that will allow you to manipulate and create
16
16
 
17
17
  ### read_json
18
18
 
19
+ | Key | Description | Env Var | Default |
20
+ |-----------|-------------------|---------|---------|
21
+ | json_path | Path to json file | | |
22
+ | verbose | verbose | | false |
23
+
19
24
  Read a json file at specific path as a hash object.
20
25
 
21
26
  _Having a json file at `path/to/my.json` with the following content:_
@@ -40,6 +45,11 @@ puts my_json[:age]
40
45
 
41
46
  ### download_json
42
47
 
48
+ | Key | Description | Env Var | Default |
49
+ |-----------|-------------------|---------|---------|
50
+ | json_url | Url to json file | | |
51
+ | verbose | verbose | | false |
52
+
43
53
  Downloads a json file from server and convert it to a hash object.
44
54
 
45
55
  ```ruby
@@ -57,6 +67,12 @@ puts my_json[:isDev]
57
67
 
58
68
  ### write_json
59
69
 
70
+ | Key | Description | Env Var | Default |
71
+ |-----------|-------------------------------------------|---------|---------|
72
+ | hash | Hash that you want to save as a json file | | |
73
+ | file_path | Path where you want to save your json | | |
74
+ | verbose | verbose | | false |
75
+
60
76
  Creates a json file from a hash.
61
77
 
62
78
  ```ruby
@@ -47,7 +47,7 @@ module Fastlane
47
47
  FastlaneCore::ConfigItem.new(key: :verbose,
48
48
  description: "verbose",
49
49
  optional: true,
50
- data_type: Boolean,
50
+ type: Boolean,
51
51
  default_value: false)
52
52
 
53
53
  ]
@@ -48,7 +48,7 @@ module Fastlane
48
48
  FastlaneCore::ConfigItem.new(key: :verbose,
49
49
  description: "verbose",
50
50
  optional: true,
51
- data_type: Boolean)
51
+ type: Boolean)
52
52
 
53
53
  ]
54
54
  end
@@ -21,7 +21,8 @@ module Fastlane
21
21
  return
22
22
  end
23
23
 
24
- file_dir = File.dirname(file_path)
24
+ file_path_expanded = File.expand_path(file_path)
25
+ file_dir = File.dirname(file_path_expanded)
25
26
  Dir.mkdir(file_dir) unless File.directory?(file_dir)
26
27
  print_params(params) if @is_verbose
27
28
 
@@ -51,7 +52,7 @@ module Fastlane
51
52
  FastlaneCore::ConfigItem.new(key: :hash,
52
53
  description: "Hash that you want to save as a json file",
53
54
  optional: false,
54
- data_type: Hash,
55
+ type: Hash,
55
56
  verify_block: proc do |value|
56
57
  UI.user_error!("You must set hash: parameter") unless value && !value.empty?
57
58
  end),
@@ -60,12 +61,12 @@ module Fastlane
60
61
  is_string: true,
61
62
  optional: false,
62
63
  verify_block: proc do |value|
63
- UI.user_error!("You must set file_path: parameter") unless value.nil?
64
+ UI.user_error!("You must set file_path: parameter") unless value && !value.empty?
64
65
  end),
65
66
  FastlaneCore::ConfigItem.new(key: :verbose,
66
67
  description: "verbose",
67
68
  optional: true,
68
- data_type: Boolean)
69
+ type: Boolean)
69
70
  ]
70
71
  end
71
72
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Json
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Gonzalez