pry 0.9.6.2 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/.gitignore +6 -0
  2. data/CHANGELOG +19 -1
  3. data/CONTRIBUTORS +22 -16
  4. data/Rakefile +12 -6
  5. data/bin/pry +15 -12
  6. data/lib/pry.rb +39 -28
  7. data/lib/pry/command_context.rb +1 -0
  8. data/lib/pry/command_processor.rb +9 -2
  9. data/lib/pry/command_set.rb +7 -0
  10. data/lib/pry/config.rb +8 -0
  11. data/lib/pry/default_commands/basic.rb +7 -10
  12. data/lib/pry/default_commands/context.rb +36 -26
  13. data/lib/pry/default_commands/documentation.rb +31 -123
  14. data/lib/pry/default_commands/gems.rb +9 -4
  15. data/lib/pry/default_commands/input.rb +21 -11
  16. data/lib/pry/default_commands/introspection.rb +79 -88
  17. data/lib/pry/default_commands/ls.rb +165 -176
  18. data/lib/pry/default_commands/shell.rb +8 -8
  19. data/lib/pry/extended_commands/experimental.rb +1 -5
  20. data/lib/pry/extended_commands/user_command_api.rb +17 -5
  21. data/lib/pry/helpers.rb +1 -0
  22. data/lib/pry/helpers/base_helpers.rb +5 -1
  23. data/lib/pry/helpers/command_helpers.rb +22 -241
  24. data/lib/pry/helpers/options_helpers.rb +58 -0
  25. data/lib/pry/helpers/text.rb +10 -4
  26. data/lib/pry/history.rb +1 -1
  27. data/lib/pry/indent.rb +205 -0
  28. data/lib/pry/method.rb +412 -0
  29. data/lib/pry/pry_class.rb +56 -15
  30. data/lib/pry/pry_instance.rb +63 -16
  31. data/lib/pry/rbx_method.rb +20 -0
  32. data/lib/pry/rbx_path.rb +34 -0
  33. data/lib/pry/version.rb +1 -1
  34. data/pry.gemspec +16 -16
  35. data/test/helper.rb +8 -4
  36. data/test/test_command_helpers.rb +1 -69
  37. data/test/test_command_set.rb +29 -28
  38. data/test/test_default_commands/test_documentation.rb +23 -10
  39. data/test/test_default_commands/test_introspection.rb +58 -13
  40. data/test/test_default_commands/test_ls.rb +148 -0
  41. data/test/test_indent.rb +234 -0
  42. data/test/test_input_stack.rb +13 -0
  43. data/test/test_method.rb +291 -0
  44. data/test/test_pry.rb +10 -1
  45. metadata +82 -65
@@ -207,6 +207,15 @@ describe Pry do
207
207
  end
208
208
  end
209
209
 
210
+ describe "valid_expression?" do
211
+ it "should not mutate the input!" do
212
+ clean = "puts <<-FOO\nhi\nFOO\n"
213
+ a = clean.dup
214
+ Pry.new.valid_expression?(a)
215
+ a.should == clean
216
+ end
217
+ end
218
+
210
219
  describe "history arrays" do
211
220
  it 'sets _ to the last result' do
212
221
  res = []
@@ -281,7 +290,7 @@ describe Pry do
281
290
 
282
291
  it "should run the rc file only once" do
283
292
  Pry.config.should_load_rc = true
284
- Pry::RC_FILES << File.expand_path("../testrc", __FILE__)
293
+ 2.times { Pry::RC_FILES << File.expand_path("../testrc", __FILE__) }
285
294
 
286
295
  Pry.start(self, :input => StringIO.new("exit-all\n"), :output => Pry::NullOutput)
287
296
  TEST_RC.should == [0]
metadata CHANGED
@@ -1,100 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pry
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.6.2
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.9.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - John Mair (banisterfiend)
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-27 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2011-10-26 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: ruby_parser
16
- requirement: &70249509140540 !ruby/object:Gem::Requirement
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
17
19
  none: false
18
- requirements:
20
+ requirements:
19
21
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 2.0.5
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.1
22
24
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70249509140540
25
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
26
27
  name: coderay
27
- requirement: &70249509139360 !ruby/object:Gem::Requirement
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
28
30
  none: false
29
- requirements:
31
+ requirements:
30
32
  - - ~>
31
- - !ruby/object:Gem::Version
33
+ - !ruby/object:Gem::Version
32
34
  version: 0.9.8
33
35
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70249509139360
36
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
37
38
  name: slop
38
- requirement: &70249509137680 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
39
41
  none: false
40
- requirements:
42
+ requirements:
41
43
  - - ~>
42
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
43
45
  version: 2.1.0
44
46
  type: :runtime
45
- prerelease: false
46
- version_requirements: *70249509137680
47
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
48
49
  name: method_source
49
- requirement: &70249509136180 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
50
52
  none: false
51
- requirements:
53
+ requirements:
52
54
  - - ~>
53
- - !ruby/object:Gem::Version
55
+ - !ruby/object:Gem::Version
54
56
  version: 0.6.5
55
57
  type: :runtime
56
- prerelease: false
57
- version_requirements: *70249509136180
58
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
59
60
  name: bacon
