Skip to content

Commit

Permalink
revert deleted files
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidlazio committed Apr 10, 2024
1 parent 322da37 commit 76bff37
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 7 deletions.
123 changes: 123 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Confidence-Package.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Confidence"
BuildableName = "Confidence"
BlueprintName = "Confidence"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ConfidenceProvider"
BuildableName = "ConfidenceProvider"
BlueprintName = "ConfidenceProvider"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ConfidenceProviderTests"
BuildableName = "ConfidenceProviderTests"
BlueprintName = "ConfidenceProviderTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ConfidenceProviderTests"
BuildableName = "ConfidenceProviderTests"
BlueprintName = "ConfidenceProviderTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ConfidenceTests"
BuildableName = "ConfidenceTests"
BlueprintName = "ConfidenceTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<EnvironmentVariables>
<EnvironmentVariable
key = "CLIENT_TOKEN"
value = "5GdaBq79NMVrMGXRVhN9g1pBKtG9cNK8"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Confidence"
BuildableName = "Confidence"
BlueprintName = "Confidence"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
66 changes: 66 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Confidence.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Confidence"
BuildableName = "Confidence"
BlueprintName = "Confidence"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Confidence"
BuildableName = "Confidence"
BlueprintName = "Confidence"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 0 additions & 3 deletions Sources/Confidence/Confidence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ public class Confidence: ConfidenceEventSender {
context: context,
parent: self)
}
public func clearContext() {
context = [:]
}
}

extension Confidence {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Confidence/EventSenderStorage.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

struct EventBatchRequest: Codable {
struct EventBatchRequest: Encodable {
let clientSecret: String
let sendTime: Date
let events: [Event]
Expand Down
6 changes: 3 additions & 3 deletions Tests/ConfidenceProviderTests/EventSenderEngineTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ final class EventSenderEngineTest: XCTestCase {

var events: [Event] = []
for i in 0..<5 {
events.append(Event(name: "\(i)"))
eventSenderEngine.send(name: "\(i)")
events.append(Event(name: "\(i)", payload: [:]))
eventSenderEngine.send(name: "\(i)", message: [:])
}

let expectedRequest = EventBatchRequest(clientSecret: "CLIENT_SECRET", sendTime: Date(), events: events)
Expand All @@ -45,7 +45,7 @@ final class EventSenderEngineTest: XCTestCase {
XCTAssertTrue(uploadRequest.events == expectedRequest.events)

uploader.reset()
eventSenderEngine.send(name: "Hello")
eventSenderEngine.send(name: "Hello", message: [:])
XCTAssertNil(uploader.calledRequest)
}
}
Expand Down

0 comments on commit 76bff37

Please sign in to comment.