Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Auto convert new Swift syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
slightair committed Sep 27, 2015
1 parent fff7392 commit f6cc549
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Example/Puree.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = PUR;
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = "Tomohiro Moro";
TargetAttributes = {
Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/PURTestAppendParamFilter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

class PURTestAppendParamFilter : PURFilter {
override func logsWithObject(object: AnyObject!, tag: String!, captured: String!) -> [AnyObject]! {
var userInfo = (object as NSDictionary).mutableCopy() as NSMutableDictionary
var userInfo = (object as! NSDictionary).mutableCopy() as! NSMutableDictionary
userInfo["ext"] = captured;

return [PURLog(tag: tag, date: NSDate(), userInfo: userInfo)]
Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/PURTestBufferedOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PURTestBufferedOutput : PURBufferedOutput {

override func writeChunk(chunk: PURBufferedOutputChunk!, completion: ((Bool) -> Void)!) {
let logs = chunk.logs as [PURLog]
let logString = reduce(logs as [PURLog], "") { (result, log) -> String in
let logString = (logs as [PURLog]).reduce("") { (result, log) -> String in
let record = join("_", map(log.userInfo) { (key, value) in "\(key)=\(value)" })
return result + "\(log.tag)-\(record)/"
}
Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/PURTestChangeTagFilter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
class PURTestChangeTagFilter : PURFilter {
var tagSuffix: String!
override func configure(settings: [NSObject : AnyObject]!) {
tagSuffix = settings["tagSuffix"] as String!
tagSuffix = settings["tagSuffix"] as! String!
}

override func logsWithObject(object: AnyObject!, tag: String!, captured: String!) -> [AnyObject]! {
Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/PURTestFailureOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PURTestFailureOutput : PURBufferedOutput {

override func writeChunk(chunk: PURBufferedOutputChunk!, completion: ((Bool) -> Void)!) {
self.logStorage?.addLog("error");
println("\(NSDate()): error!(retry debug)")
print("\(NSDate()): error!(retry debug)")
completion(false)
}
}
2 changes: 1 addition & 1 deletion Example/Tests/PURTestOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PURTestOutput : PUROutput {
}

override func emitLog(log: PURLog!) {
let record = join("_", map(log.userInfo) { (key, value) in "\(key)=\(value)" })
let record = map(log.userInfo) { (key, value) in "\(key)=\(value)" }.joinWithSeparator("_")
self.logStorage?.addLog("\(log.tag)-\(record)")
}
}
2 changes: 1 addition & 1 deletion Example/Tests/TestLogStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class TestLogStorage {
}

func toString() -> String {
return join(", ", storage)
return storage.joinWithSeparator(", ")
}
}

0 comments on commit f6cc549

Please sign in to comment.