interactive_editor 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,9 +15,11 @@ Put the following in your .irbrc:
15
15
  Then, from within irb:
16
16
 
17
17
  $ irb
18
- > vi
19
- > vi 'filename.rb'
20
- > [emacs|vim|nano|mate] ...
18
+ > vi # (use vi w/ temp file)
19
+ > vi 'filename.rb' # (open filename.rb in vi)
20
+ > ed # (use EDITOR env variable)
21
+ > [emacs|vim|nano|mate] # (other editors)
22
+
21
23
 
22
24
  To try it out without installing the gem:
23
25
 
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'interactive_editor'
10
- s.version = '0.0.3'
11
- s.date = '2010-05-17'
10
+ s.version = '0.0.4'
11
+ s.date = '2010-05-19'
12
12
  s.rubyforge_project = 'interactive_editor'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
@@ -7,7 +7,7 @@ require 'fileutils'
7
7
  require 'tempfile'
8
8
 
9
9
  class InteractiveEditor
10
- VERSION = '0.0.3'
10
+ VERSION = '0.0.4'
11
11
 
12
12
  attr_accessor :editor
13
13
 
@@ -74,7 +74,15 @@ class InteractiveEditor
74
74
  InteractiveEditor.edit(v || k, *args)
75
75
  end
76
76
  end
77
+
78
+ def ed(*args)
79
+ if ENV['EDITOR'].to_s.size > 0
80
+ InteractiveEditor.edit(ENV['EDITOR'], *args)
81
+ else
82
+ raise "You need to set the EDITOR environment variable first"
83
+ end
84
+ end
77
85
  end
78
86
  end
79
87
 
80
- include InteractiveEditor::Editors
88
+ include InteractiveEditor::Editors
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Berkel
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-17 00:00:00 +01:00
17
+ date: 2010-05-19 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency