irt 1.2.3 → 1.2.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/README.markdown +14 -4
- data/VERSION +1 -1
- data/irtrc +5 -2
- data/lib/irt/commands/edit.rb +1 -2
- data/lib/irt/extensions/irb.rb +1 -1
- data/lib/irt/utils.rb +5 -0
- data/lib/irt.rb +13 -1
- metadata +89 -118
data/README.markdown
CHANGED
@@ -94,6 +94,10 @@ If you want to enable it there is an [official Microsoft page](http://support.mi
|
|
94
94
|
about that matter, or you can eventually find useful this
|
95
95
|
[simple tutorial](http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/UserTips/Miscellaneous/CommandInterpreterAnsiSupport.html "Command Interpreter Ansi Support").
|
96
96
|
|
97
|
+
### ANSI colors on jruby
|
98
|
+
|
99
|
+
You should use the `IRT.force_color(true)` and `IRT.force_tty(true)` options in the `~/.irtrc` file in order to see colors when you use jruby.
|
100
|
+
|
97
101
|
## Sessions / Modes
|
98
102
|
|
99
103
|
There are 4 irt modes / session types: file, interactive, inspect, binding.
|
@@ -336,7 +340,10 @@ If you prefer to inspect/edit your files with your preferred IDE, you should add
|
|
336
340
|
the ~/.irtrc file (create it if you don't have one) indicating the command format for your IDE,
|
337
341
|
in order to open a file at a certain line.
|
338
342
|
|
339
|
-
These are
|
343
|
+
These are examples of a few setups for different IDEs:
|
344
|
+
|
345
|
+
# RubyMine
|
346
|
+
IRT.edit_command_format = %(mine --line %2$s %1$s)
|
340
347
|
|
341
348
|
# Plain Eclipse on Mac X (opens the file but misses the line number)
|
342
349
|
IRT.edit_command_format = %(open -a "/Applications/eclipse/Eclipse.app" %1$s)
|
@@ -586,8 +593,11 @@ which should work quite well without any change:
|
|
586
593
|
# loads irt_helper.rb files automatically
|
587
594
|
# IRT.autoload_helper_files = true
|
588
595
|
|
589
|
-
#
|
590
|
-
# IRT.
|
596
|
+
# forces tty (standard use with jruby)
|
597
|
+
# IRT.force_tty(true)
|
598
|
+
|
599
|
+
# forces color regardless the terminal ANSI support (standard use with jruby)
|
600
|
+
# IRT.force_color(true)
|
591
601
|
|
592
602
|
# the command to pipe to the copied lines that should set the clipboard
|
593
603
|
# default to 'pbcopy' on mac, 'xclip -selection c' on linux/unix and 'clip' on windoze
|
@@ -629,7 +639,7 @@ which should work quite well without any change:
|
|
629
639
|
### Colors
|
630
640
|
|
631
641
|
The default color styles of IRT should be OK in most situation, anyway, if you really don't like the colors,
|
632
|
-
you can switch off the color completely
|
642
|
+
you can switch off the color completely with `IRT.force_color(false)` or you can also
|
633
643
|
redefine the colors by redefining them in your .irtrc file.
|
634
644
|
|
635
645
|
The following are the default Dye (gem) styles, change them at will:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.4
|
data/irtrc
CHANGED
@@ -19,8 +19,11 @@
|
|
19
19
|
# loads irt_helper.rb files automatically
|
20
20
|
# IRT.autoload_helper_files = true
|
21
21
|
|
22
|
-
#
|
23
|
-
# IRT.
|
22
|
+
# forces tty (standard use with jruby)
|
23
|
+
# IRT.force_tty(true)
|
24
|
+
|
25
|
+
# forces color regardless the terminal ANSI support (standard use with jruby)
|
26
|
+
# IRT.force_color(true)
|
24
27
|
|
25
28
|
# the command that should set the clipboard to the last lines from STDIN
|
26
29
|
# default to 'pbcopy' on mac, 'xclip -selection c' on linux/unix and 'clip' on windoze
|
data/lib/irt/commands/edit.rb
CHANGED
@@ -43,7 +43,6 @@ module IRT
|
|
43
43
|
context.backtrace_map[arg]
|
44
44
|
else
|
45
45
|
raise IRT::IndexError, "No such backtrace index -- [#{arg}]"
|
46
|
-
return
|
47
46
|
end
|
48
47
|
when arg.is_a?(Array)
|
49
48
|
arg
|
@@ -76,7 +75,7 @@ module IRT
|
|
76
75
|
end
|
77
76
|
print lines_str
|
78
77
|
rescue Exception
|
79
|
-
raise IRT::NotImplementedError, "This system does not appear to support the
|
78
|
+
raise IRT::NotImplementedError, "This system does not appear to support the `#{IRT.copy_to_clipboard_command}` command."
|
80
79
|
end
|
81
80
|
end
|
82
81
|
|
data/lib/irt/extensions/irb.rb
CHANGED
@@ -20,7 +20,7 @@ module IRB #:nodoc:
|
|
20
20
|
original_init_config(ap_path)
|
21
21
|
@CONF[:AP_NAME] = 'irt'
|
22
22
|
@CONF[:PROMPT][:IRT] = { :PROMPT_I => "%02n >> ",
|
23
|
-
:PROMPT_S => '
|
23
|
+
:PROMPT_S => ' %l> ',
|
24
24
|
:PROMPT_C => "%02n .> ",
|
25
25
|
:PROMPT_N => "%02n -> ",
|
26
26
|
:RETURN => " => %s\n",
|
data/lib/irt/utils.rb
CHANGED
data/lib/irt.rb
CHANGED
@@ -27,7 +27,7 @@ module IRT
|
|
27
27
|
:macosx
|
28
28
|
when /linux/i
|
29
29
|
:linux
|
30
|
-
when /
|
30
|
+
when /solaris|bsd/i
|
31
31
|
:unix
|
32
32
|
else
|
33
33
|
:unknown
|
@@ -55,9 +55,18 @@ module IRT
|
|
55
55
|
attr_reader :log, :irt_file, :initialized
|
56
56
|
|
57
57
|
def force_color=(bool)
|
58
|
+
force_color(bool)
|
59
|
+
IRT::Prompter.say_warning "The 'IRT.force_color=' method is deprecated: use 'IRT.force_color(true/false)'"
|
60
|
+
end
|
61
|
+
|
62
|
+
def force_color(bool)
|
58
63
|
Dye.color = bool
|
59
64
|
end
|
60
65
|
|
66
|
+
def force_tty(bool)
|
67
|
+
eval %(def STDIN.tty?; #{bool}; end)
|
68
|
+
end
|
69
|
+
|
61
70
|
def init_config
|
62
71
|
@irt_on_diffs = true
|
63
72
|
@tail_on_irt = false
|
@@ -136,7 +145,10 @@ module IRT
|
|
136
145
|
def start
|
137
146
|
return if initialized
|
138
147
|
puts copyright
|
148
|
+
argv = ARGV
|
149
|
+
ARGV.clear
|
139
150
|
IRB.start
|
151
|
+
ARGV.replace(argv)
|
140
152
|
end
|
141
153
|
|
142
154
|
end
|
metadata
CHANGED
@@ -1,121 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: irt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
- 3
|
10
|
-
version: 1.2.3
|
4
|
+
prerelease:
|
5
|
+
version: 1.2.4
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
|
-
- Domizio Demichelis
|
8
|
+
- Domizio Demichelis
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
13
|
+
date: 2011-04-11 00:00:00 Z
|
20
14
|
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
name: prompter
|
55
|
-
prerelease: false
|
56
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
hash: 19
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
- 1
|
65
|
-
- 4
|
66
|
-
version: 0.1.4
|
67
|
-
type: :runtime
|
68
|
-
version_requirements: *id003
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: differ
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.1.1
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: dye
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.1.3
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: prompter
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.4
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id003
|
69
48
|
description: If you use IRT in place of irb or Rails Console, you will have more tools that will make your life a lot easier.
|
70
49
|
email: dd.nexus@gmail.com
|
71
50
|
executables:
|
72
|
-
- irt
|
73
|
-
- irt_irb
|
74
|
-
- irt_rails2
|
51
|
+
- irt
|
52
|
+
- irt_irb
|
53
|
+
- irt_rails2
|
75
54
|
extensions: []
|
76
55
|
|
77
56
|
extra_rdoc_files:
|
78
|
-
- README.markdown
|
57
|
+
- README.markdown
|
79
58
|
files:
|
80
|
-
- .gitignore
|
81
|
-
- LICENSE
|
82
|
-
- README.markdown
|
83
|
-
- Rakefile
|
84
|
-
- VERSION
|
85
|
-
- bin/irt
|
86
|
-
- bin/irt_irb
|
87
|
-
- bin/irt_rails2
|
88
|
-
- goodies/nano/README
|
89
|
-
- goodies/nano/irt.nanorc
|
90
|
-
- goodies/vi/README
|
91
|
-
- irt.gemspec
|
92
|
-
- irtrc
|
93
|
-
- lib/irt.rb
|
94
|
-
- lib/irt/commands/core.rb
|
95
|
-
- lib/irt/commands/edit.rb
|
96
|
-
- lib/irt/commands/help.rb
|
97
|
-
- lib/irt/commands/log.rb
|
98
|
-
- lib/irt/commands/ri.rb
|
99
|
-
- lib/irt/commands/test.rb
|
100
|
-
- lib/irt/differ.rb
|
101
|
-
- lib/irt/directives.rb
|
102
|
-
- lib/irt/directives/test.rb
|
103
|
-
- lib/irt/extensions/irb.rb
|
104
|
-
- lib/irt/extensions/irb/commands.rb
|
105
|
-
- lib/irt/extensions/irb/context.rb
|
106
|
-
- lib/irt/extensions/kernel.rb
|
107
|
-
- lib/irt/extensions/method.rb
|
108
|
-
- lib/irt/extensions/object.rb
|
109
|
-
- lib/irt/extensions/rails.rb
|
110
|
-
- lib/irt/history.rb
|
111
|
-
- lib/irt/hunks.rb
|
112
|
-
- lib/irt/init.rb
|
113
|
-
- lib/irt/log.rb
|
114
|
-
- lib/irt/prompter.rb
|
115
|
-
- lib/irt/ruby_version.rb
|
116
|
-
- lib/irt/session.rb
|
117
|
-
- lib/irt/utils.rb
|
118
|
-
has_rdoc: true
|
59
|
+
- .gitignore
|
60
|
+
- LICENSE
|
61
|
+
- README.markdown
|
62
|
+
- Rakefile
|
63
|
+
- VERSION
|
64
|
+
- bin/irt
|
65
|
+
- bin/irt_irb
|
66
|
+
- bin/irt_rails2
|
67
|
+
- goodies/nano/README
|
68
|
+
- goodies/nano/irt.nanorc
|
69
|
+
- goodies/vi/README
|
70
|
+
- irt.gemspec
|
71
|
+
- irtrc
|
72
|
+
- lib/irt.rb
|
73
|
+
- lib/irt/commands/core.rb
|
74
|
+
- lib/irt/commands/edit.rb
|
75
|
+
- lib/irt/commands/help.rb
|
76
|
+
- lib/irt/commands/log.rb
|
77
|
+
- lib/irt/commands/ri.rb
|
78
|
+
- lib/irt/commands/test.rb
|
79
|
+
- lib/irt/differ.rb
|
80
|
+
- lib/irt/directives.rb
|
81
|
+
- lib/irt/directives/test.rb
|
82
|
+
- lib/irt/extensions/irb.rb
|
83
|
+
- lib/irt/extensions/irb/commands.rb
|
84
|
+
- lib/irt/extensions/irb/context.rb
|
85
|
+
- lib/irt/extensions/kernel.rb
|
86
|
+
- lib/irt/extensions/method.rb
|
87
|
+
- lib/irt/extensions/object.rb
|
88
|
+
- lib/irt/extensions/rails.rb
|
89
|
+
- lib/irt/history.rb
|
90
|
+
- lib/irt/hunks.rb
|
91
|
+
- lib/irt/init.rb
|
92
|
+
- lib/irt/log.rb
|
93
|
+
- lib/irt/prompter.rb
|
94
|
+
- lib/irt/ruby_version.rb
|
95
|
+
- lib/irt/session.rb
|
96
|
+
- lib/irt/utils.rb
|
119
97
|
homepage: http://github.com/ddnexus/irt
|
120
98
|
licenses: []
|
121
99
|
|
@@ -143,35 +121,28 @@ post_install_message: |+
|
|
143
121
|
________________________________________________________________________________
|
144
122
|
|
145
123
|
rdoc_options:
|
146
|
-
- --charset=UTF-8
|
124
|
+
- --charset=UTF-8
|
147
125
|
require_paths:
|
148
|
-
- lib
|
126
|
+
- lib
|
149
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
128
|
none: false
|
151
129
|
requirements:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
segments:
|
156
|
-
- 0
|
157
|
-
version: "0"
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: "0"
|
158
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
134
|
none: false
|
160
135
|
requirements:
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
segments:
|
165
|
-
- 1
|
166
|
-
- 3
|
167
|
-
- 6
|
168
|
-
version: 1.3.6
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.3.6
|
169
139
|
requirements: []
|
170
140
|
|
171
141
|
rubyforge_project:
|
172
|
-
rubygems_version: 1.
|
142
|
+
rubygems_version: 1.7.2
|
173
143
|
signing_key:
|
174
144
|
specification_version: 3
|
175
145
|
summary: Interactive Ruby Tools - Very improved irb and Rails Console with a lot of cool features.
|
176
146
|
test_files: []
|
177
147
|
|
148
|
+
has_rdoc:
|