Skip to content

Commit

Permalink
Merge pull request #1 from sgr-ksmt/update_to_swift4
Browse files Browse the repository at this point in the history
Update to swift4.1
  • Loading branch information
sgr-ksmt authored Apr 17, 2018
2 parents 3f19010 + 624387d commit 7af7ead
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.1
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem 'cocoapods', '~>1.4.beta'
gem 'cocoapods', '1.5'
44 changes: 23 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
CFPropertyList (3.0.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
atomos (0.1.2)
claide (1.0.2)
cocoapods (1.4.0.beta.2)
cocoapods (1.5.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.4.0.beta.2)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-core (= 1.5.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
Expand All @@ -23,16 +24,16 @@ GEM
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.1)
molinillo (~> 0.6.5)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.3, < 2.0)
cocoapods-core (1.4.0.beta.2)
xcodeproj (>= 1.5.7, < 2.0)
cocoapods-core (1.5.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
Expand All @@ -46,29 +47,30 @@ GEM
escape (0.0.4)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
i18n (0.9.0)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
minitest (5.10.3)
molinillo (0.6.4)
nanaimo (0.2.3)
minitest (5.11.3)
molinillo (0.6.5)
nanaimo (0.2.5)
nap (1.1.0)
netrc (0.11.0)
ruby-macho (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.4)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.5.3)
CFPropertyList (~> 2.3.3)
xcodeproj (1.5.7)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
nanaimo (~> 0.2.4)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.4.beta)
cocoapods (= 1.5)

