Skip to content

Commit

Permalink
Added Circle CI 2.0 YML (#478)
Browse files Browse the repository at this point in the history
* Added Circle CI 2.0 YML
Removed old scripts
Update bundle / fastlane
Update Auth0 Dep

* SwiftLint Warning Fixes
  • Loading branch information
cocojoe authored Nov 16, 2017
1 parent 41a04ca commit 3c416dd
Show file tree
Hide file tree
Showing 34 changed files with 75 additions and 959 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
jobs:
build-and-test:
macos:
xcode: "9.0"

steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
- run:
name: Bootstrap
command: bundle exec fastlane ios bootstrap
- run:
name: Run test suite
command: bundle exec fastlane ios ci
environment:
SCHEME: Lock
DEVICE: iPhone 8
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2
- run: |
bash <(curl -s https://codecov.io/bash) -J 'Lock'
- save_cache:
key: dependency-cache
paths:
- Carthage/Build
- store_test_results:
path: fastlane/test_output

workflows:
version: 2
build-test-report:
jobs:
- build-and-test
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github "AliSoftware/OHHTTPStubs" "6.0.0"
github "Quick/Nimble" "v7.0.2"
github "Quick/Quick" "v1.2.0"
github "auth0/Auth0.swift" "1.9.0"
github "auth0/Auth0.swift" "1.9.1"
github "auth0/SimpleKeychain" "0.8.0"
github "emaloney/CleanroomLogger" "5.1.2"
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source 'https://rubygems.org'

gem 'fastlane', '~> 2.5'
gem 'jwt', '~> 1.5'

group :development do
gem 'cocoapods', '~> 1.0'
Expand Down
35 changes: 19 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
activesupport (4.2.9)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
Expand Down Expand Up @@ -40,14 +40,15 @@ GEM
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.2.0)
cocoapods-trunk (1.3.0)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.5)
highline (~> 1.7.2)
concurrent-ruby (1.0.5)
declarative (0.0.10)
declarative-option (0.1.0)
domain_name (0.5.20170404)
Expand All @@ -63,7 +64,7 @@ GEM
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.0)
fastlane (2.56.0)
fastlane (2.64.1)
CFPropertyList (>= 2.3, < 3.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand Down Expand Up @@ -93,7 +94,7 @@ GEM
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (~> 0.5.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.5.0, < 2.0.0)
xcodeproj (>= 1.5.2, < 2.0.0)
xcpretty (>= 0.2.4, < 1.0.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-auth0_shipper (0.2.2)
Expand All @@ -108,9 +109,9 @@ GEM
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
googleauth (0.5.3)
googleauth (0.6.2)
faraday (~> 0.12)
jwt (~> 1.4)
jwt (>= 1.4, < 3.0)
logging (~> 2.0)
memoist (~> 0.12)
multi_json (~> 1.11)
Expand All @@ -120,7 +121,8 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (0.8.6)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
json (2.1.0)
jwt (1.5.6)
little-plugger (1.1.4)
Expand All @@ -139,7 +141,7 @@ GEM
multipart-post (2.0.0)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.7.8)
netrc (0.11.0)
os (0.9.6)
plist (3.3.0)
public_suffix (2.0.5)
Expand All @@ -153,33 +155,33 @@ GEM
rubyzip (1.2.1)
security (0.1.3)
semantic (1.6.0)
signet (0.7.3)
signet (0.8.1)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (~> 1.5)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
slack-notifier (1.5.1)
terminal-notifier (1.8.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-screen (0.5.0)
tzinfo (1.2.3)
tty-screen (0.5.1)
tzinfo (1.2.4)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
unicode-display_width (1.3.0)
word_wrap (1.0.0)
xcodeproj (1.5.1)
xcodeproj (1.5.3)
CFPropertyList (~> 2.3.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
xcpretty (0.2.8)
rouge (~> 2.0.7)
xcpretty-travis-formatter (0.0.4)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
Expand All @@ -189,6 +191,7 @@ DEPENDENCIES
cocoapods (~> 1.0)
fastlane (~> 2.5)
fastlane-plugin-auth0_shipper
jwt (~> 1.5)

BUNDLED WITH
1.15.1
1.15.4
2 changes: 1 addition & 1 deletion Lock/AuthCollectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AuthCollectionView: UIView, View {
let connections: [OAuth2Connection]
let mode: Mode
let onAction: (String) -> Void
let customStyle: [String : AuthStyle]
let customStyle: [String: AuthStyle]

enum Mode {
case expanded(isLogin: Bool)
Expand Down
4 changes: 2 additions & 2 deletions Lock/CountryTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CountryTableViewController: UITableViewController, Stylable {
definesPresentationContext = true
tableView.tableHeaderView = search.searchBar

navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action:#selector(close))
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(close))
navigationItem.title = "Select your Country".i18n(key: "com.auth0.lock.passwordless.sms.country.header", comment: "Country tableview navigation header")

}
Expand All @@ -55,7 +55,7 @@ class CountryTableViewController: UITableViewController, Stylable {
}

func close() {
self.dismiss(animated: true, completion: nil)
self.dismiss(animated: true, completion: nil)
}

override func viewDidLoad() {
Expand Down
2 changes: 1 addition & 1 deletion Lock/DatabaseOnlyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class DatabaseOnlyView: UIView, DatabaseView {
let passwordPolicyView = PolicyView(rules: passwordPolicyValidator.policy.rules)
passwordPolicyValidator.delegate = passwordPolicyView
let passwordIndex = form.stackView.arrangedSubviews.index(of: form.passwordField)
form.stackView.insertArrangedSubview(passwordPolicyView, at:passwordIndex!)
form.stackView.insertArrangedSubview(passwordPolicyView, at: passwordIndex!)
passwordPolicyView.isHidden = true
form.passwordField.errorLabel?.removeFromSuperview()
form.passwordField.onBeginEditing = { [weak self, weak passwordPolicyView] _ in
Expand Down
2 changes: 1 addition & 1 deletion Lock/InfoBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class InfoBarView: UIView {
constraintEqual(anchor: iconView.centerYAnchor, toAnchor: titleView.centerYAnchor)
iconView.translatesAutoresizingMaskIntoConstraints = false

container.backgroundColor = UIColor(red:0.97, green:0.97, blue:0.97, alpha:1.0)
container.backgroundColor = UIColor(red: 0.97, green: 0.97, blue: 0.97, alpha: 1.0)

titleView.font = UIFont.systemFont(ofSize: 12.5)
titleView.textColor = UIColor.black.withAlphaComponent(0.56)
Expand Down
8 changes: 4 additions & 4 deletions Lock/InputField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ class InputField: UIView, Stylable {
self.errorLabel?.text = self.state.text
self.errorLabelTopPadding?.constant = self.state.padding
switch self.state {
case .valid:
self.containerView?.layer.borderColor = self.borderColor?.cgColor
case .invalid:
self.containerView?.layer.borderColor = self.borderColorError?.cgColor
case .valid:
self.containerView?.layer.borderColor = self.borderColor?.cgColor
case .invalid:
self.containerView?.layer.borderColor = self.borderColorError?.cgColor
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Lock/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ import Foundation
func strutView(withHeight height: CGFloat = 50) -> UIView {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
dimension(dimension:view.heightAnchor, withValue: height)
dimension(dimension: view.heightAnchor, withValue: height)
return view
}
2 changes: 1 addition & 1 deletion Lock/LockOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct LockOptions: OptionBuildable {
var logHttpRequest: Bool = false
var scope: String = "openid"
var connectionScope: [String: String] = [:]
var parameters: [String : Any] = [:]
var parameters: [String: Any] = [:]
var allow: DatabaseMode = [.Login, .Signup, .ResetPassword]
var autoClose: Bool = true
var initialScreen: DatabaseScreen = .login
Expand Down
2 changes: 1 addition & 1 deletion Lock/OnePassword.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class OnePassword: PasswordManager {
}
}

private func handleResut(_ dict: [AnyHashable : Any]?) {
private func handleResut(_ dict: [AnyHashable: Any]?) {
guard let username = dict?[AppExtensionUsernameKey] as? String, let password = dict?[AppExtensionPasswordKey] as? String else { return }
self.onUpdate(username, password)
}
Expand Down
2 changes: 1 addition & 1 deletion Lock/UnrecoverableErrorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class UnrecoverableErrorView: UIView, View {
messageLabel.textColor = Style.Auth0.textColor.withAlphaComponent(0.50)
messageLabel.numberOfLines = 3

actionButton.button?.setTitleColor(UIColor(red:0.04, green:0.53, blue:0.69, alpha:1.0), for: .normal)
actionButton.button?.setTitleColor(UIColor(red: 0.04, green: 0.53, blue: 0.69, alpha: 1.0), for: .normal)
actionButton.button?.titleLabel?.font = regularSystemFont(size: 16)

if canRetry {
Expand Down
2 changes: 1 addition & 1 deletion Lock/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class User: DatabaseUser, PasswordlessUser {
var email: String?
var username: String?
var password: String?
var additionalAttributes: [String : String] = [:]
var additionalAttributes: [String: String] = [:]
var additionalAttributesStatus: [String: Bool] = [:]
var countryCode: CountryCode?

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpe

### Configuration

In order to use Lock you need to provide your Auth0 Client Id and Domain.
In order to use Lock you need to provide your Auth0 Client ID and Domain.

> Auth0 ClientId & Domain can be found in your [Auth0 Dashboard](https://manage.auth0.com)
> The Auth0 Client ID & Domain can be found in your [Auth0 Dashboard](https://manage.auth0.com)
#### Auth0.plist file

In your application bundle you can add a `plist` file named `Auth0.plist` with the following format
In your application bundle you can add a `plist` file named `Auth0.plist` with the following information:

```xml
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -87,7 +87,7 @@ Lock Classic handles authentication using Database, Social & Enterprise connecti

### OIDC Conformant Mode

It is strongly encouraged that this SDK be used in OIDC Conformant mode. When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline and will prevent it from reaching legacy endpoints. By default this is `false`
It is strongly encouraged that this SDK be used in OIDC Conformant mode. When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline and will prevent it from reaching legacy endpoints. By default this is `false`.

```swift
.withOptions {
Expand Down
27 changes: 0 additions & 27 deletions circle.yml

This file was deleted.

13 changes: 0 additions & 13 deletions script/.env

This file was deleted.

Loading

0 comments on commit 3c416dd

Please sign in to comment.