groute 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/groute +4 -3
- data/lib/groute/version.rb +1 -1
- metadata +3 -3
data/bin/groute
CHANGED
@@ -5,13 +5,14 @@ if ARGV.first == '-h' || ARGV.first == '--help'
|
|
5
5
|
else
|
6
6
|
groutes_store = File.expand_path('tmp/.groutes')
|
7
7
|
routes_file = File.expand_path('config/routes.rb')
|
8
|
+
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
9
|
+
`rake routes > #{groutes_store}`
|
10
|
+
end
|
11
|
+
|
8
12
|
if ARGV.nil? || ARGV.size == 0
|
9
13
|
puts `cat #{groutes_store}`
|
10
14
|
else
|
11
15
|
search_term = ARGV.first
|
12
|
-
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
13
|
-
`rake routes > #{groutes_store}`
|
14
|
-
end
|
15
16
|
puts `cat #{groutes_store} | grep --color=always -i #{search_term}`
|
16
17
|
end
|
17
18
|
end
|
data/lib/groute/version.rb
CHANGED
metadata
CHANGED