gemedit 0.0.1 → 0.0.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/History.txt +5 -0
- data/README.txt +23 -2
- data/bin/gemedit +6 -2
- data/lib/gemedit/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
gemedit
|
1
|
+
gemedit
|
2
2
|
http://gemedit.rubyforge.org/
|
3
3
|
by Lee Marlow
|
4
4
|
|
@@ -6,6 +6,8 @@ gemedit
|
|
6
6
|
|
7
7
|
Gemedit lets you quickly open up the source for a gem in your favorite editor.
|
8
8
|
|
9
|
+
Looking through other people's code is a great way to learn. I often use it when a gem's RDoc isn't as helpful as I'd like or just want to see how someone put a library together. Gemedit just makes it easier to get to the code.
|
10
|
+
|
9
11
|
== INSTALLATION:
|
10
12
|
|
11
13
|
Gemedit can be installed via RubyGems:
|
@@ -13,8 +15,27 @@ Gemedit can be installed via RubyGems:
|
|
13
15
|
$ sudo gem install gemedit
|
14
16
|
|
15
17
|
If you would like some basic command completion for installed gems add the following to your ~/.bashrc or ~/.profile:
|
16
|
-
|
18
|
+
|
19
|
+
complete -C "/usr/bin/gemedit --complete" gemedit
|
17
20
|
|
18
21
|
== USAGE:
|
19
22
|
|
23
|
+
If you want to see how gemedit works just install it and run this:
|
20
24
|
$ gemedit gemedit
|
25
|
+
|
26
|
+
Gemedit tries to use your favorite editor from your <tt>$VISUAL</tt> or <tt>$EDITOR</tt> environment variable. It will fall back to <em>everyone's</em> favorite editor: *vi*. You can specify the editor with the <tt>-e/--editor</tt> switch. Run this to view the source for +rake+ in TextMate[http://macromates.com]:
|
27
|
+
$ gemedit -e mate rake
|
28
|
+
|
29
|
+
And of course, help is available:
|
30
|
+
$ gemedit -h
|
31
|
+
$ gemedit --help
|
32
|
+
|
33
|
+
== DOCUMENTATION:
|
34
|
+
|
35
|
+
There isn't much more to document than what is on this page, but feel free to browse the RDoc[http://gemedit.rubyforge.org/rdoc/]. Or checkout the Rubyforge project page here[http://rubyforge.org/projects/gemedit/].
|
36
|
+
|
37
|
+
== SOURCE REPOSITORY:
|
38
|
+
|
39
|
+
The source is currently on github[http://github.com/]. You can browse through it at http://github.com/lmarlow/gemedit or pull it down and play with it yourself with
|
40
|
+
|
41
|
+
$ git clone git://github.com/lmarlow/gemedit.git
|
data/bin/gemedit
CHANGED
@@ -13,6 +13,7 @@ require 'optparse'
|
|
13
13
|
|
14
14
|
OPTIONS = {
|
15
15
|
:verbose => false,
|
16
|
+
:pretend => false,
|
16
17
|
:editor => ENV['VISUAL'] || ENV['EDITOR'] || 'vi'
|
17
18
|
}
|
18
19
|
|
@@ -24,9 +25,12 @@ Usage: #{File.basename($0)} GEM_NAME...
|
|
24
25
|
|
25
26
|
Options are:
|
26
27
|
BANNER
|
27
|
-
opts.separator ""
|
28
28
|
opts.on("-e", "--editor=EDITOR", String,
|
29
29
|
"The editor to open the gems with", "Default: #{OPTIONS[:editor]}") { |editor| OPTIONS[:editor] = editor }
|
30
|
+
opts.on("-p", "--pretend",
|
31
|
+
"Shows what command would be run without running it", "Turns on verbose logging", "Default: #{OPTIONS[:pretend]}") { |pretend|
|
32
|
+
OPTIONS[:pretend] = OPTIONS[:verbose] = true
|
33
|
+
}
|
30
34
|
opts.on("-v", "--verbose",
|
31
35
|
"Enable verbose logging", "Default: #{OPTIONS[:verbose]}") { |verbose| OPTIONS[:verbose] = true }
|
32
36
|
opts.on("-h", "--help",
|
@@ -79,7 +83,7 @@ if gems.size > 0
|
|
79
83
|
end
|
80
84
|
cmd = "#{OPTIONS[:editor]} #{paths.join(' ')}"
|
81
85
|
puts "Running `#{cmd}`" if OPTIONS[:verbose]
|
82
|
-
exec cmd
|
86
|
+
exec cmd unless OPTIONS[:pretend]
|
83
87
|
else
|
84
88
|
puts "No gems found for editing"
|
85
89
|
end
|
data/lib/gemedit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemedit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Marlow
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-03-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|