duck_map 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 305fb5ad0e27605cee8fc74c2a2e4503a1df9a83
4
- data.tar.gz: 20c88d54a9cfb4ed011fe8cb260f2e1af0936f45
3
+ metadata.gz: c14f7c61a0d5eb21f3af37cdb6ddfe972a9cf829
4
+ data.tar.gz: fe4315309e12f88011699961c56e326f01a91314
5
5
  SHA512:
6
- metadata.gz: 1f69066f412ac398337f4a8a3d2e3087a586303488eabe15a6bc442d76fe4ff02d7e684497ef3a54d89df361dc92e15c86c40c9e2ecc9b78101b990d098c7a64
7
- data.tar.gz: 8505654b66ebe33decedb58ee7ee3be7ffdf0a31230acb74253ee1632aab9db0c491d1aeda80cde93b3bb750cef45f1b47a38dc13d88758237573c43a4573364
6
+ metadata.gz: a70b9be34c79b8cd96fa932e73f27a59ec726d7130d961d1715e2c93a96ce595e0b01e933fb2bd9d64a887532fb3d6c0c3c46f54a348a9169c204e29df6ebc6e
7
+ data.tar.gz: aa942c479137dc83e4442a21c76aef4082be90a33ef4dfae02d1e384086488879bf294135a7534edf9e2d2d72b8ac39d6b1fef5461f5a82e1257e51b2537ba74
@@ -62,7 +62,7 @@ module DuckMap
62
62
  ActiveRecord::Base.send :include, SitemapObject
63
63
  end
64
64
 
65
- ActiveSupport.on_load(:after_initialize) do
65
+ ActiveSupport.on_load(:before_initialize) do
66
66
  ActionController::Base.send :include, InheritableClassAttributes
67
67
  ActionController::Base.send :include, Attributes
68
68
  ActionController::Base.send :include, ControllerHelpers
@@ -25,8 +25,16 @@ module DuckMap
25
25
 
26
26
  sitemap_raw_route_name = "#{name}_sitemap"
27
27
 
28
- # create a route for the sitemap using the name that was passed to the sitemap method inside config/routes.
29
- match %(/#{name}.:format), controller: config[:controller], action: name, via: [:get], as: sitemap_raw_route_name
28
+ begin
29
+
30
+ # create a route for the sitemap using the name that was passed to the sitemap method inside config/routes.
31
+ match %(/#{name}.:format), controller: config[:controller], action: name, via: [:get], as: sitemap_raw_route_name
32
+
33
+ rescue ArgumentError => e
34
+ unless e.message.include?("Invalid route name")
35
+ raise e
36
+ end
37
+ end
30
38
 
31
39
  # the current Rails implementation keeps the routes in an array. Also, it does nothing to prevent duplicate routes from being added.
32
40
  # at the time of development, the route is always at the end of the list, so, it is pretty safe to assume
@@ -1,3 +1,3 @@
1
1
  module DuckMap
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duck_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Duckett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-26 00:00:00.000000000 Z
11
+ date: 2013-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails