Skip to content

Commit

Permalink
Merge pull request #405 from InnovativeTravel/replace_uri_parse_with_…
Browse files Browse the repository at this point in the history
…addressable

Replace URI parse with Addressable gem
  • Loading branch information
justin808 committed May 2, 2016
2 parents 9995619 + a4d95eb commit 638e86c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 638e86c

Please sign in to comment.