irbtools 0.7.3 → 0.7.4
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/CHANGELOG +7 -0
- data/VERSION +1 -1
- data/irbtools.gemspec +2 -2
- data/lib/irbtools.rb +1 -1
- data/lib/irbtools/configure.rb +1 -1
- data/lib/irbtools/libraries.rb +3 -1
- data/lib/irbtools/workarounds.rb +35 -0
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
0.7.4
|
2
|
+
* added workaround to use irb_rocket and hirb at the same time (basic hack, e.g. paging does not work)
|
3
|
+
* fixed little VERSION bug
|
4
|
+
|
1
5
|
0.7.3
|
2
6
|
* refactored file structure and added new Irbtools.add_lib method
|
3
7
|
* load railsrc if executed with rails and Irbtools.railsrc is set
|
@@ -8,6 +12,9 @@
|
|
8
12
|
* added boson gem (command repository)
|
9
13
|
* remember history when resetting or switching ruby version
|
10
14
|
|
15
|
+
0.7.1
|
16
|
+
* added method for starting a debugger
|
17
|
+
|
11
18
|
0.7.0
|
12
19
|
* initial release
|
13
20
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.4
|
data/irbtools.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{irbtools}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jan Lelis"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-09}
|
13
13
|
s.description = %q{irbtools is a meta gem which installs some useful irb gems and configures your irb. Simply put a require 'irbtools' in the .irbrc file in your home directory.}
|
14
14
|
s.email = %q{mail@janlelis.de}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/irbtools.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# require 'irbtools' in your .irbrc
|
5
5
|
# see the README file for more information
|
6
6
|
|
7
|
-
require File.expand_path('irbtools/configure', File.dirname(__FILE__) )
|
7
|
+
require File.expand_path('irbtools/configure', File.dirname(__FILE__) ) unless defined? Irbtools
|
8
8
|
|
9
9
|
# # # # #
|
10
10
|
# load libraries
|
data/lib/irbtools/configure.rb
CHANGED
data/lib/irbtools/libraries.rb
CHANGED
@@ -5,11 +5,14 @@
|
|
5
5
|
# but you could also require 'irbtools/configure' and then call Irbtools.init to modify the loaded libraries
|
6
6
|
# see the README file for more information
|
7
7
|
|
8
|
+
# the order does matter
|
8
9
|
Irbtools.add_library :wirble do # colors
|
9
10
|
Wirble.init
|
10
11
|
Wirble.colorize unless OS.windows?
|
11
12
|
end
|
12
13
|
|
14
|
+
Irbtools.add_library :irb_rocket # put result as comment instead of a new line!
|
15
|
+
|
13
16
|
Irbtools.add_library :hirb do # active record tables
|
14
17
|
Hirb::View.enable
|
15
18
|
end
|
@@ -69,7 +72,6 @@ Irbtools.add_library 'yaml' # nice debug printing (y)
|
|
69
72
|
Irbtools.add_library 'g' # nice debug printing (g) - MacOS only :/
|
70
73
|
Irbtools.add_library 'guessmethod' # automatically correct typos (method_missing hook)
|
71
74
|
Irbtools.add_library 'interactive_editor' # lets you open vim (or your favourite editor), hack something, save it, and it's loaded in the current irb session
|
72
|
-
Irbtools.add_library 'irb_rocket' # put result as comment instead of a new line!
|
73
75
|
#Irbtools.add_library 'zucker/all' # see rubyzucker.info
|
74
76
|
|
75
77
|
Irbtools.add_library :boson do
|
data/lib/irbtools/workarounds.rb
CHANGED
@@ -56,6 +56,41 @@ if IRB.const_defined? :CaptureIO
|
|
56
56
|
}
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
# hacks for hirb - irb_rocket interaction
|
61
|
+
module IRB
|
62
|
+
class Irb
|
63
|
+
alias output_value_unrocket output_value
|
64
|
+
def output_value
|
65
|
+
return ' ' if @io.nil?
|
66
|
+
hirb_output = Hirb::Util.capture_stdout do output_value_unrocket end
|
67
|
+
if Hirb::View.did_output?
|
68
|
+
print hirb_output
|
69
|
+
else
|
70
|
+
last = @context.io.prompt + @last_line.split("\n").last
|
71
|
+
@io.print(rc + cuu1 + (cuf1*last.length) + " " +
|
72
|
+
Wirble::Colorize::Color.escape(:blue) + "#=>" + sgr0 +
|
73
|
+
" " + Wirble::Colorize.colorize(@context.last_value.inspect) + cud1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
class << Hirb::View
|
80
|
+
def did_output?; @did_output; end
|
81
|
+
|
82
|
+
def render_output(output, options={})
|
83
|
+
@did_output = false
|
84
|
+
if (formatted_output = formatter.format_output(output, options))
|
85
|
+
render_method.call(formatted_output)
|
86
|
+
@did_output = true
|
87
|
+
true
|
88
|
+
else
|
89
|
+
false
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
59
94
|
end
|
60
95
|
|
61
96
|
# J-_-L
|
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:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 4
|
10
|
+
version: 0.7.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jan Lelis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-09 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|