-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
105 changed files
with
30,645 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
xcodeproj: ./Example/RouteComposer.xcodeproj | ||
workspace: ./Example/RouteComposer.xcworkspace/ | ||
scheme: RouteComposer-Example | ||
source_directory: ./RouteComposer/Classes | ||
binary_basename: RouteComposer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
# references: | ||
# * http://www.objc.io/issue-6/travis-ci.html | ||
# * https://github.com/supermarin/xcpretty#usage | ||
# *slather coverage --html --output-directory ./docs/tests --arch x86_64 | ||
|
||
osx_image: xcode10.2 | ||
language: swift | ||
cache: cocoapods | ||
podfile: Example/Podfile | ||
before_install: | ||
- gem install slather | ||
- gem install cocoapods # Since Travis is not always on latest version | ||
- pod install --project-directory=Example | ||
script: | ||
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/RouteComposer.xcworkspace -scheme RouteComposer-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.1' ONLY_ACTIVE_ARCH=NO | xcpretty | ||
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/RouteComposer.xcworkspace -scheme RouteComposer-Example -sdk iphonesimulator -derivedDataPath ${TRAVIS_BUILD_DIR}/myDerivedData -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty | ||
- pod lib lint | ||
after_success: slather coverage -t -b ${TRAVIS_BUILD_DIR}/myDerivedData --arch x86_64 --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RouteComposer.xcscheme
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
<html> | ||
<head> | ||
<title>AbstractFactory.swift - Slather</title> | ||
<link href="slather.css" media="all" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<header><div class="row"><a href="index.html"><img src="logo.jpg" alt="Slather logo"></a></div></header><div class="row"><div id="reports"> | ||
<h2 class="cov_title"> | ||
<span>Coverage for "AbstractFactory.swift" : </span><span class="cov_low">50.00%</span> | ||
</h2> | ||
<h4 class="cov_subtitle">(3 of 6 relevant lines covered)</h4> | ||
<h4 class="cov_filepath">RouteComposer/Classes/AbstractFactory.swift</h4> | ||
<table class="source_code"> | ||
<tr class="never"> | ||
<td class="num">1</td> | ||
<td class="src"><pre><code class="objc">//</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">2</td> | ||
<td class="src"><pre><code class="objc">// Created by Eugene Kazaev on 30/07/2018.</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">3</td> | ||
<td class="src"><pre><code class="objc">//</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">4</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">5</td> | ||
<td class="src"><pre><code class="objc">import Foundation</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">6</td> | ||
<td class="src"><pre><code class="objc">import UIKit</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">7</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">8</td> | ||
<td class="src"><pre><code class="objc">/// Base protocol for all types of factories.</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">9</td> | ||
<td class="src"><pre><code class="objc">/// An instance that extends `AbstractFactory` builds a `UIViewController` that will later be</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">10</td> | ||
<td class="src"><pre><code class="objc">/// integrated into the stack by the `Router`</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">11</td> | ||
<td class="src"><pre><code class="objc">public protocol AbstractFactory {</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">12</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">13</td> | ||
<td class="src"><pre><code class="objc"> /// Type of `UIViewController` that `AbstractFactory` can build</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">14</td> | ||
<td class="src"><pre><code class="objc"> associatedtype ViewController: UIViewController</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">15</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">16</td> | ||
<td class="src"><pre><code class="objc"> /// `Context` to be passed into `UIViewController`</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">17</td> | ||
<td class="src"><pre><code class="objc"> associatedtype Context</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">18</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">19</td> | ||
<td class="src"><pre><code class="objc"> /// The `Router` will call it before the navigation process and if the `AbstractFactory` is not able to</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">20</td> | ||
<td class="src"><pre><code class="objc"> /// build a view controller it should throw an exception. (example: it has to build a product view</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">21</td> | ||
<td class="src"><pre><code class="objc"> // controller but there is no product code in context)</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">22</td> | ||
<td class="src"><pre><code class="objc"> ///</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">23</td> | ||
<td class="src"><pre><code class="objc"> /// - Parameter context: A `Context` instance that is provided to the `Router`.</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">24</td> | ||
<td class="src"><pre><code class="objc"> /// - Throws: The `RoutingError` if the `Factory` cannot prepare to build a `UIViewController` instance</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">25</td> | ||
<td class="src"><pre><code class="objc"> /// with the `Context` instance provided.</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">26</td> | ||
<td class="src"><pre><code class="objc"> mutating func prepare(with context: Context) throws</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">27</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">28</td> | ||
<td class="src"><pre><code class="objc">}</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">29</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">30</td> | ||
<td class="src"><pre><code class="objc">/// Default implementation for any context</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">31</td> | ||
<td class="src"><pre><code class="objc">public extension AbstractFactory where Context == Any? {</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">32</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">33</td> | ||
<td class="src"><pre><code class="objc"> /// Prepares the `AbstractFactory`</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="covered"> | ||
<td class="num">34</td> | ||
<td class="src"><pre><code class="objc"> mutating func prepare() throws {</code></pre></td> | ||
<td class="coverage">5x</td> | ||
</tr> | ||
<tr class="covered"> | ||
<td class="num">35</td> | ||
<td class="src"><pre><code class="objc"> try prepare(with: nil)</code></pre></td> | ||
<td class="coverage">5x</td> | ||
</tr> | ||
<tr class="covered"> | ||
<td class="num">36</td> | ||
<td class="src"><pre><code class="objc"> }</code></pre></td> | ||
<td class="coverage">5x</td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">37</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">38</td> | ||
<td class="src"><pre><code class="objc">}</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">39</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">40</td> | ||
<td class="src"><pre><code class="objc">/// Default implementation for any context</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">41</td> | ||
<td class="src"><pre><code class="objc">public extension AbstractFactory where Context == Void {</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">42</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">43</td> | ||
<td class="src"><pre><code class="objc"> /// Prepares the `AbstractFactory`</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="missed"> | ||
<td class="num">44</td> | ||
<td class="src"><pre><code class="objc"> mutating func prepare() throws {</code></pre></td> | ||
<td class="coverage">!</td> | ||
</tr> | ||
<tr class="missed"> | ||
<td class="num">45</td> | ||
<td class="src"><pre><code class="objc"> try prepare(with: ())</code></pre></td> | ||
<td class="coverage">!</td> | ||
</tr> | ||
<tr class="missed"> | ||
<td class="num">46</td> | ||
<td class="src"><pre><code class="objc"> }</code></pre></td> | ||
<td class="coverage">!</td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">47</td> | ||
<td class="src"><pre><code class="objc"></code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
<tr class="never"> | ||
<td class="num">48</td> | ||
<td class="src"><pre><code class="objc">}</code></pre></td> | ||
<td class="coverage"></td> | ||
</tr> | ||
</table> | ||
</div></div> | ||
<footer><div class="row"> | ||
<p><a href="https://github.com/SlatherOrg/slather">Fork me on Github</a></p> | ||
<p>© 2019 Slather</p> | ||
</div></footer><script src="highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script> | ||
</body> | ||
</html> |
Oops, something went wrong.