draw_static 0.0.1 → 0.0.3
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/draw_static.rb +4 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c573ace03c2e8c85bf0a85f0bbbd173be5b71481aa303313b54d87fd6fcc018
|
4
|
+
data.tar.gz: '06339336ed9d70a39a32ebf1524667dc3032aeedb54524cadbc7b0b146600ccd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 431e9108f8e594ae94000604708dfd1af1206027110a8b70562c28abc057b5b7322fe3dc4cbc6004850eb19a4ed59d1ce336e34cdd469a8ff631603326602037
|
7
|
+
data.tar.gz: 2b60e450b4b22a9edb279112d0a2620a71193ec6e880b2f05e6fe01e78c7971ae4127a1a414ab57a54f3cdbcacb6c901eeb3fa36c61a2fbd5c5b90d7ca9c8843
|
data/lib/draw_static.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
require_relative 'static_routes'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
StaticRoutes.for(controller, self)
|
8
|
-
end
|
3
|
+
ActionDispatch::Routing::Mapper.class_eval do
|
4
|
+
def draw_static(*controllers)
|
5
|
+
controllers.each do |controller|
|
6
|
+
StaticRoutes.for(controller, self)
|
9
7
|
end
|
10
8
|
end
|
11
|
-
rescue
|
12
|
-
puts "Please add this gem to rails - it is dependent on ActionDispatch::Routing::Mapper"
|
13
9
|
end
|