From d5922386d52efc61f9238885fe53fa1a3ef252fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Caetano?= Date: Tue, 18 Apr 2017 16:07:48 -0300 Subject: [PATCH] Using xcpretty on travis --- .travis.yml | 25 ++++++++++++++++++------- README.md | 7 ++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index c628d1c..270f033 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode8.2 +osx_image: xcode8.3 language: objective-c podfile: Example/Podfile @@ -6,15 +6,26 @@ podfile: Example/Podfile before_install: - gem install cocoapods -v '1.2.1' - pod --version - - pod repo update + - pod repo update --silent -# install: -# - if [[ ! $(which xcpretty) ]]; then gem install xcpretty --user-install; fi; +install: +- pushd Example; pod install; popd + - if [[ ! $(which xcpretty) ]]; then gem install xcpretty --user-install; fi; + +env: + matrix: + - DESTINATION="platform=iOS Simulator,OS=10.3,name=iPhone 7" POD_LINT="YES" + - DESTINATION="platform=iOS Simulator,OS=9.0,name=iPhone 6" POD_LINT="NO" + - DESTINATION="platform=iOS Simulator,OS=8.3,name=iPhone 4S" POD_LINT="NO" script: - - xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' build - - xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' test - - pod lib lint --no-clean --quick + - xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination '$DESTINATION' build | xcpretty + - xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination '$DESTINATION' test | xcpretty + + # Run `pod lib lint` if specified + - if [ $POD_LINT == "YES" ]; then + pod lib lint --verbose; + fi after_success: - bash <(curl -s https://codecov.io/bash) -J 'ReCaptcha' diff --git a/README.md b/README.md index 8db087a..3b305fb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ ReCaptcha is available through [CocoaPods](http://cocoapods.org). To install it, Podfile: ``` ruby +pod "ReCaptcha" +# or pod "ReCaptcha/RxSwift" ``` @@ -33,15 +35,14 @@ let recaptcha = try? ReCaptcha() override func viewDidLoad() { super.viewDidLoad() - recaptcha?.configureWebView { [weak self] (webview: WKWebView) in - // Add constraints and configure it for display + recaptcha?.configureWebView { [weak self] webview in webview.frame = self?.view.bounds ?? CGRect.zero } } func validate() { - recaptcha?.validate(on: view) { [weak self] (result: Result) in + recaptcha?.validate(on: view) { [weak self] result in print(try? result.dematerialize()) } }