irt 1.2.12 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/VERSION +1 -1
  2. data/irt.gemspec +3 -2
  3. data/irtrc +20 -4
  4. data/lib/irt.rb +5 -1
  5. data/lib/irt/commands/ri.rb +7 -1
  6. metadata +13 -27
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.12
1
+ 1.3.0
data/irt.gemspec CHANGED
@@ -31,12 +31,13 @@ ________________________________________________________________________________
31
31
 
32
32
  ________________________________________________________________________________
33
33
 
34
- 2. In order to use the IRT contextual ri command, one of the following gems
35
- must be installed:
34
+ 2. In order to use the IRT contextual ri command, on ruby < 1.9.3,
35
+ one of the following gems must be installed:
36
36
 
37
37
  "bri" if you run ruby >= 1.9.2
38
38
  "fastri" if you run ruby < 1.9.2
39
39
 
40
+ (no extra installation needed if you use ruby >= 1.9.3)
40
41
  ________________________________________________________________________________
41
42
 
42
43
  EOM
data/irtrc CHANGED
@@ -38,14 +38,30 @@
38
38
  # the format to build the command to lauch emacs
39
39
  # IRT.emacs_command_format = %(emacs +%2$d "%1$s")
40
40
 
41
+ # the formats to build the commnd to launch your preferred IDE
42
+ # add your command format if you want to use another editor than nano or vi
43
+
44
+ # RubyMine
45
+ #IRT.edit_command_format = %(mine --line %2$s %1$s)
46
+
47
+ # Plain Eclipse on Mac X (opens the file but misses the line number)
48
+ #IRT.edit_command_format = %(open -a "/Applications/eclipse/Eclipse.app" %1$s)
49
+
50
+ # Eclipse with installed EclipseCall plugin (platform independent, file and line number ok)
51
+ # Eclipse should be running
52
+ # http://www.jaylib.org/pmwiki/pmwiki.php/EclipsePlugins/EclipseCall
53
+ # update site: http://www.jaylib.org/eclipsecall
54
+ #IRT.edit_command_format = %(java -jar eclipsecall.jar %1$s -G%2$s)
55
+
56
+ # NetBeans
57
+ #IRT.edit_command_format = %(netbeans --open %1$s:%2$s)
58
+
41
59
  # the format to build the command to launch the ri tool
42
60
  # if RUBY_VERSION < 1.9.2 uses qri (from fastri) else bri
43
61
  # IRT.ri_command_format = %(qri -f #{Dye.color? ? 'ansi' : 'plain'} "%s")
44
62
  # IRT.ri_command_format = %(bri "%s")
45
-
46
- # add your command format if you want to use another editor than nano or vi
47
- # default 'open -t %1$s' on MacOX; 'kde-open %1$s' or 'gnome-open %1$s' un unix/linux; '%1$s' on windoze
48
- # IRT.edit_command_format = "your_preferred_GUI_editor %1$s +%2$d"
63
+ # for ruby >= 1.9.3 the vanilla ri is better
64
+ # IRT.ri_command_format = %(qri -f #{Dye.color? ? 'ansi' : 'bs'} "%s")
49
65
 
50
66
  # any log-ignored-echo command you want to add
51
67
  # IRT.log.ignored_echo_commands << [:commandA, :commandB ...]
data/lib/irt.rb CHANGED
@@ -109,7 +109,11 @@ module IRT
109
109
  @vi_command_format = %(vi "%1$s" +%2$d)
110
110
  @nano_command_format = %(nano +%2$d "%1$s")
111
111
  @emacs_command_format = %(emacs +%2$d "%1$s")
112
- @ri_command_format = IRT::Commands::Ri::GEM == 'bri' ? %(bri "%s") : %(qri -f #{Dye.color? ? 'ansi' : 'plain'} "%s")
112
+ @ri_command_format = case IRT::Commands::Ri::GEM
113
+ when 'bri' then %(bri "%s")
114
+ when 'fastri' then %(qri -f #{Dye.color? ? 'ansi' : 'plain'} "%s")
115
+ when 'ri' then %(ri -f #{Dye.color? ? 'ansi' : 'bs'} "%s")
116
+ end
113
117
  @pager_command = 'less -R'
114
118
  @debug = false
115
119
  end
@@ -2,7 +2,12 @@ module IRT
2
2
  module Commands
3
3
  module Ri
4
4
 
5
- GEM = IRT::RubyVersion >= '1.9.2' ? 'bri' : 'fastri'
5
+ GEM = case
6
+ when IRT::RubyVersion >= '1.9.3' then 'ri'
7
+ when IRT::RubyVersion >= '1.9.2' then 'bri'
8
+ else 'fastri'
9
+ end
10
+
6
11
  @@choices_map = {}
7
12
 
8
13
  def self.reset_choices_map
@@ -92,6 +97,7 @@ module IRT
92
97
  end
93
98
 
94
99
  def ri_problem
100
+ return if GEM == 'ri'
95
101
  cmds = {'bri' => 'bri', 'fastri' => 'qri'}
96
102
  message = `#{cmds[GEM]}` ? "Bad ri_command_format for this system." :
97
103
  %(You must install the "#{GEM}" gem to use this command with ruby #{RUBY_VERSION}.)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-17 00:00:00.000000000 Z
12
+ date: 2012-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: differ
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70259239749540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 0.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 0.1.1
24
+ version_requirements: *70259239749540
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: dye
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70259239749020 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 0.1.3
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 0.1.3
35
+ version_requirements: *70259239749020
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: prompter
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70259239748540 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,12 +43,7 @@ dependencies:
53
43
  version: 0.1.4
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 0.1.4
46
+ version_requirements: *70259239748540
62
47
  description: If you use IRT in place of irb or Rails Console, you will have more tools
63
48
  that will make your life a lot easier.
64
49
  email: dd.nexus@gmail.com
@@ -116,9 +101,10 @@ post_install_message: ! "_______________________________________________________
116
101
  \ 1. If you notice a messed prompt while navigating the history, you must\n enable
117
102
  the 'fix_readline_prompt' option in the ~/.irtrc file:\n\n IRT.fix_readline_prompt
118
103
  = true\n\n (see the README file for details)\n\n________________________________________________________________________________\n\n
119
- \ 2. In order to use the IRT contextual ri command, one of the following gems\n
120
- \ must be installed:\n\n \"bri\" if you run ruby >= 1.9.2\n \"fastri\"
121
- if you run ruby < 1.9.2\n\n________________________________________________________________________________\n\n"
104
+ \ 2. In order to use the IRT contextual ri command, on ruby < 1.9.3,\n one of
105
+ the following gems must be installed:\n\n \"bri\" if you run ruby >= 1.9.2\n
106
+ \ \"fastri\" if you run ruby < 1.9.2\n\n (no extra installation needed
107
+ if you use ruby >= 1.9.3)\n________________________________________________________________________________\n\n"
122
108
  rdoc_options:
123
109
  - --charset=UTF-8
124
110
  require_paths:
@@ -137,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
123
  version: 1.3.6
138
124
  requirements: []
139
125
  rubyforge_project:
140
- rubygems_version: 1.8.24
126
+ rubygems_version: 1.8.10
141
127
  signing_key:
142
128
  specification_version: 3
143
129
  summary: Interactive Ruby Tools - Very improved irb and Rails Console with a lot of