Skip to content

Commit 69cc104

Browse files
committed
Update Tracks to version 1.0.0-beta.1
1 parent 09a52be commit 69cc104

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

Experiments/Experiments/ABTest.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ public extension Variation {
6363
switch self {
6464
case .control:
6565
return "control"
66-
case .treatment(let string):
67-
return string.map { "treatment: \($0)" } ?? "treatment"
66+
case .treatment:
67+
return "treatment"
68+
case .customTreatment(let name):
69+
return "treatment: \(name)"
6870
}
6971
}
7072
}

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def aztec
2727
end
2828

2929
def tracks
30-
pod 'Automattic-Tracks-iOS', '~> 0.13.0'
31-
# pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :branch => ''
30+
pod 'Automattic-Tracks-iOS', '~> 1.0-beta'
31+
# pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :branch => 'trunk'
3232
# pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :commit => ''
3333
# pod 'Automattic-Tracks-iOS', :path => '../Automattic-Tracks-iOS'
3434
end

Podfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PODS:
66
- AppAuth/Core (1.6.0)
77
- AppAuth/ExternalUserAgent (1.6.0):
88
- AppAuth/Core
9-
- Automattic-Tracks-iOS (0.13.0):
9+
- Automattic-Tracks-iOS (1.0.0-beta.1):
1010
- Sentry (~> 7.25)
1111
- Sodium (>= 0.9.1)
1212
- UIDeviceIdentifier (~> 2.0)
@@ -28,14 +28,14 @@ PODS:
2828
- Kingfisher (7.2.2)
2929
- NSObject-SafeExpectations (0.0.4)
3030
- "NSURL+IDN (0.4)"
31-
- Sentry (7.25.1):
32-
- Sentry/Core (= 7.25.1)
33-
- Sentry/Core (7.25.1)
31+
- Sentry (7.31.3):
32+
- Sentry/Core (= 7.31.3)
33+
- Sentry/Core (7.31.3)
3434
- Sodium (0.9.1)
3535
- Sourcery (1.0.3)
3636
- StripeTerminal (2.14.0)
3737
- SVProgressHUD (2.2.5)
38-
- UIDeviceIdentifier (2.0.0)
38+
- UIDeviceIdentifier (2.2.0)
3939
- WordPress-Aztec-iOS (1.11.0)
4040
- WordPress-Editor-iOS (1.11.0):
4141
- WordPress-Aztec-iOS (= 1.11.0)
@@ -75,7 +75,7 @@ PODS:
7575

7676
DEPENDENCIES:
7777
- Alamofire (~> 4.8)
78-
- Automattic-Tracks-iOS (~> 0.13.0)
78+
- Automattic-Tracks-iOS (~> 1.0-beta)
7979
- CocoaLumberjack (~> 3.7.4)
8080
- CocoaLumberjack/Swift (~> 3.7.4)
8181
- Gridicons (~> 1.2.0)
@@ -135,7 +135,7 @@ SPEC REPOS:
135135
SPEC CHECKSUMS:
136136
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
137137
AppAuth: 8fca6b5563a5baef2c04bee27538025e4ceb2add
138-
Automattic-Tracks-iOS: 63e55654f500b3e8fb35087e64575e00d12eb2f5
138+
Automattic-Tracks-iOS: 337ccaadcec4239b88c54f075ffeb62d6fe13000
139139
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
140140
GoogleSignIn: fd381840dbe7c1137aa6dc30849a5c3e070c034a
141141
Gridicons: 4455b9f366960121430e45997e32112ae49ffe1d
@@ -145,12 +145,12 @@ SPEC CHECKSUMS:
145145
Kingfisher: 184d4d1a8c36666e663caf8e08abe87898595c53
146146
NSObject-SafeExpectations: ab8fe623d36b25aa1f150affa324e40a2f3c0374
147147
"NSURL+IDN": afc873e639c18138a1589697c3add197fe8679ca
148-
Sentry: dd29c18c32b0af9269949f079cf631d581ca76ca
148+
Sentry: 08884c523575ec0f6690d94ed3ccb0246a1600bf
149149
Sodium: 23d11554ecd556196d313cf6130d406dfe7ac6da
150150
Sourcery: 70a6048014bd4f37ea80e6bd4354d47bf3b760e1
151151
StripeTerminal: 9bb367c9efa7bcddf2602cc29f8962390d87b6a6
152152
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
153-
UIDeviceIdentifier: af4e11e25a2ea670078e2bd677bb0e8144f9f063
153+
UIDeviceIdentifier: f33af270ba9045ea18b31d9aab88e42a0082ea67
154154
WordPress-Aztec-iOS: 050b34d4c3adfb7c60363849049b13d60683b348
155155
WordPress-Editor-iOS: 304098424f1051cb271546c99f906aac296b1b81
156156
WordPressAuthenticator: 0cdf1bff75bd3f58fe733d6457221f27bbbdc9f4
@@ -169,6 +169,6 @@ SPEC CHECKSUMS:
169169
ZendeskSupportProvidersSDK: 2bdf8544f7cd0fd4c002546f5704b813845beb2a
170170
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
171171

172-
PODFILE CHECKSUM: 670bb1b07306bd212f79b8afb1ebed4fc6eaa7b7
172+
PODFILE CHECKSUM: 1147980034fb44a400cdf3061dd01ef22f06b8c6
173173

174174
COCOAPODS: 1.11.3

WooCommerce/WooCommerceTests/Mocks/MockABTesting.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@ struct MockABTesting {
66
/// Sets the provided A/B Test variation in `UserDefaults`, to mock a given experiment assignment
77
///
88
static func setVariation(_ variation: AutomatticTracks.Variation, for experiment: ABTest) {
9-
let newVariation: String?
10-
switch variation {
11-
case .control:
12-
newVariation = "control"
13-
case .treatment(let type):
14-
newVariation = type ?? "treatment"
15-
}
16-
17-
let assignment = [experiment.rawValue: newVariation]
9+
let assignment = [experiment.rawValue: variation.analyticsValue]
1810
UserDefaults.standard.setValue(assignment, forKey: "ab-testing-assignments")
1911
}
2012
}

0 commit comments

Comments
 (0)