File tree Expand file tree Collapse file tree 5 files changed +31
-10
lines changed
Expand file tree Collapse file tree 5 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 11language : objective-c
2- osx_image : xcode10
2+ osx_image : xcode10.2
33env :
44 global :
55 - LC_CTYPE=en_US.UTF-8
66 - LANG=en_US.UTF-8
77 - PROJECT=FileKit.xcodeproj
88 - IOS_FRAMEWORK_SCHEME="FileKit-iOS"
99 - MACOS_FRAMEWORK_SCHEME="FileKit-OSX"
10- - IOS_SDK=iphonesimulator12.0
11- - MACOS_SDK=macosx10.13
10+ - IOS_SDK=iphonesimulator12.2
11+ - MACOS_SDK=macosx10.14
1212 matrix :
13- - DESTINATION="OS=12.0 ,name=iPhone 8" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO"
13+ - DESTINATION="OS=12.2 ,name=iPhone 8" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO"
1414 - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK" RUN_TESTS="YES"
1515before_install :
1616 - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "FileKit"
3- s . version = "5.2 .0"
3+ s . version = "5.3 .0"
44 s . summary = "Simple and expressive file management in Swift."
55 s . homepage = "https://github.com/nvzqz/FileKit"
66 s . license = { :type => "MIT" , :file => "LICENSE.md" }
Original file line number Diff line number Diff line change 1+ // swift-tools-version:4.2
12//
23// Package.swift
34// FileKit
@@ -29,7 +30,23 @@ import PackageDescription
2930
3031let package = Package (
3132 name: " FileKit " ,
32- exclude: [
33- " Tests "
33+ products: [
34+ // Products define the executables and libraries produced by a package, and make them visible to other packages.
35+ . library(
36+ name: " FileKit " ,
37+ targets: [ " FileKit " ] ) ,
38+ ] ,
39+ dependencies: [ ] ,
40+ targets: [
41+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
42+ // Targets can depend on other targets in this package, and on products in packages which this package depends on.
43+ . target(
44+ name: " FileKit " ,
45+ dependencies: [ ] ,
46+ path: " Sources " ) ,
47+ . testTarget(
48+ name: " FileKitTests " ,
49+ dependencies: [ " FileKit " ] ,
50+ path: " Tests " )
3451 ]
3552)
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ extension Readable {
4747 ///
4848 /// - Parameter path: The path being read from.
4949 ///
50- public init ( contentsOfPath path: Path ) throws { // swiftlint:disable:this valid_docs
50+ public init ( contentsOfPath path: Path ) throws {
5151 self = try Self . read ( from: path)
5252 }
5353
@@ -77,7 +77,7 @@ extension Writable {
7777 ///
7878 /// - Parameter path: The path being written to.
7979 ///
80- public func write( to path: Path ) throws { // swiftlint:disable:this valid_docs
80+ public func write( to path: Path ) throws {
8181 try write ( to: path, atomically: true )
8282 }
8383
Original file line number Diff line number Diff line change @@ -199,7 +199,11 @@ class FileKitTests: XCTestCase {
199199
200200 let directories = children. filter { $0. isDirectory }
201201
202- guard let directory = directories. first, let childOfChild = directory. children ( ) . first else {
202+ if let directory = directories. first, directory. children ( ) . isEmpty {
203+ try ? ( directory + " childOfChild " ) . createDirectory ( )
204+ }
205+
206+ guard let directory = directories. first, let childOfChild = directory. children ( ) . first else {
203207 XCTFail ( " No child of child into \( p) " )
204208 return
205209 }
You can’t perform that action at this time.
0 commit comments