From 383ba25c1cc090744c7174ae3b2a4fa42c0d54fb Mon Sep 17 00:00:00 2001 From: Christoffer Winterkvist Date: Tue, 25 Oct 2016 08:50:05 +0200 Subject: [PATCH 1/3] Check if there are any children when before creating the key --- Sources/Shared/Item.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Shared/Item.swift b/Sources/Shared/Item.swift index a17906d..c671131 100644 --- a/Sources/Shared/Item.swift +++ b/Sources/Shared/Item.swift @@ -85,7 +85,9 @@ public struct Item: Mappable, Indexable { dictionary[Key.Action.string] = action } - dictionary[Key.Children.string] = children + if !children.isEmpty { + dictionary[Key.Children.string] = children + } var relationItems = [String : [[String : Any]]]() From 996cd7763bf8a749f1fa442c2532e0673a3d6fdf Mon Sep 17 00:00:00 2001 From: Christoffer Winterkvist Date: Tue, 25 Oct 2016 08:56:38 +0200 Subject: [PATCH 2/3] Remove brew update --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9fef66..f2f2492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ osx_image: xcode8 language: objective-c before_install: -- brew update -- if brew outdated | grep -qx carthage; then brew upgrade carthage; fi - travis_wait 35 carthage bootstrap --platform iOS,Mac,tvOS script: From 95c2ba8ef7219ab9f41503a72ee8d1e4020d190e Mon Sep 17 00:00:00 2001 From: Christoffer Winterkvist Date: Tue, 25 Oct 2016 09:02:38 +0200 Subject: [PATCH 3/3] Add xcpretty --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2f2492..932284f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,12 @@ before_install: - travis_wait 35 carthage bootstrap --platform iOS,Mac,tvOS script: -- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator -- xcodebuild test -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' -- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx -- xcodebuild test -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx -- xcodebuild clean build -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' -- xcodebuild test -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' +- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator | xcpretty +- xcodebuild test -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' | xcpretty +- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx | xcpretty +- xcodebuild test -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx | xcpretty +- xcodebuild clean build -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty +- xcodebuild test -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty notifications: email: false