named-routes 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- named-routes (0.2.7)
4
+ named-routes (0.2.8)
5
5
  activesupport (>= 2.0.0)
6
6
 
7
7
  GEM
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -3,7 +3,7 @@ module NamedRoutes
3
3
  class_inheritable_accessor :host, :prefix
4
4
 
5
5
  module Definition
6
- extend ActiveSupport::Concern
6
+ extend NamedRoutes::Concern
7
7
 
8
8
  module InstanceMethods
9
9
  def eval(*args)
@@ -70,7 +70,7 @@ module NamedRoutes
70
70
  end.join("/")
71
71
  end
72
72
  unless params.empty?
73
- uri_string << "?#{params.to_param}"
73
+ uri_string << "?#{params.to_param.gsub("%5B", "[").gsub("%5D", "]")}"
74
74
  end
75
75
  uri_string
76
76
  end
data/lib/named-routes.rb CHANGED
@@ -1,7 +1,16 @@
1
1
  require "active_support"
2
- require "active_support/concern"
3
- require "active_support/hash_with_indifferent_access"
4
- require "active_support/core_ext/object/to_query"
2
+ begin
3
+ require "active_support/hash_with_indifferent_access"
4
+ rescue LoadError
5
+ require "active_support/core_ext/hash/indifferent_access"
6
+ end
7
+ begin
8
+ require "active_support/core_ext/object/to_query"
9
+ rescue LoadError
10
+ require "active_support/core_ext/object/conversions"
11
+ require "active_support/core_ext/array/conversions"
12
+ require "active_support/core_ext/hash/conversions"
13
+ end
5
14
  require "active_support/core_ext/class/inheritable_attributes"
6
15
  require "uri"
7
16
 
@@ -24,5 +33,6 @@ module NamedRoutes
24
33
  end
25
34
 
26
35
  dir = File.dirname(__FILE__)
36
+ require "#{dir}/named-routes/concern"
27
37
  require "#{dir}/named-routes/routes"
28
38
  require "#{dir}/named-routes/schemed_uri"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: named-routes
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.7
5
+ version: 0.2.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Takita