irbtools 0.0.2 → 0.0.3

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 (4) hide show
  1. data/README.rdoc +28 -17
  2. data/VERSION +1 -1
  3. data/lib/irbtools.rb +8 -2
  4. metadata +3 -3
data/README.rdoc CHANGED
@@ -5,8 +5,10 @@ This is a meta gem which installs great irb gems for you and configures your irb
5
5
  == Setup
6
6
 
7
7
  gem install irbtools
8
-
9
- On linux, you also need the +xclip+ program (apt-get install xclip).
8
+ gem install irb_rocket --source http://merbi.st
9
+
10
+ * On Linux, you also need the +xclip+ program (apt-get install xclip).
11
+ * On MacOS, you need growl, if you want to use the +g+ gem.
10
12
 
11
13
  == Usage
12
14
 
@@ -15,30 +17,39 @@ To use it, put the following in your <tt>~/.irbrc</tt> file (this file is loaded
15
17
  require 'rubygems' # only needed in 1.8
16
18
  require 'irbtools'
17
19
 
20
+ If it does not exists, just create a new one.
21
+
18
22
  You could also just read and copy the irbtools.rb source file, tweak it and use it directly as <tt>.irbrc</tt>
19
23
 
20
24
  == Features
21
25
 
22
- See http;//rbjl.net/40 or read the commented source file: @lib/irbtools.rb@
26
+ See http;//rbjl.net/40 or read the commented source file: lib/irbtools.rb
23
27
 
24
28
  === Included gems and libraries
25
29
 
26
- 'wirble', # colors
27
- 'hirb', # active record tables
28
- 'fileutils', # cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
29
- 'zucker/env', # Info, OS, RubyVersion, RubyEngine
30
- 'zucker/debug', # nice debug printing (q, o, c, .m, .d)
31
- 'ap', # nice debug printing (ap)
32
- 'yaml', # nice debug printing (y)
33
- 'clipboard', # easy clipboard access (copy & paste)
34
- 'guessmethod', # automatically correct typos (method_missing hook)
35
- 'drx', # nice tk object inspector (.see)
36
- 'interactive_editor', # lets you open vim (or your favourite editor), hack something, save it, and it's loaded in the current irb session
37
- 'coderay', # some nice colorful display ;)
38
- 'irb_rocket', # put result as comment instead of a new line!
39
-
30
+ * wirble[http://pablotron.org/software/wirble/] colors
31
+ * hirb[http://tagaholic.me/2009/03/13/hirb-irb-on-the-good-stuff.html] active record tables
32
+ * *fileutils* cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
33
+ * zucker/env[http://rubyzucker.info] Info, OS, RubyVersion, RubyEngine
34
+ * zucker/debug[http:/rubyzucker.info] nice debug printing (q, o, c, .m, .d)
35
+ * ap[http://github.com/michaeldv/awesome_print] nice debug printing (ap)
36
+ * *yaml* nice debug printing (y)
37
+ * clipboard[http://github.com/janlelis/clipboard] easy clipboard access (copy & paste)
38
+ * guessmethod[http://guessmethod.rubyforge.org/] automatically correct typos (method_missing hook)
39
+ * interactive_editor[http://github.com/jberkel/interactive_editor] lets you open vim, hack something, and it gets loaded into the current session
40
+ * coderay[http://coderay.rubychan.de/] some nice colorful display ;)
41
+ * irb_rocket[http://merbi.st/plugins/22] put result as comment instead of a new line!
42
+
43
+ == TODO
44
+
45
+ * Make guessmethod 1.9 compatible
46
+ * ...
40
47
  == Copyright
41
48
 
42
49
  Copyright (c) 2010 Jan Lelis. See LICENSE for details.
43
50
 
44
51
  J-_-L
52
+
53
+ blogartikel
54
+ windows
55
+ outcommentable
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/irbtools.rb CHANGED
@@ -4,13 +4,14 @@
4
4
 
5
5
  # either use this file as .irbrc or require 'irbtools' in your .irbrc
6
6
 
7
+ require 'zucker/env' # Info, OS, RubyVersion, RubyEngine
8
+
7
9
  # # # # #
8
10
  # load libraries
9
11
  irb_libs = ['rubygems',
10
12
  'wirble', # colors
11
13
  'hirb', # active record tables
12
14
  'fileutils', # cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
13
- 'zucker/env', # Info, OS, RubyVersion, RubyEngine
14
15
  'zucker/debug', # nice debug printing (q, o, c, .m, .d)
15
16
  'ap', # nice debug printing (ap)
16
17
  'yaml', # nice debug printing (y)
@@ -24,6 +25,10 @@ irb_libs = ['rubygems',
24
25
  # 'zucker/all' # see rubyzucker.info
25
26
  ]
26
27
 
28
+ if RubyVersion.is? 1.9
29
+ irb_libs -= %w[guessmethod]
30
+ end
31
+
27
32
  irb_libs.each{ |lib|
28
33
  begin
29
34
  require lib
@@ -145,7 +150,8 @@ def ruby_version(which = nil)
145
150
 
146
151
  # if ruby is found, start it
147
152
  if $1
148
- irbname = $0 + $1.tr(' ', '-') + '@global'
153
+ ruby_name = File.split( $1 )[-1].tr(' ', '-')
154
+ irbname = $0 + '-' + ruby_name + '@global'
149
155
  exec irbname
150
156
  else
151
157
  puts "Sorry, that Ruby version could not be found."
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irbtools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Lelis