From c97609a342ad25f707912215cabbf28e552d6eb0 Mon Sep 17 00:00:00 2001 From: Andrea Mazzini Date: Tue, 28 Jul 2015 16:33:07 +0200 Subject: [PATCH] Minor fixes --- .travis.yml | 6 +++++ .../InterfaceController.swift | 4 ++-- Gulps/AppDelegate.swift | 6 ++--- Gulps/Base.lproj/Main.storyboard | 24 +++++++++---------- .../ViewControllers/DrinkViewController.swift | 6 ++--- Podfile | 12 +--------- Rakefile | 4 +++- 7 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..49c40c1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +osx_image: xcode6.4 +language: swift +before_install: + - export LANG=en_US.UTF-8 + - gem install cocoapods xcpretty --no-ri --no-rdoc --no-ri --no-rdoc +script: rake test diff --git a/Gulps WatchKit Extension/InterfaceController.swift b/Gulps WatchKit Extension/InterfaceController.swift index e602ea9..56d561a 100644 --- a/Gulps WatchKit Extension/InterfaceController.swift +++ b/Gulps WatchKit Extension/InterfaceController.swift @@ -17,7 +17,7 @@ class InterfaceController: WKInterfaceController { self.reloadAndUpdateUI() } - let entry = EntryHandler().currentEntry() as Entry + let entry = EntryHandler.sharedHandler.currentEntry() as Entry previousPercentage = entry.percentage progressImage.setImageNamed("activity-") } @@ -50,7 +50,7 @@ class InterfaceController: WKInterfaceController { private extension InterfaceController { func reloadAndUpdateUI() { - let entry = EntryHandler().currentEntry() as Entry + let entry = EntryHandler.sharedHandler.currentEntry() as Entry var delta = Int(entry.percentage - previousPercentage) if (delta < 0) { // animate in reverse using negative duration diff --git a/Gulps/AppDelegate.swift b/Gulps/AppDelegate.swift index 75689fe..4bfd2b9 100644 --- a/Gulps/AppDelegate.swift +++ b/Gulps/AppDelegate.swift @@ -1,5 +1,5 @@ import UIKit -import RealmSwift + @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -9,8 +9,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { setupAppearance() - Settings.registerDefaults() - EntryHandler.sharedHandler.realm = Realm(inMemoryIdentifier: "gulps-spec") + Settings.registerDefaults() + let userDefaults = NSUserDefaults.groupUserDefaults() if (!userDefaults.boolForKey(Settings.General.OnboardingShown.key())) { loadOnboardingInterface() diff --git a/Gulps/Base.lproj/Main.storyboard b/Gulps/Base.lproj/Main.storyboard index 49ae124..0b5c5cf 100644 --- a/Gulps/Base.lproj/Main.storyboard +++ b/Gulps/Base.lproj/Main.storyboard @@ -34,7 +34,7 @@ - + @@ -197,13 +197,13 @@ -