Skip to content

Commit

Permalink
Merge branch 'deploy/2.1.1' into productive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Feb 18, 2017
2 parents 4a85a3a + dcb77c8 commit fff4078
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion HandySwift.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "HandySwift"
s.version = "2.1.0"
s.version = "2.1.1"
s.summary = "Handy Swift features that didn't make it into the Swift standard library"

s.description = <<-DESC
Expand Down
6 changes: 3 additions & 3 deletions HandySwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\nfi";
shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n if which swiftlint > /dev/null; then\n swiftlint\n else\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\n fi\nfi";
};
82F967F51C67A69A0003F12A /* Run Swift Linter */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -578,7 +578,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\nfi";
shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n if which swiftlint > /dev/null; then\n swiftlint\n else\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\n fi\nfi";
};
82F967F61C67A6A80003F12A /* Run Swift Linter */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -592,7 +592,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\nfi";
shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n if which swiftlint > /dev/null; then\n swiftlint\n else\n echo \"SwiftLint not installed, download it from https://github.com/realm/SwiftLint\"\n fi\nfi";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
alt="codebeat badge">
</a>
<a href="https://github.com/Flinesoft/HandySwift/releases">
<img src="https://img.shields.io/badge/Version-2.1.0-blue.svg"
alt="Version: 2.1.0">
<img src="https://img.shields.io/badge/Version-2.1.1-blue.svg"
alt="Version: 2.1.1">
</a>
<img src="https://img.shields.io/badge/Swift-3.0-FFAC45.svg"
alt="Swift: 3.0">
Expand Down
5 changes: 5 additions & 0 deletions Sources/Extensions/DispatchTimeIntervalExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ extension Timespan {
}
}
}

public func * (timespan: Timespan, factor: Double) -> Timespan {
let resultingNanoseconds = Int(timespan.timeInterval * factor * 1_000_000_000)
return Timespan.nanoseconds(resultingNanoseconds)
}
2 changes: 1 addition & 1 deletion Sources/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.1.0</string>
<string>2.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
7 changes: 7 additions & 0 deletions Tests/Extensions/DispatchTimeIntervalExtensionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ class DispatchTimeIntervalTests: XCTestCase {

XCTAssertEqualWithAccuracy(timeInterval, 0.5, accuracy: 0.001)
}

func testMultiplyInfix() {
let timespan = Timespan.milliseconds(500)
let multipledTimespan = timespan * 3

XCTAssertEqualWithAccuracy(multipledTimespan.timeInterval, 1.5, accuracy: 0.001)
}
}

0 comments on commit fff4078

Please sign in to comment.