Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa41530d47 | ||
|
|
1ac46a4859 | ||
|
|
2c02475a49 | ||
|
|
752558b420 | ||
|
|
1af6fa81f0 | ||
|
|
37c07f099a | ||
|
|
612bb4ca11 | ||
|
|
e6fcda22fc | ||
|
|
f9282dcef2 | ||
|
|
8e47206f83 | ||
|
|
aca50feac8 | ||
|
|
bdc6b5b6dd | ||
|
|
846edcd8c1 | ||
|
|
e9192698e9 | ||
|
|
226b1e3219 | ||
|
|
0f4a0dc5ad | ||
|
|
7eb1e95fd6 | ||
|
|
b38c71af0b |
@@ -0,0 +1,15 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: macOS-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Fastlane Action
|
||||||
|
uses: maierj/fastlane-action@v1.0.0
|
||||||
|
with:
|
||||||
|
lane: scan_project
|
||||||
@@ -40,4 +40,5 @@ Carthage/
|
|||||||
|
|
||||||
# Cocoapods
|
# Cocoapods
|
||||||
Pods/
|
Pods/
|
||||||
|
fastlane/report.xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,23 @@
|
|||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
### 4.1.1
|
||||||
|
|
||||||
|
- Fix build
|
||||||
|
|
||||||
|
### 4.1.0
|
||||||
|
|
||||||
|
- Add SwiftUI support (thanks to doronkatz)
|
||||||
|
|
||||||
|
### 4.0.2
|
||||||
|
|
||||||
|
- Fix pod release
|
||||||
|
- Add Github workflow
|
||||||
|
|
||||||
|
### 4.0.1
|
||||||
|
|
||||||
|
- Fix SPM
|
||||||
|
|
||||||
### 4.0.0
|
### 4.0.0
|
||||||
|
|
||||||
- Swift 5.1
|
- Swift 5.1
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ Contributors to the codebase :
|
|||||||
| Name | Github handle | Mail |
|
| Name | Github handle | Mail |
|
||||||
| ------------- |------------- | ----- |
|
| ------------- |------------- | ----- |
|
||||||
| David Lari | DavidLari | / |
|
| David Lari | DavidLari | / |
|
||||||
|
| Doron Katz | | David Lari | DavidLari | / |
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'OpenSourceController'
|
s.name = 'OpenSourceController'
|
||||||
s.version = '4.0.1'
|
s.version = '4.1.1'
|
||||||
s.summary = 'Display all the librarys licence used in your application. Enjoy !'
|
s.summary = 'Display all the librarys licence used in your application. Enjoy !'
|
||||||
s.description = 'Display a screen with all licence used in your apply can be painful to maintain. OpenSourceController was built to respond to this problem. OpenSourceController is a simple parser to display the licences which are used in your application.'
|
s.description = 'Display a screen with all licence used in your apply can be painful to maintain. OpenSourceController was built to respond to this problem. OpenSourceController is a simple parser to display the licences which are used in your application.'
|
||||||
s.homepage = 'https://github.com/floriangbh/OpenSourceController'
|
s.homepage = 'https://github.com/floriangbh/OpenSourceController'
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
52D6D9871BEFF229002C0205 /* OpenSourceController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */; };
|
52D6D9871BEFF229002C0205 /* OpenSourceController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */; };
|
||||||
76229B722180AD8400A61697 /* LicenceLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B712180AD8400A61697 /* LicenceLoader.swift */; };
|
|
||||||
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */; };
|
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */; };
|
||||||
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */; };
|
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */; };
|
||||||
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7F2180ADA800A61697 /* OpenSourceController.swift */; };
|
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7F2180ADA800A61697 /* OpenSourceController.swift */; };
|
||||||
@@ -16,6 +15,8 @@
|
|||||||
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */; };
|
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */; };
|
||||||
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */; };
|
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */; };
|
||||||
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */; };
|
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */; };
|
||||||
|
76B7980F238844F300009193 /* LicenceLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76B7980E238844F300009193 /* LicenceLoader.swift */; };
|
||||||
|
76B79811238845D300009193 /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76B79810238845D300009193 /* Style.swift */; };
|
||||||
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */; };
|
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */; };
|
||||||
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24121BEB18A004B74CB /* Reusable.swift */; };
|
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24121BEB18A004B74CB /* Reusable.swift */; };
|
||||||
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */; };
|
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */; };
|
||||||
@@ -37,7 +38,6 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OpenSourceController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OpenSourceController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
52D6D9861BEFF229002C0205 /* OpenSourceController-iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OpenSourceController-iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
52D6D9861BEFF229002C0205 /* OpenSourceController-iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OpenSourceController-iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
76229B712180AD8400A61697 /* LicenceLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceLoader.swift; path = Sources/Model/LicenceLoader.swift; sourceTree = "<group>"; };
|
|
||||||
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HTTPDataLoader.swift; path = Sources/Loader/HTTPDataLoader.swift; sourceTree = "<group>"; };
|
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HTTPDataLoader.swift; path = Sources/Loader/HTTPDataLoader.swift; sourceTree = "<group>"; };
|
||||||
76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceControllerConfig.swift; path = Sources/OpenSourceControllerConfig.swift; sourceTree = "<group>"; };
|
76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceControllerConfig.swift; path = Sources/OpenSourceControllerConfig.swift; sourceTree = "<group>"; };
|
||||||
76229B7F2180ADA800A61697 /* OpenSourceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceController.swift; path = Sources/OpenSourceController.swift; sourceTree = "<group>"; };
|
76229B7F2180ADA800A61697 /* OpenSourceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceController.swift; path = Sources/OpenSourceController.swift; sourceTree = "<group>"; };
|
||||||
@@ -45,6 +45,8 @@
|
|||||||
769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceListViewController.swift; path = Sources/Controller/LicenceListViewController.swift; sourceTree = "<group>"; };
|
769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceListViewController.swift; path = Sources/Controller/LicenceListViewController.swift; sourceTree = "<group>"; };
|
||||||
769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoadingViewController.swift; path = Sources/Controller/LoadingViewController.swift; sourceTree = "<group>"; };
|
769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoadingViewController.swift; path = Sources/Controller/LoadingViewController.swift; sourceTree = "<group>"; };
|
||||||
769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceTableViewCell.swift; path = Sources/Controller/OpenSourceTableViewCell.swift; sourceTree = "<group>"; };
|
769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceTableViewCell.swift; path = Sources/Controller/OpenSourceTableViewCell.swift; sourceTree = "<group>"; };
|
||||||
|
76B7980E238844F300009193 /* LicenceLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceLoader.swift; path = Sources/Loader/LicenceLoader.swift; sourceTree = "<group>"; };
|
||||||
|
76B79810238845D300009193 /* Style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Style.swift; path = Sources/Utils/Style.swift; sourceTree = "<group>"; };
|
||||||
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UITableView+Extensions.swift"; path = "Sources/Utils/UITableView+Extensions.swift"; sourceTree = "<group>"; };
|
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UITableView+Extensions.swift"; path = "Sources/Utils/UITableView+Extensions.swift"; sourceTree = "<group>"; };
|
||||||
76D7F24121BEB18A004B74CB /* Reusable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Reusable.swift; path = Sources/Utils/Reusable.swift; sourceTree = "<group>"; };
|
76D7F24121BEB18A004B74CB /* Reusable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Reusable.swift; path = Sources/Utils/Reusable.swift; sourceTree = "<group>"; };
|
||||||
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIViewController+Extensions.swift"; path = "Sources/Utils/UIViewController+Extensions.swift"; sourceTree = "<group>"; };
|
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIViewController+Extensions.swift"; path = "Sources/Utils/UIViewController+Extensions.swift"; sourceTree = "<group>"; };
|
||||||
@@ -104,7 +106,6 @@
|
|||||||
76229B702180AD7700A61697 /* Model */ = {
|
76229B702180AD7700A61697 /* Model */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
76229B712180AD8400A61697 /* LicenceLoader.swift */,
|
|
||||||
76EAA84C1E93EDCD009A41DA /* LicenceFile.swift */,
|
76EAA84C1E93EDCD009A41DA /* LicenceFile.swift */,
|
||||||
);
|
);
|
||||||
name = Model;
|
name = Model;
|
||||||
@@ -114,6 +115,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */,
|
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */,
|
||||||
|
76B7980E238844F300009193 /* LicenceLoader.swift */,
|
||||||
);
|
);
|
||||||
name = Loader;
|
name = Loader;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -125,6 +127,7 @@
|
|||||||
76D7F24121BEB18A004B74CB /* Reusable.swift */,
|
76D7F24121BEB18A004B74CB /* Reusable.swift */,
|
||||||
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */,
|
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */,
|
||||||
76D7F24421BEB18A004B74CB /* UIView+Extensions.swift */,
|
76D7F24421BEB18A004B74CB /* UIView+Extensions.swift */,
|
||||||
|
76B79810238845D300009193 /* Style.swift */,
|
||||||
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */,
|
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */,
|
||||||
);
|
);
|
||||||
name = Utils;
|
name = Utils;
|
||||||
@@ -238,7 +241,7 @@
|
|||||||
52D6D9851BEFF229002C0205 = {
|
52D6D9851BEFF229002C0205 = {
|
||||||
CreatedOnToolsVersion = 7.1;
|
CreatedOnToolsVersion = 7.1;
|
||||||
DevelopmentTeam = XEHEC9B46E;
|
DevelopmentTeam = XEHEC9B46E;
|
||||||
LastSwiftMigration = "";
|
LastSwiftMigration = 1130;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -287,15 +290,16 @@
|
|||||||
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */,
|
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */,
|
||||||
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */,
|
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */,
|
||||||
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */,
|
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */,
|
||||||
|
76B79811238845D300009193 /* Style.swift in Sources */,
|
||||||
769FD9D121871DEC00FB5A53 /* OpenSourceViewController.swift in Sources */,
|
769FD9D121871DEC00FB5A53 /* OpenSourceViewController.swift in Sources */,
|
||||||
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */,
|
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */,
|
||||||
76EAA84F1E93EDCD009A41DA /* LicenceFile.swift in Sources */,
|
76EAA84F1E93EDCD009A41DA /* LicenceFile.swift in Sources */,
|
||||||
76229B722180AD8400A61697 /* LicenceLoader.swift in Sources */,
|
|
||||||
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */,
|
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */,
|
||||||
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */,
|
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */,
|
||||||
76D7F24821BEB18A004B74CB /* Array+Extensions.swift in Sources */,
|
76D7F24821BEB18A004B74CB /* Array+Extensions.swift in Sources */,
|
||||||
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */,
|
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */,
|
||||||
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */,
|
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */,
|
||||||
|
76B7980F238844F300009193 /* LicenceLoader.swift in Sources */,
|
||||||
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */,
|
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -495,7 +499,7 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -510,7 +514,7 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="#features">Features</a>
|
<a href="#features">Features</a>
|
||||||
• <a href="#installation">Installation</a>
|
|
||||||
• <a href="#usage">Usage</a>
|
• <a href="#usage">Usage</a>
|
||||||
• <a href="#translation">Translation</a>
|
• <a href="#translation">Translation</a>
|
||||||
• <a href="#customisation">Customisation</a>
|
• <a href="#customisation">Customisation</a>
|
||||||
|
• <a href="#installation">Installation</a>
|
||||||
• <a href="#license">License</a>
|
• <a href="#license">License</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -28,39 +28,11 @@ Display a screen with all licences used in your application can be painful to ma
|
|||||||
- [x] Display tableView with licences used in your app
|
- [x] Display tableView with licences used in your app
|
||||||
- [x] Download licence from an URL
|
- [x] Download licence from an URL
|
||||||
|
|
||||||
## Todo (feel free to make PR)
|
|
||||||
|
|
||||||
- [ ] Download licence from Podfile (https://github.com/terflogag/OpenSourceController/issues/1)
|
|
||||||
- [ ] Download licence from Cartfile (https://github.com/terflogag/OpenSourceController/issues/2)
|
|
||||||
- [ ] Download licence from local file
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Xcode 9
|
* Xcode 11
|
||||||
* iOS 9.0+ target deployment
|
* iOS 9.0+ target deployment
|
||||||
* Swift 3, Swift 4 or Swift 4.2 project
|
* Swift 3, Swift 4 or Swift 5.1 project
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
- To integrate OpenSourceController into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your Podfile :
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
pod "OpenSourceController", '~> 3.0.0' # Swift 4.2 Version
|
|
||||||
|
|
||||||
pod "OpenSourceController", '~> 2.0' # Swift 4.0 Version
|
|
||||||
|
|
||||||
pod "OpenSourceController", '~> 1.0.8' # Swift 3.1 version
|
|
||||||
```
|
|
||||||
|
|
||||||
- To integrate OpenSourceController into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile :
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
github "floriangbh/OpenSourceController" ~> 3.0.0 # Swift 4.2 version
|
|
||||||
|
|
||||||
github "floriangbh/OpenSourceController" ~> 2.0 # Swift 4.0 version
|
|
||||||
|
|
||||||
github "floriangbh/OpenSourceController" ~> 1.0.8 # Swift 3.1 version
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -89,6 +61,30 @@ openSourceVC.presentOpenSourceController(from: self)
|
|||||||
openSourceVC.pushOpenSourceController(from: self)
|
openSourceVC.pushOpenSourceController(from: self)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
With SwiftUI :
|
||||||
|
|
||||||
|
```swift
|
||||||
|
struct OpenSourceView: UIViewControllerRepresentable {
|
||||||
|
@available(iOS 13, *)
|
||||||
|
public func updateUIViewController(_ uiViewController: OpenSourceViewController, context: UIViewControllerRepresentableContext<OpenSourceView>) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(iOS 13, *)
|
||||||
|
public func makeUIViewController(context: UIViewControllerRepresentableContext<OpenSourceView>) -> OpenSourceViewController {
|
||||||
|
let openSourceVC = OpenSourceViewController(licences:
|
||||||
|
[LicenceFile(title: "FacebookImagePicker",
|
||||||
|
url: "https://raw.githubusercontent.com/terflogag/FacebookImagePicker/master/LICENSE"),
|
||||||
|
LicenceFile(title: "JSQMessagesViewController",
|
||||||
|
url: "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/LICENSE")],
|
||||||
|
showCloseButton: true,
|
||||||
|
configuration: OpenSourceControllerConfig(),
|
||||||
|
licenceLoader: LicenceLoader())
|
||||||
|
return openSourceVC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Customisation
|
## Customisation
|
||||||
|
|
||||||
You can apply some customisation. To do it you can use the OpenSourceControllerConfig structure like this :
|
You can apply some customisation. To do it you can use the OpenSourceControllerConfig structure like this :
|
||||||
@@ -124,6 +120,30 @@ OpenSourceController is currently write in english. If you need translation for
|
|||||||
"Unable to load this licence." = "<your_translation>";
|
"Unable to load this licence." = "<your_translation>";
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
- To integrate OpenSourceController into your Xcode project using [Swift Packet Manager](https://github.com/apple/swift-package-manager), specify this url in Xcode : `https://github.com/floriangbh/OpenSourceController`
|
||||||
|
|
||||||
|
- To integrate OpenSourceController into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your Podfile :
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
pod "OpenSourceController", '~> 3.0.0' # Swift 4.2 Version
|
||||||
|
|
||||||
|
pod "OpenSourceController", '~> 2.0' # Swift 4.0 Version
|
||||||
|
|
||||||
|
pod "OpenSourceController", '~> 1.0.8' # Swift 3.1 version
|
||||||
|
```
|
||||||
|
|
||||||
|
- To integrate OpenSourceController into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile :
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
github "floriangbh/OpenSourceController" ~> 3.0.0 # Swift 4.2 version
|
||||||
|
|
||||||
|
github "floriangbh/OpenSourceController" ~> 2.0 # Swift 4.0 version
|
||||||
|
|
||||||
|
github "floriangbh/OpenSourceController" ~> 1.0.8 # Swift 3.1 version
|
||||||
|
```
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
Florian Gabach, florian.gabach@gmail.com
|
Florian Gabach, florian.gabach@gmail.com
|
||||||
|
|||||||
@@ -6,9 +6,13 @@
|
|||||||
// Copyright © 2018 OpenSourceController. All rights reserved.
|
// Copyright © 2018 OpenSourceController. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if !os(macOS)
|
||||||
import UIKit
|
import UIKit
|
||||||
|
#else
|
||||||
|
import AppKit
|
||||||
|
#endif
|
||||||
|
|
||||||
final class LicenceListViewController: UITableViewController {
|
open class LicenceListViewController: UITableViewController {
|
||||||
|
|
||||||
// MARK: - Var
|
// MARK: - Var
|
||||||
|
|
||||||
@@ -24,11 +28,11 @@ final class LicenceListViewController: UITableViewController {
|
|||||||
super.init(style: .plain)
|
super.init(style: .plain)
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required public init?(coder aDecoder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override open func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
self.prepareTableView()
|
self.prepareTableView()
|
||||||
@@ -50,22 +54,22 @@ extension LicenceListViewController {
|
|||||||
|
|
||||||
// MARK: - Table View Data Source
|
// MARK: - Table View Data Source
|
||||||
|
|
||||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
override open func numberOfSections(in tableView: UITableView) -> Int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
override open func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
return self.downloadedLicence.count
|
return self.downloadedLicence.count
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
override open func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
let cell: OpenSourceTableViewCell = tableView.dequeueReusableCell(for: indexPath)
|
let cell: OpenSourceTableViewCell = tableView.dequeueReusableCell(for: indexPath)
|
||||||
guard let licence = self.downloadedLicence.get(at: indexPath.row) else { return cell }
|
guard let licence = self.downloadedLicence.get(at: indexPath.row) else { return cell }
|
||||||
cell.configure(licence: licence, config: self.config)
|
cell.configure(licence: licence, config: self.config)
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
|
override open func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||||
return UITableView.automaticDimension
|
return UITableView.automaticDimension
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
final class LoadingViewController: UIViewController {
|
open class LoadingViewController: UIViewController {
|
||||||
|
|
||||||
// MARK: - Var
|
// MARK: - Var
|
||||||
|
|
||||||
@@ -32,11 +32,11 @@ final class LoadingViewController: UIViewController {
|
|||||||
super.init(nibName: nil, bundle: nil)
|
super.init(nibName: nil, bundle: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required public init?(coder aDecoder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override open func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
self.view.backgroundColor = self.config.uiConfig.backgroundColor
|
self.view.backgroundColor = self.config.uiConfig.backgroundColor
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
final class OpenSourceTableViewCell: UITableViewCell, Reusable {
|
open class OpenSourceTableViewCell: UITableViewCell, Reusable {
|
||||||
|
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ final class OpenSourceTableViewCell: UITableViewCell, Reusable {
|
|||||||
self.prepareCellComponent()
|
self.prepareCellComponent()
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required public init?(coder aDecoder: NSCoder) {
|
||||||
super.init(coder: aDecoder)
|
super.init(coder: aDecoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
final class OpenSourceViewController: UIViewController {
|
open class OpenSourceViewController: UIViewController {
|
||||||
|
|
||||||
// MARK: - Var
|
// MARK: - Var
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ final class OpenSourceViewController: UIViewController {
|
|||||||
|
|
||||||
// MARK: - Lifecyle
|
// MARK: - Lifecyle
|
||||||
|
|
||||||
init(licences: [LicenceFile],
|
public init(licences: [LicenceFile],
|
||||||
showCloseButton: Bool,
|
showCloseButton: Bool,
|
||||||
configuration: OpenSourceControllerConfig,
|
configuration: OpenSourceControllerConfig,
|
||||||
licenceLoader: LicenceLoader) {
|
licenceLoader: LicenceLoader) {
|
||||||
@@ -42,11 +42,11 @@ final class OpenSourceViewController: UIViewController {
|
|||||||
super.init(nibName: nil, bundle: nil)
|
super.init(nibName: nil, bundle: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required public init?(coder aDecoder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override open func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
self.title = self.config.title
|
self.title = self.config.title
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
final class HTTPDataLoader {
|
open class HTTPDataLoader {
|
||||||
func loadData(fromUrl url: String, completion: @escaping (Data?) -> Void) {
|
func loadData(fromUrl url: String, completion: @escaping (Data?) -> Void) {
|
||||||
if let url = URL(string: url) {
|
if let url = URL(string: url) {
|
||||||
let task = URLSession.shared.dataTask(with: url) { (data, _, error) in
|
let task = URLSession.shared.dataTask(with: url) { (data, _, error) in
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
final class LicenceLoader {
|
open class LicenceLoader {
|
||||||
|
|
||||||
/// Download every licence
|
/// Download every licence
|
||||||
///
|
///
|
||||||
@@ -32,4 +32,6 @@ final class LicenceLoader {
|
|||||||
completion()
|
completion()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public init() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public final class LicenceFile {
|
open class LicenceFile {
|
||||||
|
|
||||||
// MARK- Var
|
// MARK- Var
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
// Created by Florian Gabach on 05/02/2017.
|
// Created by Florian Gabach on 05/02/2017.
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
#if canImport(SwiftUI)
|
||||||
|
import SwiftUI
|
||||||
|
#endif
|
||||||
|
|
||||||
open class OpenSourceController: NSObject {
|
open class OpenSourceController: NSObject {
|
||||||
|
|
||||||
@@ -43,3 +46,4 @@ open class OpenSourceController: NSObject {
|
|||||||
navigationController.pushViewController(licenceController, animated: true)
|
navigationController.pushViewController(licenceController, animated: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,5 +35,8 @@ public struct OpenSourceControllerConfig {
|
|||||||
public var verbose: Bool = false
|
public var verbose: Bool = false
|
||||||
|
|
||||||
/// UI-specific configuration.
|
/// UI-specific configuration.
|
||||||
|
|
||||||
|
public init() {
|
||||||
|
}
|
||||||
public var uiConfig = UIConfig()
|
public var uiConfig = UIConfig()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
extension UITableView {
|
extension UITableView {
|
||||||
final func register<T: UITableViewCell>(cellType: T.Type)
|
open func register<T: UITableViewCell>(cellType: T.Type)
|
||||||
where T: Reusable {
|
where T: Reusable {
|
||||||
self.register(cellType.self, forCellReuseIdentifier: cellType.reuseIdentifier)
|
self.register(cellType.self, forCellReuseIdentifier: cellType.reuseIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
final func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T
|
open func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T
|
||||||
where T: Reusable {
|
where T: Reusable {
|
||||||
guard let cell = self.dequeueReusableCell(withIdentifier: cellType.reuseIdentifier, for: indexPath) as? T else {
|
guard let cell = self.dequeueReusableCell(withIdentifier: cellType.reuseIdentifier, for: indexPath) as? T else {
|
||||||
fatalError(
|
fatalError(
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ platform :ios do
|
|||||||
release("major")
|
release("major")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Scan the project"
|
||||||
|
lane :scan_project do
|
||||||
|
scan(scheme: "OpenSourceController-iOS")
|
||||||
|
end
|
||||||
|
|
||||||
def release(type)
|
def release(type)
|
||||||
podspec_name = "OpenSourceController.podspec"
|
podspec_name = "OpenSourceController.podspec"
|
||||||
pod_lib_lint(use_bundle_exec: false)
|
pod_lib_lint(use_bundle_exec: false)
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ Release a new version with a minor bump_type
|
|||||||
fastlane ios major
|
fastlane ios major
|
||||||
```
|
```
|
||||||
Release a new version with a major bump_type
|
Release a new version with a major bump_type
|
||||||
|
### ios buildproject
|
||||||
|
```
|
||||||
|
fastlane ios buildproject
|
||||||
|
```
|
||||||
|
Build the project
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Test Results | xcpretty</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body { font-family:Avenir Next, Helvetica Neue, sans-serif; color: #4A4A4A; background-color: #F0F3FB; margin:0;}
|
||||||
|
h1 { font-weight: normal; font-size: 24px; margin: 10px 0 0 0;}
|
||||||
|
h3 { font-weight: normal; margin: 2px; font-size: 1.1em;}
|
||||||
|
header { position: fixed;width: 100%;background: rgba(249, 254, 255, 0.9);margin: 0;padding: 10px;}
|
||||||
|
header:before, header:after { content:""; display:table;}
|
||||||
|
header:after { clear:both;}
|
||||||
|
a:link { color: #A1D761;}
|
||||||
|
footer { clear: both;position: relative;z-index: 10;height: 40px;margin-top: -10px; margin-left:30px; font-size:12px;}
|
||||||
|
table { width:100%; border-collapse: collapse;}
|
||||||
|
tr td:first-child { width:7%}
|
||||||
|
.left { float: left; margin-left:30px;}
|
||||||
|
.right { float: right; margin-right: 40px; margin-top: 0; margin-bottom:0;}
|
||||||
|
.test-suite { margin: 0 0 30px 0;}
|
||||||
|
.test-suite > .heading { font-family:Menlo, Monaco, monospace; font-weight: bold; border-color: #A1D761; background-color: #B8E986; border-width: 1px;}
|
||||||
|
.test-suite.failing > .heading { border-color: #C84F5E; background-color: #E58591;}
|
||||||
|
.test-suite > .heading > .title { margin-top: 4px; margin-left: 10px;}
|
||||||
|
.tests { overflow: scroll;margin: 0 30px 0 60px;}
|
||||||
|
.test, .test-suite > .heading { height: 30px; overflow: hidden; margin: 0 30px;}
|
||||||
|
.test, .test-suite > .heading { border-width: 1px; border-collapse: collapse; border-style: solid; }
|
||||||
|
.test { margin-left: 30px; border-top:none;}
|
||||||
|
.test.failing { border-color: #C84F5E; background-color: #F4DDE0;}
|
||||||
|
.test.passing { border-color: #A1D761;}
|
||||||
|
.test.failing { background-color: #E7A1AA;}
|
||||||
|
.test.passing { background-color: #CAF59F;}
|
||||||
|
.test.failing.odd { background-color: #EEC7CC;}
|
||||||
|
.test.passing.odd { background-color: #E5FBCF;}
|
||||||
|
.details.failing { background-color: #F4DDE0; border: 1px solid #C84F5E;}
|
||||||
|
.details.passing { background-color: #E5F4DC; border: 1px solid #A1D761;}
|
||||||
|
.test .test-detail:last-child { padding-bottom: 8px;}
|
||||||
|
.test .title { float: left; font-size: 0.9em; margin-top: 8px; font-family: Menlo, Monaco, monospace;}
|
||||||
|
.test .time { float: left;margin: 4px 10px 0 20px;}
|
||||||
|
.test-detail { font-family:Menlo, Monaco, monospace; font-size: 0.9em; margin: 5px 0 5px 0px;}
|
||||||
|
.screenshots { height: auto; overflow: hidden; padding: 4px 4px 0 4px; background-color: #B8E986; border: #A1D761; border-width: 0 1px; border-style: solid; }
|
||||||
|
.screenshots.failing { border-color: #C84F5E; background-color: #E58591; }
|
||||||
|
.screenshot { max-height: 60px; float: left; transition: max-height 0.2s; margin: 0 4px 4px 0 }
|
||||||
|
.screenshot.selected { max-height: 568px; }
|
||||||
|
#test-suites { display: inline-block; width: 100%;margin-top:100px;}
|
||||||
|
#segment-bar { margin-top: 10px;margin-left: 14px;float:right;}
|
||||||
|
#segment-bar a:first-child { border-radius: 9px 0 0 9px; border-right: none;}
|
||||||
|
#segment-bar a:last-child { border-radius: 0 9px 9px 0; border-left: none;}
|
||||||
|
#segment-bar > a { color: #565656; border: 2px solid #7B7B7B; width: 80px; font-weight: bold; display:inline-block;text-align:center; font-weight: normal;}
|
||||||
|
#segment-bar > a.selected { background-color: #979797; color: #F0F3FB;}
|
||||||
|
#counters { float: left;margin: 10px;text-align: right;}
|
||||||
|
#counters h2 { font-size: 16px; font-family: Avenir, sans-serif; font-weight: lighter; display:inline;}
|
||||||
|
#counters .number { font-size: 20px;}
|
||||||
|
#fail-count { color: #D0021B; margin-left:10px;}
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
h1, #counters, #segment-bar { margin: 5px auto; text-align:center;}
|
||||||
|
header, #segment-bar { width: 100%; position: relative; background:none;}
|
||||||
|
.left, .right { float:none; margin:0;}
|
||||||
|
#test-suites { margin-top: 0;}
|
||||||
|
#counters { float:none;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var hide = function(element) { element.style.display = 'none';}
|
||||||
|
var show = function(element) { element.style.display = '';}
|
||||||
|
var isHidden = function(element) { return element.style.display == 'none';}
|
||||||
|
var isSelected = function(element) { return element.classList.contains("selected");}
|
||||||
|
var deselect = function(element) { return element.classList.remove("selected");}
|
||||||
|
var select = function(element) { return element.classList.add("selected");}
|
||||||
|
var toggle = function(element) { isHidden(element) ? show(element) : hide(element);};
|
||||||
|
var toggleTests = function(heading) { toggle(heading.parentNode.children[1]);};
|
||||||
|
var toggleDetails = function(detailClass) {
|
||||||
|
var details = document.querySelectorAll('.' + detailClass);
|
||||||
|
for (var i = details.length - 1; i >= 0; i--) { toggle(details[i]);};
|
||||||
|
};
|
||||||
|
var hideAll = function(collection) {
|
||||||
|
for (var i = collection.length - 1; i >= 0; i--) { hide(collection[i]); };
|
||||||
|
}
|
||||||
|
var showAll = function(collection) {
|
||||||
|
for (var i = collection.length - 1; i >= 0; i--) { show(collection[i]); };
|
||||||
|
}
|
||||||
|
var selectSegment = function(segment) {
|
||||||
|
if (isSelected(segment)) return;
|
||||||
|
var segments = document.querySelectorAll('#segment-bar > a');
|
||||||
|
for (var i = segments.length - 1; i >= 0; i--) { deselect(segments[i]);};
|
||||||
|
select(segment);
|
||||||
|
if (segment.id == "all-segment") {
|
||||||
|
showAll(document.querySelectorAll('.test-suite'));
|
||||||
|
showAll(document.querySelectorAll('.test'));
|
||||||
|
} else if (segment.id == "failing-segment") {
|
||||||
|
hideAll(document.querySelectorAll('.test.passing'));
|
||||||
|
showAll(document.querySelectorAll('.test.failing'));
|
||||||
|
hideAll(document.querySelectorAll('.test-suite.passing'));
|
||||||
|
showAll(document.querySelectorAll('.test-suite.failing'));
|
||||||
|
} else if (segment.id == "passing-segment") {
|
||||||
|
hideAll(document.querySelectorAll('.test.failing'));
|
||||||
|
showAll(document.querySelectorAll('.test.passing'));
|
||||||
|
hideAll(document.querySelectorAll('.test-suite.failing'));
|
||||||
|
showAll(document.querySelectorAll('.test-suite.passing'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var toggleScreenshot = function(suiteName, index) {
|
||||||
|
var screenshot = document.getElementById("screenshot-" + suiteName + "-" + index);
|
||||||
|
isSelected(screenshot) ? deselect(screenshot) : select(screenshot);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<section class="left">
|
||||||
|
<h1>Test Results</h1>
|
||||||
|
</section>
|
||||||
|
<section class="right">
|
||||||
|
<section id="counters">
|
||||||
|
<h2 id="test-count"><span class="number">0</span> tests</h2>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section id="segment-bar">
|
||||||
|
<a id="all-segment" onclick="selectSegment(this);" class="selected">All</a><a id="failing-segment" onclick="selectSegment(this);">Failing</a><a id="passing-segment" onclick="selectSegment(this);">Passing</a>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</header>
|
||||||
|
<section id="test-suites">
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<footer>Report generated with <a href="https://github.com/supermarin/xcpretty">xcpretty</a></footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<testsuites tests='0' failures='0'/>
|
||||||
Reference in New Issue
Block a user