coypond 0.2.1 → 0.2.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.
Files changed (5) hide show
  1. data/README.rdoc +27 -1
  2. data/VERSION +1 -1
  3. data/bin/coypond +13 -6
  4. data/coypond.gemspec +1 -1
  5. metadata +10 -10
data/README.rdoc CHANGED
@@ -1,6 +1,32 @@
1
1
  = coypond
2
2
 
3
- Description goes here.
3
+ A semantic grep-like tool for Ruby. You can use coypond to search through ruby code for class, module, or method definitions.
4
+
5
+ == Features:
6
+
7
+ * Search using raw string or regular expression
8
+ * Narraw search to only module, classes, methods or any combination
9
+ * Search through files, directories, or specify a locally installed gem (using -g option)
10
+
11
+ == Installation:
12
+
13
+ From the command line:
14
+ $ gem install coypond
15
+
16
+ or, in your Gemfile
17
+
18
+ gem 'coypond'
19
+
20
+ == Examples:
21
+
22
+ To search for methods, classes or modules named +foo+ in the current directory:
23
+ $ coypond foo .
24
+
25
+ Coypond uses the fully qualified name to index types, so to search the current directory for the +initialize+ method in the +Bar+ class under the +Foo+ module:
26
+ $ coypond "Foo::Bar#initialize" .
27
+
28
+ You can also specify a gem for Coypond to search through using the _-g_ option (Coypond will try to find gems in the Ruby load path):
29
+ $ coypond "Thumbnail#initialize" -g paperclip
4
30
 
5
31
  == Contributing to coypond
6
32
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/bin/coypond CHANGED
@@ -4,16 +4,23 @@ require 'coypond'
4
4
 
5
5
  def print_help
6
6
  puts "Usage:"
7
- puts " coypond search_term [options] file1 [file2 [file3 [...]]]"
7
+ puts " coypond search_term [options] [file1 [file2 [file3 [...]]]]"
8
8
  puts ""
9
9
  puts "Options:"
10
- puts " -m search method names"
11
- puts " -c search class names"
12
- puts " -M search Module names"
13
- puts " -a search all available type names (default: true unless another search option was given)"
10
+ puts " -m:\n search method names\n\n"
11
+ puts " -c:\n search class names\n\n"
12
+ puts " -M:\n search Module names\n\n"
13
+ puts " -a:\n search all available type names (default: true unless another search option was given)\n\n"
14
+ puts " -r:\n treat the search term as a regular expression\n\n"
15
+ puts " -i:\n ignore case\n\n"
16
+ puts " -g [gem name]:\n look through types in gems beginning with the name specified\n\n"
17
+ puts ""
18
+ puts "Examples:"
19
+ puts " coypond initialize .\n\n"
20
+ puts " coypond \"ActiveRecord.*#validates_.*\" -r -g activerecord\n\n"
14
21
  end
15
22
 
16
- if $*.first == "-h" || $*.first == "--help"
23
+ if $*.empty? or $*.first == "-h" or $*.first == "--help"
17
24
  print_help
18
25
  exit(0)
19
26
  end
data/coypond.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{coypond}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Amit Levy"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coypond
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable: coypond
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: shoulda
17
- requirement: &2160798560 !ruby/object:Gem::Requirement
17
+ requirement: &2156810780 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *2160798560
25
+ version_requirements: *2156810780
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &2160797200 !ruby/object:Gem::Requirement
28
+ requirement: &2156809820 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.0.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2160797200
36
+ version_requirements: *2156809820
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: jeweler
39
- requirement: &2160796180 !ruby/object:Gem::Requirement
39
+ requirement: &2156808340 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.6.4
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2160796180
47
+ version_requirements: *2156808340
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rcov
50
- requirement: &2160794940 !ruby/object:Gem::Requirement
50
+ requirement: &2156807160 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2160794940
58
+ version_requirements: *2156807160
59
59
  description: Semantic grep for Ruby
60
60
  email: aalevy@gmail.com
61
61
  executables:
@@ -95,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  segments:
97
97
  - 0
98
- hash: -3724066173365988347
98
+ hash: -73129731692111590
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements: