Skip to content

Commit 7854e0c

Browse files
authored
Merge pull request #21 from giginet/swift5
Support Swift 5
2 parents abe62b4 + 11b98aa commit 7854e0c

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os: osx
2-
osx_image: xcode10
2+
osx_image: xcode10.2
33
language: objective-c
44
before_script:
55
- swiftlint --strict

Puree.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = "Puree"
3-
s.version = "4.0.2"
3+
s.version = "5.0.0"
44
s.summary = "Awesome log aggregator"
55
s.homepage = "https://github.com/cookpad/Puree-Swift"
66
s.license = { :type => "MIT", :file => "LICENSE" }
77
s.authors = { "Tomohiro Moro" => "[email protected]", "Kohki Miki" => "[email protected]", "Vincent Isambart" => "[email protected]" }
88
s.platform = :ios, "10.0"
99
s.source = { :git => "https://github.com/cookpad/Puree-Swift.git", :tag => "#{s.version}" }
1010
s.source_files = "Sources/**/*.{h,swift}"
11+
s.swift_version = "5.0.0"
1112
end

Puree.xcodeproj/project.pbxproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@
230230
LastUpgradeCheck = 0940;
231231
TargetAttributes = {
232232
NT_412093004181 = {
233-
LastSwiftMigration = 1000;
233+
LastSwiftMigration = 1020;
234234
};
235235
NT_479946421258 = {
236-
LastSwiftMigration = 1000;
236+
LastSwiftMigration = 1020;
237237
};
238238
};
239239
};
@@ -243,6 +243,7 @@
243243
hasScannedForEncodings = 0;
244244
knownRegions = (
245245
en,
246+
Base,
246247
);
247248
mainGroup = G_8448771205358;
248249
projectDirPath = "";
@@ -305,7 +306,7 @@
305306
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
306307
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
307308
SDKROOT = iphoneos;
308-
SWIFT_VERSION = 4.2;
309+
SWIFT_VERSION = 5.0;
309310
TARGETED_DEVICE_FAMILY = "1,2";
310311
};
311312
name = Debug;
@@ -328,7 +329,7 @@
328329
PRODUCT_BUNDLE_IDENTIFIER = com.cookpad.Puree;
329330
SDKROOT = iphoneos;
330331
SKIP_INSTALL = YES;
331-
SWIFT_VERSION = 4.2;
332+
SWIFT_VERSION = 5.0;
332333
TARGETED_DEVICE_FAMILY = "1,2";
333334
VERSIONING_SYSTEM = "apple-generic";
334335
};
@@ -410,7 +411,7 @@
410411
PRODUCT_BUNDLE_IDENTIFIER = com.cookpad.Puree;
411412
SDKROOT = iphoneos;
412413
SKIP_INSTALL = YES;
413-
SWIFT_VERSION = 4.2;
414+
SWIFT_VERSION = 5.0;
414415
TARGETED_DEVICE_FAMILY = "1,2";
415416
VERSIONING_SYSTEM = "apple-generic";
416417
};
@@ -425,7 +426,7 @@
425426
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
426427
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
427428
SDKROOT = iphoneos;
428-
SWIFT_VERSION = 4.2;
429+
SWIFT_VERSION = 5.0;
429430
TARGETED_DEVICE_FAMILY = "1,2";
430431
};
431432
name = Release;

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![](Documentation/logo.png)
44

55
[![Build Status](https://travis-ci.org/cookpad/Puree-Swift.svg?branch=master)](https://travis-ci.org/cookpad/Puree-Swift)
6-
[![Language](https://img.shields.io/badge/language-Swift%204.2-orange.svg)](https://swift.org)
6+
[![Language](https://img.shields.io/badge/language-Swift%205.0-orange.svg)](https://swift.org)
77
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
88
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Puree.svg)](http://cocoadocs.org/docsets/Puree)
99
[![Platform](https://img.shields.io/cocoapods/p/Puree.svg?style=flat)](http://cocoadocs.org/docsets/Puree)
@@ -37,7 +37,7 @@ github "cookpad/Puree-Swift"
3737
```ruby
3838
use_frameworks!
3939

40-
pod 'Puree', '~> 4.0'
40+
pod 'Puree', '~> 5.0'
4141
```
4242

4343
## Usage

Sources/Puree/LogEntry.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ public struct LogEntry: Codable, Hashable {
66
public var date: Date
77
public var userData: Data?
88

9-
public var hashValue: Int {
10-
return identifier.hashValue
9+
public func hash(into hasher: inout Hasher) {
10+
hasher.combine(identifier)
1111
}
1212

1313
public static func == (lhs: LogEntry, rhs: LogEntry) -> Bool {

Sources/Puree/Output/BufferedOutput.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ open class BufferedOutput: Output {
2626
return lhs.logs == rhs.logs
2727
}
2828

29-
public var hashValue: Int {
30-
return logs.hashValue
29+
public func hash(into hasher: inout Hasher) {
30+
hasher.combine(logs)
3131
}
3232
}
3333
public struct Configuration {

0 commit comments

Comments
 (0)