From f6b1a21e43858750166a964d4f8ea3c1413ea2ea Mon Sep 17 00:00:00 2001 From: James Treanor Date: Thu, 10 Oct 2019 14:57:46 +0100 Subject: [PATCH 1/7] Use CocoaPods CDN specs repo --- .circleci/config.yml | 3 +-- Gemfile | 3 +-- Gemfile.lock | 40 ++++++++++++++++++++++------------------ Podfile | 3 +-- Podfile.lock | 10 +++++----- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 00e7c887..7bb5a207 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: # This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs - ios: wordpress-mobile/ios@0.0.35 + ios: wordpress-mobile/ios@0.0.36 workflows: test_and_validate: @@ -18,7 +18,6 @@ workflows: name: Validate Podspec xcode-version: "10.2.0" podspec-path: WordPressKit.podspec - update-specs-repo: true - ios/publish-podspec: name: Publish to Trunk xcode-version: "10.2.0" diff --git a/Gemfile b/Gemfile index 8a791e2b..b68907c3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,3 @@ source 'https://rubygems.org' do - gem 'cocoapods', '1.6.1' - gem 'cocoapods-repo-update' + gem 'cocoapods', '1.8.3' end diff --git a/Gemfile.lock b/Gemfile.lock index bfe02b07..a23ddab0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,58 +1,63 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.0) + CFPropertyList (3.0.1) activesupport (4.2.11.1) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) + algoliasearch (1.27.1) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) atomos (0.1.3) - claide (1.0.2) - cocoapods (1.6.1) + claide (1.0.3) + cocoapods (1.8.3) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.6.1) - cocoapods-deintegrate (>= 1.0.2, < 2.0) + cocoapods-core (= 1.8.3) + cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.3.1, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) - fourflusher (>= 2.2.0, < 3.0) + fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) molinillo (~> 0.6.6) nap (~> 1.0) ruby-macho (~> 1.4) - xcodeproj (>= 1.8.1, < 2.0) - cocoapods-core (1.6.1) + xcodeproj (>= 1.11.1, < 2.0) + cocoapods-core (1.8.3) activesupport (>= 4.0.2, < 6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) cocoapods-deintegrate (1.0.4) cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap - cocoapods-repo-update (0.0.4) - cocoapods (~> 1.0, >= 1.3.0) cocoapods-search (1.0.0) cocoapods-stats (1.1.0) - cocoapods-trunk (1.3.1) + cocoapods-trunk (1.4.1) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.1.0) colored2 (3.1.2) concurrent-ruby (1.1.5) escape (0.0.4) - fourflusher (2.2.0) + fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) + httpclient (2.8.3) i18n (0.9.5) concurrent-ruby (~> 1.0) - minitest (5.11.3) + json (2.2.0) + minitest (5.12.2) molinillo (0.6.6) nanaimo (0.2.6) nap (1.1.0) @@ -61,7 +66,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.8.2) + xcodeproj (1.12.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -72,8 +77,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.6.1)! - cocoapods-repo-update! + cocoapods (= 1.8.3)! BUNDLED WITH - 1.17.2 + 2.0.2 diff --git a/Podfile b/Podfile index e55a433d..15c110a0 100644 --- a/Podfile +++ b/Podfile @@ -1,10 +1,9 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' inhibit_all_warnings! use_frameworks! platform :ios, '11.0' -plugin 'cocoapods-repo-update' def wordpresskit_pods pod 'Alamofire', '~> 4.7.3' diff --git a/Podfile.lock b/Podfile.lock index 8f38c53d..0641a440 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -27,7 +27,7 @@ PODS: - OHHTTPStubs/Swift (6.1.0): - OHHTTPStubs/Default - UIDeviceIdentifier (1.1.4) - - WordPressShared (1.8.3-beta.1): + - WordPressShared (1.8.8-beta.1): - CocoaLumberjack (~> 3.4) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - wpxmlrpc (0.8.4) @@ -44,7 +44,7 @@ DEPENDENCIES: - wpxmlrpc (= 0.8.4) SPEC REPOS: - https://github.com/cocoapods/specs.git: + trunk: - Alamofire - CocoaLumberjack - FormatterKit @@ -63,9 +63,9 @@ SPEC CHECKSUMS: OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab OHHTTPStubs: 1e21c7d2c084b8153fc53d48400d8919d2d432d0 UIDeviceIdentifier: 8f8a24b257a4d978c8d40ad1e7355b944ffbfa8c - WordPressShared: 7f3007a57331b4567c2c5bc539990818dd9a9965 + WordPressShared: 43343deb20fa5a094d31b18646986a1bd1cbc0d8 wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2 -PODFILE CHECKSUM: b9712dd8c2440cef21248d82e0878f6c786adf74 +PODFILE CHECKSUM: cb9caae9de544a5f1a1d6ee29288a88b7e00720c -COCOAPODS: 1.6.1 +COCOAPODS: 1.8.3 From 63709f2c21d3c63e830053048154fce7722ae89d Mon Sep 17 00:00:00 2001 From: James Treanor Date: Thu, 17 Oct 2019 15:07:18 +0100 Subject: [PATCH 2/7] CircleCI: Bump Orbs to use any 1.0.x version --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bb5a207..8ded644a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,8 @@ version: 2.1 orbs: - # This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs - ios: wordpress-mobile/ios@0.0.36 + # Using 1.0 of our Orbs means it will use the latest 1.0.x version from https://github.com/wordpress-mobile/circleci-orbs + ios: wordpress-mobile/ios@1.0 workflows: test_and_validate: @@ -14,14 +14,18 @@ workflows: scheme: WordPressKitTests device: iPhone Xs ios-version: "12.2" + bundle-install: true + pod-install: true - ios/validate-podspec: name: Validate Podspec xcode-version: "10.2.0" podspec-path: WordPressKit.podspec + bundle-install: true - ios/publish-podspec: name: Publish to Trunk xcode-version: "10.2.0" podspec-path: WordPressKit.podspec + bundle-install: true post-to-slack: true filters: tags: From f81b8548fd034a9f6dc1a2efefc03d164a3211df Mon Sep 17 00:00:00 2001 From: yaelirub Date: Mon, 21 Oct 2019 13:52:59 -0700 Subject: [PATCH 3/7] Added signup_flow_name attribute (#190) * Added signup_flow_name attribute to account creation with email * Now adding the param in the right place * Adding sign_up_flow as an extra param * remove comma * bump version --- WordPressKit.podspec | 2 +- WordPressKit/AccountServiceRemoteREST.m | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/WordPressKit.podspec b/WordPressKit.podspec index acd9805c..ef17bb88 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressKit" - s.version = "4.5.1" + s.version = "4.5.2-beta.1" s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API." s.description = <<-DESC diff --git a/WordPressKit/AccountServiceRemoteREST.m b/WordPressKit/AccountServiceRemoteREST.m index 795bd936..6670ff8f 100644 --- a/WordPressKit/AccountServiceRemoteREST.m +++ b/WordPressKit/AccountServiceRemoteREST.m @@ -202,6 +202,7 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email path:path clientID:clientID clientSecret:clientSecret + extraParams: nil wpcomScheme:scheme success:success failure:failure]; @@ -217,11 +218,14 @@ - (void)requestWPComSignupLinkForEmail:(NSString *)email NSString *path = [self pathForEndpoint:@"auth/send-signup-email" withVersion:ServiceRemoteWordPressComRESTApiVersion_1_1]; - + + NSDictionary *signupFlowParam = @{@"signup_flow_name": @"mobile-ios"}; + [self requestWPComMagicLinkForEmail:email path:path clientID:clientID clientSecret:clientSecret + extraParams:signupFlowParam wpcomScheme:scheme success:success failure:failure]; @@ -231,6 +235,7 @@ - (void)requestWPComMagicLinkForEmail:(NSString *)email path:(NSString *)path clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret + extraParams:(nullable NSDictionary *)extraParams wpcomScheme:(NSString *)scheme success:(void (^)(void))success failure:(void (^)(NSError *error))failure @@ -241,10 +246,15 @@ - (void)requestWPComMagicLinkForEmail:(NSString *)email @"email": email, @"client_id": clientID, @"client_secret": clientSecret - }]; + }]; + if (![@"wordpress" isEqualToString:scheme]) { [params setObject:scheme forKey:@"scheme"]; } + + if (extraParams != nil) { + [params addEntriesFromDictionary:extraParams]; + } [self.wordPressComRestApi POST:path parameters:[NSDictionary dictionaryWithDictionary:params] From 13a3a2b1f58b727af18673442ea10260cc123026 Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Mon, 28 Oct 2019 15:40:40 -0600 Subject: [PATCH 4/7] Fixing category name. --- WordPressKit/NSString+MD5.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressKit/NSString+MD5.m b/WordPressKit/NSString+MD5.m index 9fdec77b..17947aea 100644 --- a/WordPressKit/NSString+MD5.m +++ b/WordPressKit/NSString+MD5.m @@ -2,7 +2,7 @@ #import -@implementation NSString (Gravatar) +@implementation NSString (MD5) - (NSString *)md5 { From 5505e41b5133f463e0156423d4c870321be7a068 Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Mon, 28 Oct 2019 15:41:03 -0600 Subject: [PATCH 5/7] Making method public so they can be used by host app. --- WordPressKit/NSAttributedString+extensions.swift | 2 +- WordPressKit/NSMutableParagraphStyle+extensions.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WordPressKit/NSAttributedString+extensions.swift b/WordPressKit/NSAttributedString+extensions.swift index dd34b7de..a24db85e 100644 --- a/WordPressKit/NSAttributedString+extensions.swift +++ b/WordPressKit/NSAttributedString+extensions.swift @@ -4,7 +4,7 @@ extension NSAttributedString { /// This helper method returns a new NSAttributedString instance, with all of the the leading / trailing newLines /// characters removed. /// - @objc func trimNewlines() -> NSAttributedString { + @objc public func trimNewlines() -> NSAttributedString { guard let trimmed = mutableCopy() as? NSMutableAttributedString else { return self } diff --git a/WordPressKit/NSMutableParagraphStyle+extensions.swift b/WordPressKit/NSMutableParagraphStyle+extensions.swift index 36c701d7..b87a3dee 100644 --- a/WordPressKit/NSMutableParagraphStyle+extensions.swift +++ b/WordPressKit/NSMutableParagraphStyle+extensions.swift @@ -1,14 +1,14 @@ import Foundation extension NSMutableParagraphStyle { - @objc convenience init(minLineHeight: CGFloat, lineBreakMode: NSLineBreakMode, alignment: NSTextAlignment) { + @objc convenience public init(minLineHeight: CGFloat, lineBreakMode: NSLineBreakMode, alignment: NSTextAlignment) { self.init() self.minimumLineHeight = minLineHeight self.lineBreakMode = lineBreakMode self.alignment = alignment } - @objc convenience init(minLineHeight: CGFloat, maxLineHeight: CGFloat, lineBreakMode: NSLineBreakMode, alignment: NSTextAlignment) { + @objc convenience public init(minLineHeight: CGFloat, maxLineHeight: CGFloat, lineBreakMode: NSLineBreakMode, alignment: NSTextAlignment) { self.init(minLineHeight: minLineHeight, lineBreakMode: lineBreakMode, alignment: alignment) self.maximumLineHeight = maxLineHeight } From 9c3a55e3ce5a55809a7ba7ce5c39b1da1a170a45 Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Mon, 28 Oct 2019 15:41:12 -0600 Subject: [PATCH 6/7] Updating pod version. --- WordPressKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressKit.podspec b/WordPressKit.podspec index ef17bb88..c2ecc11e 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressKit" - s.version = "4.5.2-beta.1" + s.version = "4.5.2-beta.2" s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API." s.description = <<-DESC From bc3a936e9c54dbf68cede13e934476ba4b21894c Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Mon, 4 Nov 2019 10:43:56 +0100 Subject: [PATCH 7/7] Bump version to 4.5.2 --- WordPressKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressKit.podspec b/WordPressKit.podspec index c2ecc11e..f2e635d0 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressKit" - s.version = "4.5.2-beta.2" + s.version = "4.5.2" s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API." s.description = <<-DESC