marionette-generators 0.2.0 → 0.2.1
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: de382a39b71a0af0e32a13684f0801107be6eb44
|
4
|
+
data.tar.gz: ec80f50779f0a692952aa25eec9a36ddc59a0a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9b5c1fe89bc3d791388e77b41601cfff6d81ba018b840e2cc7721f337e9ed5833ac585bc33568d6df6ce0602ff707712ddba4b781f35dfbc804f2ab1210a043
|
7
|
+
data.tar.gz: b13ac17279768cc9d952038610a992b6e8a16bd22db8a1f8fad4970ff60e7cb6fab4811bae44680a1e042663ba9a6e9356f7abd1102876fdd5b3a574bf553f85
|
@@ -43,8 +43,10 @@ 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 captures.
|
47
|
-
|
46
|
+
if !captures.nil?
|
47
|
+
if captures.first.empty?
|
48
|
+
home = captures.last
|
49
|
+
end
|
48
50
|
else
|
49
51
|
home = "visitors"
|
50
52
|
append_to_file "config/routes.rb", " root to: '#{home}#index'", after: "routes.draw do\n"
|