marionette-generators 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 911c937967f3a7aa37979a67fef5d0c8cc6911f1
|
4
|
+
data.tar.gz: d17419fa804009b8ca9836b15dda363fdac71421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce1f41dc453c1033c979917b04a1a789c37df369def5252741c01e1f319b6b607589ad3a56066c1bceaf50bea19b0c81084c4322917cd549892bf9c97d53af54
|
7
|
+
data.tar.gz: df0ed5a49a339aaf0e35f410d46021448ef73386b56af53acb71a06bb3a0bcbf4e621f264a26907b662b1ef899067021efafb87bab144c78ab772973cf7964b3
|
@@ -43,10 +43,8 @@ module Marionette
|
|
43
43
|
if File.exist? "config/routes.rb"
|
44
44
|
routes = File.read "config/routes.rb"
|
45
45
|
captures = routes.match(/(\s*#\s*|)root( to:|) ['"]{1}([a-z_]+)\#index['"]{1}/).try :captures
|
46
|
-
if
|
47
|
-
|
48
|
-
home = captures.last
|
49
|
-
end
|
46
|
+
if captures.first.empty?
|
47
|
+
home = captures.last
|
50
48
|
else
|
51
49
|
home = "visitors"
|
52
50
|
append_to_file "config/routes.rb", " root to: '#{home}#index'", after: "routes.draw do\n"
|