pry 0.9.11.3-i386-mingw32 → 0.9.11.4-i386-mingw32
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 +4 -0
- data/lib/pry/pager.rb +24 -5
- data/lib/pry/pry_class.rb +4 -0
- data/lib/pry/pry_instance.rb +1 -0
- data/lib/pry/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/pry/pager.rb
CHANGED
@@ -24,7 +24,12 @@ class Pry::Pager
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.page_size
|
27
|
-
|
27
|
+
@page_size ||= begin
|
28
|
+
require 'io/console'
|
29
|
+
$stdout.winsize.first
|
30
|
+
rescue LoadError
|
31
|
+
27
|
32
|
+
end
|
28
33
|
end
|
29
34
|
|
30
35
|
def initialize(text)
|
@@ -47,13 +52,27 @@ class Pry::Pager
|
|
47
52
|
|
48
53
|
class SystemPager < Pry::Pager
|
49
54
|
def self.default_pager
|
50
|
-
ENV["PAGER"] || "
|
55
|
+
pager = ENV["PAGER"] || ""
|
56
|
+
|
57
|
+
# Default to less, and make sure less is being passed the correct options
|
58
|
+
if pager.strip.empty? or pager =~ /^less\s*/
|
59
|
+
pager = "less -R -S -F -X"
|
60
|
+
end
|
61
|
+
|
62
|
+
pager
|
51
63
|
end
|
52
64
|
|
53
65
|
def self.available?
|
54
|
-
|
55
|
-
|
56
|
-
|
66
|
+
if @system_pager.nil?
|
67
|
+
@system_pager = begin
|
68
|
+
pager_executable = default_pager.split(' ').first
|
69
|
+
`which #{ pager_executable }`
|
70
|
+
rescue
|
71
|
+
false
|
72
|
+
end
|
73
|
+
else
|
74
|
+
@system_pager
|
75
|
+
end
|
57
76
|
end
|
58
77
|
|
59
78
|
def initialize(*)
|
data/lib/pry/pry_class.rb
CHANGED
@@ -55,6 +55,10 @@ class Pry
|
|
55
55
|
# @return [Binding] A top level binding with no local variables
|
56
56
|
attr_accessor :toplevel_binding
|
57
57
|
|
58
|
+
# @return [Exception, nil] The last pry internal error.
|
59
|
+
# (a CommandError in most cases)
|
60
|
+
attr_accessor :last_internal_error
|
61
|
+
|
58
62
|
# plugin forwardables
|
59
63
|
def_delegators :@plugin_manager, :plugins, :load_plugins, :locate_plugins
|
60
64
|
|
data/lib/pry/pry_instance.rb
CHANGED
@@ -300,6 +300,7 @@ class Pry
|
|
300
300
|
# eval_string will probably be mutated by this method
|
301
301
|
retrieve_line(eval_string, target)
|
302
302
|
rescue CommandError, Slop::InvalidOptionError, MethodSource::SourceNotFoundError => e
|
303
|
+
Pry.last_internal_error = e
|
303
304
|
output.puts "Error: #{e.message}"
|
304
305
|
end
|
305
306
|
|
data/lib/pry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.11.
|
4
|
+
version: 0.9.11.4
|
5
5
|
prerelease:
|
6
6
|
platform: i386-mingw32
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-01-
|
14
|
+
date: 2013-01-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: coderay
|