From 310104583e6171fdcd784dd1b44c3ef661b127ba Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 16:29:23 +0100 Subject: [PATCH 1/8] Add fastlane --- Gemfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..7a118b4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" From 7c4114d12bf1b1b71cfd987d09a3a0d0ced4cc1a Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 16:29:36 +0100 Subject: [PATCH 2/8] Add Scanfile --- fastlane/Scanfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 fastlane/Scanfile diff --git a/fastlane/Scanfile b/fastlane/Scanfile new file mode 100644 index 0000000..52e2fd1 --- /dev/null +++ b/fastlane/Scanfile @@ -0,0 +1,5 @@ +clean true +output_types "html" +devices ["iPhone 5s", "iPhone 6s", "iPhone 7", "iPad Air"] +scheme "PKHUD Demo" +open_report true \ No newline at end of file From 640e980980de371c6724cf3882767f69331366bf Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 16:30:10 +0100 Subject: [PATCH 3/8] Add fastlane test --- fastlane/Appfile | 1 + fastlane/Fastfile | 10 ++++++++++ fastlane/README.md | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/README.md diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 0000000..e0e821e --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1 @@ +app_identifier "com.NSExceptional.PKHUD-Demo" # The bundle identifier of your app diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 0000000..4f21311 --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,10 @@ +fastlane_version "2.7.0" + +default_platform :ios + +platform :ios do + lane :test do + swiftlint(mode: :autocorrect) + scan + end +end \ No newline at end of file diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 0000000..54cc899 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,19 @@ +fastlane documentation +================ +# Installation +``` +sudo gem install fastlane +``` +# Available Actions +## iOS +### ios test +``` +fastlane ios test +``` + + +---- + +This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. +More information about fastlane can be found on [https://fastlane.tools](https://fastlane.tools). +The documentation of fastlane can be found on [GitHub](https://github.com/fastlane/fastlane/tree/master/fastlane). From cc71d2db654078ccc62dcbc5b31d2595fe03b57d Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 17:27:07 +0100 Subject: [PATCH 4/8] Update Info.plist to version 4.1.0 --- Demo/Info.plist | 2 +- PKHUD/Info.plist | 2 +- PKHUDDemoUITests/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Demo/Info.plist b/Demo/Info.plist index e921e67..76e64c5 100644 --- a/Demo/Info.plist +++ b/Demo/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 4.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/PKHUD/Info.plist b/PKHUD/Info.plist index 7812205..b4cbf65 100644 --- a/PKHUD/Info.plist +++ b/PKHUD/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 4.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/PKHUDDemoUITests/Info.plist b/PKHUDDemoUITests/Info.plist index 6c6c23c..7251f6d 100644 --- a/PKHUDDemoUITests/Info.plist +++ b/PKHUDDemoUITests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.0 + 4.1.0 CFBundleVersion 1 From 8346a9e51e583c6a99d56ee26815696d55dfb955 Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 17:27:53 +0100 Subject: [PATCH 5/8] Fix style with SwiftLint --- PKHUD/PKHUD.swift | 10 +++++----- PKHUD/Window.swift | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PKHUD/PKHUD.swift b/PKHUD/PKHUD.swift index 8fd3653..63a214f 100644 --- a/PKHUD/PKHUD.swift +++ b/PKHUD/PKHUD.swift @@ -49,7 +49,7 @@ open class PKHUD: NSObject { .flexibleRightMargin, .flexibleTopMargin, .flexibleBottomMargin ] - + self.container.isAccessibilityElement = true self.container.accessibilityIdentifier = "PKHUD" } @@ -114,7 +114,7 @@ open class PKHUD: NSObject { let timer = Timer(timeInterval: graceTime, target: self, selector: #selector(PKHUD.handleGraceTimer(_:)), userInfo: nil, repeats: false) RunLoop.current.add(timer, forMode: .commonModes) graceTimer = timer - }else{ + } else { showContent() } } @@ -124,7 +124,7 @@ open class PKHUD: NSObject { container.showFrameView() startAnimatingContentView() } - + open func hide(animated anim: Bool = true, completion: TimerAction? = nil) { graceTimer?.invalidate() @@ -168,9 +168,9 @@ open class PKHUD: NSObject { animatingContentView.stopAnimation?() } } - + // MARK: Timer callbacks - + internal func performDelayedHide(_ timer: Timer? = nil) { let userInfo = timer?.userInfo as? [String:AnyObject] let key = userInfo?["timerActionKey"] as? String diff --git a/PKHUD/Window.swift b/PKHUD/Window.swift index 889ed08..39fff20 100644 --- a/PKHUD/Window.swift +++ b/PKHUD/Window.swift @@ -67,7 +67,7 @@ internal class ContainerView: UIView { UIView.animate(withDuration: 0.8, animations: { self.frameView.alpha = 0.0 self.hideBackground(animated: false) - }, completion: { bool in finalize(true) }) + }, completion: { _ in finalize(true) }) } else { self.frameView.alpha = 0.0 finalize(true) From 3820f637915431ef40c1e51fe19056013420dbfd Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 17:27:53 +0100 Subject: [PATCH 6/8] Fix style with SwiftLint --- Demo/DemoViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo/DemoViewController.swift b/Demo/DemoViewController.swift index 613d928..7ce1a08 100644 --- a/Demo/DemoViewController.swift +++ b/Demo/DemoViewController.swift @@ -69,7 +69,7 @@ class DemoViewController: UIViewController { return .lightContent } - func delay(_ delay: Double, closure:@escaping ()->()) { + func delay(_ delay: Double, closure:@escaping () -> Void) { DispatchQueue.main.asyncAfter( deadline: DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: closure) } From 1cd9ef4328c23e84babaf75fbd81e65c47545da0 Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 17:30:10 +0100 Subject: [PATCH 7/8] Add lane pod to prepare release new pod version --- .gitignore | 4 ++ Gemfile.lock | 147 +++++++++++++++++++++++++++++++++++++++++++++ fastlane/Fastfile | 19 +++++- fastlane/README.md | 5 ++ 4 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 24507b0..f4f84f4 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ ThirdParty/boost/* # Maya temporary .mayaSwatches/ UserInterfaceState.xcuserstate + +fastlane/report.xml + +fastlane/test_output/report.html diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..6f6a48f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,147 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (2.3.4) + activesupport (4.2.7.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + babosa (1.0.2) + claide (1.0.1) + colored (1.2) + commander (4.4.3) + highline (~> 1.7.2) + domain_name (0.5.20161129) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.1.2) + excon (0.54.0) + faraday (0.11.0) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) + faraday_middleware (0.11.0) + faraday (>= 0.7.4, < 1.0) + fastimage (2.0.1) + addressable (~> 2) + fastlane (2.9.0) + activesupport (< 5) + addressable (>= 2.3, < 3.0.0) + babosa (>= 1.0.2, < 2.0.0) + bundler (~> 1.12) + colored + commander (>= 4.4.0, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + excon (>= 0.45.0, < 1.0.0) + faraday (~> 0.9) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.9) + fastimage (>= 1.6) + gh_inspector (>= 1.0.1, < 2.0.0) + google-api-client (~> 0.9.2) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + mini_magick (~> 4.5.1) + multi_json + multi_xml (~> 0.5) + multipart-post (~> 2.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 1.1.0, < 2.0.0) + security (= 0.1.3) + slack-notifier (>= 1.3, < 2.0.0) + terminal-notifier (>= 1.6.2, < 2.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 0.20, < 2.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + xcpretty-travis-formatter (>= 0.0.3) + gh_inspector (1.0.3) + google-api-client (0.9.23) + addressable (~> 2.3) + googleauth (~> 0.5) + httpclient (~> 2.7) + hurley (~> 0.1) + memoist (~> 0.11) + mime-types (>= 1.6) + representable (~> 2.3.0) + retriable (~> 2.0) + googleauth (0.5.1) + faraday (~> 0.9) + jwt (~> 1.4) + logging (~> 2.0) + memoist (~> 0.12) + multi_json (~> 1.11) + os (~> 0.9) + signet (~> 0.7) + highline (1.7.8) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + hurley (0.2) + i18n (0.7.0) + json (1.8.6) + jwt (1.5.6) + little-plugger (1.1.4) + logging (2.1.0) + little-plugger (~> 1.1) + multi_json (~> 1.10) + memoist (0.15.0) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_magick (4.5.1) + minitest (5.10.1) + multi_json (1.12.1) + multi_xml (0.6.0) + multipart-post (2.0.0) + nanaimo (0.2.3) + os (0.9.6) + plist (3.2.0) + public_suffix (2.0.5) + representable (2.3.0) + uber (~> 0.0.7) + retriable (2.1.0) + rouge (1.11.1) + rubyzip (1.2.0) + security (0.1.3) + signet (0.7.3) + addressable (~> 2.3) + faraday (~> 0.9) + jwt (~> 1.5) + multi_json (~> 1.10) + slack-notifier (1.5.1) + terminal-notifier (1.7.1) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) + thread_safe (0.3.5) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uber (0.0.15) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.3) + word_wrap (1.0.0) + xcodeproj (1.4.2) + CFPropertyList (~> 2.3.3) + activesupport (>= 3) + claide (>= 1.0.1, < 2.0) + colored (~> 1.2) + nanaimo (~> 0.2.3) + xcpretty (0.2.4) + rouge (~> 1.8) + xcpretty-travis-formatter (0.0.4) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + fastlane + +BUNDLED WITH + 1.14.0 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4f21311..703b76c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,10 +1,25 @@ fastlane_version "2.7.0" - default_platform :ios platform :ios do - lane :test do + + before_all do |lane, options| swiftlint(mode: :autocorrect) scan end + + lane :test do + end + + lane :pod do |options| + desc "Release a new pod Version" + before_all do + pod_lib_lint + end + + increment_version_number(bump_type: options[:bump_type]) + version_bump_podspec(bump_type: options[:bump_type]) + error do |lane, exception| + end + end end \ No newline at end of file diff --git a/fastlane/README.md b/fastlane/README.md index 54cc899..8e0c906 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -11,6 +11,11 @@ sudo gem install fastlane fastlane ios test ``` +### ios pod +``` +fastlane ios pod +``` + ---- From 83f82652b8d4473034162d6bdc0701929ac020d1 Mon Sep 17 00:00:00 2001 From: Piergiuseppe Longo Date: Sat, 21 Jan 2017 17:30:10 +0100 Subject: [PATCH 8/8] Add lane pod to prepare release new pod version --- .gitignore | 4 ++ Gemfile.lock | 147 +++++++++++++++++++++++++++++++++++++++++++++ fastlane/Fastfile | 16 ++++- fastlane/README.md | 5 ++ 4 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 24507b0..f4f84f4 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ ThirdParty/boost/* # Maya temporary .mayaSwatches/ UserInterfaceState.xcuserstate + +fastlane/report.xml + +fastlane/test_output/report.html diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..6f6a48f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,147 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (2.3.4) + activesupport (4.2.7.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + babosa (1.0.2) + claide (1.0.1) + colored (1.2) + commander (4.4.3) + highline (~> 1.7.2) + domain_name (0.5.20161129) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.1.2) + excon (0.54.0) + faraday (0.11.0) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) + faraday_middleware (0.11.0) + faraday (>= 0.7.4, < 1.0) + fastimage (2.0.1) + addressable (~> 2) + fastlane (2.9.0) + activesupport (< 5) + addressable (>= 2.3, < 3.0.0) + babosa (>= 1.0.2, < 2.0.0) + bundler (~> 1.12) + colored + commander (>= 4.4.0, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + excon (>= 0.45.0, < 1.0.0) + faraday (~> 0.9) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.9) + fastimage (>= 1.6) + gh_inspector (>= 1.0.1, < 2.0.0) + google-api-client (~> 0.9.2) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + mini_magick (~> 4.5.1) + multi_json + multi_xml (~> 0.5) + multipart-post (~> 2.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 1.1.0, < 2.0.0) + security (= 0.1.3) + slack-notifier (>= 1.3, < 2.0.0) + terminal-notifier (>= 1.6.2, < 2.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 0.20, < 2.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + xcpretty-travis-formatter (>= 0.0.3) + gh_inspector (1.0.3) + google-api-client (0.9.23) + addressable (~> 2.3) + googleauth (~> 0.5) + httpclient (~> 2.7) + hurley (~> 0.1) + memoist (~> 0.11) + mime-types (>= 1.6) + representable (~> 2.3.0) + retriable (~> 2.0) + googleauth (0.5.1) + faraday (~> 0.9) + jwt (~> 1.4) + logging (~> 2.0) + memoist (~> 0.12) + multi_json (~> 1.11) + os (~> 0.9) + signet (~> 0.7) + highline (1.7.8) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + hurley (0.2) + i18n (0.7.0) + json (1.8.6) + jwt (1.5.6) + little-plugger (1.1.4) + logging (2.1.0) + little-plugger (~> 1.1) + multi_json (~> 1.10) + memoist (0.15.0) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_magick (4.5.1) + minitest (5.10.1) + multi_json (1.12.1) + multi_xml (0.6.0) + multipart-post (2.0.0) + nanaimo (0.2.3) + os (0.9.6) + plist (3.2.0) + public_suffix (2.0.5) + representable (2.3.0) + uber (~> 0.0.7) + retriable (2.1.0) + rouge (1.11.1) + rubyzip (1.2.0) + security (0.1.3) + signet (0.7.3) + addressable (~> 2.3) + faraday (~> 0.9) + jwt (~> 1.5) + multi_json (~> 1.10) + slack-notifier (1.5.1) + terminal-notifier (1.7.1) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) + thread_safe (0.3.5) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uber (0.0.15) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.3) + word_wrap (1.0.0) + xcodeproj (1.4.2) + CFPropertyList (~> 2.3.3) + activesupport (>= 3) + claide (>= 1.0.1, < 2.0) + colored (~> 1.2) + nanaimo (~> 0.2.3) + xcpretty (0.2.4) + rouge (~> 1.8) + xcpretty-travis-formatter (0.0.4) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + fastlane + +BUNDLED WITH + 1.14.0 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4f21311..b827714 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,10 +1,22 @@ fastlane_version "2.7.0" - default_platform :ios platform :ios do - lane :test do + + before_all do |lane, options| swiftlint(mode: :autocorrect) scan end + + lane :test do + end + + lane :pod do |options| + desc "Release a new pod Version" + pod_lib_lint + increment_version_number(bump_type: options[:bump_type]) + version_bump_podspec(bump_type: options[:bump_type]) + error do |lane, exception| + end + end end \ No newline at end of file diff --git a/fastlane/README.md b/fastlane/README.md index 54cc899..8e0c906 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -11,6 +11,11 @@ sudo gem install fastlane fastlane ios test ``` +### ios pod +``` +fastlane ios pod +``` + ----