Skip to content

Commit

Permalink
TravisCI: remove swift 4.x; add swift 5.4 (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannys42 authored Aug 30, 2021
1 parent 8241da8 commit 1909bd4
Show file tree
Hide file tree
Showing 33 changed files with 799 additions and 545 deletions.
2 changes: 0 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ readme: README.md
skip_undocumented: false
hide_documentation_coverage: false

xcodebuild_arguments: [-project, KituraStencil.xcodeproj, -target, KituraStencil, LIBRARY_SEARCH_PATHS=.build/debug]

46 changes: 10 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,29 @@ matrix:
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=swift:4.0.3 SWIFT_SNAPSHOT=4.0.3
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu16.04:5.1.5
- os: linux
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=swift:4.1.3 SWIFT_SNAPSHOT=4.1.3
- os: linux
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=swift:4.2.4 SWIFT_SNAPSHOT=4.2.4
- os: linux
dist: xenial
dist: bionic
sudo: required
services: docker
env: DOCKER_IMAGE=swift:5.0.3-xenial SWIFT_SNAPSHOT=5.0.3
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:5.4
- os: linux
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=swift:5.1
- os: linux
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=swift:5.1 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT
- os: osx
osx_image: xcode9.2
sudo: required
env: SWIFT_SNAPSHOT=4.0.3
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest USE_SWIFT_DEVELOPMENT_SNAPSHOT=1
- os: osx
osx_image: xcode9.4
sudo: required
env: SWIFT_SNAPSHOT=4.1.2
- os: osx
osx_image: xcode10.1
sudo: required
env: SWIFT_SNAPSHOT=4.2.1
- os: osx
osx_image: xcode10.2
osx_image: xcode11
sudo: required
env: SWIFT_SNAPSHOT=5.0.1 JAZZY_ELIGIBLE=true
env: SWIFT_SNAPSHOT=5.1.5 JAZZY_ELIGIBLE=true
- os: osx
osx_image: xcode11
osx_image: xcode12.2
sudo: required
- os: osx
osx_image: xcode11
osx_image: xcode12.5
sudo: required
env: SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT
env: USE_SWIFT_DEVELOPMENT_SNAPSHOT=1


before_install:
- git clone https://github.com/Kitura/Package-Builder.git
Expand Down
44 changes: 0 additions & 44 deletions [email protected]

This file was deleted.

42 changes: 0 additions & 42 deletions [email protected]

This file was deleted.

42 changes: 0 additions & 42 deletions [email protected]

This file was deleted.

8 changes: 4 additions & 4 deletions Sources/KituraStencil/KituraStencilTemplateEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public enum StencilTemplateEngineError: Swift.Error {
/**
A `TemplateEngine` for Kitura that uses [Stencil](https://github.com/stencilproject/Stencil) for templating.

The file extension for templates using this engine is `stencil`. If the file extension of the template specified in the call to [`response.render`](https://ibm-swift.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF) matches, this template engine will be invoked. If no extension is specified, _and_ this engine has been set as the default via [`router.setDefault(templateEngine:)`](https://ibm-swift.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC10setDefaulty0A14TemplateEngine0eF0_pSg08templateF0_tF), the extension will be applied automatically.
The file extension for templates using this engine is `stencil`. If the file extension of the template specified in the call to [`response.render`](https://kitura.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF) matches, this template engine will be invoked. If no extension is specified, _and_ this engine has been set as the default via [`router.setDefault(templateEngine:)`](https://kitura.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC10setDefaulty0A14TemplateEngine0eF0_pSg08templateF0_tF), the extension will be applied automatically.

### Usage Example: ###
```swift
Expand Down Expand Up @@ -93,7 +93,7 @@ public class StencilTemplateEngine: TemplateEngine {

/// Defines the filesystem paths where your Stencil templates can be located.
/// Note that Kitura calls this function for you with a default path of `./Views/`
/// or you can customize this by setting the [`router.viewsPath`](https://ibm-swift.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC9viewsPathSSvp) property.
/// or you can customize this by setting the [`router.viewsPath`](https://kitura.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC9viewsPathSSvp) property.
///
/// - Parameter rootPaths: The paths to be searched for Stencil templates.
public func setRootPaths(rootPaths: [String]) {
Expand All @@ -107,7 +107,7 @@ public class StencilTemplateEngine: TemplateEngine {

/// Take a template file and a set of "variables" in the form of a context
/// and generate content to be sent back to the client.
/// Note that this function is called by Kitura when you call [`response.render(_:context:options:)`](https://ibm-swift.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF).
/// Note that this function is called by Kitura when you call [`response.render(_:context:options:)`](https://kitura.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF).
///
/// - Parameter filePath: The path of the template file to use when generating
/// the content.
Expand All @@ -134,7 +134,7 @@ public class StencilTemplateEngine: TemplateEngine {
}

/// Take a template file and an `Encodable` type and generate the content to be sent back to the client.
/// Note that this function is called by Kitura when you call [`response.render(_:with:forKey:options:)`](https://ibm-swift.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_x4withSSSg6forKey0A14TemplateEngine16RenderingOptions_p7optionstKs9EncodableRzlF).
/// Note that this function is called by Kitura when you call [`response.render(_:with:forKey:options:)`](https://kitura.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_x4withSSSg6forKey0A14TemplateEngine16RenderingOptions_p7optionstKs9EncodableRzlF).
///
/// - Parameter filePath: The path of the template file to use when generating
/// the content.
Expand Down
13 changes: 7 additions & 6 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</head>
<body>

<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>

<a title="Classes Reference"></a>

Expand All @@ -32,7 +33,7 @@
</p>

<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/IBM-Swift/Kitura-StencilTemplateEngine/">
<a class="header-link" href="https://github.com/Kitura/Kitura-StencilTemplateEngine/">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
Expand Down Expand Up @@ -70,7 +71,7 @@
<article class="main-content">

<section class="section">
<div class="section-content">
<div class="section-content top-matter">
<h1>Classes</h1>
<p>The following classes are available globally.</p>

Expand All @@ -96,7 +97,7 @@ <h1>Classes</h1>
<div class="abstract">
<p>A <code>TemplateEngine</code> for Kitura that uses <a href="https://github.com/stencilproject/Stencil">Stencil</a> for templating.</p>

<p>The file extension for templates using this engine is <code>stencil</code>. If the file extension of the template specified in the call to <a href="https://ibm-swift.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF"><code>response.render</code></a> matches, this template engine will be invoked. If no extension is specified, <em>and</em> this engine has been set as the default via <a href="https://ibm-swift.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC10setDefaulty0A14TemplateEngine0eF0_pSg08templateF0_tF"><code>router.setDefault(templateEngine:)</code></a>, the extension will be applied automatically.</p>
<p>The file extension for templates using this engine is <code>stencil</code>. If the file extension of the template specified in the call to <a href="https://kitura.github.io/Kitura/Classes/RouterResponse.html#/s:6Kitura14RouterResponseC6renderACSS_s10DictionaryVySSypG7context0A14TemplateEngine16RenderingOptions_p7optionstKF"><code>response.render</code></a> matches, this template engine will be invoked. If no extension is specified, <em>and</em> this engine has been set as the default via <a href="https://kitura.github.io/Kitura/Classes/Router.html#/s:6Kitura6RouterC10setDefaulty0A14TemplateEngine0eF0_pSg08templateF0_tF"><code>router.setDefault(templateEngine:)</code></a>, the extension will be applied automatically.</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>
<pre class="highlight swift"><code> <span class="n">router</span><span class="o">.</span><span class="nf">add</span><span class="p">(</span><span class="nv">templateEngine</span><span class="p">:</span> <span class="kt">StencilTemplateEngine</span><span class="p">())</span>

Expand Down Expand Up @@ -130,7 +131,7 @@ <h3 id='usage-example' class='heading'>Usage Example:</h3>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">StencilTemplateEngine</span><span class="p">:</span> <span class="kt">TemplateEngine</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">StencilTemplateEngine</span> <span class="p">:</span> <span class="kt">TemplateEngine</span></code></pre>

</div>
</div>
Expand All @@ -145,8 +146,8 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-07-16)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2021 <a class="link" href="" target="_blank" rel="external">IBM and the Kitura project authors</a>. All rights reserved. (Last updated: 2021-08-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
Expand Down
Loading

0 comments on commit 1909bd4

Please sign in to comment.