interactive_editor 0.0.7 → 0.0.8
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/README.md +11 -0
- data/Rakefile +1 -0
- data/interactive_editor.gemspec +2 -2
- data/lib/interactive_editor.rb +2 -2
- metadata +6 -6
data/README.md
CHANGED
@@ -20,6 +20,10 @@ Then, from within irb:
|
|
20
20
|
> ed # (use EDITOR env variable)
|
21
21
|
> [emacs|vim|mvim|nano|mate] # (other editors)
|
22
22
|
|
23
|
+
Bonus: editing of objects on the fly (inspired by _why's [object aorta][])
|
24
|
+
|
25
|
+
$ irb
|
26
|
+
> { 'chunky' => 'bacon' }.vi
|
23
27
|
|
24
28
|
To try it out without installing the gem:
|
25
29
|
|
@@ -33,4 +37,11 @@ interactive_editor also works with the IRB alternative [ripl][].
|
|
33
37
|
|
34
38
|
Giles Bowkett, Greg Brown, and several audience members from Giles' Ruby East presentation: [Use vi or any text editor from within IRB](http://gilesbowkett.blogspot.com/2007/10/use-vi-or-any-text-editor-from-within.html).
|
35
39
|
|
40
|
+
With contributions from:
|
41
|
+
|
42
|
+
* [Renaud Morvan](https://github.com/nel)
|
43
|
+
* [Jan Lelis](https://github.com/janlelis)
|
44
|
+
* [TJ Singleton](https://github.com/tjsingleton)
|
45
|
+
|
36
46
|
[ripl]: https://github.com/cldwalker/ripl
|
47
|
+
[object aorta]: http://rubyforge.org/snippet/detail.php?type=snippet&id=22
|
data/Rakefile
CHANGED
data/interactive_editor.gemspec
CHANGED
@@ -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.
|
11
|
-
s.date = '2011-03-
|
10
|
+
s.version = '0.0.8'
|
11
|
+
s.date = '2011-03-28'
|
12
12
|
s.rubyforge_project = 'interactive_editor'
|
13
13
|
|
14
14
|
## Make sure your summary is short. The description may be as long
|
data/lib/interactive_editor.rb
CHANGED
@@ -9,7 +9,7 @@ require 'shellwords'
|
|
9
9
|
require 'yaml'
|
10
10
|
|
11
11
|
class InteractiveEditor
|
12
|
-
VERSION = '0.0.
|
12
|
+
VERSION = '0.0.8'
|
13
13
|
|
14
14
|
attr_accessor :editor
|
15
15
|
|
@@ -32,7 +32,7 @@ class InteractiveEditor
|
|
32
32
|
end
|
33
33
|
|
34
34
|
if object
|
35
|
-
File.open( current_file, 'w' ) { |f| f << object.to_yaml }
|
35
|
+
File.open( current_file.path, 'w' ) { |f| f << object.to_yaml }
|
36
36
|
else
|
37
37
|
@file = current_file
|
38
38
|
mtime = File.stat(@file.path).mtime
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactive_editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 15
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jan Berkel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-28 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements: []
|
80
80
|
|
81
81
|
rubyforge_project: interactive_editor
|
82
|
-
rubygems_version: 1.
|
82
|
+
rubygems_version: 1.3.7
|
83
83
|
signing_key:
|
84
84
|
specification_version: 2
|
85
85
|
summary: Interactive editing in irb.
|