Skip to content

Commit

Permalink
rename SwiftTemplate to StencilSwiftTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Jan 27, 2017
1 parent e9e33c6 commit 4718064
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
31 changes: 14 additions & 17 deletions Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions Tests/TestSuites/CallNodeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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")
XCTDiffStrings(result, expected)
}

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")
Expand Down
4 changes: 2 additions & 2 deletions Tests/TestSuites/SetNodeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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")
XCTDiffStrings(result, expected)
}

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,
Expand Down

0 comments on commit 4718064

Please sign in to comment.