Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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.35
# 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:
Expand All @@ -14,15 +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
update-specs-repo: true
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:
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org' do
gem 'cocoapods', '1.6.1'
gem 'cocoapods-repo-update'
gem 'cocoapods', '1.8.3'
end
40 changes: 22 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand All @@ -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
3 changes: 1 addition & 2 deletions Podfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -44,7 +44,7 @@ DEPENDENCIES:
- wpxmlrpc (= 0.8.4)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
trunk:
- Alamofire
- CocoaLumberjack
- FormatterKit
Expand All @@ -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
2 changes: 1 addition & 1 deletion WordPressKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WordPressKit"
s.version = "4.5.1"
s.version = "4.5.2"
s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API."

s.description = <<-DESC
Expand Down
14 changes: 12 additions & 2 deletions WordPressKit/AccountServiceRemoteREST.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email
path:path
clientID:clientID
clientSecret:clientSecret
extraParams: nil
wpcomScheme:scheme
success:success
failure:failure];
Expand All @@ -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];
Expand All @@ -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
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion WordPressKit/NSAttributedString+extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions WordPressKit/NSMutableParagraphStyle+extensions.swift
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion WordPressKit/NSString+MD5.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import <CommonCrypto/CommonDigest.h>


@implementation NSString (Gravatar)
@implementation NSString (MD5)

- (NSString *)md5
{
Expand Down