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

Using Addressable to parse URI #5

Merged
merged 2 commits into from
Oct 11, 2021
Merged

Using Addressable to parse URI #5

merged 2 commits into from
Oct 11, 2021

Conversation

edwoodward
Copy link
Contributor

No description provided.

@edwoodward edwoodward self-assigned this Sep 24, 2021
@edwoodward edwoodward requested a review from Dantemss September 24, 2021 16:59
Gemfile Outdated
@@ -27,3 +27,5 @@ end
gem "rails", rails

gem "an_engine", path: "./spec/an_engine"

gem "addressable"
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to https://github.com/openstax/path_prefixer/blob/master/path_prefixer.gemspec? Otherwise bundler will not bundle it correctly. Use s.add_dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -18,7 +18,7 @@ def _compute_redirect_to_location(request, options) #:nodoc:
already_has_prefix = options.match(/^#{request.script_name}/)

unless already_has_prefix
options_uri = URI(options)
options_uri = Addressable::URI.parse(options)
Copy link
Member

Choose a reason for hiding this comment

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

require 'addressable/uri' at the top (gemspec does not load dependencies automatically)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Dantemss Dantemss merged commit 4a18c62 into master Oct 11, 2021
@Dantemss Dantemss deleted the addressable branch October 11, 2021 16:36
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.

2 participants