From 1784d566727159dee6068a2aaa887f8d46f46b6f Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Tue, 10 Mar 2020 17:04:26 -0300 Subject: [PATCH 1/9] Adds a new track that accepts string parameters --- WordPressShared.xcodeproj/project.pbxproj | 4 +++ WordPressShared/Core/Analytics/WPAnalytics.h | 6 +++++ WordPressShared/Core/Analytics/WPAnalytics.m | 15 +++++++++++ .../Core/Analytics/WPAnalytics.swift | 14 +++++++++++ WordPressSharedTests/WPAnalyticsTests.m | 25 ++++++++++++++++++- 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 WordPressShared/Core/Analytics/WPAnalytics.swift diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index 16e2e51..e29d6df 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -53,6 +53,7 @@ 827070A41ECA5A7C00155CBF /* NotoSerif-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 827070A01ECA5A7C00155CBF /* NotoSerif-Regular.ttf */; }; 829DD1481EC9EED200AB8C12 /* WordPressShared.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 829DD13E1EC9EED200AB8C12 /* WordPressShared.framework */; }; 829DD14F1EC9EED200AB8C12 /* WordPressShared.h in Headers */ = {isa = PBXBuildFile; fileRef = 829DD1411EC9EED200AB8C12 /* WordPressShared.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8B2207AE2417FAA40038BF61 /* WPAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */; }; 937BA5881EF1DAC100D301B2 /* CocoaLumberjack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937BA5871EF1DAC100D301B2 /* CocoaLumberjack.swift */; }; 93A73ABC1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A73ABA1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h */; settings = {ATTRIBUTES = (Public, ); }; }; 93A73ABD1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = 93A73ABB1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m */; }; @@ -166,6 +167,7 @@ 829DD13E1EC9EED200AB8C12 /* WordPressShared.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WordPressShared.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 829DD1411EC9EED200AB8C12 /* WordPressShared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WordPressShared.h; sourceTree = ""; }; 829DD1471EC9EED200AB8C12 /* WordPressSharedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WordPressSharedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WPAnalytics.swift; sourceTree = ""; }; 937BA5871EF1DAC100D301B2 /* CocoaLumberjack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CocoaLumberjack.swift; sourceTree = ""; }; 93A73ABA1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPMapFilterReduce.h; sourceTree = ""; }; 93A73ABB1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPMapFilterReduce.m; sourceTree = ""; }; @@ -463,6 +465,7 @@ E1A444251F063CAB00F6AA8A /* Analytics */ = { isa = PBXGroup; children = ( + 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */, E1A444261F063CAB00F6AA8A /* WPAnalytics.h */, E1A444271F063CAB00F6AA8A /* WPAnalytics.m */, ); @@ -693,6 +696,7 @@ 7414BD561F13CBE0005759F8 /* String+Helpers.swift in Sources */, 827070031ECA43AA00155CBF /* NSString+Util.m in Sources */, F1C83C1023E20EF200A8CCF1 /* String+RemovingMatches.swift in Sources */, + 8B2207AE2417FAA40038BF61 /* WPAnalytics.swift in Sources */, 82706FF41ECA438500155CBF /* WPSharedLoggingPrivate.m in Sources */, 7430C9E11F1935400051B8E6 /* WPImageURLHelper.swift in Sources */, B5A78813202B3A55007874FB /* WPStyleGuide.m in Sources */, diff --git a/WordPressShared/Core/Analytics/WPAnalytics.h b/WordPressShared/Core/Analytics/WPAnalytics.h index 74e7654..a693b51 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.h +++ b/WordPressShared/Core/Analytics/WPAnalytics.h @@ -1,5 +1,7 @@ @import Foundation; +@class WPAnalyticsEvent; + typedef NS_ENUM(NSUInteger, WPAnalyticsStat) { WPAnalyticsStatNoStat, // Since we can't have a nil enum we'll use this to act as the nil WPAnalyticsStatABTestStart, @@ -603,6 +605,8 @@ extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo; + (void)endTimerForStat:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; + (void)track:(WPAnalyticsStat)stat; + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; ++ (void)trackEvent:(NSString *)event; ++ (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties; + (void)endSession; + (void)clearQueuedEvents; @@ -612,6 +616,8 @@ extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo; - (void)track:(WPAnalyticsStat)stat; - (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; +- (void)trackEvent:(NSString *)event; +- (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties; @optional - (void)beginSession; diff --git a/WordPressShared/Core/Analytics/WPAnalytics.m b/WordPressShared/Core/Analytics/WPAnalytics.m index 5b95a0c..c8018ab 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.m +++ b/WordPressShared/Core/Analytics/WPAnalytics.m @@ -63,6 +63,21 @@ + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties } } ++ (void)trackEvent:(NSString *)event +{ + for (id tracker in [self trackers]) { + [tracker trackEvent:event]; + } +} + ++ (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties +{ + NSParameterAssert(properties != nil); + for (id tracker in [self trackers]) { + [tracker trackEvent:event withProperties:properties]; + } +} + + (void)beginSession { for (id tracker in [self trackers]) { diff --git a/WordPressShared/Core/Analytics/WPAnalytics.swift b/WordPressShared/Core/Analytics/WPAnalytics.swift new file mode 100644 index 0000000..c4263de --- /dev/null +++ b/WordPressShared/Core/Analytics/WPAnalytics.swift @@ -0,0 +1,14 @@ +import Foundation + +extension WPAnalytics { + + /// Track a event + /// + /// This will call each registered tracker and fire the given event + /// - Parameter track: a `String` that represents the event name + /// + public static func track(_ event: String) { + WPAnalytics.trackEvent(event) + } + +} diff --git a/WordPressSharedTests/WPAnalyticsTests.m b/WordPressSharedTests/WPAnalyticsTests.m index c765b73..1eb0e0c 100644 --- a/WordPressSharedTests/WPAnalyticsTests.m +++ b/WordPressSharedTests/WPAnalyticsTests.m @@ -117,4 +117,27 @@ itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); }); -SpecEnd \ No newline at end of file +describe(@"trackEvent:", ^{ + NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackEvent:)]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:@selector(trackEvent:)]; + NSString *event = @"my_event"; + [invocation setArgument:&event atIndex:2]; + + itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); +}); + +describe(@"trackEvent:withProperties:", ^{ + NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackEvent:withProperties:)]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:@selector(trackEvent:withProperties:)]; + + NSString *event = @"my_event"; + NSDictionary *dict = @{}; + [invocation setArgument:&event atIndex:2]; + [invocation setArgument:&dict atIndex:3]; + + itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); +}); + +SpecEnd From 059b14d6468ac37cb7aac1bdfe3d9d734d782b93 Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Wed, 11 Mar 2020 10:15:40 -0300 Subject: [PATCH 2/9] Add track for a plain string with properties --- WordPressShared/Core/Analytics/WPAnalytics.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/WordPressShared/Core/Analytics/WPAnalytics.swift b/WordPressShared/Core/Analytics/WPAnalytics.swift index c4263de..84d22dd 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.swift +++ b/WordPressShared/Core/Analytics/WPAnalytics.swift @@ -5,10 +5,20 @@ extension WPAnalytics { /// Track a event /// /// This will call each registered tracker and fire the given event - /// - Parameter track: a `String` that represents the event name + /// - Parameter event: a `String` that represents the event name /// public static func track(_ event: String) { WPAnalytics.trackEvent(event) } + /// Track a event + /// + /// This will call each registered tracker and fire the given event + /// - Parameter event: a `String` that represents the event name + /// - Parameter properties: a `Hash` that represents the properties + /// + public static func track(_ event: String, properties: [AnyHashable: Any]) { + WPAnalytics.trackEvent(event, withProperties: properties) + } + } From 269538ad1622116a350c3757813007947f922e4d Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Wed, 11 Mar 2020 10:17:42 -0300 Subject: [PATCH 3/9] Remove media editor events --- WordPressShared/Core/Analytics/WPAnalytics.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/WordPressShared/Core/Analytics/WPAnalytics.h b/WordPressShared/Core/Analytics/WPAnalytics.h index a693b51..fe8a674 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.h +++ b/WordPressShared/Core/Analytics/WPAnalytics.h @@ -203,8 +203,6 @@ typedef NS_ENUM(NSUInteger, WPAnalyticsStat) { WPAnalyticsStatLoginSocialErrorUnknownUser, WPAnalyticsStatLogout, WPAnalyticsStatLowMemoryWarning, - WPAnalyticsStatMediaEditorShown, - WPAnalyticsStatMediaEditorUsed, WPAnalyticsStatMediaLibraryDeletedItems, WPAnalyticsStatMediaLibraryEditedItemMetadata, WPAnalyticsStatMediaLibraryPreviewedItem, From 94c59c37ee237b9dc5532725559321639ab9bfb2 Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Wed, 11 Mar 2020 16:15:20 -0300 Subject: [PATCH 4/9] Remove plain string extension --- WordPressShared.xcodeproj/project.pbxproj | 4 ---- .../Core/Analytics/WPAnalytics.swift | 24 ------------------- 2 files changed, 28 deletions(-) delete mode 100644 WordPressShared/Core/Analytics/WPAnalytics.swift diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index e29d6df..16e2e51 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -53,7 +53,6 @@ 827070A41ECA5A7C00155CBF /* NotoSerif-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 827070A01ECA5A7C00155CBF /* NotoSerif-Regular.ttf */; }; 829DD1481EC9EED200AB8C12 /* WordPressShared.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 829DD13E1EC9EED200AB8C12 /* WordPressShared.framework */; }; 829DD14F1EC9EED200AB8C12 /* WordPressShared.h in Headers */ = {isa = PBXBuildFile; fileRef = 829DD1411EC9EED200AB8C12 /* WordPressShared.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8B2207AE2417FAA40038BF61 /* WPAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */; }; 937BA5881EF1DAC100D301B2 /* CocoaLumberjack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937BA5871EF1DAC100D301B2 /* CocoaLumberjack.swift */; }; 93A73ABC1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A73ABA1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h */; settings = {ATTRIBUTES = (Public, ); }; }; 93A73ABD1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = 93A73ABB1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m */; }; @@ -167,7 +166,6 @@ 829DD13E1EC9EED200AB8C12 /* WordPressShared.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WordPressShared.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 829DD1411EC9EED200AB8C12 /* WordPressShared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WordPressShared.h; sourceTree = ""; }; 829DD1471EC9EED200AB8C12 /* WordPressSharedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WordPressSharedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WPAnalytics.swift; sourceTree = ""; }; 937BA5871EF1DAC100D301B2 /* CocoaLumberjack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CocoaLumberjack.swift; sourceTree = ""; }; 93A73ABA1EE9DD7D00C0F2F9 /* WPMapFilterReduce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPMapFilterReduce.h; sourceTree = ""; }; 93A73ABB1EE9DD7D00C0F2F9 /* WPMapFilterReduce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPMapFilterReduce.m; sourceTree = ""; }; @@ -465,7 +463,6 @@ E1A444251F063CAB00F6AA8A /* Analytics */ = { isa = PBXGroup; children = ( - 8B2207AD2417FAA40038BF61 /* WPAnalytics.swift */, E1A444261F063CAB00F6AA8A /* WPAnalytics.h */, E1A444271F063CAB00F6AA8A /* WPAnalytics.m */, ); @@ -696,7 +693,6 @@ 7414BD561F13CBE0005759F8 /* String+Helpers.swift in Sources */, 827070031ECA43AA00155CBF /* NSString+Util.m in Sources */, F1C83C1023E20EF200A8CCF1 /* String+RemovingMatches.swift in Sources */, - 8B2207AE2417FAA40038BF61 /* WPAnalytics.swift in Sources */, 82706FF41ECA438500155CBF /* WPSharedLoggingPrivate.m in Sources */, 7430C9E11F1935400051B8E6 /* WPImageURLHelper.swift in Sources */, B5A78813202B3A55007874FB /* WPStyleGuide.m in Sources */, diff --git a/WordPressShared/Core/Analytics/WPAnalytics.swift b/WordPressShared/Core/Analytics/WPAnalytics.swift deleted file mode 100644 index 84d22dd..0000000 --- a/WordPressShared/Core/Analytics/WPAnalytics.swift +++ /dev/null @@ -1,24 +0,0 @@ -import Foundation - -extension WPAnalytics { - - /// Track a event - /// - /// This will call each registered tracker and fire the given event - /// - Parameter event: a `String` that represents the event name - /// - public static func track(_ event: String) { - WPAnalytics.trackEvent(event) - } - - /// Track a event - /// - /// This will call each registered tracker and fire the given event - /// - Parameter event: a `String` that represents the event name - /// - Parameter properties: a `Hash` that represents the properties - /// - public static func track(_ event: String, properties: [AnyHashable: Any]) { - WPAnalytics.trackEvent(event, withProperties: properties) - } - -} From f30da4d712ede4b6b87075cb4f3f626d0a3d1e40 Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Thu, 12 Mar 2020 12:53:17 -0300 Subject: [PATCH 5/9] Remove WPAnalyticsEvent --- WordPressShared/Core/Analytics/WPAnalytics.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/WordPressShared/Core/Analytics/WPAnalytics.h b/WordPressShared/Core/Analytics/WPAnalytics.h index fe8a674..f8b6fe0 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.h +++ b/WordPressShared/Core/Analytics/WPAnalytics.h @@ -1,7 +1,5 @@ @import Foundation; -@class WPAnalyticsEvent; - typedef NS_ENUM(NSUInteger, WPAnalyticsStat) { WPAnalyticsStatNoStat, // Since we can't have a nil enum we'll use this to act as the nil WPAnalyticsStatABTestStart, From 6389e9e0b6ce0fc88969694220daa276370b5489 Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Thu, 12 Mar 2020 16:22:12 -0300 Subject: [PATCH 6/9] Rename trackEvent to trackString --- WordPressShared/Core/Analytics/WPAnalytics.h | 8 ++++---- WordPressShared/Core/Analytics/WPAnalytics.m | 8 ++++---- WordPressSharedTests/TestAnalyticsTracker.m | 10 ++++++++++ WordPressSharedTests/WPAnalyticsTests.m | 12 ++++++------ 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/WordPressShared/Core/Analytics/WPAnalytics.h b/WordPressShared/Core/Analytics/WPAnalytics.h index f8b6fe0..00beb56 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.h +++ b/WordPressShared/Core/Analytics/WPAnalytics.h @@ -601,8 +601,8 @@ extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo; + (void)endTimerForStat:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; + (void)track:(WPAnalyticsStat)stat; + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; -+ (void)trackEvent:(NSString *)event; -+ (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties; ++ (void)trackString:(NSString *)event; ++ (void)trackString:(NSString *)event withProperties:(NSDictionary *)properties; + (void)endSession; + (void)clearQueuedEvents; @@ -612,8 +612,8 @@ extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo; - (void)track:(WPAnalyticsStat)stat; - (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; -- (void)trackEvent:(NSString *)event; -- (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties; +- (void)trackString:(NSString *)event; +- (void)trackString:(NSString *)event withProperties:(NSDictionary *)properties; @optional - (void)beginSession; diff --git a/WordPressShared/Core/Analytics/WPAnalytics.m b/WordPressShared/Core/Analytics/WPAnalytics.m index c8018ab..5db3727 100644 --- a/WordPressShared/Core/Analytics/WPAnalytics.m +++ b/WordPressShared/Core/Analytics/WPAnalytics.m @@ -63,18 +63,18 @@ + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties } } -+ (void)trackEvent:(NSString *)event ++ (void)trackString:(NSString *)event { for (id tracker in [self trackers]) { - [tracker trackEvent:event]; + [tracker trackString:event]; } } -+ (void)trackEvent:(NSString *)event withProperties:(NSDictionary *)properties ++ (void)trackString:(NSString *)event withProperties:(NSDictionary *)properties { NSParameterAssert(properties != nil); for (id tracker in [self trackers]) { - [tracker trackEvent:event withProperties:properties]; + [tracker trackString:event withProperties:properties]; } } diff --git a/WordPressSharedTests/TestAnalyticsTracker.m b/WordPressSharedTests/TestAnalyticsTracker.m index c1e9c42..33e1e1b 100644 --- a/WordPressSharedTests/TestAnalyticsTracker.m +++ b/WordPressSharedTests/TestAnalyticsTracker.m @@ -27,4 +27,14 @@ - (void)refreshMetadata // No-op } +- (void)trackString:(NSString *)event { + // No-op +} + + +- (void)trackString:(NSString *)event withProperties:(NSDictionary *)properties { + // No-op +} + + @end diff --git a/WordPressSharedTests/WPAnalyticsTests.m b/WordPressSharedTests/WPAnalyticsTests.m index 1eb0e0c..a8c99c9 100644 --- a/WordPressSharedTests/WPAnalyticsTests.m +++ b/WordPressSharedTests/WPAnalyticsTests.m @@ -117,20 +117,20 @@ itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); }); -describe(@"trackEvent:", ^{ - NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackEvent:)]; +describe(@"trackString:", ^{ + NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackString:)]; NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:@selector(trackEvent:)]; + [invocation setSelector:@selector(trackString:)]; NSString *event = @"my_event"; [invocation setArgument:&event atIndex:2]; itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); }); -describe(@"trackEvent:withProperties:", ^{ - NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackEvent:withProperties:)]; +describe(@"trackString:withProperties:", ^{ + NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(trackString:withProperties:)]; NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:@selector(trackEvent:withProperties:)]; + [invocation setSelector:@selector(trackString:withProperties:)]; NSString *event = @"my_event"; NSDictionary *dict = @{}; From 86eb2a59836cc10fa2fe0a54b46730cb9eda794c Mon Sep 17 00:00:00 2001 From: Leandro Alonso Date: Thu, 12 Mar 2020 16:54:33 -0300 Subject: [PATCH 7/9] Bump version --- WordPressShared.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressShared.podspec b/WordPressShared.podspec index 688ee13..42d9a32 100644 --- a/WordPressShared.podspec +++ b/WordPressShared.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressShared" - s.version = "1.8.15-beta.2" + s.version = "1.8.16-beta.1" s.summary = "Shared components used in building the WordPress iOS apps and other library components." s.description = <<-DESC From e493684ca341861d952a29297602355b0fe17fe6 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Fri, 13 Mar 2020 08:22:23 -0600 Subject: [PATCH 8/9] Pin the ruby version for this project (#258) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Pin the ruby version for this project This ensures we’re using a consistent version, which will prevent bundler weirdness. To Test: 1. See that CI is passing. 2. Check out this branch, and run ruby -v. The output should be something like ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]. * Use 2.6.4 instead --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..2714f53 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.6.4 From b99bf12f8d47ce64be9ae91ee1841c3b01e52249 Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Mon, 23 Mar 2020 09:42:51 +0100 Subject: [PATCH 9/9] Bump version for release --- WordPressShared.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressShared.podspec b/WordPressShared.podspec index 42d9a32..4261531 100644 --- a/WordPressShared.podspec +++ b/WordPressShared.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressShared" - s.version = "1.8.16-beta.1" + s.version = "1.8.16" s.summary = "Shared components used in building the WordPress iOS apps and other library components." s.description = <<-DESC