fastlane-plugin-json_auth 1.2.5 → 1.3.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: 7a66e9d2581bafb76c2746b31d4f8aa1251b5fed7dbc515dd0fc8e939d72560c
4
- data.tar.gz: 4146bb8a053ac855bc12ce176079efc167ab06e04ab60c392a134a8401b3ea43
3
+ metadata.gz: 05665d22189d9cbd70eb571953230645196d247cfd84f60bb6071223d34c05ab
4
+ data.tar.gz: 31a6a93d19e168a1606241a52f9182f6936209c1c9f1679f65e1444b1fdce172
5
5
  SHA512:
6
- metadata.gz: 84a799c3490c8ba5fe8edb16b3e19460368db0b4ff034de5ff038d3660c9f53f12f327721b88227565a68f00d02297e0d6573e954e4730c42e1720292de4dd28
7
- data.tar.gz: d77e6c7a1f1f58b8be675a2f2bf6536997962b5d985d3645ebf4a0084878527a7aa939aee961dfa3bbfe07f612e26a62d1d1b2da611881a6b6a3b4bcbb100de1
6
+ metadata.gz: 53fbdb477b9c3e9a02e8535c42a0199a1f238d551f85810cb907e982bf2982f5060198eeb1fc4559eb5e7fe22e124ce50ac488f2592ac0b301cfe95599fc0a84
7
+ data.tar.gz: 178919aae96f0a07d6ad00e56fd8c2f42110e591dcc16de8721c9d98c2be80d91e029bb71c837b68b4174d15d1fd241b9c42f1d1426adf16f2fe2420015e5555
@@ -1,7 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fastlane/action'
4
+ require 'fastlane_core/configuration/config_item'
5
+ require 'fastlane_core/print_table'
3
6
  require "net/http"
4
7
  require "json"
8
+ require_relative '../helper/json_helper'
5
9
 
6
10
  module Fastlane
7
11
  module Actions
@@ -21,7 +25,6 @@ module Fastlane
21
25
  Net::HTTP.start(uri.host, uri.port,
22
26
  use_ssl: uri.scheme == 'https',
23
27
  verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
24
-
25
28
  request = Net::HTTP::Get.new(uri.request_uri)
26
29
  if !username.nil? && !username.empty? && !password.nil? && !password.empty?
27
30
  request.basic_auth(params[:username], params[:password])
@@ -31,9 +34,9 @@ module Fastlane
31
34
  JSON.parse(response.body, symbolize_names: true)
32
35
  end
33
36
  rescue JSON::ParserError
34
- puts_error!("Downloaded json has invalid content")
35
- rescue => exception
36
- puts_error!("Failed to download json. Message: #{exception.message}")
37
+ puts_error!("Downloaded json has invalid content.")
38
+ rescue StandardError => e
39
+ puts_error!("Failed to download json. Message: #{e.message}.")
37
40
  end
38
41
  end
39
42
 
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fastlane/action'
4
+ require 'fastlane_core/configuration/config_item'
5
+ require 'fastlane_core/print_table'
3
6
  require "json"
7
+ require_relative '../helper/json_helper'
4
8
 
5
9
  module Fastlane
6
10
  module Actions
@@ -11,15 +15,15 @@ module Fastlane
11
15
  @is_verbose = params[:verbose]
12
16
 
13
17
  print_params(params) if @is_verbose
14
- put_error!("jsons_path cannot be empty") if jsons_paths.empty?
18
+ put_error!("jsons_path cannot be empty.") if jsons_paths.empty?
15
19
 
16
20
  hashes = jsons_paths.map do |json_path|
17
- put_error!("json_path: #{json_path} is not valid") unless File.exist?(json_path)
21
+ put_error!("json_path: #{json_path} is not valid.") unless File.exist?(json_path)
18
22
  json_content = File.read(File.expand_path(json_path))
19
23
  begin
20
24
  JSON.parse(json_content, symbolize_names: true)
21
- rescue
22
- put_error!("File at path #{json_path} has invalid content.")
25
+ rescue StandardError
26
+ put_error!("File at path #{json_path} has invalid content.")
23
27
  end
24
28
  end
25
29
 
@@ -36,9 +40,9 @@ module Fastlane
36
40
  Dir.mkdir(file_dir) unless File.directory?(file_dir)
37
41
 
38
42
  begin
39
- File.open(output_path, "w") { |f| f.write(JSON.pretty_generate(hash)) }
40
- rescue
41
- put_error!("Failed to write json at #{output_path}.")
43
+ File.write(output_path, JSON.pretty_generate(hash))
44
+ rescue StandardError
45
+ put_error!("Failed to write json at #{output_path}.")
42
46
  end
43
47
  end
44
48
 
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fastlane/action'
4
+ require 'fastlane_core/configuration/config_item'
5
+ require 'fastlane_core/print_table'
3
6
  require "json"
7
+ require_relative '../helper/json_helper'
4
8
 
5
9
  module Fastlane
6
10
  module Actions
@@ -11,7 +15,7 @@ module Fastlane
11
15
  @is_verbose = params[:verbose]
12
16
 
13
17
  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)")