BUNDLED WITH
1.14.6
1.16.1
2 changes: 1 addition & 1 deletion Lobster.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Lobster"
s.version = "0.1.0"
s.version = "1.0"
s.summary = "Type-safe Firebase-RemoteConfig helper library"
s.homepage = "https://github.com/sgr-ksmt/Lobster"
s.license = 'MIT'
Expand Down
6 changes: 5 additions & 1 deletion Lobster.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
163143F61FA8BE8600D25996 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Suguru Kishimoto";
TargetAttributes = {
163143FE1FA8BE8600D25996 = {
Expand Down Expand Up @@ -238,13 +238,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -298,13 +300,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
4 changes: 1 addition & 3 deletions Lobster.xcodeproj/xcshareddata/xcschemes/Lobster.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 2 additions & 2 deletions Lobster.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Lobster.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
46 changes: 26 additions & 20 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
PODS:
- Firebase/Core (4.4.0):
- FirebaseAnalytics (= 4.0.4)
- FirebaseCore (= 4.0.9)
- Firebase/RemoteConfig (4.4.0):
- Firebase/Core (4.13.0):
- FirebaseAnalytics (= 4.2.0)
- FirebaseCore (= 4.0.20)
- Firebase/RemoteConfig (4.13.0):
- Firebase/Core
- FirebaseRemoteConfig (= 2.0.3)
- FirebaseAnalytics (4.0.4):
- FirebaseRemoteConfig (= 2.1.3)
- FirebaseABTesting (1.0.0):
- FirebaseCore (~> 4.0)
- Protobuf (~> 3.1)
- FirebaseAnalytics (4.2.0):
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseCore (4.0.9):
- FirebaseCore (4.0.20):
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseInstanceID (2.0.5)
- FirebaseRemoteConfig (2.0.3):
- FirebaseAnalytics (~> 4.0)
- FirebaseInstanceID (2.0.10):
- FirebaseCore (~> 4.0)
- FirebaseRemoteConfig (2.1.3):
- FirebaseABTesting (~> 1.0)
- FirebaseAnalytics (~> 4.1)
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- Protobuf (~> 3.1)
- Protobuf (~> 3.5)
- GoogleToolboxForMac/Defines (2.1.3)
- GoogleToolboxForMac/NSData+zlib (2.1.3):
- GoogleToolboxForMac/Defines (= 2.1.3)
Expand All @@ -27,21 +32,22 @@ PODS:
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.4.0)
- Protobuf (3.5.0)

DEPENDENCIES:
- Firebase/RemoteConfig

SPEC CHECKSUMS:
Firebase: 3e92884a63e8f76d107c43a67d2ab9071e1eda10
FirebaseAnalytics: 722b53c7b32bfc7806b06e0093a2f5180d4f2c5a
FirebaseCore: ebe73f64302705e693b1de9919a76edbdd17a19d
FirebaseInstanceID: f2b688c66b972f30d7fa9f5f9f91455454a03b47
FirebaseRemoteConfig: 1c982f73af48ec048c8fa8621d5178cfdffac9aa
Firebase: 5ec5e863d269d82d66b4bf56856726f8fb8f0fb3
FirebaseABTesting: d07d0ee833b842d5153549e4c7e2e2cb1c23a3f9
FirebaseAnalytics: 7ef69e76a5142f643aeb47c780e1cdce4e23632e
FirebaseCore: 90cb1c53d69b556f112a1bf72b5fcfaad7650790
FirebaseInstanceID: 8d20d890d65c917f9f7d9950b6e10a760ad34321
FirebaseRemoteConfig: 3e95fb7c072308492e85fa41d59d38b3d6fd2372
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 03eef2ee0b674770735cf79d9c4d3659cf6908e8
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03

PODFILE CHECKSUM: a0ac64af65ccc2a1ef76137a9390274ee3d1190c

COCOAPODS: 1.4.0.beta.2
COCOAPODS: 1.4.0
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type-safe Firebase-RemoteConfig helper library


[![GitHub release](https://img.shields.io/github/release/sgr-ksmt/Lobster.svg)](https://github.com/sgr-ksmt/Lobster/releases)
![Language](https://img.shields.io/badge/language-Swift%204-orange.svg)
![Language](https://img.shields.io/badge/language-Swift%204.1-orange.svg)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods](https://img.shields.io/badge/Cocoa%20Pods-✓-4BC51D.svg?style=flat)](https://cocoapods.org/pods/Lobster)
[![CocoaPodsDL](https://img.shields.io/cocoapods/dt/Lobster.svg)](https://cocoapods.org/pods/Lobster)
Expand Down Expand Up @@ -127,7 +127,7 @@ support only hex: e.g. `"#FF00FF"`
![](docs/img3.png)

#### CGPoint
support text: e.g. `"[100, 100]"`
support text: e.g. `"[100, 100]"`
→ Use `DecodableConfigKey`(or `CodableConfigKey`)

```swift
Expand All @@ -137,7 +137,7 @@ extension ConfigKeys {
```

#### CGSize
support text: e.g. `"[100, 100]"`
support text: e.g. `"[100, 100]"`
→ Use `DecodableConfigKey`(or `CodableConfigKey`)

```swift
Expand All @@ -147,7 +147,7 @@ extension ConfigKeys {
```

#### CGRect
support text: e.g. `"[10, 10, 100, 100]"`
support text: e.g. `"[10, 10, 100, 100]"`
→ Use `DecodableConfigKey`(or `CodableConfigKey`)

```swift
Expand All @@ -161,13 +161,13 @@ extension ConfigKeys {
![](docs/img4.png)

#### Enum
supports `Int` or `String` rawValue.
supports `Int` or `String` rawValue.
If you want to use other enum, see "Use custom value".

#### Decodable compliant type
#### Decodable compliant type
read only

#### Codable compliant type
#### Codable compliant type
can set default value / read config value


Expand Down Expand Up @@ -271,7 +271,7 @@ Only **CocoaPods 1.4 Beta or higher**
it, simply add the following line to your Podfile:

```ruby
pod 'Lobster', '~> 0.1.0'
pod 'Lobster', '~> 1.0'
```

and run `pod install`
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIColor+Ex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension String {
var int = UInt32()
Scanner(string: hex).scanHexInt32(&int)
let a, r, g, b: UInt32
switch hex.characters.count {
switch hex.count {
case 3:
(r, g, b, a) = ((int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17, 255)
case 6:
Expand Down

0 comments on commit 7af7ead

Please sign in to comment.