groute 0.1.0 → 0.1.1
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/README.mdown +24 -0
- data/bin/groute +2 -4
- data/groute.gemspec +1 -1
- data/lib/groute.rb +4 -0
- data/lib/groute/version.rb +1 -1
- metadata +6 -4
data/README.mdown
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
## groute
|
2
|
+
|
3
|
+
Adds a simple utility to quickly search over your routes.
|
4
|
+
|
5
|
+
### How to use
|
6
|
+
|
7
|
+
From your rails directory instead of
|
8
|
+
|
9
|
+
`rake routes | grep <PATTERN>`
|
10
|
+
|
11
|
+
type
|
12
|
+
|
13
|
+
`groute <PATTERN>`
|
14
|
+
|
15
|
+
The full output from `rake routes` will be saved and reused until the modification time on *config/routes.rb* is
|
16
|
+
updated
|
17
|
+
|
18
|
+
### Install
|
19
|
+
|
20
|
+
Best place to install is your global gemset.
|
21
|
+
|
22
|
+
rvm use 1.9.3@global
|
23
|
+
gem install groute
|
24
|
+
. .rvmrc # if inside a project folder
|
data/bin/groute
CHANGED
@@ -4,10 +4,8 @@ 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('
|
9
|
-
Dir.chdir File.expand_path(File.dirname('./'))
|
10
|
-
puts Dir.pwd
|
7
|
+
groutes_store = File.expand_path(File.dirname('tmp'), '.groutes')
|
8
|
+
routes_file = File.expand_path(File.dirname('config'), 'routes.rb')
|
11
9
|
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
12
10
|
`rake routes > #{groutes_store}`
|
13
11
|
end
|
data/groute.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Groute::VERSION
|
8
8
|
s.authors = ["Jordan Carter"]
|
9
9
|
s.email = ["jordan.d.carter@gmail.com"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "http://github.com/jordandcarter/groute"
|
11
11
|
s.summary = %q{Caches your rake routes output and greps it, cache updates when routes.rb timestamp updated}
|
12
12
|
s.description = %q{Grep over your routes often? This will speed it up a bit}
|
13
13
|
|
data/lib/groute.rb
ADDED
data/lib/groute/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jordan Carter
|
@@ -31,12 +31,14 @@ extra_rdoc_files: []
|
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
33
|
- Gemfile
|
34
|
+
- README.mdown
|
34
35
|
- Rakefile
|
35
36
|
- bin/groute
|
36
37
|
- groute.gemspec
|
38
|
+
- lib/groute.rb
|
37
39
|
- lib/groute/version.rb
|
38
40
|
has_rdoc: true
|
39
|
-
homepage:
|
41
|
+
homepage: http://github.com/jordandcarter/groute
|
40
42
|
licenses: []
|
41
43
|
|
42
44
|
post_install_message:
|