Skip to content

Commit

Permalink
update internal boilerplate code.
Browse files Browse the repository at this point in the history
  • Loading branch information
art-divin committed Mar 29, 2024
1 parent 18fac39 commit 8579166
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion SourceryRuntime/Sources/Generated/Coding.generated.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline

Expand Down
2 changes: 1 addition & 1 deletion SourceryRuntime/Sources/Generated/JSExport.generated.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline

Expand Down
2 changes: 1 addition & 1 deletion SourceryRuntime/Sources/Generated/Typed.generated.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace

Expand Down
11 changes: 6 additions & 5 deletions SourcerySwift/Sources/SourceryRuntime.content.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ public class Attribute: NSObject, AutoCoding, AutoEquatable, AutoDiffable, AutoJ
public init(name: String, arguments: [String: NSObject] = [:], description: String? = nil) {
self.name = name
self.arguments = arguments
self._description = description ?? "@\\(name)"
let argumentDescription = arguments.map { "\\($0.key): \\($0.value is String ? "\\"" : "")\\($0.value)\\($0.value is String ? "\\"" : "")" }.joined(separator: ", ")
self._description = description ?? "@\\(name)\\(!argumentDescription.isEmpty ? "(" : "")\\(argumentDescription)\\(!argumentDescription.isEmpty ? ")" : "")"
}
/// TODO: unify `asSource` / `description`?
Expand All @@ -342,7 +343,7 @@ public class Attribute: NSObject, AutoCoding, AutoEquatable, AutoDiffable, AutoJ
/// Attribute description that can be used in a template.
public override var description: String {
return _description
_description
}
/// :nodoc:
Expand Down Expand Up @@ -7575,7 +7576,7 @@ public final class Variable: NSObject, SourceryModel, Typed, Annotated, Document
"""),
.init(name: "Coding.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline
Expand Down Expand Up @@ -7681,7 +7682,7 @@ extension Variable: NSCoding {}
"""),
.init(name: "JSExport.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline
Expand Down Expand Up @@ -8418,7 +8419,7 @@ extension Variable: VariableAutoJSExport {}
"""),
.init(name: "Typed.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ public class Attribute: NSObject, AutoCoding, AutoEquatable, AutoDiffable, AutoJ
public init(name: String, arguments: [String: NSObject] = [:], description: String? = nil) {
self.name = name
self.arguments = arguments
self._description = description ?? "@\\(name)"
let argumentDescription = arguments.map { "\\($0.key): \\($0.value is String ? "\\"" : "")\\($0.value)\\($0.value is String ? "\\"" : "")" }.joined(separator: ", ")
self._description = description ?? "@\\(name)\\(!argumentDescription.isEmpty ? "(" : "")\\(argumentDescription)\\(!argumentDescription.isEmpty ? ")" : "")"
}
/// TODO: unify `asSource` / `description`?
Expand All @@ -342,7 +343,7 @@ public class Attribute: NSObject, AutoCoding, AutoEquatable, AutoDiffable, AutoJ
/// Attribute description that can be used in a template.
public override var description: String {
return _description
_description
}
/// :nodoc:
Expand Down Expand Up @@ -8008,7 +8009,7 @@ public final class Variable: NSObject, SourceryModel, Typed, Annotated, Document
"""),
.init(name: "Coding.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline
Expand Down Expand Up @@ -8114,7 +8115,7 @@ extension Variable: NSCoding {}
"""),
.init(name: "JSExport.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace trailing_newline
Expand Down Expand Up @@ -8851,7 +8852,7 @@ extension Variable: VariableAutoJSExport {}
"""),
.init(name: "Typed.generated.swift", content:
"""
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable vertical_whitespace
Expand Down
2 changes: 1 addition & 1 deletion SourceryTests/Models/TypedSpec.generated.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
import Quick
import Nimble
Expand Down

0 comments on commit 8579166

Please sign in to comment.