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

Add option to disable URL normalization #135

Merged
merged 2 commits into from May 6, 2020

Conversation

ziaulrehman40
Copy link
Contributor

Fixes #123

Copy link
Collaborator

@fschwahn fschwahn left a comment

Choose a reason for hiding this comment

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

Looks good to me.

One other possibility to achieve this would be to let users define the clean_url-mechanism, by moving the clean_url-logic to a lambda which is changeable, eg. Shortener.clean_url = ->(url) { url }. Not sure this flexibility is even desired here though. @jpmcgrath @olleolleolle thoughts?

@ziaulrehman40
Copy link
Contributor Author

@fschwahn Sounds good, but i guess we can do this in another iteration. For now this should be enough. Because cleaning URL is still possible on the app logic end. So we should be good.

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

I like the functionality!

I added GitHub Suggestions about spec it style.

spec/models/shortened_url_spec.rb Outdated Show resolved Hide resolved
spec/models/shortened_url_spec.rb Outdated Show resolved Hide resolved
@olleolleolle olleolleolle merged commit a8072b0 into jpmcgrath:develop May 6, 2020
@ziaulrehman40
Copy link
Contributor Author

@olleolleolle Thanks for merging, but as it has got in repo's readme, this should be released as well otherwise users could be trying using the option while it is not yet released.

@jpmcgrath
Copy link
Owner

Released as v0.8.2: https://rubygems.org/gems/shortener/versions/0.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't clean_url unless user desires
5 participants