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

Replace URI parse with Addressable gem #405

Merged
merged 13 commits into from
May 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. Items under

Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
## [Unreleased]
##### Changed
- Replace URI with Addressable gem. See [#405](https://github.com/shakacode/react_on_rails/pull/405) by [lucke84]

## [5.2.0] - 2016-04-08
##### Added
Expand Down
6 changes: 4 additions & 2 deletions app/helpers/react_on_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ def initialize_redux_stores
# second parameter passed to both component and store generator functions.
def rails_context(server_side:)
@rails_context ||= begin
uri = URI.parse(request.original_url)
# uri = URI("http://foo.com:3000/posts?id=30&limit=5#time=1305298413")
# Using Addressable instead of standard URI to better deal with
# non-ASCII characters (see https://github.com/shakacode/react_on_rails/pull/405)
uri = Addressable::URI.parse(request.original_url)
# uri = Addressable::URI.parse("http://foo.com:3000/posts?id=30&limit=5#time=1305298413")

result = {
# URL settings
Expand Down
1 change: 1 addition & 0 deletions react_on_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency "rainbow", "~> 2.1"
s.add_dependency "rails", ">= 3.2"
s.add_dependency "foreman"
s.add_dependency "addressable"

s.add_development_dependency "bundler", "~> 1.10"
s.add_development_dependency "rake", "~> 10.0"
Expand Down
3 changes: 2 additions & 1 deletion spec/dummy/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PATH
remote: ../..
specs:
react_on_rails (5.2.0)
addressable
connection_pool
execjs (~> 2.5)
foreman
Expand Down Expand Up @@ -97,7 +98,7 @@ GEM
erubis (2.7.0)
execjs (2.6.0)
ffi (1.9.10)
foreman (0.78.0)
foreman (0.81.0)
thor (~> 0.19.1)
generator_spec (0.9.3)
activesupport (>= 3.0.0)
Expand Down