groute 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/groute +5 -5
- data/lib/groute/version.rb +1 -1
- metadata +3 -3
data/bin/groute
CHANGED
@@ -3,12 +3,12 @@ if ARGV.nil? || ARGV.size == 0
|
|
3
3
|
puts "Usage: groute.rb PATTERN"
|
4
4
|
else
|
5
5
|
search_term = ARGV.first
|
6
|
-
groutes_store = File.expand_path(File.dirname(
|
7
|
-
routes_file = File.expand_path(File.dirname(
|
8
|
-
Dir.chdir File.expand_path(File.dirname(
|
6
|
+
groutes_store = File.expand_path(File.dirname('./'), 'tmp/.groutes')
|
7
|
+
routes_file = File.expand_path(File.dirname('./'), 'config/routes.rb')
|
8
|
+
Dir.chdir File.expand_path(File.dirname('./'))
|
9
9
|
puts Dir.pwd
|
10
10
|
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
11
|
-
`rake routes >
|
11
|
+
`rake routes > #{groutes_store}`
|
12
12
|
end
|
13
|
-
puts `cat
|
13
|
+
puts `cat #{groutes_store} | grep #{search_term}`
|
14
14
|
end
|
data/lib/groute/version.rb
CHANGED
metadata
CHANGED