Fix Tests
Some checks failed
gitea-openium/resgen.swift/pipeline/head Build started...
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2025-07-17 10:44:28 +02:00
parent bc17e23039
commit 739e4b5bef
7 changed files with 400 additions and 394 deletions

View File

@@ -93,8 +93,8 @@ enum AnalyticsGenerator {
\(Self.getImport(targets: targets))
\(Self.getAnalyticsProtocol(targets: targets))
\(Self.getTrackerTypeEnum())
\(Self.getTrackerTypeEnum(targets: targets))
// MARK: - Manager
@@ -111,14 +111,14 @@ enum AnalyticsGenerator {
\(Self.getEnabledContent())
\(Self.getAnalyticsProperties(targets: targets))
\(Self.getPrivateLogFunction())
"""
}
private static func getTrackerTypeEnum() -> String {
private static func getTrackerTypeEnum(targets: [TrackerType]) -> String {
var result: [String] = []
TrackerType.allCases.forEach { type in
targets.forEach { type in
result.append(" case \(type)")
}
@@ -126,6 +126,7 @@ enum AnalyticsGenerator {
// MARK: - Traker Type
enum TrackerType: CaseIterable {
\(result.joined(separator: "\n"))
}
"""
@@ -141,7 +142,7 @@ enum AnalyticsGenerator {
}
}
// MARK: - Methods
// MARK: - Enable Methods
private func setAnalytics(enable: Bool, _ analytics: [TrackerType]) {
managers.forEach { (key, value) in
@@ -180,7 +181,9 @@ enum AnalyticsGenerator {
private static func getPrivateLogFunction() -> String {
"""
private func logScreen(
// MARK: - Private Log Methods
private func logScreen(
name: String,
path: String,
params: [String: Any]?
@@ -252,6 +255,7 @@ enum AnalyticsGenerator {
// MARK: - Protocol
protocol AnalyticsManagerProtocol {
func logScreen(
name: String,
path: String,
@@ -267,7 +271,6 @@ enum AnalyticsGenerator {
func setEnable(_ enable: Bool)
}
"""
var result: [String] = [proto]
@@ -280,7 +283,7 @@ enum AnalyticsGenerator {
result.append(FirebaseGenerator.service)
}
return result.joined(separator: "\n")
return result.joined(separator: "\n\n")
}
private static func getProperties(