duck_map 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/duck_map/engine.rb +1 -1
- data/lib/duck_map/mapper.rb +10 -2
- data/lib/duck_map/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c14f7c61a0d5eb21f3af37cdb6ddfe972a9cf829
|
4
|
+
data.tar.gz: fe4315309e12f88011699961c56e326f01a91314
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a70b9be34c79b8cd96fa932e73f27a59ec726d7130d961d1715e2c93a96ce595e0b01e933fb2bd9d64a887532fb3d6c0c3c46f54a348a9169c204e29df6ebc6e
|
7
|
+
data.tar.gz: aa942c479137dc83e4442a21c76aef4082be90a33ef4dfae02d1e384086488879bf294135a7534edf9e2d2d72b8ac39d6b1fef5461f5a82e1257e51b2537ba74
|
data/lib/duck_map/engine.rb
CHANGED
@@ -62,7 +62,7 @@ module DuckMap
|
|
62
62
|
ActiveRecord::Base.send :include, SitemapObject
|
63
63
|
end
|
64
64
|
|
65
|
-
ActiveSupport.on_load(:
|
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
|
data/lib/duck_map/mapper.rb
CHANGED
@@ -25,8 +25,16 @@ module DuckMap
|
|
25
25
|
|
26
26
|
sitemap_raw_route_name = "#{name}_sitemap"
|
27
27
|
|
28
|
-
|
29
|
-
|
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
|
data/lib/duck_map/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|