Skip to content

Commit 3ee6cd7

Browse files
Merge pull request #469 from wordpress-mobile/update/is_string-to-type
Replace all instances of `is_string` with `type`
2 parents 5cf95d2 + cb40b83 commit 3ee6cd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+95
-82
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ _None_
2626
- Update `danger` to `9.3.0`. This is an internal-only change and is not a breaking change for clients. [#464]
2727
- Replace `rspec-buildkite-analytics` with `buildkite-test_collector` (Buildkite renamed the gem) and update it to `2.2.0`. This is another internal-only change and is not a breaking change for clients. [#465]
2828
- Adds `ignore_pipeline_branch_filters=true` parameter to the API call triggering a Buildkite build [#468]
29+
- Replace all instances of `is_string` with `type` [#469]
2930

3031
## 7.0.0
3132

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ PLATFORMS
413413
ruby
414414

415415
DEPENDENCIES
416-
buildkite-test_collector (~> 2.1)
416+
buildkite-test_collector (~> 2.2)
417417
bundler (~> 2.0)
418418
cocoapods (~> 1.10)
419419
codecov

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def self.available_options
131131
FastlaneCore::ConfigItem.new(key: :po_file_path,
132132
env_name: 'FL_UPDATE_METADATA_SOURCE_PO_FILE_PATH',
133133
description: 'The path of the .po file to update',
134-
is_string: true,
134+
type: String,
135135
verify_block: proc do |value|
136136
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?)
137137
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
@@ -145,7 +145,7 @@ def self.available_options
145145
FastlaneCore::ConfigItem.new(key: :source_files,
146146
env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES',
147147
description: 'The hash with the path to the source files and the key to use to include their content',
148-
is_string: false,
148+
type: Hash,
149149
verify_block: proc do |value|
150150
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?)
151151
end),

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,37 @@ def self.return_value
3333
end
3434

3535
def self.details
36-
'Checks that the strings to be localised are updated from the libs into the main application file'
36+
<<~DETAILS
37+
Checks that the strings to be localised are updated from the libs into the main application file
38+
39+
For the `lib_strings_path` ConfigItem, it is an array of Hashes, each describing a library and
40+
containing these specific keys:
41+
- `:library`: The human readable name of the library, used to display in console messages
42+
- `:strings_path`: The path to the strings.xml file of the library to merge into the main one
43+
- `:exclusions`: An array of strings keys to exclude during merge. Any of those keys from the
44+
library's `strings.xml` will be skipped and won't be merged into the main one.
45+
- `:source_id`: An optional `String` which will be added as the `a8c-src-lib` XML attribute
46+
to strings coming from this library, to help identify their source in the merged file.
47+
- `:add_ignore_attr`: If set to `true`, will add `tools:ignore="UnusedResources"` to merged strings.
48+
DETAILS
3749
end
3850

3951
def self.available_options
4052
[
4153
FastlaneCore::ConfigItem.new(key: :app_strings_path,
4254
description: 'The path of the main strings file',
4355
optional: false,
44-
is_string: true),
56+
type: String),
4557
FastlaneCore::ConfigItem.new(key: :libs_strings_path,
4658
env_name: 'CHECK_LIBS_STRINGS_PATH',
47-
description: 'The list of libs to merge',
59+
description: 'The list of libs to merge. This should be an array of Hashes.',
4860
optional: false,
49-
is_string: false),
61+
type: Array),
5062
FastlaneCore::ConfigItem.new(key: :diff_url,
5163
env_name: 'CHECK_LIBS_DIFF_URL',
5264
description: 'The url of the diff to check',
5365
optional: true,
54-
is_string: true),
66+
type: String),
5567
]
5668
end
5769

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def self.available_options
7474
FastlaneCore::ConfigItem.new(key: :base_version,
7575
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_BASE_VERSION',
7676
description: 'The version to work on', # a short description of this parameter
77-
is_string: true,
77+
type: String,
7878
optional: true), # true: verifies the input is a string, false: every kind of value),
7979
FastlaneCore::ConfigItem.new(key: :skip_confirm,
8080
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_SKIPCONFIRM',
8181
description: 'Skips confirmation',
82-
is_string: false, # true: verifies the input is a string, false: every kind of value
82+
type: Boolean,
8383
default_value: false), # the default value if the user didn't provide one
8484
FastlaneCore::ConfigItem.new(key: :default_branch,
8585
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ def self.available_options
4646
FastlaneCore::ConfigItem.new(key: :skip_confirm,
4747
env_name: 'FL_ANDROID_BUILD_PRECHECKS_SKIP_CONFIRM',
4848
description: 'True to avoid the system ask for confirmation',
49-
is_string: false,
49+
type: Boolean,
5050
default_value: false),
5151
FastlaneCore::ConfigItem.new(key: :alpha,
5252
env_name: 'FL_ANDROID_BUILD_PRECHECKS_ALPHA_BUILD',
5353
description: 'True if this is for an alpha build',
54-
is_string: false,
54+
type: Boolean,
5555
default_value: false),
5656
FastlaneCore::ConfigItem.new(key: :beta,
5757
env_name: 'FL_ANDROID_BUILD_PRECHECKS_BETA_BUILD',
5858
description: 'True if this is for a beta build',
59-
is_string: false,
59+
type: Boolean,
6060
default_value: false),
6161
FastlaneCore::ConfigItem.new(key: :final,
6262
env_name: 'FL_ANDROID_BUILD_PRECHECKS_FINAL_BUILD',
6363
description: 'True if this is for a final build',
64-
is_string: false,
64+
type: Boolean,
6565
default_value: false),
6666
]
6767
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def self.available_options
4343
FastlaneCore::ConfigItem.new(key: :version_name,
4444
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_VERSION',
4545
description: 'The version name for the hotfix',
46-
is_string: true),
46+
type: String),
4747
FastlaneCore::ConfigItem.new(key: :version_code,
4848
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_CODE',
4949
description: 'The version code for the hotfix'),
5050
FastlaneCore::ConfigItem.new(key: :previous_version_name,
5151
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
5252
description: 'The version to branch from',
53-
is_string: true),
53+
type: String),
5454
]
5555
end
5656

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def self.available_options
5757
FastlaneCore::ConfigItem.new(key: :skip_confirm,
5858
env_name: 'FL_ANDROID_CODEFREEZE_PRECHECKS_SKIPCONFIRM',
5959
description: 'Skips confirmation before codefreeze',
60-
is_string: false, # true: verifies the input is a string, false: every kind of value
60+
type: Boolean,
6161
default_value: false), # the default value if the user didn't provide one
6262
FastlaneCore::ConfigItem.new(key: :default_branch,
6363
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def self.available_options
4040
FastlaneCore::ConfigItem.new(key: :skip_confirm,
4141
env_name: 'FL_ANDROID_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM',
4242
description: 'Skips confirmation',
43-
is_string: false, # true: verifies the input is a string, false: every kind of value
43+
type: Boolean,
4444
default_value: false), # the default value if the user didn't provide one
4545
]
4646
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ def self.available_options
3838
env_name: 'ANDROID_XML_NOTES_DOWNLOAD_PATH',
3939
description: 'The path to the folder with the release notes',
4040
optional: false,
41-
is_string: true),
41+
type: String),
4242
FastlaneCore::ConfigItem.new(key: :build_number,
4343
env_name: 'ANDROID_XML_NOTES_BUILD_NUMBER',
4444
description: 'The build number of the release notes',
4545
optional: false,
46-
is_string: true),
46+
type: String),
4747
FastlaneCore::ConfigItem.new(key: :locales,
4848
env_name: 'FL_DOWNLOAD_METADATA_LOCALES',
4949
description: 'The hash with the GLotPress locale and the project locale association',
50-
is_string: false),
50+
type: Hash),
5151
]
5252
end
5353

0 commit comments

Comments
 (0)