fastlane-plugin-stream_actions 0.1.14 → 0.1.15

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: fcb13b3f09d78254a4fd4bd0aedfaa73dbd01471f286048fc262ad5519743551
4
- data.tar.gz: 525d059e5ad30f690e8c28d575f4e752ce38ce01390f399d5cf867d9a473f560
3
+ metadata.gz: af1d94514c2d3fc5e6de1be36819a669dd210316016d6f1724722ef337e72603
4
+ data.tar.gz: 1dd2ee983d552514d090a4f09900300fe8a5df4bac091123b7b4d097a9954d2b
5
5
  SHA512:
6
- metadata.gz: 13f3f4538eddb334ab7a3fb408baf4bb3776737d6fee60575fc384c779b9b63a085bda1bb94a359d4d50f9618e18a1d8fb958697f883827753a2fdc2f9c55c5d
7
- data.tar.gz: f15417504964bb1deebb850244be7c1de7bad5d5bf964838fe5779ae969338f8b33dcddbabbe2435c4d104a9f4efca0e29363341db6969fbc61eee0d3bf37a5e
6
+ metadata.gz: 347bd253d9443b5bb14683ac93fc4408ddf6e34bd43060db1699e18d2d5ceaf8eadb1eb6addfa970e69713c0302926c614b30315f3b0b3492b590a96803655ac
7
+ data.tar.gz: 8e2e9b4ef242c8f3eff526fd212dac0f6fc99ae0231a6659bc526dddfed7130f54d7b89494a5eba6b3449635dd181aa7ef3417f8a8b2287d0c463f8092674e4f
@@ -35,7 +35,7 @@ module Fastlane
35
35
  description: 'AppStore Connect API Key',
36
36
  is_string: false,
37
37
  verify_block: proc do |api_key|
38
- UI.user_error!('AppStore Connect API Key has to be specified') unless api_key
38
+ UI.user_error!('AppStore Connect API Key has to be specified') if api_key.nil? || api_key.empty? || !api_key.kind_of?(Hash)
39
39
  end
40
40
  ),
41
41
  FastlaneCore::ConfigItem.new(
@@ -2,11 +2,11 @@ module Fastlane
2
2
  module Actions
3
3
  class IsCheckRequiredAction < Action
4
4
  def self.run(params)
5
- return true unless params[:github_pr_num]
5
+ return true if params[:github_pr_num].nil? || params[:github_pr_num].empty?
6
6
 
7
7
  UI.message("Checking if check is required for PR ##{params[:github_pr_num]}")
8
8
 
9
- changed_files = sh("gh pr view #{params[:github_pr_num]} --json files -q '.files[].path'").split("\n")
9
+ changed_files = Actions.sh("gh pr view #{params[:github_pr_num]} --json files -q '.files[].path'").split("\n")
10
10
 
11
11
  return true if changed_files.size == 100 # TODO: https://github.com/cli/cli/issues/5368
12
12
 
@@ -31,14 +31,15 @@ module Fastlane
31
31
  key: :sources,
32
32
  description: 'Array of paths to scan',
33
33
  is_string: false,
34
- verify_block: proc do |source|
35
- UI.user_error!("Sources have to be specified") unless source
34
+ verify_block: proc do |array|
35
+ UI.user_error!("Sources have to be specified") unless array.kind_of?(Array) && array.size.positive?
36
36
  end
37
37
  ),
38
38
  FastlaneCore::ConfigItem.new(
39
39
  env_name: 'GITHUB_PR_NUM',
40
40
  key: :github_pr_num,
41
- description: 'GitHub PR number'
41
+ description: 'GitHub PR number',
42
+ optional: true
42
43
  )
43
44
  ]
44
45
  end
@@ -2,8 +2,6 @@ module Fastlane
2
2
  module Actions
3
3
  class ReadChangelogAction < Action
4
4
  def self.run(params)
5
- UI.user_error!('You need to pass the version of the release you want to obtain the changelog from') unless params[:version]
6
-
7
5
  UI.message("Getting changelog for #{params[:version]}")
8
6
  reading_changelog = false
9
7
  changes = ''
@@ -38,7 +36,7 @@ module Fastlane
38
36
  key: :version,
39
37
  description: 'Release version',
40
38
  verify_block: proc do |v|
41
- UI.user_error!("You need to pass the version of the release you want to obtain the changelog from") unless v
39
+ UI.user_error!("You need to pass the version of the release you want to obtain the changelog from") if v.nil? || v.empty?
42
40
  end
43
41
  ),
