From 3d4bad821465d56ce3ca0e66fc2e2686020fb43b Mon Sep 17 00:00:00 2001 From: Allan Vialatte Date: Thu, 16 Nov 2017 16:02:42 +0100 Subject: [PATCH 1/4] Update Readme and podspec --- .travis.yml | 12 +++--------- EasyRealm.podspec | 16 ++++++++-------- README.md | 15 +++++---------- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index a90e679..5f30578 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: objective-c -osx_image: xcode8.2 +osx_image: xcode9 xcode_project: Example/EasyRealm.xcworkspace before_install: - - gem install slather --no-rdoc --no-ri --no-document --quiet - gem install fastlane -NV before_script: #If one of this failed we have error and all process is stopped @@ -13,10 +12,5 @@ script: - fastlane scan -s EasyRealm-Example --device "iPhone 6" --clean --code_coverage after_success: -- cd $TRAVIS_BUILD_DIR && slather -deploy: - skip_cleanup: true - provider: script - script: sh $TRAVIS_BUILD_DIR/scripts/deploy.sh - on: - tags: true +- cd $TRAVIS_BUILD_DIR +- bash <(curl -s https://codecov.io/bash) diff --git a/EasyRealm.podspec b/EasyRealm.podspec index 9031004..2c31c05 100644 --- a/EasyRealm.podspec +++ b/EasyRealm.podspec @@ -8,14 +8,14 @@ Pod::Spec.new do |s| s.name = 'EasyRealm' - s.version = '2.0.1' + s.version = '2.0.0' s.summary = 'EasyRealm is a micro-framework that helps you use Realm.' -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! s.description = <<-DESC EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm. @@ -23,9 +23,9 @@ EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm. s.homepage = 'https://github.com/PoissonBallon/EasyRealm.git' # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' - s.license = { :type => 'MIT', :file => 'LICENSE' } + s.license = { type: 'MIT', file: 'LICENSE' } s.author = { 'Allan Vialatte' => 'allan.vialatte@icloud.com' } - s.source = { :git => 'https://github.com/PoissonBallon/EasyRealm.git', :tag => s.version.to_s } + s.source = { git: 'https://github.com/PoissonBallon/EasyRealm.git', tag: s.version.to_s } s.social_media_url = 'https://twitter.com/poissonballon' s.ios.deployment_target = '8.0' diff --git a/README.md b/README.md index 29668be..e66e2a8 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,17 @@

- -
- EasyRealm -

+

+ DataModelKit +

------- - -# EasyRealm [![Version](https://img.shields.io/cocoapods/v/EasyRealm.svg?style=flat)](http://cocoapods.org/pods/EasyRealm) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Platform](https://img.shields.io/cocoapods/p/EasyRealm.svg?style=flat)](http://cocoapods.org/pods/EasyRealm) - [![Build Status](https://travis-ci.org/PoissonBallon/EasyRealm.svg?branch=master)](https://travis-ci.org/PoissonBallon/EasyRealm) -[![Swift 3](https://img.shields.io/badge/Language-Swift%203-orange.svg)](https://developer.apple.com/swift/) -[![Coverage Status](https://coveralls.io/repos/github/PoissonBallon/EasyRealm/badge.svg?branch=master)](https://coveralls.io/github/PoissonBallon/EasyRealm?branch=master) +[![Swift 4](https://img.shields.io/badge/Language-Swift%203-orange.svg)](https://developer.apple.com/swift/) +[![codecov](https://codecov.io/gh/PoissonBallon/EasyRealm/branch/master/graph/badge.svg)](https://codecov.io/gh/PoissonBallon/EasyRealm) [![License](https://img.shields.io/cocoapods/l/EasyRealm.svg?style=flat)](http://cocoapods.org/pods/EasyRealm) EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm. From 17b6ca232bbb5fd2fb2e80b33aabc6aca18d1d26 Mon Sep 17 00:00:00 2001 From: Allan Vialatte Date: Thu, 16 Nov 2017 16:09:20 +0100 Subject: [PATCH 2/4] Update Readme and dependencies --- Cartfile | 4 ++-- EasyRealm.podspec | 2 +- Example/EasyRealm.xcodeproj/project.pbxproj | 17 +++++++++++++-- Example/Podfile.lock | 24 ++++++++++----------- README.md | 8 ++++++- 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/Cartfile b/Cartfile index 12e2178..adfb9c6 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -# Require version 2.4.0 or later -github "realm/realm-cocoa" >= 2.4.0 +# Require version 3.0.0 or later +github "realm/realm-cocoa" >= 3.0.0 diff --git a/EasyRealm.podspec b/EasyRealm.podspec index 2c31c05..8d9b252 100644 --- a/EasyRealm.podspec +++ b/EasyRealm.podspec @@ -30,7 +30,7 @@ EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm. s.ios.deployment_target = '8.0' s.source_files = 'EasyRealm/Classes/**/*' - s.dependency 'RealmSwift', '~> 2.4' + s.dependency 'RealmSwift', '~> 3.0.0' # s.resource_bundles = { # 'EasyRealm' => ['EasyRealm/Assets/*.png'] diff --git a/Example/EasyRealm.xcodeproj/project.pbxproj b/Example/EasyRealm.xcodeproj/project.pbxproj index 0278b74..8eb688c 100644 --- a/Example/EasyRealm.xcodeproj/project.pbxproj +++ b/Example/EasyRealm.xcodeproj/project.pbxproj @@ -297,13 +297,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-EasyRealm_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 6D5CBF9C7FED35D44B9ED640 /* [CP] Copy Pods Resources */ = { @@ -327,9 +330,16 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-EasyRealm_Example/Pods-EasyRealm_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/EasyRealm/EasyRealm.framework", + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EasyRealm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -342,13 +352,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-EasyRealm_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; A98665CB3C4F52A46CC2C65F /* [CP] Embed Pods Frameworks */ = { diff --git a/Example/Podfile.lock b/Example/Podfile.lock index cee5595..8410ac4 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,24 +1,24 @@ PODS: - - EasyRealm (1.1.2): - - RealmSwift (~> 2.4.0) - - Realm (2.4.3): - - Realm/Headers (= 2.4.3) - - Realm/Headers (2.4.3) - - RealmSwift (2.4.3): - - Realm (= 2.4.3) + - EasyRealm (2.0.0): + - RealmSwift (~> 3.0.0) + - Realm (3.0.2): + - Realm/Headers (= 3.0.2) + - Realm/Headers (3.0.2) + - RealmSwift (3.0.2): + - Realm (= 3.0.2) DEPENDENCIES: - EasyRealm (from `../`) EXTERNAL SOURCES: EasyRealm: - :path: "../" + :path: ../ SPEC CHECKSUMS: - EasyRealm: e0406ac9b9f18e551be5e52b12893bd0cbbfbc44 - Realm: e08d60b0048ccccd3949c8c28a92c4db5712d7e9 - RealmSwift: 30d49739ccb3385d201242736ca4dda56aec9dfc + EasyRealm: 29eb41155474cf12fa5dac5b4166748eec997e1c + Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180 + RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2 PODFILE CHECKSUM: 75271464d388777fdf0703576b224eaba6178765 -COCOAPODS: 1.2.0 +COCOAPODS: 1.3.1 diff --git a/README.md b/README.md index e66e2a8..1c17193 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- DataModelKit + EasyRealm

