pry 0.8.4pre1-i386-mswin32 → 0.9.0-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG +25 -6
  3. data/README.markdown +11 -4
  4. data/Rakefile +15 -19
  5. data/TODO +28 -2
  6. data/bin/pry +28 -11
  7. data/examples/example_basic.rb +2 -4
  8. data/examples/example_command_override.rb +2 -5
  9. data/examples/example_commands.rb +1 -4
  10. data/examples/example_hooks.rb +2 -5
  11. data/examples/example_image_edit.rb +4 -8
  12. data/examples/example_input.rb +1 -4
  13. data/examples/example_input2.rb +1 -4
  14. data/examples/example_output.rb +1 -4
  15. data/examples/example_print.rb +2 -5
  16. data/examples/example_prompt.rb +2 -5
  17. data/examples/helper.rb +6 -0
  18. data/lib/pry.rb +59 -3
  19. data/lib/pry/command_context.rb +10 -9
  20. data/lib/pry/command_processor.rb +51 -73
  21. data/lib/pry/command_set.rb +79 -28
  22. data/lib/pry/commands.rb +9 -123
  23. data/lib/pry/completion.rb +30 -29
  24. data/lib/pry/config.rb +100 -0
  25. data/lib/pry/default_commands/basic.rb +37 -0
  26. data/lib/pry/default_commands/context.rb +16 -15
  27. data/lib/pry/default_commands/documentation.rb +73 -54
  28. data/lib/pry/default_commands/easter_eggs.rb +1 -20
  29. data/lib/pry/default_commands/gems.rb +31 -40
  30. data/lib/pry/default_commands/input.rb +223 -15
  31. data/lib/pry/default_commands/introspection.rb +108 -73
  32. data/lib/pry/default_commands/ls.rb +25 -11
  33. data/lib/pry/default_commands/shell.rb +29 -39
  34. data/lib/pry/extended_commands/experimental.rb +17 -0
  35. data/lib/pry/extended_commands/user_command_api.rb +22 -0
  36. data/lib/pry/helpers.rb +1 -0
  37. data/lib/pry/helpers/base_helpers.rb +15 -104
  38. data/lib/pry/helpers/command_helpers.rb +96 -59
  39. data/lib/pry/helpers/text.rb +83 -0
  40. data/lib/pry/history_array.rb +105 -0
  41. data/lib/pry/plugins.rb +79 -0
  42. data/lib/pry/pry_class.rb +102 -114
  43. data/lib/pry/pry_instance.rb +123 -55
  44. data/lib/pry/version.rb +1 -1
  45. data/pry.gemspec +45 -0
  46. data/test/helper.rb +57 -7
  47. data/test/test_command_processor.rb +205 -0
  48. data/test/{test_commandset.rb → test_command_set.rb} +18 -12
  49. data/test/test_default_commands.rb +59 -0
  50. data/test/test_default_commands/test_context.rb +64 -0
  51. data/test/test_default_commands/test_documentation.rb +31 -0
  52. data/test/test_default_commands/test_gems.rb +14 -0
  53. data/test/test_default_commands/test_input.rb +327 -0
  54. data/test/test_default_commands/test_introspection.rb +155 -0
  55. data/test/test_history_array.rb +65 -0
  56. data/test/test_pry.rb +548 -313
  57. metadata +48 -15
  58. data/lib/pry/hooks.rb +0 -17
  59. data/lib/pry/print.rb +0 -16
  60. 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
5
- version: 0.8.4pre1
4
+ prerelease:
5
+ version: 0.9.0
6
6
  platform: i386-mswin32
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-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.5.3
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.4.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: win32console
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: *id006
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/hooks.rb
130
- - lib/pry/print.rb
131
- - lib/pry/prompts.rb
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/test_commandset.rb
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: 1.3.1
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/test_commandset.rb
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
@@ -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