diff --git a/.swift-version b/.swift-version deleted file mode 100644 index bf77d54..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.2 diff --git a/.travis.yml b/.travis.yml index 7ab388c..51faf15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: osx -osx_image: xcode10 +osx_image: xcode10.2 language: objective-c before_script: - swiftlint --strict diff --git a/Puree.podspec b/Puree.podspec index 93c4eb5..da90fad 100644 --- a/Puree.podspec +++ b/Puree.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Puree" - s.version = "4.0.2" + s.version = "5.0.0" s.summary = "Awesome log aggregator" s.homepage = "https://github.com/cookpad/Puree-Swift" s.license = { :type => "MIT", :file => "LICENSE" } @@ -8,4 +8,5 @@ Pod::Spec.new do |s| s.platform = :ios, "10.0" s.source = { :git => "https://github.com/cookpad/Puree-Swift.git", :tag => "#{s.version}" } s.source_files = "Sources/**/*.{h,swift}" + s.swift_version = "5.0.0" end diff --git a/Puree.xcodeproj/project.pbxproj b/Puree.xcodeproj/project.pbxproj index 736806f..dea2985 100644 --- a/Puree.xcodeproj/project.pbxproj +++ b/Puree.xcodeproj/project.pbxproj @@ -230,10 +230,10 @@ LastUpgradeCheck = 0940; TargetAttributes = { NT_412093004181 = { - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; }; NT_479946421258 = { - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; }; }; }; @@ -243,6 +243,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = G_8448771205358; projectDirPath = ""; @@ -305,7 +306,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -328,7 +329,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.cookpad.Puree; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -410,7 +411,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.cookpad.Puree; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -425,7 +426,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/README.md b/README.md index 6cec46b..4ef934b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![](Documentation/logo.png) [![Build Status](https://travis-ci.org/cookpad/Puree-Swift.svg?branch=master)](https://travis-ci.org/cookpad/Puree-Swift) -[![Language](https://img.shields.io/badge/language-Swift%204.2-orange.svg)](https://swift.org) +[![Language](https://img.shields.io/badge/language-Swift%205.0-orange.svg)](https://swift.org) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Puree.svg)](http://cocoadocs.org/docsets/Puree) [![Platform](https://img.shields.io/cocoapods/p/Puree.svg?style=flat)](http://cocoadocs.org/docsets/Puree) @@ -37,7 +37,7 @@ github "cookpad/Puree-Swift" ```ruby use_frameworks! -pod 'Puree', '~> 4.0' +pod 'Puree', '~> 5.0' ``` ## Usage diff --git a/Sources/Puree/LogEntry.swift b/Sources/Puree/LogEntry.swift index dbb7a68..9c183d1 100644 --- a/Sources/Puree/LogEntry.swift +++ b/Sources/Puree/LogEntry.swift @@ -6,8 +6,8 @@ public struct LogEntry: Codable, Hashable { public var date: Date public var userData: Data? - public var hashValue: Int { - return identifier.hashValue + public func hash(into hasher: inout Hasher) { + hasher.combine(identifier) } public static func == (lhs: LogEntry, rhs: LogEntry) -> Bool { diff --git a/Sources/Puree/Output/BufferedOutput.swift b/Sources/Puree/Output/BufferedOutput.swift index 742c8fd..044aba4 100644 --- a/Sources/Puree/Output/BufferedOutput.swift +++ b/Sources/Puree/Output/BufferedOutput.swift @@ -26,8 +26,8 @@ open class BufferedOutput: Output { return lhs.logs == rhs.logs } - public var hashValue: Int { - return logs.hashValue + public func hash(into hasher: inout Hasher) { + hasher.combine(logs) } } public struct Configuration {