From bdae5848ea2bb3484089e2b1ffd226735a420e3f Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 15 Jan 2016 17:34:58 +0800 Subject: [PATCH] rename AppleiTunesHost --- Yep/Extensions/NSURL+Yep.swift | 8 ++++---- Yep/Services/OpenGraphService.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Yep/Extensions/NSURL+Yep.swift b/Yep/Extensions/NSURL+Yep.swift index 2ec1bf5e..b7bdfbb9 100644 --- a/Yep/Extensions/NSURL+Yep.swift +++ b/Yep/Extensions/NSURL+Yep.swift @@ -97,14 +97,14 @@ extension NSURL { return nil } - enum iTunesHost: String { + enum AppleiTunesHost: String { case Long = "itunes.apple.com" case Short = "itun.es" } - var yep_isAppleURL: Bool { + var yep_isAppleiTunesURL: Bool { - guard let host = host, let _ = iTunesHost(rawValue: host) else { + guard let host = host, let _ = AppleiTunesHost(rawValue: host) else { return false } @@ -113,7 +113,7 @@ extension NSURL { var yep_appleAllianceURL: NSURL { - guard self.yep_isAppleURL else { + guard self.yep_isAppleiTunesURL else { return self } diff --git a/Yep/Services/OpenGraphService.swift b/Yep/Services/OpenGraphService.swift index 05a3724e..cc86eeeb 100644 --- a/Yep/Services/OpenGraphService.swift +++ b/Yep/Services/OpenGraphService.swift @@ -183,7 +183,7 @@ func openGraphWithURL(URL: NSURL, failureHandler: ((Reason, String?) -> Void)?, if let URL = response.response?.URL, host = URL.host { - guard let _ = NSURL.iTunesHost(rawValue: host) else { + guard let _ = NSURL.AppleiTunesHost(rawValue: host) else { completion(openGraph) return }