Skip to content

Commit

Permalink
Integrated Slather
Browse files Browse the repository at this point in the history
  • Loading branch information
ekazaev committed Apr 5, 2019
1 parent ce822c4 commit 68a28f6
Show file tree
Hide file tree
Showing 105 changed files with 30,645 additions and 272 deletions.
5 changes: 5 additions & 0 deletions .slather.yml
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
5 changes: 4 additions & 1 deletion .travis.yml
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
2 changes: 2 additions & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
platform :ios, '9.3'
use_frameworks!

plugin 'slather'

target 'RouteComposer_Example' do
pod 'RouteComposer', :path => '../'

Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
RouteComposer: 2e3a290122f0ef9926bdec015297c73ad01c721c

PODFILE CHECKSUM: 42df1440502a2c666dc2402d2027b25de2a00f46
PODFILE CHECKSUM: 6dc3a094906d5a0f701bcb325869e4a05ad2ae57

COCOAPODS: 1.6.0
2 changes: 1 addition & 1 deletion Example/Pods/Manifest.lock

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

534 changes: 266 additions & 268 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Swift 5.0](https://img.shields.io/badge/language-Swift5.0-orange.svg?style=flat)](https://developer.apple.com/swift)
[![Platform iOS](https://img.shields.io/badge/platform-iOS-yellow.svg)](https://www.apple.com/ios)
[![Documentation](https://saksdirect.github.io/route-composer/badge.svg)](https://saksdirect.github.io/route-composer)
![Code coverage](https://img.shields.io/badge/code%20coverage-86%25-green.svg?style=flat)
[![Code coverage](https://img.shields.io/badge/code%20coverage-83%25-green.svg?style=flat)](https://saksdirect.github.io/route-composer/tests/index.html)
[![MIT License](https://img.shields.io/cocoapods/l/RouteComposer.svg?style=flat)](https://github.com/saksdirect/RouteComposer/blob/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/saksdirect/route-composer.svg?style=flat)](https://twitter.com/intent/tweet?text=Check%20it%20out:&url=https%3A%2F%2Fgithub.com%2Fsaksdirect%2Froute-composer)

Expand Down
262 changes: 262 additions & 0 deletions docs/tests/AbstractFactory.swift.html
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>&copy; 2019 Slather</p>
</div></footer><script src="highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
Loading

0 comments on commit 68a28f6

Please sign in to comment.