@@ -16,6 +16,12 @@ EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm. +## Versions guides + +| Swift | Realm | EasyRealm | +|-----------|----------|-----------| +| 3.0 | >= 2.4 | 2.0.1 | +| 3.2 / 4.0 | >= 3.0.0 | >= 3.0.0 | ## Keys Features From 2fbcd450344b7b95722331adb2ffe7fb4d3fda99 Mon Sep 17 00:00:00 2001 From: Allan Vialatte Date: Thu, 16 Nov 2017 16:28:11 +0100 Subject: [PATCH 3/4] Fix EasyRealmList for Realm 3 --- .swift-version | 2 +- Cartfile.resolved | 2 +- EasyRealm.xcodeproj/project.pbxproj | 4 ++-- EasyRealm/Classes/EasyRealmList.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.swift-version b/.swift-version index 9f55b2c..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 395e5eb..feb39f7 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "realm/realm-cocoa" "v2.7.0" +github "realm/realm-cocoa" "v3.0.2" diff --git a/EasyRealm.xcodeproj/project.pbxproj b/EasyRealm.xcodeproj/project.pbxproj index 8cfa082..a180e91 100644 --- a/EasyRealm.xcodeproj/project.pbxproj +++ b/EasyRealm.xcodeproj/project.pbxproj @@ -338,7 +338,7 @@ PRODUCT_BUNDLE_IDENTIFIER = vialatte.EasyRealm; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -362,7 +362,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/EasyRealm/Classes/EasyRealmList.swift b/EasyRealm/Classes/EasyRealmList.swift index 969fc57..c28f4f5 100644 --- a/EasyRealm/Classes/EasyRealmList.swift +++ b/EasyRealm/Classes/EasyRealmList.swift @@ -16,6 +16,6 @@ internal protocol EasyRealmList { extension List:EasyRealmList { internal func children() -> [Object] { - return self.flatMap{ $0 } + return self.flatMap { return $0 as? Object } } } From 5cdf5af0124ebab194e73caa2b66abf578c69b28 Mon Sep 17 00:00:00 2001 From: Allan Vialatte Date: Thu, 16 Nov 2017 16:29:01 +0100 Subject: [PATCH 4/4] Update podspec --- EasyRealm.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EasyRealm.podspec b/EasyRealm.podspec index 8d9b252..75171bf 100644 --- a/EasyRealm.podspec +++ b/EasyRealm.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'EasyRealm' - s.version = '2.0.0' + s.version = '3.0.0' s.summary = 'EasyRealm is a micro-framework that helps you use Realm.' # This description is used to generate tags and improve search results.