pry 0.8.4pre1-java → 0.9.0pre1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +1 -0
  2. data/README.markdown +1 -1
  3. data/Rakefile +11 -5
  4. data/TODO +28 -2
  5. data/bin/pry +5 -9
  6. data/examples/example_basic.rb +2 -4
  7. data/examples/example_command_override.rb +2 -5
  8. data/examples/example_commands.rb +1 -4
  9. data/examples/example_hooks.rb +2 -5
  10. data/examples/example_image_edit.rb +4 -8
  11. data/examples/example_input.rb +1 -4
  12. data/examples/example_input2.rb +1 -4
  13. data/examples/example_output.rb +1 -4
  14. data/examples/example_print.rb +2 -5
  15. data/examples/example_prompt.rb +2 -5
  16. data/examples/helper.rb +6 -0
  17. data/lib/pry.rb +61 -4
  18. data/lib/pry/command_context.rb +10 -9
  19. data/lib/pry/command_processor.rb +29 -68
  20. data/lib/pry/command_set.rb +79 -28
  21. data/lib/pry/commands.rb +10 -121
  22. data/lib/pry/completion.rb +30 -29
  23. data/lib/pry/config.rb +93 -0
  24. data/lib/pry/default_commands/basic.rb +37 -0
  25. data/lib/pry/default_commands/context.rb +15 -15
  26. data/lib/pry/default_commands/documentation.rb +49 -48
  27. data/lib/pry/default_commands/easter_eggs.rb +1 -20
  28. data/lib/pry/default_commands/gems.rb +32 -41
  29. data/lib/pry/default_commands/input.rb +95 -19
  30. data/lib/pry/default_commands/introspection.rb +54 -60
  31. data/lib/pry/default_commands/ls.rb +2 -2
  32. data/lib/pry/default_commands/shell.rb +29 -39
  33. data/lib/pry/extended_commands/experimental.rb +48 -0
  34. data/lib/pry/extended_commands/user_command_api.rb +22 -0
  35. data/lib/pry/helpers.rb +1 -0
  36. data/lib/pry/helpers/base_helpers.rb +9 -106
  37. data/lib/pry/helpers/command_helpers.rb +96 -59
  38. data/lib/pry/helpers/text.rb +83 -0
  39. data/lib/pry/plugins.rb +79 -0
  40. data/lib/pry/pry_class.rb +96 -111
  41. data/lib/pry/pry_instance.rb +87 -55
  42. data/lib/pry/version.rb +1 -1
  43. data/test/helper.rb +56 -7
  44. data/test/test_command_processor.rb +99 -0
  45. data/test/{test_commandset.rb → test_command_set.rb} +18 -12
  46. data/test/test_default_commands.rb +59 -0
  47. data/test/test_default_commands/test_context.rb +64 -0
  48. data/test/test_default_commands/test_documentation.rb +31 -0
  49. data/test/test_default_commands/test_input.rb +157 -0
  50. data/test/test_default_commands/test_introspection.rb +146 -0
  51. data/test/test_pry.rb +430 -313
  52. metadata +25 -9
  53. data/lib/pry/hooks.rb +0 -17
  54. data/lib/pry/print.rb +0 -16
  55. data/lib/pry/prompts.rb +0 -31
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: pry
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 5
5
- version: 0.8.4pre1
5
+ version: 0.9.0pre1
6
6
  platform: java
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-05-05 00:00:00 Z
13
+ date: 2011-06-04 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.5.3
45
+ version: 1.6.0
46
46
  type: :runtime
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
@@ -96,14 +96,17 @@ files:
96
96
  - examples/example_output.rb
97
97
  - examples/example_print.rb
98
98
  - examples/example_prompt.rb
99
+ - examples/helper.rb
99
100
  - lib/pry.rb
100
101
  - lib/pry/command_context.rb
101
102
  - lib/pry/command_processor.rb
102
103
  - lib/pry/command_set.rb
103
104
  - lib/pry/commands.rb
104
105
  - lib/pry/completion.rb
106
+ - lib/pry/config.rb
105
107
  - lib/pry/core_extensions.rb
106
108
  - lib/pry/custom_completions.rb
109
+ - lib/pry/default_commands/basic.rb
107
110
  - lib/pry/default_commands/context.rb
108
111
  - lib/pry/default_commands/documentation.rb
109
112
  - lib/pry/default_commands/easter_eggs.rb
@@ -112,18 +115,25 @@ files:
112
115
  - lib/pry/default_commands/introspection.rb
113
116
  - lib/pry/default_commands/ls.rb
114
117
  - lib/pry/default_commands/shell.rb
118
+ - lib/pry/extended_commands/experimental.rb
119
+ - lib/pry/extended_commands/user_command_api.rb
115
120
  - lib/pry/helpers.rb
116
121
  - lib/pry/helpers/base_helpers.rb
117
122
  - lib/pry/helpers/command_helpers.rb
118
- - lib/pry/hooks.rb
119
- - lib/pry/print.rb
120
- - lib/pry/prompts.rb
123
+ - lib/pry/helpers/text.rb
124
+ - lib/pry/plugins.rb
121
125
  - lib/pry/pry_class.rb
122
126
  - lib/pry/pry_instance.rb
123
127
  - lib/pry/version.rb
124
128
  - test/helper.rb
125
129
  - test/test_command_helpers.rb
126
- - test/test_commandset.rb
130
+ - test/test_command_processor.rb
131
+ - test/test_command_set.rb
132
+ - test/test_default_commands.rb
133
+ - test/test_default_commands/test_context.rb
134
+ - test/test_default_commands/test_documentation.rb
135
+ - test/test_default_commands/test_input.rb
136
+ - test/test_default_commands/test_introspection.rb
127
137
  - test/test_pry.rb
128
138
  - test/testrc
129
139
  - wiki/Customizing-pry.md
@@ -158,6 +168,12 @@ summary: an IRB alternative and runtime developer console
158
168
  test_files:
159
169
  - test/helper.rb
160
170
  - test/test_command_helpers.rb
161
- - test/test_commandset.rb
171
+ - test/test_command_processor.rb
172
+ - test/test_command_set.rb
173
+ - test/test_default_commands.rb
174
+ - test/test_default_commands/test_context.rb
175
+ - test/test_default_commands/test_documentation.rb
176
+ - test/test_default_commands/test_input.rb
177
+ - test/test_default_commands/test_introspection.rb
162
178
  - test/test_pry.rb
163
179
  - test/testrc
@@ -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
@@ -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
-
@@ -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