44
42
  FastlaneCore::ConfigItem.new(
@@ -30,7 +30,7 @@ module Fastlane
30
30
 
31
31
  release_details = other_action.set_github_release(
32
32
  repository_name: params[:github_repo],
33
- api_token: ENV['GITHUB_TOKEN'],
33
+ api_token: params[:github_token],
34
34
  name: version_number,
35
35
  tag_name: version_number,
36
36
  description: changes,
@@ -115,7 +115,7 @@ module Fastlane
115
115
  FastlaneCore::ConfigItem.new(
116
116
  env_name: 'GITHUB_TOKEN',
117
117
  key: :github_token,
118
- description: 'GITHUB_TOKEN env var has to be set up'
118
+ description: 'GITHUB_TOKEN environment variable'
119
119
  ),
120
120
  FastlaneCore::ConfigItem.new(
121
121
  key: :check_git_status,
@@ -47,9 +47,9 @@ module Fastlane
47
47
  "This is the build for Regression testing on release candidate v#{version_number} (sha: #{sha})."
48
48
  else
49
49
  "This is the official sample app built with iOS #{params[:sdk_target]} SDK v#{version_number}. It's designed " \
50
- 'to highlight engaging features and new improvements to the SDK, but remember that this is just one ' \
51
- 'possible implementation. You can start your own by borrowing and customizing the code from this ' \
52
- "sample, or build something completely different using Stream's components."
50
+ 'to highlight engaging features and new improvements to the SDK, but remember that this is just one ' \
51
+ 'possible implementation. You can start your own by borrowing and customizing the code from this ' \
52
+ "sample, or build something completely different using Stream's components."
53
53
  end
54
54
  end
55
55
 
@@ -68,35 +68,35 @@ module Fastlane
68
68
  description: 'AppStore Connect API Key',
69
69
  is_string: false,
70
70
  verify_block: proc do |api_key|
71
- UI.user_error!('AppStore Connect API Key has to be specified') unless api_key
71
+ UI.user_error!('AppStore Connect API Key has to be specified') if api_key.nil? || api_key.empty?
72
72
  end
73
73
  ),
74
74
  FastlaneCore::ConfigItem.new(
75
75
  key: :xcode_project,
76
76
  description: 'Path to the Xcode project',
77
77
  verify_block: proc do |path|
78
- UI.user_error!('Path to the Xcode project has to be specified') unless path
78
+ UI.user_error!('Path to the Xcode project has to be specified') if path.nil? || path.empty?
79
79
  end
80
80
  ),
81
81
  FastlaneCore::ConfigItem.new(
82
82
  key: :sdk_target,
83
83
  description: 'SDK target name',
84
84
  verify_block: proc do |target|
85
- UI.user_error!('SDK target name has to be specified') unless target
85
+ UI.user_error!('SDK target name has to be specified') if target.nil? || target.empty?
86
86
  end
87
87
  ),
88
88
  FastlaneCore::ConfigItem.new(
89
89
  key: :app_target,
90
90
  description: 'DemoApp target name',
91
91
  verify_block: proc do |target|
92
- UI.user_error!('DemoApp target name has to be specified') unless target
92
+ UI.user_error!('DemoApp target name has to be specified') if target.nil? || target.empty?
93
93
  end
94
94
  ),
95
95
  FastlaneCore::ConfigItem.new(
96
96
  key: :app_identifier,
97
97
  description: 'DemoApp bundle identifier',
98
98
  verify_block: proc do |id|
99
- UI.user_error!('DemoApp bundle identifier has to be specified') unless id
99
+ UI.user_error!('DemoApp bundle identifier has to be specified') if id.nil? || id.empty?
100
100
  end
101
101
  ),
102
102
  FastlaneCore::ConfigItem.new(
@@ -4,14 +4,17 @@ module Fastlane
4
4
  def self.run(params)
5
5
  data_hash = JSON.parse(File.read(params[:path]))
6
6
 
7
- # Create the `environmentVariableEntries` array if it doesn't exist
8
7
  data_hash['defaultOptions']['environmentVariableEntries'] ||= []
9
8
 
10
- data_hash['defaultOptions']['environmentVariableEntries'] << params[:env_vars]
9
+ if params[:env_vars].kind_of?(Hash)
10
+ data_hash['defaultOptions']['environmentVariableEntries'] << params[:env_vars]
11
+ else
12
+ params[:env_vars].each { |env| data_hash['defaultOptions']['environmentVariableEntries'] << env }
13
+ end
14
+
11
15
  File.write(params[:path], JSON.pretty_generate(data_hash))
12
16
 
13
- UI.success(" `#{params[:env_vars]}` ENV variables have been added to #{params[:path]}")
14
- UI.message("👀 #{params[:path]} ENV variables:\n#{data_hash['defaultOptions']['environmentVariableEntries']}")
17
+ UI.message("👀 Testplan environment variables:\n#{data_hash['defaultOptions']['environmentVariableEntries']}")
15
18
  end
16
19
 
17
20
  #####################################################
@@ -35,8 +38,8 @@ module Fastlane
35
38
  key: :env_vars,
36
39
  description: 'The environment variables to add to test plan',
37
40
  is_string: false,
38
- verify_block: proc do |array|
39
- UI.user_error!("The environment variables array should not be empty") if array.empty?
41
+ verify_block: proc do |env_vars|
42
+ UI.user_error!("The environment variables array should not be empty") if env_vars.nil? || env_vars.empty?
40
43
  end
41
44
  )
42
45
  ]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = "0.1.14"
3
+ VERSION = "0.1.15"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 1.12.1
131
+ version: '1.38'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 1.12.1
138
+ version: '1.38'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-performance
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 2.4.0
187
+ version: 2.15.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 2.4.0
194
+ version: 2.15.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +239,8 @@ files:
239
239
  - lib/fastlane/plugin/stream_actions/version.rb
240
240
  homepage: https://github.com/GetStream/fastlane-plugin-stream_actions
241
241
  licenses: []
242
- metadata: {}
242
+ metadata:
243
+ rubygems_mfa_required: 'true'
243
244
  post_install_message:
244
245
  rdoc_options: []
245
246
  require_paths: