ssoroka-grepmate 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/Manifest +2 -1
  2. data/README +11 -4
  3. data/Rakefile +1 -1
  4. data/bin/grepmate +11 -3
  5. data/grepmate.gemspec +7 -5
  6. metadata +4 -4
data/Manifest CHANGED
@@ -1,4 +1,5 @@
1
1
  bin/grepmate
2
+ grepmate.gemspec
3
+ Manifest
2
4
  Rakefile
3
5
  README
4
- Manifest
data/README CHANGED
@@ -1,12 +1,16 @@
1
- = grepmate
1
+ = Grepmate
2
2
 
3
3
  Extremely fast search of rails projects or rails source for code, open in textmate or browser with html output
4
4
 
5
- == SYNOPSIS
5
+ == Usage
6
6
 
7
7
  grepmate [what_to_search_for*] [dir=dir] [exclude=exclude] [options]+
8
+
9
+ or this works too...
8
10
 
9
- == PARAMETERS
11
+ grepmate [options]+ [what_to_search_for*] [dir=dir] [exclude=exclude]
12
+
13
+ == Parameters
10
14
 
11
15
  what_to_search_for (-1 ~> what_to_search_for)
12
16
  What to search for. Enclose in quotes to search for phrase.
@@ -44,4 +48,7 @@ Extremely fast search of rails projects or rails source for code, open in textma
44
48
  == To Do
45
49
 
46
50
  - check ~/.grepmate for current rails repo to use instead of always using latest
47
- - change output file to write to /tmp or something
51
+ - change output file to write to /tmp or something
52
+ - add include parameter to selectively include file extensions
53
+ - Allow global and cwd .gmconfig files to determine things like exclusions and inclusions.
54
+ - If we're not in a RAILS_ROOT, assume -r ./*
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('grepmate', '1.0.0') do |p|
5
+ Echoe.new('grepmate', '1.0.1') do |p|
6
6
  p.description = 'Extremely fast search of rails projects or rails source for code, open in textmate or browser with html output'
7
7
  p.url = 'http://github.com/ssoroka/grepmate'
8
8
  p.author = 'Steven Soroka'
data/bin/grepmate CHANGED
@@ -5,7 +5,6 @@ require 'rubygems'
5
5
  gem 'main', '>=2.8.0'
6
6
  require 'main' # don't think this line is needed. gem should require it
7
7
 
8
-
9
8
  def gem_path
10
9
  `gem environment gemdir`.chomp
11
10
  end
@@ -82,6 +81,12 @@ Main {
82
81
  description 'Exclude paths matching these patterns.'
83
82
  }
84
83
 
84
+ keyword( 'tempfile' ) {
85
+ arity 1
86
+ default '/tmp/grepmate_out.html'
87
+ description "Where to store search results for HTML output. Terminate with .html"
88
+ }
89
+
85
90
  argument( 'what_to_search_for' ) {
86
91
  arity -1
87
92
  description "What to search for. Enclose in quotes to search for phrase."
@@ -277,8 +282,11 @@ document.body.innerHTML=bodyText;return true;}</script></script>
277
282
 
278
283
  html << '</table></body></html>'
279
284
 
280
- File.open('grepmate.html', 'w') { |f| f.write(html) }
281
- system("open grepmate.html")
285
+ FileUtils.makedirs( File.dirname( params['tempfile'].value ) )
286
+ FileUtils.touch( params['tempfile'].value )
287
+ File.open( params['tempfile'].value, 'w' ) { |f| f.write(html) }
288
+
289
+ system( "open #{params['tempfile'].value}" )
282
290
  end
283
291
 
284
292
  def run
data/grepmate.gemspec CHANGED
@@ -1,29 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = %q{grepmate}
3
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
4
6
 
5
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
8
  s.authors = ["Steven Soroka"]
7
- s.date = %q{2008-12-05}
9
+ s.date = %q{2008-12-06}
8
10
  s.default_executable = %q{grepmate}
9
11
  s.description = %q{Extremely fast search of rails projects or rails source for code, open in textmate or browser with html output}
10
12
  s.email = %q{ssoroka78@gmail.com}
11
13
  s.executables = ["grepmate"]
12
14
  s.extra_rdoc_files = ["bin/grepmate", "README"]
13
- s.files = ["bin/grepmate", "Rakefile", "README", "Manifest", "grepmate.gemspec"]
15
+ s.files = ["bin/grepmate", "grepmate.gemspec", "Manifest", "Rakefile", "README"]
14
16
  s.has_rdoc = true
15
17
  s.homepage = %q{http://github.com/ssoroka/grepmate}
16
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Grepmate", "--main", "README"]
17
19
  s.require_paths = ["lib"]
18
20
  s.rubyforge_project = %q{grepmate}
19
- s.rubygems_version = %q{1.2.0}
21
+ s.rubygems_version = %q{1.3.1}
20
22
  s.summary = %q{Extremely fast search of rails projects or rails source for code, open in textmate or browser with html output}
21
23
 
22
24
  if s.respond_to? :specification_version then
23
25
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
26
  s.specification_version = 2
25
27
 
26
- if current_version >= 3 then
28
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
29
  s.add_development_dependency(%q<main>, [">= 0"])
28
30
  else
29
31
  s.add_dependency(%q<main>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssoroka-grepmate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Soroka
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-05 00:00:00 -08:00
12
+ date: 2008-12-06 00:00:00 -08:00
13
13
  default_executable: grepmate
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,10 +32,10 @@ extra_rdoc_files:
32
32
  - README
33
33
  files:
34
34
  - bin/grepmate
35
+ - grepmate.gemspec
36
+ - Manifest
35
37
  - Rakefile
36
38
  - README
37
- - Manifest
38
- - grepmate.gemspec
39
39
  has_rdoc: true
40
40
  homepage: http://github.com/ssoroka/grepmate
41
41
  post_install_message: