groute 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/groute +3 -2
- data/lib/groute/version.rb +1 -1
- metadata +3 -3
data/bin/groute
CHANGED
@@ -4,8 +4,9 @@ if ARGV.nil? || ARGV.size == 0
|
|
4
4
|
puts "Description: Equivalent to 'rake routes | grep <PATTERN>' but caches output. Relies on config/routes.rb modification time to refresh cache."
|
5
5
|
else
|
6
6
|
search_term = ARGV.first
|
7
|
-
groutes_store = File.expand_path(File.dirname('
|
8
|
-
routes_file = File.expand_path(File.dirname('
|
7
|
+
groutes_store = File.expand_path(File.dirname('./'), 'tmp/.groutes')
|
8
|
+
routes_file = File.expand_path(File.dirname('./'), 'config/routes.rb')
|
9
|
+
|
9
10
|
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
10
11
|
`rake routes > #{groutes_store}`
|
11
12
|
end
|
data/lib/groute/version.rb
CHANGED
metadata
CHANGED