18
+ put_error!("You need to provide a json_path (file to path) or json_string (json as string).")
15
19
  return nil
16
20
  end
17
21
 
@@ -21,7 +25,7 @@ module Fastlane
21
25
 
22
26
  unless json_path.nil?
23
27
  unless File.file?(json_path)
24
- put_error!("File at path #{json_path} does not exist. Verify that the path is correct")
28
+ put_error!("File at path #{json_path} does not exist. Verify that the path is correct.")
25
29
  return nil
26
30
  end
27
31
 
@@ -30,8 +34,8 @@ module Fastlane
30
34
 
31
35
  begin
32
36
  JSON.parse(json_content, symbolize_names: true)
33
- rescue
34
- put_error!("File at path #{json_path} has invalid content.")
37
+ rescue StandardError
38
+ put_error!("File at path #{json_path} has invalid content.")
35
39
  end
36
40
  end
37
41
 
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "json"
3
+ require 'fastlane/action'
4
+ require 'fastlane_core/configuration/config_item'
5
+ require 'fastlane_core/print_table'
6
+ require 'json'
7
+ require_relative '../helper/json_helper'
4
8
 
5
9
  module Fastlane
6
10
  module Actions
@@ -19,11 +23,9 @@ module Fastlane
19
23
  Dir.mkdir(file_dir) unless File.directory?(file_dir)
20
24
 
21
25
  begin
22
- File.open(file_path, "w") do |f|
23
- f.write(JSON.pretty_generate(hash))
24
- end
25
- rescue
26
- put_error!("File at path #{json_path} has invalid content. ❌")
26
+ File.write(file_path, JSON.pretty_generate(hash))
27
+ rescue StandardError
28
+ put_error!("File at path #{file_path} has invalid content.")
27
29
  end
28
30
  end
29
31
 
@@ -1,7 +1,7 @@
1
1
  require 'fastlane_core/ui/ui'
2
2
 
3
3
  module Fastlane
4
- UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
5
5
 
6
6
  module Helper
7
7
  class JsonHelper
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module JsonAuth
3
- VERSION = "1.2.5"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-json_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Gonzalez
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-05 00:00:00.000000000 Z
12
+ date: 2022-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: pry
15
+ name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
@@ -26,7 +26,21 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: bundler
29
+ name: fastlane
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 2.206.2
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 2.206.2
42
+ - !ruby/object:Gem::Dependency
43
+ name: pry
30
44
  requirement: !ruby/object:Gem::Requirement
31
45
  requirements:
32
46
  - - ">="
@@ -40,7 +54,7 @@ dependencies:
40
54
  - !ruby/object:Gem::Version
41
55
  version: '0'
42
56
  - !ruby/object:Gem::Dependency
43
- name: rspec
57
+ name: rake
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
60
  - - ">="
@@ -54,7 +68,7 @@ dependencies:
54
68
  - !ruby/object:Gem::Version
55
69
  version: '0'
56
70
  - !ruby/object:Gem::Dependency
57
- name: rspec_junit_formatter
71
+ name: rspec
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
74
  - - ">="
@@ -68,7 +82,7 @@ dependencies:
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
70
84
  - !ruby/object:Gem::Dependency
71
- name: rake
85
+ name: rspec_junit_formatter
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
88
  - - ">="
@@ -87,16 +101,16 @@ dependencies:
87
101
  requirements:
88
102
  - - '='
89
103
  - !ruby/object:Gem::Version
90
- version: 0.49.1
104
+ version: 1.30.1
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - '='
96
110
  - !ruby/object:Gem::Version
97
- version: 0.49.1
111
+ version: 1.30.1
98
112
  - !ruby/object:Gem::Dependency
99
- name: rubocop-require_tools
113
+ name: rubocop-performance
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - ">="
@@ -110,7 +124,7 @@ dependencies:
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
- name: simplecov
127
+ name: rubocop-require_tools
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
130
  - - ">="
@@ -124,19 +138,19 @@ dependencies:
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
- name: fastlane
141
+ name: simplecov
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
144
  - - ">="
131
145
  - !ruby/object:Gem::Version
132
- version: 2.151.2
146
+ version: '0'
133
147
  type: :development
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
151
  - - ">="
138
152
  - !ruby/object:Gem::Version
139
- version: 2.151.2
153
+ version: '0'
140
154
  description:
141
155
  email:
142
156
  - gonzalez.martin90@gmail.com
@@ -157,7 +171,8 @@ files:
157
171
  homepage: https://github.com/thangnc/fastlane-plugin-json_auth
158
172
  licenses:
159
173
  - MIT
160
- metadata: {}
174
+ metadata:
175
+ rubygems_mfa_required: 'true'
161
176
  post_install_message:
162
177
  rdoc_options: []
163
178
  require_paths:
@@ -166,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
181
  requirements:
167
182
  - - ">="
168
183
  - !ruby/object:Gem::Version
169
- version: '0'
184
+ version: '2.6'
170
185
  required_rubygems_version: !ruby/object:Gem::Requirement
171
186
  requirements:
172
187
  - - ">="