groute 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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