From 4718064e337680b17f99d76f170e046b8cc443e9 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Fri, 27 Jan 2017 14:50:10 +0100 Subject: [PATCH] rename SwiftTemplate to StencilSwiftTemplate --- CHANGELOG.md | 3 ++ Pods/Pods.xcodeproj/project.pbxproj | 31 +++++++++---------- ...plate.swift => StencilSwiftTemplate.swift} | 4 +-- Tests/TestSuites/CallNodeTests.swift | 4 +-- Tests/TestSuites/SetNodeTests.swift | 4 +-- 5 files changed, 23 insertions(+), 23 deletions(-) rename Sources/{SwiftTemplate.swift => StencilSwiftTemplate.swift} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c57d55df..1b5cc653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ ### Internal Changes +* Renamed `SwiftTemplate` to `StencilSwiftTemplate`. + [David Jennes](https://github.com/djbe) + [#14](https://github.com/SwiftGen/StencilSwiftKit/issues/14) ## Before 5.0.0 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 575f42c0..c88ab60a 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 47; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -16,7 +16,7 @@ 1B8805B5D9190640247C00EA9F0BF08C /* NowTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D3CBAF672FD3CA25D7EE1A8E93A6F07 /* NowTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 1BA59F29AB7F02089F55CE5EBE581F8B /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8923816ECEE63BE56AD67F2A147EF787 /* Context.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 2367547A833F83B3F00364A5C221511D /* Filters.swift in Sources */ = {isa = PBXBuildFile; fileRef = C74DCC10F6CC9FB70BEF27A2183A5B4F /* Filters.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 24DD620B7037C62A14EA6FD0AE38FF3D /* SwiftTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09480DB5774EB9FBBAE030F88F5BCC3 /* SwiftTemplate.swift */; }; + 24DD620B7037C62A14EA6FD0AE38FF3D /* StencilSwiftTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09480DB5774EB9FBBAE030F88F5BCC3 /* StencilSwiftTemplate.swift */; }; 2636E7A890C8E29D410238FE1578E827 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11F7F2E3F010D24453E40821938EF8EC /* Foundation.framework */; }; 3378EE87DA9FB9454669D5D5191B4E98 /* StencilSwiftKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A3BD3F28796B2AF07380069687DCC29C /* StencilSwiftKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 36AAACDBFB8ECDCEA1C35A1CC99C9F10 /* Template.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69F59D1438D9D791C86016D62F2078B9 /* Template.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -110,7 +110,7 @@ 1E71D84622E74564E52BBC4ABDCF1819 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 206DA29D6C35E14C93D2BF773A66C54C /* Environment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Environment.swift; path = Sources/Environment.swift; sourceTree = ""; }; 2155A4AD28DF68375EC10C46F7EDC8AF /* Parser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Parser.swift; path = Sources/Parser.swift; sourceTree = ""; }; - 244B8FF0FA77FDEE4814649AB9039241 /* StencilSwiftKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = StencilSwiftKit.modulemap; sourceTree = ""; }; + 244B8FF0FA77FDEE4814649AB9039241 /* StencilSwiftKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = StencilSwiftKit.modulemap; sourceTree = ""; }; 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 268C13CD136CE7EDCA3ABF3F31928DD5 /* SwiftIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftIdentifier.swift; sourceTree = ""; }; 27AB13C581DBF4D4B41876C69872B183 /* Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extension.swift; path = Sources/Extension.swift; sourceTree = ""; }; @@ -118,26 +118,26 @@ 2C8AAD97E22D7F6B08B73B0AE02BFA6D /* Pods-Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Tests-resources.sh"; sourceTree = ""; }; 2E6EDE0590FA1A030C93F83C2EEFC65C /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tests.release.xcconfig"; sourceTree = ""; }; 31A007C042C580A003C9B6DB5AD1B534 /* Lexer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lexer.swift; path = Sources/Lexer.swift; sourceTree = ""; }; - 351D229C0FCFC7B3571671631111EE1C /* Pods_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Tests.framework; path = "Pods-Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 351D229C0FCFC7B3571671631111EE1C /* Pods_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B1C96CDE10E0238E81B06BD4DF23DAE /* Stencil-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-umbrella.h"; sourceTree = ""; }; 3D9976A9FB02F6316003996E10007AEE /* FilterTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilterTag.swift; path = Sources/FilterTag.swift; sourceTree = ""; }; 4309AA7478DD6B254C478AE5335748BA /* Pods-Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tests-acknowledgements.plist"; sourceTree = ""; }; - 49BCF2F8CB8DBEA0E51D00A9DE6AC7F5 /* Stencil.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Stencil.framework; path = Stencil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4F35C03EE539651D8168B79F18A1DF5B /* Pods-Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Tests.modulemap"; sourceTree = ""; }; + 49BCF2F8CB8DBEA0E51D00A9DE6AC7F5 /* Stencil.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Stencil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F35C03EE539651D8168B79F18A1DF5B /* Pods-Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Tests.modulemap"; sourceTree = ""; }; 52E08CA96B2F20724148FF5361AD7206 /* Pods-Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Tests-umbrella.h"; sourceTree = ""; }; 5B85A6D36EC20031BC5814F8D8D514E8 /* PathKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathKit.swift; path = Sources/PathKit.swift; sourceTree = ""; }; 696F3A64179D69D82E342A67221FE187 /* StencilSwiftKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "StencilSwiftKit-dummy.m"; sourceTree = ""; }; 69F59D1438D9D791C86016D62F2078B9 /* Template.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Template.swift; path = Sources/Template.swift; sourceTree = ""; }; 6E3DE9DADD254D64C598089530A5932B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 749318FE61E9EC318ED19250766267E2 /* Stencil-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-prefix.pch"; sourceTree = ""; }; - 7DB310C86ADAE310E9DF111FDD487FAF /* StencilSwiftKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = StencilSwiftKit.framework; path = StencilSwiftKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7DB310C86ADAE310E9DF111FDD487FAF /* StencilSwiftKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StencilSwiftKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8923816ECEE63BE56AD67F2A147EF787 /* Context.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Context.swift; path = Sources/Context.swift; sourceTree = ""; }; 8CA49A25561E541E61395E8C64512F22 /* PathKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PathKit-dummy.m"; sourceTree = ""; }; 8CCB7B571DD30214319D05B2A2D01268 /* ForTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ForTag.swift; path = Sources/ForTag.swift; sourceTree = ""; }; 8FFA7DA1538F3CB30DA2B5074B573E52 /* Tokenizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tokenizer.swift; path = Sources/Tokenizer.swift; sourceTree = ""; }; - 919EAEDB009B1AA70C305AC91847AC41 /* PathKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PathKit.modulemap; sourceTree = ""; }; + 919EAEDB009B1AA70C305AC91847AC41 /* PathKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PathKit.modulemap; sourceTree = ""; }; 93A3BA06E90B797B9126411EF449E61E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 95F48C2804B8C05C9EE9EB78ACC7C2E5 /* CallNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CallNode.swift; sourceTree = ""; }; 9A68FA9661EC6B4BA5415DDD474F7F00 /* Stencil.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Stencil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A03EA653264F980DD920923E3D631E27 /* SetNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SetNode.swift; sourceTree = ""; }; @@ -151,13 +151,13 @@ C0ABA9994C05CE2F400945671B7038BA /* Pods-Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Tests-dummy.m"; sourceTree = ""; }; C1E8657D8A2E60CA5179FDE94F283B2A /* PathKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PathKit.xcconfig; sourceTree = ""; }; C62389B5756FDBA46714335EE5B2079D /* PathKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-umbrella.h"; sourceTree = ""; }; - C68D522B00371B910EC16028EBD47384 /* PathKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PathKit.framework; path = PathKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C68D522B00371B910EC16028EBD47384 /* PathKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PathKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C74DCC10F6CC9FB70BEF27A2183A5B4F /* Filters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filters.swift; path = Sources/Filters.swift; sourceTree = ""; }; D12438B80ED47AD60857542BE0113ED7 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Expression.swift; sourceTree = ""; }; D5846CC8D36C9B97B51ACC82399D6A12 /* PathKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-prefix.pch"; sourceTree = ""; }; - D6C2D28B3980163C3F38852C8437E5C2 /* Stencil.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Stencil.modulemap; sourceTree = ""; }; + D6C2D28B3980163C3F38852C8437E5C2 /* Stencil.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Stencil.modulemap; sourceTree = ""; }; D887BD539929925B9535E5136F861F20 /* IfTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IfTag.swift; path = Sources/IfTag.swift; sourceTree = ""; }; - E09480DB5774EB9FBBAE030F88F5BCC3 /* SwiftTemplate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftTemplate.swift; sourceTree = ""; }; + E09480DB5774EB9FBBAE030F88F5BCC3 /* StencilSwiftTemplate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StencilSwiftTemplate.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -214,10 +214,9 @@ 95F48C2804B8C05C9EE9EB78ACC7C2E5 /* CallNode.swift */, B9C2D0FB00398A5111567EEFD1CCB01B /* Filters.swift */, A03EA653264F980DD920923E3D631E27 /* SetNode.swift */, + E09480DB5774EB9FBBAE030F88F5BCC3 /* StencilSwiftTemplate.swift */, 268C13CD136CE7EDCA3ABF3F31928DD5 /* SwiftIdentifier.swift */, - E09480DB5774EB9FBBAE030F88F5BCC3 /* SwiftTemplate.swift */, ); - name = Sources; path = Sources; sourceTree = ""; }; @@ -365,7 +364,6 @@ 17E001094F65D072A6D5E4A0C7F419BD /* Variable.swift */, 472C634E13CB5E53C65AA1985F35C13D /* Support Files */, ); - name = Stencil; path = Stencil; sourceTree = ""; }; @@ -375,7 +373,6 @@ 5B85A6D36EC20031BC5814F8D8D514E8 /* PathKit.swift */, 693A6FD601295700FF3115312779D86A /* Support Files */, ); - name = PathKit; path = PathKit; sourceTree = ""; }; @@ -575,7 +572,7 @@ A082AAC03E6892EC107B7421BC93838D /* SetNode.swift in Sources */, 59F231D22411C3AA93D3D9B9D9E555F5 /* StencilSwiftKit-dummy.m in Sources */, 02A898432BFB56500E31943EA2E63D91 /* SwiftIdentifier.swift in Sources */, - 24DD620B7037C62A14EA6FD0AE38FF3D /* SwiftTemplate.swift in Sources */, + 24DD620B7037C62A14EA6FD0AE38FF3D /* StencilSwiftTemplate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sources/SwiftTemplate.swift b/Sources/StencilSwiftTemplate.swift similarity index 97% rename from Sources/SwiftTemplate.swift rename to Sources/StencilSwiftTemplate.swift index 65ed8a2b..af644e99 100644 --- a/Sources/SwiftTemplate.swift +++ b/Sources/StencilSwiftTemplate.swift @@ -7,7 +7,7 @@ import Stencil // Workaround until Stencil fixes https://github.com/kylef/Stencil/issues/22 -open class SwiftTemplate: Template { +open class StencilSwiftTemplate: Template { public required init(templateString: String, environment: Environment? = nil, name: String? = nil) { let templateStringWithMarkedNewlines = templateString .replacingOccurrences(of: "\n\n", with: "\n\u{000b}\n") @@ -61,5 +61,5 @@ func stencilSwiftExtension() -> Extension { } public func stencilSwiftEnvironment() -> Environment { - return Environment(extensions: [stencilSwiftExtension()], templateClass: SwiftTemplate.self) + return Environment(extensions: [stencilSwiftExtension()], templateClass: StencilSwiftTemplate.self) } diff --git a/Tests/TestSuites/CallNodeTests.swift b/Tests/TestSuites/CallNodeTests.swift index 2e2a5707..17dea343 100644 --- a/Tests/TestSuites/CallNodeTests.swift +++ b/Tests/TestSuites/CallNodeTests.swift @@ -9,7 +9,7 @@ import XCTest class CallNodeTests: XCTestCase { func testBasic() { - let template = SwiftTemplate(templateString: Fixtures.string(for: "call-basic.stencil"), environment: stencilSwiftEnvironment()) + let template = StencilSwiftTemplate(templateString: Fixtures.string(for: "call-basic.stencil"), environment: stencilSwiftEnvironment()) let result = try! template.render([:]) let expected = Fixtures.string(for: "call-basic.out") @@ -17,7 +17,7 @@ class CallNodeTests: XCTestCase { } func testWithRecursion() { - let template = SwiftTemplate(templateString: Fixtures.string(for: "call-with-recursion.stencil"), environment: stencilSwiftEnvironment()) + let template = StencilSwiftTemplate(templateString: Fixtures.string(for: "call-with-recursion.stencil"), environment: stencilSwiftEnvironment()) let result = try! template.render([:]) let expected = Fixtures.string(for: "call-with-recursion.out") diff --git a/Tests/TestSuites/SetNodeTests.swift b/Tests/TestSuites/SetNodeTests.swift index e9bf85d2..7389a692 100644 --- a/Tests/TestSuites/SetNodeTests.swift +++ b/Tests/TestSuites/SetNodeTests.swift @@ -9,7 +9,7 @@ import XCTest class SetNodeTests: XCTestCase { func testBasic() { - let template = SwiftTemplate(templateString: Fixtures.string(for: "set-basic.stencil"), environment: stencilSwiftEnvironment()) + let template = StencilSwiftTemplate(templateString: Fixtures.string(for: "set-basic.stencil"), environment: stencilSwiftEnvironment()) let result = try! template.render([:]) let expected = Fixtures.string(for: "set-basic.out") @@ -17,7 +17,7 @@ class SetNodeTests: XCTestCase { } func testWithContext() { - let template = SwiftTemplate(templateString: Fixtures.string(for: "set-with-context.stencil"), environment: stencilSwiftEnvironment()) + let template = StencilSwiftTemplate(templateString: Fixtures.string(for: "set-with-context.stencil"), environment: stencilSwiftEnvironment()) let result = try! template.render([ "x": 1, "y": 2,