From 8d730414c3f27e0ef3137ccf677d2dad6aae4817 Mon Sep 17 00:00:00 2001 From: "i.o.novikov" Date: Fri, 20 Jan 2023 14:01:35 +0300 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: 970860fa95434f90c4533cb25935d2266567304e --- .github/workflows/publish.yml | 2 +- .gitignore | 3 - .rubocop.yml | 380 ++++++++++++++++++ ASDKSample/.swiftlint.yml | 6 +- .../xcschemes/ASDKSample.xcscheme | 11 +- .../contents.xcworkspacedata | 16 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + ASDKSample/Podfile | 14 +- ASDKSample/Podfile.lock | 2 +- ASDKSample/swiftgen.yml | 1 - Example/TestPlans/Core.xctestplan | 24 ++ Example/TestPlans/UI.xctestplan | 24 ++ Gemfile | 6 +- Gemfile.lock | 2 +- TinkoffASDKCore.podspec | 53 ++- TinkoffASDKCore/swiftgen.yml | 1 - TinkoffASDKUI.podspec | 55 ++- TinkoffASDKUI/swiftgen.yml | 1 - TinkoffASDKYandexPay.podspec | 43 +- fastlane/Fastfile | 20 +- 20 files changed, 566 insertions(+), 106 deletions(-) create mode 100644 .rubocop.yml create mode 100644 ASDKSample/ASDKSample.xcworkspace/contents.xcworkspacedata create mode 100644 ASDKSample/ASDKSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Example/TestPlans/Core.xctestplan create mode 100644 Example/TestPlans/UI.xctestplan diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f804a3bd9..febc868ad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,4 +14,4 @@ jobs: with: bump_type: ${{ github.event.inputs.bump_type }} secrets: - cocapods_trunk_token: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} \ No newline at end of file + cocapods_trunk_token: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/.gitignore b/.gitignore index 340305b57..4e9c677b3 100644 --- a/.gitignore +++ b/.gitignore @@ -153,8 +153,5 @@ fastlane/README.md # VSCode .vscode -# Xcode generated workspaces -ASDKSample/ASDKSample.xcworkspace/** - # Debug helper files for local development TinkoffASDKUI/TinkoffASDKUI/Debug/** \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..605310aba --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,380 @@ +require: + - rubocop/require_tools + +AllCops: + TargetRubyVersion: 2.6 + Exclude: + - vendor/**/* + - "bin/**/*" + - vendor/**/* + - Development/voicekit_sdk/**/* + +Style/MultipleComparison: + Enabled: false + +Style/PercentLiteralDelimiters: + Enabled: false + +# kind_of? is a good way to check a type +Style/ClassCheck: + EnforcedStyle: kind_of? + +Style/FrozenStringLiteralComment: + Enabled: false + +# This doesn't work with older versions of Ruby (pre 2.4.0) +Style/SafeNavigation: + Enabled: false + +# .length == 0 is also good, we don't always want .zero? +Style/NumericPredicate: + Enabled: false + +# this would cause errors with long lanes +Metrics/BlockLength: + Enabled: false + +# this is a bit buggy +Metrics/ModuleLength: + Enabled: false + +# certificate_1 is an okay variable name +Naming/VariableNumber: + Enabled: false + +# This is used a lot across the fastlane code base for config files +Lint/MissingSuper: + Enabled: false + +Style/MissingRespondToMissing: + Enabled: false + +# This rule isn't useful, lots of discussion happening around it also +# e.g. https://github.com/bbatsov/rubocop/issues/2338 +# MultilineBlockChain: +# Enabled: false + +# +# File.chmod(0777, f) +# +# is easier to read than +# +# File.chmod(0o777, f) +# +Style/NumericLiteralPrefix: + Enabled: false + +# +# command = (!clean_expired.nil? || !clean_pattern.nil?) ? CLEANUP : LIST +# +# is easier to read than +# +# command = !clean_expired.nil? || !clean_pattern.nil? ? CLEANUP : LIST +# +Style/TernaryParentheses: + Enabled: false + +# sometimes it is useful to have those empty methods +Style/EmptyMethod: + Enabled: false + +Require/MissingRequireStatement: + Enabled: false + +# We could potentially enable the 2 below: +Layout/FirstHashElementIndentation: + Enabled: false + +Layout/HashAlignment: + Enabled: false + +# HoundCI doesn't like this rule +Layout/DotPosition: + Enabled: false + +# We allow !! as it's an easy way to convert to boolean +Style/DoubleNegation: + Enabled: false + +# Prevent to replace [] into %i +Style/SymbolArray: + Enabled: false + +# We still support Ruby 2.0.0 +Layout/HeredocIndentation: + Enabled: false + +# Sometimes we allow a rescue block that doesn't contain code +Lint/SuppressedException: + Enabled: false + +# Cop supports --auto-correct. +Lint/UnusedBlockArgument: + Enabled: false + +Lint/AmbiguousBlockAssociation: + Enabled: false + +# Needed for $verbose +Style/GlobalVars: + Enabled: false + +# We want to allow class Fastlane::Class +Style/ClassAndModuleChildren: + Enabled: false + +# $? Exit +Style/SpecialGlobalVars: + Enabled: false + +Metrics/AbcSize: + Enabled: false + +Metrics/MethodLength: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + +# The %w might be confusing for new users +Style/WordArray: + MinSize: 19 + +# raise and fail are both okay +Style/SignalException: + Enabled: false + +# Better too much 'return' than one missing +Style/RedundantReturn: + Enabled: false + +# Having if in the same line might not always be good +Style/IfUnlessModifier: + Enabled: false + +# and and or is okay +Style/AndOr: + Enabled: true + EnforcedStyle: conditionals + +# Configuration parameters: CountComments. +Metrics/ClassLength: + Max: 320 + +# Configuration parameters: AllowURI, URISchemes. +Layout/LineLength: + Max: 370 + +# Configuration parameters: CountKeywordArgs. +Metrics/ParameterLists: + Max: 17 + +Metrics/PerceivedComplexity: + Max: 18 + +# Sometimes it's easier to read without guards +Style/GuardClause: + Enabled: false + +# We allow both " and ' +Style/StringLiterals: + Enabled: false + +# something = if something_else +# that's confusing +Style/ConditionalAssignment: + Enabled: false + +# Better to have too much self than missing a self +Style/RedundantSelf: + Enabled: false + +# e.g. +# def self.is_supported?(platform) +# we may never use `platform` +Lint/UnusedMethodArgument: + Enabled: false + +# the let(:key) { ... } +Lint/ParenthesesAsGroupedExpression: + Enabled: true + +# This would reject is_ in front of methods +# We use `is_supported?` everywhere already +Naming/PredicateName: + Enabled: false + +# We allow the $ +Style/PerlBackrefs: + Enabled: false + +# Disable '+ should be surrounded with a single space' for xcodebuild_spec.rb +Layout/SpaceAroundOperators: + Enabled: true + +# They have not to be snake_case +Naming/FileName: + Exclude: + - "**/Brewfile" + - "**/Gemfile" + - "**/Podfile" + - "**/Rakefile" + - "**/Fastfile" + - "**/Deliverfile" + - "**/Snapfile" + - "**/*.gemspec" + - "**/*.podspec" + +# We're not there yet +Style/Documentation: + Enabled: false + +# Added after upgrade to 0.38.0 +Style/MutableConstant: + Enabled: false + +# length > 0 is good +Style/ZeroLengthPredicate: + Enabled: false + +# Adds complexity +Style/IfInsideElse: + Enabled: false + +# Sometimes we just want to 'collect' +Style/CollectionMethods: + Enabled: false + +Naming/AccessorMethodName: + Enabled: false + +# ( ) for method calls +Style/MethodCallWithArgsParentheses: + Enabled: true + Exclude: + - "**/*.podspec" + IgnoredMethods: + - "require" + - "require_relative" + - "fastlane_require" + - "gem" + - "program" + - "command" + - "raise" + - "attr_accessor" + - "attr_reader" + - "desc" + - "lane" + - "private_lane" + - "platform" + # rspec tests code below + - "to" + - "not_to" + - "describe" + - "it" + - "be" + - "context" + - "before" + - "after" + +# suggested by rubocop +Layout/BeginEndAlignment: # (new in 0.91) + Enabled: true +Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83) + Enabled: true +Layout/SpaceAroundMethodCallOperator: # (new in 0.82) + Enabled: true +Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89) + Enabled: true +Lint/ConstantDefinitionInBlock: # (new in 0.91) + Enabled: true +Lint/DeprecatedOpenSSLConstant: # (new in 0.84) + Enabled: true +Lint/DuplicateElsifCondition: # (new in 0.88) + Enabled: true +Lint/DuplicateRequire: # (new in 0.90) + Enabled: true +Lint/DuplicateRescueException: # (new in 0.89) + Enabled: true +Lint/EmptyConditionalBody: # (new in 0.89) + Enabled: true +Lint/EmptyFile: # (new in 0.90) + Enabled: true +Lint/FloatComparison: # (new in 0.89) + Enabled: true +Lint/HashCompareByIdentity: # (new in 0.93) + Enabled: true +Lint/IdentityComparison: # (new in 0.91) + Enabled: true +Lint/MixedRegexpCaptureTypes: # (new in 0.85) + Enabled: true +Lint/OutOfRangeRegexpRef: # (new in 0.89) + Enabled: true +Lint/RaiseException: # (new in 0.81) + Enabled: true +Lint/RedundantSafeNavigation: # (new in 0.93) + Enabled: true +Lint/SelfAssignment: # (new in 0.89) + Enabled: true +Lint/StructNewOverride: # (new in 0.81) + Enabled: true +Lint/TopLevelReturnWithArgument: # (new in 0.89) + Enabled: true +Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90) + Enabled: true +Lint/UnreachableLoop: # (new in 0.89) + Enabled: true +Lint/UselessMethodDefinition: # (new in 0.90) + Enabled: true +Lint/UselessTimes: # (new in 0.91) + Enabled: true +Style/AccessorGrouping: # (new in 0.87) + Enabled: true +Style/BisectedAttrAccessor: # (new in 0.87) + Enabled: true +Style/CaseLikeIf: # (new in 0.88) + Enabled: true +Style/ClassEqualityComparison: # (new in 0.93) + Enabled: true +Style/CombinableLoops: # (new in 0.90) + Enabled: true +Style/ExplicitBlockArgument: # (new in 0.89) + Enabled: true +Style/ExponentialNotation: # (new in 0.82) + Enabled: true +Style/GlobalStdStream: # (new in 0.89) + Enabled: true +Style/HashAsLastArrayItem: # (new in 0.88) + Enabled: true +Style/HashEachMethods: # (new in 0.80) + Enabled: true +Style/HashLikeCase: # (new in 0.88) + Enabled: true +Style/HashTransformKeys: # (new in 0.80) + Enabled: true +Style/HashTransformValues: # (new in 0.80) + Enabled: true +Style/KeywordParametersOrder: # (new in 0.90) + Enabled: true +Style/OptionalBooleanParameter: # (new in 0.89) + Enabled: true +Style/RedundantAssignment: # (new in 0.87) + Enabled: true +Style/RedundantFetchBlock: # (new in 0.86) + Enabled: true +Style/RedundantFileExtensionInRequire: # (new in 0.88) + Enabled: true +Style/RedundantRegexpCharacterClass: # (new in 0.85) + Enabled: true +Style/RedundantRegexpEscape: # (new in 0.85) + Enabled: true +Style/RedundantSelfAssignment: # (new in 0.90) + Enabled: true +Style/SingleArgumentDig: # (new in 0.89) + Enabled: true +Style/SlicingWithRange: # (new in 0.83) + Enabled: true +Style/SoleNestedConditional: # (new in 0.89) + Enabled: true +Style/StringConcatenation: # (new in 0.89) + Enabled: true diff --git a/ASDKSample/.swiftlint.yml b/ASDKSample/.swiftlint.yml index 57663c937..4ec3b09c4 100644 --- a/ASDKSample/.swiftlint.yml +++ b/ASDKSample/.swiftlint.yml @@ -23,9 +23,9 @@ disabled_rules: - generic_type_name # Порядок set и get в свойствах. - computed_accessors_order - # ⛔ FIXME: - Enable after refactoring + # ⛔ FIXME: - Enable after refactoring - file_length - # ⛔ FIXME: - Enable after refactoring + # ⛔ FIXME: - Enable after refactoring - implicitly_unwrapped_optional opt_in_rules: @@ -84,7 +84,7 @@ function_body_length: error: 100 # Сложность тела функции должна быть ограничена -# ⛔ FIXME: - Enable after refactoring commeted values +# ⛔ FIXME: - Enable after refactoring commeted values cyclomatic_complexity: warning: 25 # 12 error: 30 # 18 diff --git a/ASDKSample/ASDKSample.xcodeproj/xcshareddata/xcschemes/ASDKSample.xcscheme b/ASDKSample/ASDKSample.xcodeproj/xcshareddata/xcschemes/ASDKSample.xcscheme index e21c8b7c3..db65c6f6b 100644 --- a/ASDKSample/ASDKSample.xcodeproj/xcshareddata/xcschemes/ASDKSample.xcscheme +++ b/ASDKSample/ASDKSample.xcodeproj/xcshareddata/xcschemes/ASDKSample.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -27,6 +27,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + diff --git a/ASDKSample/ASDKSample.xcworkspace/contents.xcworkspacedata b/ASDKSample/ASDKSample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..4ec02d2af --- /dev/null +++ b/ASDKSample/ASDKSample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/ASDKSample/ASDKSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ASDKSample/ASDKSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/ASDKSample/ASDKSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ASDKSample/Podfile b/ASDKSample/Podfile index 640e71ef9..52b5ccd0d 100644 --- a/ASDKSample/Podfile +++ b/ASDKSample/Podfile @@ -4,20 +4,20 @@ platform :ios, '12.3' use_frameworks! target 'ASDKSample' do - pod 'TinkoffASDKCore', :path => "../", :testspecs => ['Tests'] - pod 'TinkoffASDKUI', :path => "../", :testspecs => ['Tests'] - pod 'TinkoffASDKYandexPay', :path => '../' + pod 'TinkoffASDKCore', path: '../', testspecs: ['Tests'] + pod 'TinkoffASDKUI', path: '../', testspecs: ['Tests'] + pod 'TinkoffASDKYandexPay', path: '../' - # Linting and Formatting + # Linting and Formatting pod 'SwiftFormat/CLI', '0.49.18' # Версия должна совпадать с версией контейнера на CI pod 'SwiftLint', '0.47.0' # Версия должна совпадать с версией контейнера на CI pod 'SwiftGen', '~> 6.0' end def install_githooks - system("git config --local core.hooksPath \"$(git rev-parse --show-toplevel)/githooks\"") + system('git config --local core.hooksPath "$(git rev-parse --show-toplevel)/githooks"') end -post_install do |installer| +post_install do |_installer| install_githooks -end \ No newline at end of file +end diff --git a/ASDKSample/Podfile.lock b/ASDKSample/Podfile.lock index 6c2af0b82..69861a459 100644 --- a/ASDKSample/Podfile.lock +++ b/ASDKSample/Podfile.lock @@ -65,6 +65,6 @@ SPEC CHECKSUMS: YandexMobileMetrica: baf7cea47cb87fc9af963c4f747ce8dd7df3d7c0 YandexPaySDK: 77bfc6e67d889e26f1f3926c2a6cdfd5ccbb6a52 -PODFILE CHECKSUM: 217bce3f9ba90d1b9b1fb5edcc9d48457072e21e +PODFILE CHECKSUM: 898ee7468810b5cd8599f35e049d6e6118dc3017 COCOAPODS: 1.11.3 diff --git a/ASDKSample/swiftgen.yml b/ASDKSample/swiftgen.yml index 8d9c080d7..1c991851d 100644 --- a/ASDKSample/swiftgen.yml +++ b/ASDKSample/swiftgen.yml @@ -13,4 +13,3 @@ xcassets: output: ASDKSample/Resources/Generated/Assets+Generated.swift params: forceProvidesNamespaces: true - diff --git a/Example/TestPlans/Core.xctestplan b/Example/TestPlans/Core.xctestplan new file mode 100644 index 000000000..63180d30a --- /dev/null +++ b/Example/TestPlans/Core.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "4F590F73-E4D6-4B66-8836-E8BC1D4127CD", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Pods\/Pods.xcodeproj", + "identifier" : "C3C81D2058EE95A9FFAB9B9ACD4643CD", + "name" : "TinkoffASDKCore-Unit-Tests" + } + } + ], + "version" : 1 +} diff --git a/Example/TestPlans/UI.xctestplan b/Example/TestPlans/UI.xctestplan new file mode 100644 index 000000000..b7bac7478 --- /dev/null +++ b/Example/TestPlans/UI.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "016ABB29-E01A-45FA-8ED6-F598D0157BDC", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Pods\/Pods.xcodeproj", + "identifier" : "8B5DD01CE09B225B9FED247AFFA4DC2E", + "name" : "TinkoffASDKUI-Unit-Tests" + } + } + ], + "version" : 1 +} diff --git a/Gemfile b/Gemfile index caee7d712..59575c5b8 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,7 @@ gem 'fastlane-plugin-changelog' # https://github.com/CocoaPods/CocoaPods/issues/10388 gem 'rexml', '~> 3.2.4' -plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) \ No newline at end of file +# ruby linter +gem 'rubocop', '~> 1.25.1' +# required to parse rubocop config +gem 'rubocop-require_tools' diff --git a/Gemfile.lock b/Gemfile.lock index 1c59f0c15..20d3baf8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,4 +284,4 @@ DEPENDENCIES rexml (~> 3.2.4) BUNDLED WITH - 2.3.14 + 2.3.14 \ No newline at end of file diff --git a/TinkoffASDKCore.podspec b/TinkoffASDKCore.podspec index b7087db16..8902e6dbd 100644 --- a/TinkoffASDKCore.podspec +++ b/TinkoffASDKCore.podspec @@ -1,30 +1,29 @@ Pod::Spec.new do |spec| - - spec.name = 'TinkoffASDKCore' - spec.version = '2.16.0' - spec.summary = 'Мобильный SDK' - spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS' - spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' - spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' - spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' - spec.license = { :type => 'Apache 2.0', :file => 'TinkoffASDKCore/License.txt' } - spec.author = { 'Tinkoff' => 'v.budnikov@tinkoff.ru' } - spec.platform = :ios - spec.module_name = "TinkoffASDKCore" - spec.swift_version = '5.0' - spec.ios.deployment_target = '12.3' - spec.source = { :git => 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', :tag => spec.version } - spec.source_files = 'TinkoffASDKCore/TinkoffASDKCore/**/*.swift' - spec.resource_bundles = { - 'TinkoffASDKCoreResources' => ['TinkoffASDKCore/TinkoffASDKCore/**/*.{lproj,strings}'] - } - spec.pod_target_xcconfig = { - 'CODE_SIGN_IDENTITY' => '' - } - + spec.name = 'TinkoffASDKCore' + spec.version = '2.16.0' + spec.summary = 'Мобильный SDK' + spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS' + spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' + spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' + spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' + spec.license = { type: 'Apache 2.0', file: 'TinkoffASDKCore/License.txt' } + spec.author = { 'Tinkoff' => 'v.budnikov@tinkoff.ru' } + spec.platform = :ios + spec.module_name = 'TinkoffASDKCore' + spec.swift_version = '5.0' + spec.ios.deployment_target = '12.3' + spec.source = { git: 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', tag: spec.version } + spec.source_files = 'TinkoffASDKCore/TinkoffASDKCore/**/*.swift' + spec.resource_bundles = { + 'TinkoffASDKCoreResources' => ['TinkoffASDKCore/TinkoffASDKCore/**/*.{lproj,strings}'] + } + spec.pod_target_xcconfig = { + 'CODE_SIGN_IDENTITY' => '' + } spec.test_spec 'Tests' do |test_spec| - test_spec.source_files = 'TinkoffASDKCore/TinkoffASDKCoreTests/**/*.swift' - test_spec.exclude_files = 'TinkoffASDKCore/TinkoffASDKCoreTests/IntegrationTests.swift', 'TinkoffASDKCore/TinkoffASDKCoreTests/FinishResponseTests.swift', 'TinkoffASDKCore/TinkoffASDKCoreTests/CoreTests.swift' - test_spec.resources = 'TinkoffASDKCore/TinkoffASDKCoreTests/**/*.{json}' - end + test_spec.source_files = 'TinkoffASDKCore/TinkoffASDKCoreTests/**/*.swift' + test_spec.exclude_files = 'TinkoffASDKCore/TinkoffASDKCoreTests/IntegrationTests.swift', + 'TinkoffASDKCore/TinkoffASDKCoreTests/FinishResponseTests.swift', 'TinkoffASDKCore/TinkoffASDKCoreTests/CoreTests.swift' + test_spec.resources = 'TinkoffASDKCore/TinkoffASDKCoreTests/**/*.{json}' + end end diff --git a/TinkoffASDKCore/swiftgen.yml b/TinkoffASDKCore/swiftgen.yml index 7555aa523..5e873b7e4 100644 --- a/TinkoffASDKCore/swiftgen.yml +++ b/TinkoffASDKCore/swiftgen.yml @@ -6,4 +6,3 @@ strings: params: enumName: Loc bundle: Bundle.coreResources - diff --git a/TinkoffASDKUI.podspec b/TinkoffASDKUI.podspec index 8848c3ee0..1bdd27be3 100644 --- a/TinkoffASDKUI.podspec +++ b/TinkoffASDKUI.podspec @@ -1,32 +1,31 @@ Pod::Spec.new do |spec| + spec.name = 'TinkoffASDKUI' + spec.version = '2.16.0' + spec.summary = 'Мобильный SDK' + spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS' + spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' + spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' + spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' + spec.license = { type: 'Apache 2.0', file: 'TinkoffASDKUI/License.txt' } + spec.author = { 'Tinkoff' => 'v.budnikov@tinkoff.ru' } + spec.platform = :ios + spec.module_name = 'TinkoffASDKUI' + spec.swift_version = '5.0' + spec.ios.deployment_target = '12.3' + spec.source = { git: 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', tag: spec.version } + spec.source_files = 'TinkoffASDKUI/TinkoffASDKUI/**/*.swift' + spec.resource_bundles = { + 'TinkoffASDKUIResources' => ['TinkoffASDKUI/TinkoffASDKUI/**/*.{lproj,strings,xib,xcassets,imageset,png}'] + } + spec.pod_target_xcconfig = { + 'CODE_SIGN_IDENTITY' => '' + } - spec.name = "TinkoffASDKUI" - spec.version = '2.16.0' - spec.summary = 'Мобильный SDK' - spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS' - spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' - spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' - spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' - spec.license = { :type => 'Apache 2.0', :file => 'TinkoffASDKUI/License.txt' } - spec.author = { 'Tinkoff' => 'v.budnikov@tinkoff.ru' } - spec.platform = :ios - spec.module_name = "TinkoffASDKUI" - spec.swift_version = '5.0' - spec.ios.deployment_target = '12.3' - spec.source = { :git => 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', :tag => spec.version } - spec.source_files = 'TinkoffASDKUI/TinkoffASDKUI/**/*.swift' - spec.resource_bundles = { - 'TinkoffASDKUIResources' => ['TinkoffASDKUI/TinkoffASDKUI/**/*.{lproj,strings,xib,xcassets,imageset,png}'] - } - spec.pod_target_xcconfig = { - 'CODE_SIGN_IDENTITY' => '' - } + spec.vendored_frameworks = ['ThirdParty/ThreeDSWrapper.xcframework', 'ThirdParty/TdsSdkIos.xcframework'] + spec.preserve_paths = ['ThirdParty/ThreeDSWrapper.xcframework', 'ThirdParty/TdsSdkIos.xcframework'] + spec.dependency 'TinkoffASDKCore' - spec.vendored_frameworks = ['ThirdParty/ThreeDSWrapper.xcframework', 'ThirdParty/TdsSdkIos.xcframework'] - spec.preserve_paths = ['ThirdParty/ThreeDSWrapper.xcframework', 'ThirdParty/TdsSdkIos.xcframework'] - spec.dependency 'TinkoffASDKCore' - - spec.test_spec 'Tests' do |test_spec| - test_spec.source_files = 'TinkoffASDKUI/TinkoffASDKUITests/**/*' - end + spec.test_spec 'Tests' do |test_spec| + test_spec.source_files = 'TinkoffASDKUI/TinkoffASDKUITests/**/*' + end end diff --git a/TinkoffASDKUI/swiftgen.yml b/TinkoffASDKUI/swiftgen.yml index beb8bd90e..ddf24fa4c 100644 --- a/TinkoffASDKUI/swiftgen.yml +++ b/TinkoffASDKUI/swiftgen.yml @@ -15,4 +15,3 @@ xcassets: params: forceProvidesNamespaces: true bundle: Bundle.uiResources - diff --git a/TinkoffASDKYandexPay.podspec b/TinkoffASDKYandexPay.podspec index f3c361533..097a4ebcb 100644 --- a/TinkoffASDKYandexPay.podspec +++ b/TinkoffASDKYandexPay.podspec @@ -1,26 +1,25 @@ Pod::Spec.new do |spec| + spec.name = 'TinkoffASDKYandexPay' + spec.version = '2.16.0' + spec.summary = 'Мобильный SDK' + spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS с помощью YandexPaySDK' + spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' + spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' + spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' + spec.license = { type: 'Apache 2.0', file: 'TinkoffASDKYandexPay/License.txt' } + spec.author = { 'Tinkoff' => 'r.akhmadeev@tinkoff.ru' } + spec.platform = :ios + spec.module_name = 'TinkoffASDKYandexPay' + spec.swift_version = '5.0' + spec.ios.deployment_target = '12.3' + spec.source = { git: 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', tag: spec.version } + spec.source_files = 'TinkoffASDKYandexPay/TinkoffASDKYandexPay/**/*.swift' - spec.name = "TinkoffASDKYandexPay" - spec.version = '2.16.0' - spec.summary = 'Мобильный SDK' - spec.description = 'Позволяет настроить прием платежей в нативной форме приложений для платформы iOS с помощью YandexPaySDK' - spec.homepage = 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS' - spec.changelog = 'https://github.com/Tinkoff/AcquiringSdk_IOS/blob/master/CHANGELOG.md' - spec.documentation_url = 'https://oplata.tinkoff.ru/develop/api/payments/' - spec.license = { :type => 'Apache 2.0', :file => 'TinkoffASDKYandexPay/License.txt' } - spec.author = { 'Tinkoff' => 'r.akhmadeev@tinkoff.ru' } - spec.platform = :ios - spec.module_name = "TinkoffASDKYandexPay" - spec.swift_version = '5.0' - spec.ios.deployment_target = '12.3' - spec.source = { :git => 'https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS.git', :tag => spec.version } - spec.source_files = 'TinkoffASDKYandexPay/TinkoffASDKYandexPay/**/*.swift' + spec.pod_target_xcconfig = { + 'CODE_SIGN_IDENTITY' => '' + } - spec.pod_target_xcconfig = { - 'CODE_SIGN_IDENTITY' => '' - } - - spec.dependency 'TinkoffASDKCore' - spec.dependency 'TinkoffASDKUI' - spec.dependency 'YandexPaySDK/Dynamic', '~> 1.2' + spec.dependency 'TinkoffASDKCore' + spec.dependency 'TinkoffASDKUI' + spec.dependency 'YandexPaySDK/Dynamic', '~> 1.2' end diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a5e690b8b..05b84c12a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -4,10 +4,10 @@ import_from_git( ) override_lane :extend_bump_version do |options| - version_swift="TinkoffASDKCore/TinkoffASDKCore/SDK/Version.swift" - relative_file_path = "../" + version_swift + version_swift = "TinkoffASDKCore/TinkoffASDKCore/SDK/Version.swift" + relative_file_path = "../#{version_swift}" data = File.read(relative_file_path) - data = data.gsub(/versionString = \"([\d.]+)\"/, "versionString = \"#{options[:version]}\"") + data = data.gsub(/versionString = "([\d.]+)"/, "versionString = \"#{options[:version]}\"") File.write(relative_file_path, data) [version_swift] end @@ -21,9 +21,15 @@ lane :build_spm do end end -lane :tests do +lane :tests do run_tests( - workspace: "ASDKSample/ASDKSample.xcworkspace", - scheme: "ASDKSample" - ) + workspace: 'ASDKSample/ASDKSample.xcworkspace', + scheme: 'ASDKSample', + testplan: "Core" + ) + run_tests( + workspace: 'ASDKSample/ASDKSample.xcworkspace', + scheme: 'ASDKSample', + testplan: "UI" + ) end