Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configurationBaseURL option for Custom Domains support #505

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

cocojoe
Copy link
Member

@cocojoe cocojoe commented Jun 5, 2018

Fixes #504

@cocojoe cocojoe added this to the v2-Next milestone Jun 5, 2018
@cocojoe cocojoe force-pushed the added-option-baseurl branch from 4ed7306 to 3c525b6 Compare June 5, 2018 15:59
Added `configurationBase` convenience setter
Added Tests
@cocojoe cocojoe force-pushed the added-option-baseurl branch from 3c525b6 to 938a949 Compare June 5, 2018 16:12
var configurationBase: String? {
get {
guard let url = self.configurationBaseURL else { return nil }
return url.absoluteString
Copy link
Contributor

@mariancerny mariancerny Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two lines can be shortened to return self.configurationBaseURL?.absoluteString.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure could, this is for clarity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I find it more clear (not knowing swift) with a single line. But it's up to you @cocojoe .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine as it is

return url.absoluteString
}
set {
guard let value = newValue, let url = URL(string: value) else { return } // FIXME: log error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a FIXME here. Are you going to add it in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't feel these are relevant anymore tbh

@@ -256,6 +259,11 @@ class OptionsSpec: QuickSpec {
expect(options.supportURL?.absoluteString) == "https://auth0.com/docs"
}

it("should set baseURL") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use configurationBaseURL instead (like in the other test)

var configurationBase: String? {
get {
guard let url = self.configurationBaseURL else { return nil }
return url.absoluteString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I find it more clear (not knowing swift) with a single line. But it's up to you @cocojoe .

Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👨‍🎓

@cocojoe cocojoe merged commit e37a33e into master Jun 7, 2018
@lbalmaceda lbalmaceda deleted the added-option-baseurl branch June 7, 2018 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants