Skip to content

Commit 7113e92

Browse files
authored
Fix Rubocop issues and config descriptions. (#381)
1 parent 180f7cb commit 7113e92

18 files changed

+120
-113
lines changed

.rubocop.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
require:
3+
- rubocop/require_tools
24
Style/MultipleComparison:
35
Enabled: false
46
Style/PercentLiteralDelimiters:
@@ -152,9 +154,6 @@ Style/IfInsideElse:
152154
Enabled: false
153155
Style/CollectionMethods:
154156
Enabled: false
155-
CrossPlatform/ForkUsage:
156-
Exclude:
157-
- "**/plugins/template/**/*"
158157
Style/MethodCallWithArgsParentheses:
159158
Enabled: true
160159
IgnoredMethods:

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'open3'
34
require 'shellwords'
45
require 'googleauth'
5-
require 'google/apis/firebaseappdistribution_v1'
6+
require_relative '../helper/firebase_app_distribution_apis'
67
require_relative '../helper/firebase_app_distribution_helper'
78
require_relative '../helper/firebase_app_distribution_error_message'
89
require_relative '../helper/firebase_app_distribution_auth_client'
@@ -158,7 +159,9 @@ def self.xcode_archive_path
158159
# the same lane
159160
return nil if lane_platform == :android
160161

162+
# rubocop:disable Require/MissingRequireStatement
161163
Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
164+
# rubocop:enable Require/MissingRequireStatement
162165
end
163166

164167
def self.lane_platform
@@ -174,6 +177,7 @@ def self.platform_from_app_id(app_id)
174177
end
175178
end
176179

180+
# rubocop:disable Require/MissingRequireStatement
177181
def self.get_binary_path(platform, params)
178182
if platform == :ios
179183
return params[:ipa_path] ||
@@ -198,6 +202,7 @@ def self.get_binary_path(platform, params)
198202
UI.error("Unable to determine binary path for unsupported platform #{platform}.")
199203
nil
200204
end
205+
# rubocop:enable Require/MissingRequireStatement
201206

202207
def self.get_upload_timeout(params)
203208
if params[:upload_timeout]
@@ -236,7 +241,9 @@ def self.aab_info_name(app_name)
236241
def self.release_notes(params)
237242
release_notes_param =
238243
get_value_from_value_or_file(params[:release_notes], params[:release_notes_file])
244+
# rubocop:disable Require/MissingRequireStatement
239245
release_notes_param || Actions.lane_context[SharedValues::FL_CHANGELOG]
246+
# rubocop:enable Require/MissingRequireStatement
240247
end
241248

242249
def self.poll_upload_release_operation(client, operation, binary_type)
@@ -506,7 +513,7 @@ def self.available_options
506513
type: String),
507514
FastlaneCore::ConfigItem.new(key: :groups_file,
508515
env_name: "FIREBASEAPPDISTRO_GROUPS_FILE",
509-
description: "Path to file containing group aliases used for distribution, separated by commas",
516+
description: "Path to file containing group aliases used for distribution, separated by commas or newlines",
510517
optional: true,
511518
type: String),
512519
FastlaneCore::ConfigItem.new(key: :testers,
@@ -516,7 +523,7 @@ def self.available_options
516523
type: String),
517524
FastlaneCore::ConfigItem.new(key: :testers_file,
518525
env_name: "FIREBASEAPPDISTRO_TESTERS_FILE",
519-
description: "Path to file containing email addresses of testers, separated by commas",
526+
description: "Path to file containing email addresses of testers, separated by commas or newlines",
520527
optional: true,
521528
type: String),
522529
FastlaneCore::ConfigItem.new(key: :release_notes,
@@ -533,12 +540,13 @@ def self.available_options
533540
# Release Testing
534541
FastlaneCore::ConfigItem.new(key: :test_devices,
535542
env_name: "FIREBASEAPPDISTRO_TEST_DEVICES",
536-
description: "List of devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>;model=<model-id>,...'. Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta",
543+
description: "List of devices (separated by semicolons) to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>;model=<model-id>,...'. Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta",
537544
optional: true,
538545
type: String),
539546
FastlaneCore::ConfigItem.new(key: :test_devices_file,
540547
env_name: "FIREBASEAPPDISTRO_TEST_DEVICES_FILE",
541-
description: "Path to file containing a list of devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>;model=<model-id>,...'. Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta",
548+
description: "Path to file containing a list of devices (sepatated by semicolons or newlines) to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>;model=<model-id>,...'. " \
549+
"Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta",
542550
optional: true,
543551
type: String),
544552
FastlaneCore::ConfigItem.new(key: :test_username,

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_add_testers_action.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'fastlane_core/ui/ui'
3-
require 'google/apis/firebaseappdistribution_v1'
4+
require_relative '../helper/firebase_app_distribution_apis'
45
require_relative '../helper/firebase_app_distribution_helper'
6+
require_relative '../helper/firebase_app_distribution_error_message'
57
require_relative '../helper/firebase_app_distribution_auth_client'
68

79
module Fastlane

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_create_group_action.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'fastlane_core/ui/ui'
3-
require 'google/apis/firebaseappdistribution_v1'
4+
require_relative '../helper/firebase_app_distribution_apis'
45
require_relative '../helper/firebase_app_distribution_helper'
6+
require_relative '../helper/firebase_app_distribution_error_message'
57
require_relative '../helper/firebase_app_distribution_auth_client'
68

79
module Fastlane

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_delete_group_action.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'fastlane_core/ui/ui'
3-
require 'google/apis/firebaseappdistribution_v1'
4+
require_relative '../helper/firebase_app_distribution_apis'
45
require_relative '../helper/firebase_app_distribution_helper'
6+
require_relative '../helper/firebase_app_distribution_error_message'
57
require_relative '../helper/firebase_app_distribution_auth_client'
68

79
module Fastlane

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_get_latest_release.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require 'fastlane/action'
2-
require 'google/apis/firebaseappdistribution_v1'
2+
require 'fastlane_core'
3+
require_relative '../helper/firebase_app_distribution_apis'
34
require_relative '../helper/firebase_app_distribution_auth_client'
5+
require_relative '../helper/firebase_app_distribution_error_message'
46
require_relative '../helper/firebase_app_distribution_helper'
57

68
module Fastlane

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_get_udids.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'open3'
34
require 'shellwords'
45
require 'googleauth'
5-
require 'google/apis/firebaseappdistribution_v1alpha'
6+
require_relative '../helper/firebase_app_distribution_apis'
67
require_relative '../helper/firebase_app_distribution_helper'
78
require_relative '../helper/firebase_app_distribution_error_message'
89
require_relative '../helper/firebase_app_distribution_auth_client'

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_remove_testers_action.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'fastlane/action'
2+
require 'fastlane_core'
23
require 'fastlane_core/ui/ui'
3-
require 'google/apis/firebaseappdistribution_v1'
4+
require_relative '../helper/firebase_app_distribution_apis'
45
require_relative '../helper/firebase_app_distribution_helper'
6+
require_relative '../helper/firebase_app_distribution_error_message'
57
require_relative '../helper/firebase_app_distribution_auth_client'
68

79
module Fastlane
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require 'google/apis/firebaseappdistribution_v1'
2+
require 'google/apis/firebaseappdistribution_v1alpha'

lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_auth_client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'googleauth'
22
require 'fastlane_core/ui/ui'
3+
require_relative './firebase_app_distribution_error_message'
34

45
module Fastlane
56
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")

lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
require 'fastlane_core/ui/ui'
22
require 'cfpropertylist'
3+
require 'google/apis/core'
4+
require 'google/apis/options'
5+
require_relative './firebase_app_distribution_error_message'
36

47
module Fastlane
58
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")

0 commit comments

Comments
 (0)