pry 0.8.4pre1-i386-mingw32 → 0.9.0-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/.gitignore +1 -0
- data/CHANGELOG +25 -6
- data/README.markdown +11 -4
- data/Rakefile +15 -19
- data/TODO +28 -2
- data/bin/pry +28 -11
- data/examples/example_basic.rb +2 -4
- data/examples/example_command_override.rb +2 -5
- data/examples/example_commands.rb +1 -4
- data/examples/example_hooks.rb +2 -5
- data/examples/example_image_edit.rb +4 -8
- data/examples/example_input.rb +1 -4
- data/examples/example_input2.rb +1 -4
- data/examples/example_output.rb +1 -4
- data/examples/example_print.rb +2 -5
- data/examples/example_prompt.rb +2 -5
- data/examples/helper.rb +6 -0
- data/lib/pry.rb +59 -3
- data/lib/pry/command_context.rb +10 -9
- data/lib/pry/command_processor.rb +51 -73
- data/lib/pry/command_set.rb +79 -28
- data/lib/pry/commands.rb +9 -123
- data/lib/pry/completion.rb +30 -29
- data/lib/pry/config.rb +100 -0
- data/lib/pry/default_commands/basic.rb +37 -0
- data/lib/pry/default_commands/context.rb +16 -15
- data/lib/pry/default_commands/documentation.rb +73 -54
- data/lib/pry/default_commands/easter_eggs.rb +1 -20
- data/lib/pry/default_commands/gems.rb +31 -40
- data/lib/pry/default_commands/input.rb +223 -15
- data/lib/pry/default_commands/introspection.rb +108 -73
- data/lib/pry/default_commands/ls.rb +25 -11
- data/lib/pry/default_commands/shell.rb +29 -39
- data/lib/pry/extended_commands/experimental.rb +17 -0
- data/lib/pry/extended_commands/user_command_api.rb +22 -0
- data/lib/pry/helpers.rb +1 -0
- data/lib/pry/helpers/base_helpers.rb +15 -104
- data/lib/pry/helpers/command_helpers.rb +96 -59
- data/lib/pry/helpers/text.rb +83 -0
- data/lib/pry/history_array.rb +105 -0
- data/lib/pry/plugins.rb +79 -0
- data/lib/pry/pry_class.rb +102 -114
- data/lib/pry/pry_instance.rb +123 -55
- data/lib/pry/version.rb +1 -1
- data/pry.gemspec +45 -0
- data/test/helper.rb +57 -7
- data/test/test_command_processor.rb +205 -0
- data/test/{test_commandset.rb → test_command_set.rb} +18 -12
- data/test/test_default_commands.rb +59 -0
- data/test/test_default_commands/test_context.rb +64 -0
- data/test/test_default_commands/test_documentation.rb +31 -0
- data/test/test_default_commands/test_gems.rb +14 -0
- data/test/test_default_commands/test_input.rb +327 -0
- data/test/test_default_commands/test_introspection.rb +155 -0
- data/test/test_history_array.rb +65 -0
- data/test/test_pry.rb +548 -313
- metadata +48 -15
- data/lib/pry/hooks.rb +0 -17
- data/lib/pry/print.rb +0 -16
- data/lib/pry/prompts.rb +0 -31
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.
|
4
|
+
prerelease:
|
5
|
+
version: 0.9.0
|
6
6
|
platform: i386-mingw32
|
7
7
|
authors:
|
8
8
|
- John Mair (banisterfiend)
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-06-17 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ruby_parser
|
@@ -40,9 +40,9 @@ dependencies:
|
|
40
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.9.0
|
46
46
|
type: :runtime
|
47
47
|
version_requirements: *id003
|
48
48
|
- !ruby/object:Gem::Dependency
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.6.0
|
57
57
|
type: :runtime
|
58
58
|
version_requirements: *id004
|
59
59
|
- !ruby/object:Gem::Dependency
|
@@ -68,16 +68,27 @@ dependencies:
|
|
68
68
|
type: :development
|
69
69
|
version_requirements: *id005
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: open4
|
72
72
|
prerelease: false
|
73
73
|
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.0.1
|
79
|
+
type: :development
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: win32console
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
74
85
|
none: false
|
75
86
|
requirements:
|
76
87
|
- - ">="
|
77
88
|
- !ruby/object:Gem::Version
|
78
89
|
version: 1.3.0
|
79
90
|
type: :runtime
|
80
|
-
version_requirements: *
|
91
|
+
version_requirements: *id007
|
81
92
|
description: an IRB alternative and runtime developer console
|
82
93
|
email: jrmair@gmail.com
|
83
94
|
executables:
|
@@ -107,14 +118,17 @@ files:
|
|
107
118
|
- examples/example_output.rb
|
108
119
|
- examples/example_print.rb
|
109
120
|
- examples/example_prompt.rb
|
121
|
+
- examples/helper.rb
|
110
122
|
- lib/pry.rb
|
111
123
|
- lib/pry/command_context.rb
|
112
124
|
- lib/pry/command_processor.rb
|
113
125
|
- lib/pry/command_set.rb
|
114
126
|
- lib/pry/commands.rb
|
115
127
|
- lib/pry/completion.rb
|
128
|
+
- lib/pry/config.rb
|
116
129
|
- lib/pry/core_extensions.rb
|
117
130
|
- lib/pry/custom_completions.rb
|
131
|
+
- lib/pry/default_commands/basic.rb
|
118
132
|
- lib/pry/default_commands/context.rb
|
119
133
|
- lib/pry/default_commands/documentation.rb
|
120
134
|
- lib/pry/default_commands/easter_eggs.rb
|
@@ -123,18 +137,29 @@ files:
|
|
123
137
|
- lib/pry/default_commands/introspection.rb
|
124
138
|
- lib/pry/default_commands/ls.rb
|
125
139
|
- lib/pry/default_commands/shell.rb
|
140
|
+
- lib/pry/extended_commands/experimental.rb
|
141
|
+
- lib/pry/extended_commands/user_command_api.rb
|
126
142
|
- lib/pry/helpers.rb
|
127
143
|
- lib/pry/helpers/base_helpers.rb
|
128
144
|
- lib/pry/helpers/command_helpers.rb
|
129
|
-
- lib/pry/
|
130
|
-
- lib/pry/
|
131
|
-
- lib/pry/
|
145
|
+
- lib/pry/helpers/text.rb
|
146
|
+
- lib/pry/history_array.rb
|
147
|
+
- lib/pry/plugins.rb
|
132
148
|
- lib/pry/pry_class.rb
|
133
149
|
- lib/pry/pry_instance.rb
|
134
150
|
- lib/pry/version.rb
|
151
|
+
- pry.gemspec
|
135
152
|
- test/helper.rb
|
136
153
|
- test/test_command_helpers.rb
|
137
|
-
- test/
|
154
|
+
- test/test_command_processor.rb
|
155
|
+
- test/test_command_set.rb
|
156
|
+
- test/test_default_commands.rb
|
157
|
+
- test/test_default_commands/test_context.rb
|
158
|
+
- test/test_default_commands/test_documentation.rb
|
159
|
+
- test/test_default_commands/test_gems.rb
|
160
|
+
- test/test_default_commands/test_input.rb
|
161
|
+
- test/test_default_commands/test_introspection.rb
|
162
|
+
- test/test_history_array.rb
|
138
163
|
- test/test_pry.rb
|
139
164
|
- test/testrc
|
140
165
|
- wiki/Customizing-pry.md
|
@@ -156,9 +181,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
182
|
none: false
|
158
183
|
requirements:
|
159
|
-
- - "
|
184
|
+
- - ">="
|
160
185
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
186
|
+
version: "0"
|
162
187
|
requirements: []
|
163
188
|
|
164
189
|
rubyforge_project:
|
@@ -169,6 +194,14 @@ summary: an IRB alternative and runtime developer console
|
|
169
194
|
test_files:
|
170
195
|
- test/helper.rb
|
171
196
|
- test/test_command_helpers.rb
|
172
|
-
- test/
|
197
|
+
- test/test_command_processor.rb
|
198
|
+
- test/test_command_set.rb
|
199
|
+
- test/test_default_commands.rb
|
200
|
+
- test/test_default_commands/test_context.rb
|
201
|
+
- test/test_default_commands/test_documentation.rb
|
202
|
+
- test/test_default_commands/test_gems.rb
|
203
|
+
- test/test_default_commands/test_input.rb
|
204
|
+
- test/test_default_commands/test_introspection.rb
|
205
|
+
- test/test_history_array.rb
|
173
206
|
- test/test_pry.rb
|
174
207
|
- test/testrc
|
data/lib/pry/hooks.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
|
3
|
-
# The default hooks - display messages when beginning and ending Pry sessions.
|
4
|
-
DEFAULT_HOOKS = {
|
5
|
-
|
6
|
-
:before_session => proc do |out, target|
|
7
|
-
# ensure we're actually in a method
|
8
|
-
meth_name = target.eval('__method__')
|
9
|
-
file = target.eval('__FILE__')
|
10
|
-
|
11
|
-
# /unknown/ for rbx
|
12
|
-
if file !~ /(\(.*\))|<.*>/ && file !~ /__unknown__/ && file != "" && file != "-e"
|
13
|
-
Pry.run_command "whereami 5", :output => out, :show_output => true, :context => target, :commands => Pry::Commands
|
14
|
-
end
|
15
|
-
end,
|
16
|
-
}
|
17
|
-
end
|
data/lib/pry/print.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
DEFAULT_PRINT = proc do |output, value|
|
3
|
-
if Pry.color
|
4
|
-
output.puts "=> #{CodeRay.scan(Pry.view(value), :ruby).term}"
|
5
|
-
else
|
6
|
-
output.puts "=> #{Pry.view(value)}"
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
# Will only show the first line of the backtrace
|
11
|
-
DEFAULT_EXCEPTION_HANDLER = proc do |output, exception|
|
12
|
-
output.puts "#{exception.class}: #{exception.message}"
|
13
|
-
output.puts "from #{exception.backtrace.first}"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
data/lib/pry/prompts.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
|
3
|
-
|
4
|
-
# The default prompt; includes the target and nesting level
|
5
|
-
DEFAULT_PROMPT = [
|
6
|
-
proc do |target_self, nest_level|
|
7
|
-
|
8
|
-
if nest_level == 0
|
9
|
-
"pry(#{Pry.view_clip(target_self)})> "
|
10
|
-
else
|
11
|
-
"pry(#{Pry.view_clip(target_self)}):#{Pry.view_clip(nest_level)}> "
|
12
|
-
end
|
13
|
-
end,
|
14
|
-
|
15
|
-
proc do |target_self, nest_level|
|
16
|
-
if nest_level == 0
|
17
|
-
"pry(#{Pry.view_clip(target_self)})* "
|
18
|
-
else
|
19
|
-
"pry(#{Pry.view_clip(target_self)}):#{Pry.view_clip(nest_level)}* "
|
20
|
-
end
|
21
|
-
end
|
22
|
-
]
|
23
|
-
|
24
|
-
# A simple prompt - doesn't display target or nesting level
|
25
|
-
SIMPLE_PROMPT = [proc { ">> " }, proc { ">* " }]
|
26
|
-
|
27
|
-
SHELL_PROMPT = [
|
28
|
-
proc { |target_self, _| "pry #{Pry.view_clip(target_self)}:#{Dir.pwd} $ " },
|
29
|
-
proc { |target_self, _| "pry #{Pry.view_clip(target_self)}:#{Dir.pwd} * " }
|
30
|
-
]
|
31
|
-
end
|