60
- requirement: &70249509135220 !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
61
63
  none: false
62
- requirements:
64
+ requirements:
63
65
  - - ~>
64
- - !ruby/object:Gem::Version
66
+ - !ruby/object:Gem::Version
65
67
  version: 1.1.0
66
68
  type: :development
67
- prerelease: false
68
- version_requirements: *70249509135220
69
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
70
71
  name: open4
71
- requirement: &70249509134520 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id006 !ruby/object:Gem::Requirement
72
74
  none: false
73
- requirements:
75
+ requirements:
74
76
  - - ~>
75
- - !ruby/object:Gem::Version
77
+ - !ruby/object:Gem::Version
76
78
  version: 1.0.1
77
79
  type: :development
78
- prerelease: false
79
- version_requirements: *70249509134520
80
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
81
82
  name: rake
82
- requirement: &70249509133080 !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id007 !ruby/object:Gem::Requirement
83
85
  none: false
84
- requirements:
86
+ requirements:
85
87
  - - ~>
86
- - !ruby/object:Gem::Version
87
- version: '0.9'
88
+ - !ruby/object:Gem::Version
89
+ version: "0.9"
88
90
  type: :development
89
- prerelease: false
90
- version_requirements: *70249509133080
91
+ version_requirements: *id007
91
92
  description: An IRB alternative and runtime developer console
92
93
  email: jrmair@gmail.com
93
- executables:
94
+ executables:
94
95
  - pry
95
96
  extensions: []
97
+
96
98
  extra_rdoc_files: []
97
- files:
99
+
100
+ files:
98
101
  - .document
99
102
  - .gemtest
100
103
  - .gitignore
@@ -142,12 +145,17 @@ files:
142
145
  - lib/pry/helpers.rb
143
146
  - lib/pry/helpers/base_helpers.rb
144
147
  - lib/pry/helpers/command_helpers.rb
148
+ - lib/pry/helpers/options_helpers.rb
145
149
  - lib/pry/helpers/text.rb
146
150
  - lib/pry/history.rb
147
151
  - lib/pry/history_array.rb
152
+ - lib/pry/indent.rb
153
+ - lib/pry/method.rb
148
154
  - lib/pry/plugins.rb
149
155
  - lib/pry/pry_class.rb
150
156
  - lib/pry/pry_instance.rb
157
+ - lib/pry/rbx_method.rb
158
+ - lib/pry/rbx_path.rb
151
159
  - lib/pry/version.rb
152
160
  - pry.gemspec
153
161
  - test/helper.rb
@@ -161,10 +169,13 @@ files:
161
169
  - test/test_default_commands/test_gems.rb
162
170
  - test/test_default_commands/test_input.rb
163
171
  - test/test_default_commands/test_introspection.rb
172
+ - test/test_default_commands/test_ls.rb
164
173
  - test/test_default_commands/test_shell.rb
165
174
  - test/test_exception_whitelist.rb
166
175
  - test/test_history_array.rb
176
+ - test/test_indent.rb
167
177
  - test/test_input_stack.rb
178
+ - test/test_method.rb
168
179
  - test/test_pry.rb
169
180
  - test/test_pry_history.rb
170
181
  - test/test_pry_output.rb
@@ -174,29 +185,32 @@ files:
174
185
  - wiki/Home.md
175
186
  homepage: http://pry.github.com
176
187
  licenses: []
188
+
177
189
  post_install_message:
178
190
  rdoc_options: []
179
- require_paths:
191
+
192
+ require_paths:
180
193
  - lib
181
- required_ruby_version: !ruby/object:Gem::Requirement
194
+ required_ruby_version: !ruby/object:Gem::Requirement
182
195
  none: false
183
- requirements:
184
- - - ! '>='
185
- - !ruby/object:Gem::Version
186
- version: '0'
187
- required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: "0"
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
201
  none: false
189
- requirements:
190
- - - ! '>='
191
- - !ruby/object:Gem::Version
192
- version: '0'
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: "0"
193
206
  requirements: []
207
+
194
208
  rubyforge_project:
195
- rubygems_version: 1.8.6
209
+ rubygems_version: 1.8.11
196
210
  signing_key:
197
211
  specification_version: 3
198
212
  summary: An IRB alternative and runtime developer console
199
- test_files:
213
+ test_files:
200
214
  - test/helper.rb
201
215
  - test/test_command_helpers.rb
202
216
  - test/test_command_processor.rb
@@ -208,10 +222,13 @@ test_files:
208
222
  - test/test_default_commands/test_gems.rb
209
223
  - test/test_default_commands/test_input.rb
210
224
  - test/test_default_commands/test_introspection.rb
225
+ - test/test_default_commands/test_ls.rb
211
226
  - test/test_default_commands/test_shell.rb
212
227
  - test/test_exception_whitelist.rb
213
228
  - test/test_history_array.rb
229
+ - test/test_indent.rb
214
230
  - test/test_input_stack.rb
231
+ - test/test_method.rb
215
232
  - test/test_pry.rb
216
233
  - test/test_pry_history.rb
217
234
  - test/test_pry_output.rb