Skip to content

Commit

Permalink
Merge pull request #27 from mac-gallagher/add-swift-pm
Browse files Browse the repository at this point in the history
Add SPM support, update Quick/Nimble and codecov.yml
  • Loading branch information
mac-gallagher authored Jul 12, 2019
2 parents b379db3 + c0797e4 commit 07c7fbe
Show file tree
Hide file tree
Showing 52 changed files with 567 additions and 462 deletions.
12 changes: 10 additions & 2 deletions codecov.yml → .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ coverage:
range: "70...100"

status:
project: yes
patch: yes
project:
default:
target: 100%
threshold: null
paths: "Sources/"
patch:
default:
target: 100%
threshold: null
paths: "Sources/"
changes: no

parsers:
Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

1 change: 0 additions & 1 deletion Example/DemoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import UIKit

class DemoViewController: UITableViewController {

override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "Demo"
Expand Down
11 changes: 10 additions & 1 deletion Example/Extensions/UIView+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ import UIKit

extension UIView {
@discardableResult
func anchor(top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, paddingTop: CGFloat = 0, paddingLeft: CGFloat = 0, paddingBottom: CGFloat = 0, paddingRight: CGFloat = 0, width: CGFloat = 0, height: CGFloat = 0) -> [NSLayoutConstraint] {
func anchor(top: NSLayoutYAxisAnchor? = nil,
left: NSLayoutXAxisAnchor? = nil,
bottom: NSLayoutYAxisAnchor? = nil,
right: NSLayoutXAxisAnchor? = nil,
paddingTop: CGFloat = 0,
paddingLeft: CGFloat = 0,
paddingBottom: CGFloat = 0,
paddingRight: CGFloat = 0,
width: CGFloat = 0,
height: CGFloat = 0) -> [NSLayoutConstraint] {
translatesAutoresizingMaskIntoConstraints = false

var anchors = [NSLayoutConstraint]()
Expand Down
3 changes: 2 additions & 1 deletion Example/LanguageExample/LanguageExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class LanguageExampleViewController: UIViewController {
@IBOutlet private weak var progressView4: LanguageExampleProgressView!
@IBOutlet private weak var progressView5: LanguageExampleProgressView!

private lazy var progressViews = backgroundView.subviews.filter { $0 is LanguageExampleProgressView }
private lazy var progressViews
= backgroundView.subviews.filter { $0 is LanguageExampleProgressView }
as! [LanguageExampleProgressView]

override func viewDidLoad() {
Expand Down
2 changes: 1 addition & 1 deletion MultiProgressView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ s.author = { "Mac Gallagher" => "[email protected]" }
s.source = { :git => "https://github.com/mac-gallagher/MultiProgressView.git", :tag => "v1.1.0" }

s.swift_version = "5.0"
s.source_files = "MultiProgressView/**/*"
s.source_files = "Sources/**/*"

end
58 changes: 36 additions & 22 deletions MultiProgressView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
AD3B329D22514B4E006E0F14 /* MultiProgressViewSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3B329422514B4E006E0F14 /* MultiProgressViewSpec.swift */; };
AD3B329E22514B4E006E0F14 /* ProgressViewSectionSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3B329522514B4E006E0F14 /* ProgressViewSectionSpec.swift */; };
AD3B329F22514B4E006E0F14 /* LayoutCalculatorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3B329622514B4E006E0F14 /* LayoutCalculatorSpec.swift */; };
AD3B32A022514B4E006E0F14 /* MultiProgressViewTests.plist in Resources */ = {isa = PBXBuildFile; fileRef = AD3B329722514B4E006E0F14 /* MultiProgressViewTests.plist */; };
AD3B32A122514B4E006E0F14 /* TestableProgressViewSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3B329922514B4E006E0F14 /* TestableProgressViewSection.swift */; };
AD3B32A222514B4E006E0F14 /* TestableMultiProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3B329A22514B4E006E0F14 /* TestableMultiProgressView.swift */; };
AD3B3323225161CA006E0F14 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD3B3322225161CA006E0F14 /* Assets.xcassets */; };
Expand Down Expand Up @@ -156,9 +155,7 @@
AD3B328F22514B4E006E0F14 /* Tests */ = {
isa = PBXGroup;
children = (
AD3B329022514B4E006E0F14 /* Mocks */,
AD3B329322514B4E006E0F14 /* Specs */,
AD3B329822514B4E006E0F14 /* Testables */,
AD8E50C522C14EE200905D79 /* MultiProgressViewTests */,
ADA760F52251676B0044095C /* Supporting Files */,
);
path = Tests;
Expand Down Expand Up @@ -197,8 +194,8 @@
children = (
AD3B333322516299006E0F14 /* AppDelegate.swift */,
ADF85D4E227353980049D580 /* DemoViewController.swift */,
AD6CED53227362B30049CDBA /* StorageExample */,
AD6CED54227362FB0049CDBA /* LanguageExample */,
AD6CED53227362B30049CDBA /* StorageExample */,
AD3B332F22516298006E0F14 /* Extensions */,
AD3B332E22516216006E0F14 /* Supporting Files */,
);
Expand Down Expand Up @@ -230,7 +227,7 @@
children = (
ADA760F6225167DE0044095C /* Podspec Metadata */,
AD3B331A225161C9006E0F14 /* Example for MultiProgressView */,
AD50127E224B0E5400370157 /* MultiProgressView */,
AD8E50C422C14ED300905D79 /* Sources */,
AD3B328F22514B4E006E0F14 /* Tests */,
AD501274224B0E1600370157 /* Products */,
AD3B328722514889006E0F14 /* Frameworks */,
Expand All @@ -251,12 +248,11 @@
AD50127E224B0E5400370157 /* MultiProgressView */ = {
isa = PBXGroup;
children = (
AD501280224B0E5400370157 /* LayoutCalculator.swift */,
AD501282224B0E5400370157 /* ProgressViewSection.swift */,
AD501284224B0E5400370157 /* AlignmentType.swift */,
AD501280224B0E5400370157 /* LayoutCalculator.swift */,
AD501285224B0E5400370157 /* LineCapType.swift */,
AD501286224B0E5400370157 /* MultiProgressView.swift */,
ADA760F92251682D0044095C /* Supporting Files */,
AD501282224B0E5400370157 /* ProgressViewSection.swift */,
);
path = MultiProgressView;
sourceTree = "<group>";
Expand All @@ -283,24 +279,26 @@
path = LanguageExample;
sourceTree = "<group>";
};
ADA760F52251676B0044095C /* Supporting Files */ = {
AD8E50C422C14ED300905D79 /* Sources */ = {
isa = PBXGroup;
children = (
AD3B329722514B4E006E0F14 /* MultiProgressViewTests.plist */,
AD50127E224B0E5400370157 /* MultiProgressView */,
AD8E50C622C1500D00905D79 /* Supporting Files */,
);
name = "Supporting Files";
path = Sources;
sourceTree = "<group>";
};
ADA760F6225167DE0044095C /* Podspec Metadata */ = {
AD8E50C522C14EE200905D79 /* MultiProgressViewTests */ = {
isa = PBXGroup;
children = (
ADA760F7225168070044095C /* MultiProgressView.podspec */,
ADA760F8225168080044095C /* README.md */,
AD3B329022514B4E006E0F14 /* Mocks */,
AD3B329322514B4E006E0F14 /* Specs */,
AD3B329822514B4E006E0F14 /* Testables */,
);
name = "Podspec Metadata";
path = MultiProgressViewTests;
sourceTree = "<group>";
};
ADA760F92251682D0044095C /* Supporting Files */ = {
AD8E50C622C1500D00905D79 /* Supporting Files */ = {
isa = PBXGroup;
children = (
AD501281224B0E5400370157 /* MultiProgressView.h */,
Expand All @@ -309,6 +307,23 @@
name = "Supporting Files";
sourceTree = "<group>";
};
ADA760F52251676B0044095C /* Supporting Files */ = {
isa = PBXGroup;
children = (
AD3B329722514B4E006E0F14 /* MultiProgressViewTests.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
ADA760F6225167DE0044095C /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
ADA760F7225168070044095C /* MultiProgressView.podspec */,
ADA760F8225168080044095C /* README.md */,
);
name = "Podspec Metadata";
sourceTree = "<group>";
};
B0092178B38222678F2403A2 /* Pods */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -436,7 +451,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
AD3B32A022514B4E006E0F14 /* MultiProgressViewTests.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -590,7 +604,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Tests/MultiprogressViewTests.plist;
INFOPLIST_FILE = Tests/MultiProgressViewTests.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -614,7 +628,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Tests/MultiprogressViewTests.plist;
INFOPLIST_FILE = Tests/MultiProgressViewTests.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -803,7 +817,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/MultiProgressView/MultiProgressView.plist";
INFOPLIST_FILE = "$(SRCROOT)/Sources/MultiProgressView.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -828,7 +842,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/MultiProgressView/MultiProgressView.plist";
INFOPLIST_FILE = "$(SRCROOT)/Sources/MultiProgressView.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
25 changes: 25 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble",
"state": {
"branch": null,
"revision": "f8657642dfdec9973efc79cc68bcef43a653a2bc",
"version": "8.0.2"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "94df9b449508344667e5afc7e80f8bcbff1e4c37",
"version": "2.1.0"
}
}
]
},
"version": 1
}
33 changes: 33 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "MultiProgressView",
platforms: [
.iOS(.v9)
],
products: [
.library(
name: "MultiProgressView",
targets: ["MultiProgressView"]),
],
dependencies: [
.package(url: "https://github.com/Quick/Quick", from: "2.1.0"),
.package(url: "https://github.com/Quick/Nimble", from: "8.0.2")
],
targets: [
.target(
name: "MultiProgressView",
dependencies: []),
.testTarget(
name: "MultiProgressViewTests",
dependencies: [
"MultiProgressView",
"Quick",
"Nimble"
]
)
]
)
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ platform :ios, '9.0'
workspace 'MultiProgressView'

target 'MultiProgressViewTests' do
pod 'Quick'
pod 'Nimble'
pod 'Quick', '>= 2.1.0'
pod 'Nimble', '>= 8.0.2'
end
14 changes: 7 additions & 7 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PODS:
- Nimble (8.0.1)
- Quick (2.0.0)
- Nimble (8.0.2)
- Quick (2.1.0)

DEPENDENCIES:
- Nimble
- Quick
- Nimble (>= 8.0.2)
- Quick (>= 2.1.0)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Nimble
- Quick

SPEC CHECKSUMS:
Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
Quick: ce1276c7c27ba2da3cb2fd0cde053c3648b3b22d
Nimble: 622629381bda1dd5678162f21f1368cec7cbba60
Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d

PODFILE CHECKSUM: f44f576160ba95166a2b98fdeda46e9c573717ea
PODFILE CHECKSUM: 12722990d4c51f0f49ab87b5c08ff7edfa368301

COCOAPODS: 1.6.1
14 changes: 7 additions & 7 deletions Pods/Manifest.lock

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

23 changes: 23 additions & 0 deletions Pods/Nimble/README.md

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

Loading

0 comments on commit 07c7fbe

Please sign in to comment.