groute 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/bin/groute +14 -0
- data/groute.gemspec +24 -0
- data/lib/groute/version.rb +3 -0
- metadata +73 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/groute
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
if ARGV.nil? || ARGV.size == 0
|
3
|
+
puts "Usage: groute.rb PATTERN"
|
4
|
+
else
|
5
|
+
search_term = ARGV.first
|
6
|
+
groutes_store = File.expand_path(File.dirname(__FILE__), '.groutes')
|
7
|
+
routes_file = File.expand_path(File.dirname(__FILE__), 'config/routes.rb')
|
8
|
+
Dir.chdir File.expand_path(File.dirname(__FILE__))
|
9
|
+
puts Dir.pwd
|
10
|
+
unless File.exists?(groutes_store) && File.mtime(groutes_store) > File.mtime(routes_file)
|
11
|
+
`rake routes > .groutes`
|
12
|
+
end
|
13
|
+
puts `cat .groutes | grep #{search_term}`
|
14
|
+
end
|
data/groute.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "groute/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "groute"
|
7
|
+
s.version = Groute::VERSION
|
8
|
+
s.authors = ["Jordan Carter"]
|
9
|
+
s.email = ["jordan.d.carter@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Caches your rake routes output and greps it, cache updates when routes.rb timestamp updated}
|
12
|
+
s.description = %q{Grep over your routes often? This will speed it up a bit}
|
13
|
+
|
14
|
+
s.rubyforge_project = "groute"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
# s.add_runtime_dependency "rest-client"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: groute
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jordan Carter
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-03-30 00:00:00 +13:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Grep over your routes often? This will speed it up a bit
|
23
|
+
email:
|
24
|
+
- jordan.d.carter@gmail.com
|
25
|
+
executables:
|
26
|
+
- groute
|
27
|
+
extensions: []
|
28
|
+
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- Rakefile
|
35
|
+
- bin/groute
|
36
|
+
- groute.gemspec
|
37
|
+
- lib/groute/version.rb
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: ""
|
40
|
+
licenses: []
|
41
|
+
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
hash: 3
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
version: "0"
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project: groute
|
68
|
+
rubygems_version: 1.6.2
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Caches your rake routes output and greps it, cache updates when routes.rb timestamp updated
|
72
|
+
test_files: []
|
73
|
+
|