Skip to content

Commit

Permalink
Merge pull request nori0620#1 from mono0926/ios8
Browse files Browse the repository at this point in the history
Ios8
  • Loading branch information
mono0926 committed Aug 15, 2015
2 parents 6cc6977 + 03791e6 commit e71478b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: objective-c
osx_image: xcode6.4

script:
- bundle exec rake default
4 changes: 2 additions & 2 deletions SwiftFilePath.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Pod::Spec.new do |s|

s.name = "SwiftFilePath"
s.version = "0.0.3"
s.version = "0.0.5"
s.summary = "Simple and powerful wrapper for NSFileManager."
s.homepage = "https://github.com/nori0620/SwiftFilePath"
s.license = "MIT"
s.author = { "Norihiro Sakamoto" => "nori0620@gmail.com" }
s.source = { :git => "https://github.com/nori0620/SwiftFilePath.git", :tag => "0.0.3" }
s.source = { :git => "https://github.com/nori0620/SwiftFilePath.git", :tag => "0.0.5" }
s.platform = :ios, '8.0'
s.source_files = "SwiftFilePath/**/*.swift"
s.requires_arc = true
Expand Down
6 changes: 4 additions & 2 deletions SwiftFilePath.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -322,7 +322,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -335,6 +335,7 @@
CC7833031A610125005E77C3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -350,6 +351,7 @@
CC7833041A610125005E77C3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
2 changes: 1 addition & 1 deletion SwiftFilePath/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>0.0.3</string>
<string>0.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion SwiftFilePath/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Path {

public class func isDir(path:NSString) -> Bool {
var isDirectory: ObjCBool = false
let isFileExists = NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory:&isDirectory)
let isFileExists = NSFileManager.defaultManager().fileExistsAtPath(path as! String, isDirectory:&isDirectory)

return isDirectory ? true : false
}
Expand Down
8 changes: 4 additions & 4 deletions SwiftFilePath/PathExtensionDir.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extension Path {
}

private class func userDomainOf(pathEnum:NSSearchPathDirectory)->Path{
let pathString = NSSearchPathForDirectoriesInDomains(pathEnum, .UserDomainMask, true)[0] as String
let pathString = NSSearchPathForDirectoriesInDomains(pathEnum, .UserDomainMask, true)[0] as! String
return Path( pathString )
}

Expand All @@ -54,7 +54,7 @@ extension Path: SequenceType {
}

return contents!.map({ [unowned self] content in
return self.content(content as String)
return self.content(content as! String)
})

}
Expand All @@ -64,7 +64,7 @@ extension Path: SequenceType {
}

public func content(path_string:NSString) -> Path {
return Path( self.path_string.stringByAppendingPathComponent(path_string) )
return Path( self.path_string.stringByAppendingPathComponent(path_string as! String) )
}

public func child(path:NSString) -> Path {
Expand All @@ -88,7 +88,7 @@ extension Path: SequenceType {
assert(self.isDir,"To get iterator, path must be dir< \(path_string) >")
let iterator = fileManager.enumeratorAtPath(path_string)
return GeneratorOf<Path>() {
let optionalContent = iterator?.nextObject() as String?
let optionalContent = iterator?.nextObject() as! String?
if var content = optionalContent {
return self.content(content)
} else {
Expand Down
2 changes: 1 addition & 1 deletion SwiftFilePathTests/SwiftFilePathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension String {
func match(pattern: String) -> Bool {
var error : NSError?
let matcher = NSRegularExpression(pattern: pattern, options: nil, error: &error)
return matcher?.numberOfMatchesInString(self, options: nil, range: NSMakeRange(0, self.utf16Count)) != 0
return matcher?.numberOfMatchesInString(self, options: nil, range: NSMakeRange(0, count(self.utf16))) != 0
}

}
Expand Down

0 comments on commit e71478b

Please sign in to comment.