Skip to content

Commit

Permalink
Merge pull request #21 from giginet/swift5
Browse files Browse the repository at this point in the history
Support Swift 5
  • Loading branch information
giginet authored Apr 5, 2019
2 parents abe62b4 + 11b98aa commit 7854e0c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: osx
osx_image: xcode10
osx_image: xcode10.2
language: objective-c
before_script:
- swiftlint --strict
Expand Down
3 changes: 2 additions & 1 deletion Puree.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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" }
s.authors = { "Tomohiro Moro" => "tomohiro-moro@cookpad.com", "Kohki Miki" => "koki-miki@cookpad.com", "Vincent Isambart" => "vincent-isambart@cookpad.com" }
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
13 changes: 7 additions & 6 deletions Puree.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@
LastUpgradeCheck = 0940;
TargetAttributes = {
NT_412093004181 = {
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
};
NT_479946421258 = {
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
};
};
};
Expand All @@ -243,6 +243,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = G_8448771205358;
projectDirPath = "";
Expand Down Expand Up @@ -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;
Expand All @@ -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";
};
Expand Down Expand Up @@ -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";
};
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -37,7 +37,7 @@ github "cookpad/Puree-Swift"
```ruby
use_frameworks!

pod 'Puree', '~> 4.0'
pod 'Puree', '~> 5.0'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions Sources/Puree/LogEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Puree/Output/BufferedOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7854e0c

Please sign in to comment.