Skip to content

Commit

Permalink
comply swiftlint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabmaiti committed Mar 29, 2023
1 parent fa9b27f commit 2988cec
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 48 deletions.
12 changes: 2 additions & 10 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
PODS:
<<<<<<< HEAD
- Rudder (2.2.6)
=======
- Rudder (2.2.3)
>>>>>>> dea6b21 (Provided fix for the track event race condition.)
- Rudder (2.2.7)

DEPENDENCIES:
- Rudder (from `.`)
Expand All @@ -13,11 +9,7 @@ EXTERNAL SOURCES:
:path: "."

SPEC CHECKSUMS:
<<<<<<< HEAD
Rudder: 228c479bb2f900cae13fbf469131852201691d67
=======
Rudder: 5f11c123cefcc5bc915947aefce77675a2ecd6f2
>>>>>>> dea6b21 (Provided fix for the track event race condition.)
Rudder: 2347c09aee69232812e8262b28d72b69df677940

PODFILE CHECKSUM: ee379229e6a0b60bc98226700ace2de002171547

Expand Down
4 changes: 0 additions & 4 deletions Rudder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
ED157C5727D0FFA400F22202 /* RSLifeCycle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSLifeCycle.swift; sourceTree = "<group>"; };
ED157C5927D1010D00F22202 /* RSPushNotifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSPushNotifications.swift; sourceTree = "<group>"; };
ED277FA027421B06002A8FEA /* RSEventsAndKeys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSEventsAndKeys.swift; sourceTree = "<group>"; };
ED308480288A97C200A357E3 /* main.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = main.yml; path = .github/workflows/main.yml; sourceTree = "<group>"; };
ED3D2257279EAC2800EC8366 /* RudderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RudderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
ED3D226227A3F0C100EC8366 /* RSClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RSClient.swift; sourceTree = "<group>"; };
ED3D226627A3F0C100EC8366 /* Vendor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Vendor.swift; sourceTree = "<group>"; };
Expand All @@ -133,11 +132,9 @@
ED3D228227A3F0C100EC8366 /* RSClient+Plugins.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "RSClient+Plugins.swift"; sourceTree = "<group>"; };
ED3D229227A3F0C100EC8366 /* RSMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RSMessage.swift; sourceTree = "<group>"; };
ED3D22BD27A45B6500EC8366 /* RSTypeAlias.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSTypeAlias.swift; sourceTree = "<group>"; };
ED488F8627EB141700831594 /* release.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = release.sh; sourceTree = "<group>"; };
ED5603842881C691004B5BEC /* RSUserInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RSUserInfo.swift; sourceTree = "<group>"; };
ED5603862882CE6D004B5BEC /* RSSessionStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSSessionStorage.swift; sourceTree = "<group>"; };
ED560388288316C2004B5BEC /* Data+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Ext.swift"; sourceTree = "<group>"; };
ED56038A2887EA73004B5BEC /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
ED910CDE273BA25100A3EDFF /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
ED910CE0273BA25100A3EDFF /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
ED910CE1273BA25100A3EDFF /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
Expand Down Expand Up @@ -353,7 +350,6 @@
EDA7EF462739119600E73142 /* RSConstants.swift */,
ED277FA027421B06002A8FEA /* RSEventsAndKeys.swift */,
ED3D22BD27A45B6500EC8366 /* RSTypeAlias.swift */,
EDA7EF452739119600E73142 /* RSUserDefaults.swift */,
ED05631E291BEB0400BAEE65 /* RSVersion.swift */,
);
path = Constants;
Expand Down
1 change: 0 additions & 1 deletion Sources/Classes/Client/Plugins/RSAnonymousIdPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Cocoa
import WebKit
#endif


class RSAnonymousIdPlugin: RSPlatformPlugin {
let type = PluginType.before
weak var client: RSClient?
Expand Down
6 changes: 3 additions & 3 deletions Sources/Classes/Client/Plugins/RSContextPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RSContextPlugin: RSPlatformPlugin {
}

func insertDynamicOptionData(message: RSMessage, context: inout [String: Any]) {
/// First priority will given to the `option` passed along with the event
// First priority will given to the `option` passed along with the event
if let option = message.option {
if let externalIds = option.externalIds {
context["externalId"] = externalIds
Expand All @@ -141,15 +141,15 @@ class RSContextPlugin: RSPlatformPlugin {
}
}
} else {
/// Fetch `customContexts` set using setOption API.
// Fetch `customContexts` set using setOption API.
if let globalOption: RSOption = RSSessionStorage.shared.read(.option) {
if let customContexts = globalOption.customContexts {
for (key, value) in customContexts {
context[key] = value
}
}
}
/// Fetch `externalIds` set using identify API.
// Fetch `externalIds` set using identify API.
if let externalIds: [[String: String]] = userDefaults?.read(.externalId) {
context["externalId"] = externalIds
}
Expand Down
60 changes: 30 additions & 30 deletions Sources/Classes/Client/Plugins/RudderDestinationPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,36 @@ class RudderDestinationPlugin: RSDestinationPlugin {
}
}

//extension RudderDestinationPlugin {
// internal func configureCloudDestinations<T: RSMessage>(message: T) -> T {
// guard let serverConfig = client?.serverConfig else { return message }
// guard let plugins = client?.controller.plugins[.destination]?.plugins as? [RSDestinationPlugin] else { return message }
// guard let customerValues = message.integrations else { return message }
//
// var merged = [String: Bool]()
//
// for plugin in plugins {
// var hasSettings = false
// if let destinations = serverConfig.destinations {
// if let destination = destinations.first(where: { $0.destinationDefinition?.displayName == plugin.key }), destination.enabled {
// hasSettings = true
// }
// }
// if hasSettings {
// merged[plugin.key] = false
// }
// }
//
// for (key, value) in customerValues {
// merged[key] = value
// }
//
// var modified = message
// modified.integrations = merged
//
// return modified
// }
//}
/*extension RudderDestinationPlugin {
internal func configureCloudDestinations<T: RSMessage>(message: T) -> T {
guard let serverConfig = client?.serverConfig else { return message }
guard let plugins = client?.controller.plugins[.destination]?.plugins as? [RSDestinationPlugin] else { return message }
guard let customerValues = message.integrations else { return message }

var merged = [String: Bool]()

for plugin in plugins {
var hasSettings = false
if let destinations = serverConfig.destinations {
if let destination = destinations.first(where: { $0.destinationDefinition?.displayName == plugin.key }), destination.enabled {
hasSettings = true
}
}
if hasSettings {
merged[plugin.key] = false
}
}

for (key, value) in customerValues {
merged[key] = value
}

var modified = message
modified.integrations = merged

return modified
}
}*/

extension RudderDestinationPlugin {

Expand Down

0 comments on commit 2988cec

Please sign in to comment.