pry 0.9.7.1-i386-mswin32 → 0.9.7.2-i386-mswin32
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 +11 -0
- data/lib/pry/indent.rb +2 -2
- data/lib/pry/pry_instance.rb +9 -7
- data/lib/pry/version.rb +1 -1
- data/test/test_pry.rb +10 -1
- metadata +54 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
27/10/2011 version 0.9.7.2 hotfix
|
2
|
+
* fixed indentation for 'super if' and 'ensure', 'next if', etc
|
3
|
+
* refactored Pry#run_command so it can accept an eval_string parameter (so amend-line and so on can work with it)
|
4
|
+
* changed ^D so it no longer resets indent level automatically
|
5
|
+
|
6
|
+
26/10/2011 version 0.9.7.1 hotfix
|
7
|
+
* fixed gem dependecy issues
|
8
|
+
|
1
9
|
25/10/2011 version 0.9.7
|
2
10
|
|
3
11
|
MAJOR NEW FEATURES:
|
@@ -8,6 +16,9 @@ MAJOR NEW FEATURES:
|
|
8
16
|
complete CHANGELOG:
|
9
17
|
* fixed syntax highlighting for object literals
|
10
18
|
* fixed ActiveSupport method-naming conflict with "in?"
|
19
|
+
* added --super option to edit-method, show-method, and friends - making it easier to operate on superclass methods
|
20
|
+
* officially added edit --in to open previous expressions in an editor
|
21
|
+
* whereami now works for REPL-defined code
|
11
22
|
* started using JRuby parser for input validation in JRuby (thanks pangloss!)
|
12
23
|
* fixed bug where ~/.pryrc could be loaded more than once (thanks kelseyjudson!)
|
13
24
|
* added parse_options! helper to pull option parsing out of commands
|
data/lib/pry/indent.rb
CHANGED
@@ -48,11 +48,11 @@ class Pry
|
|
48
48
|
# Tokens that indicate the end of a statement (i.e. that, if they appear
|
49
49
|
# directly before an "if" indicates that that if applies to the same line,
|
50
50
|
# not the next line)
|
51
|
-
STATEMENT_END_TOKENS = IGNORE_TOKENS + [:regexp, :integer, :float]
|
51
|
+
STATEMENT_END_TOKENS = IGNORE_TOKENS + [:regexp, :integer, :float, :keyword]
|
52
52
|
|
53
53
|
# Collection of tokens that should appear dedented even though they
|
54
54
|
# don't affect the surrounding code.
|
55
|
-
MIDWAY_TOKENS = %w(when else elsif rescue)
|
55
|
+
MIDWAY_TOKENS = %w(when else elsif ensure rescue)
|
56
56
|
|
57
57
|
def initialize
|
58
58
|
reset
|
data/lib/pry/pry_instance.rb
CHANGED
@@ -254,6 +254,8 @@ class Pry
|
|
254
254
|
val = ""
|
255
255
|
loop do
|
256
256
|
val = retrieve_line(eval_string, target)
|
257
|
+
|
258
|
+
# eval_string may be mutated by this method
|
257
259
|
process_line(val, eval_string, target)
|
258
260
|
|
259
261
|
break if valid_expression?(eval_string)
|
@@ -302,12 +304,10 @@ class Pry
|
|
302
304
|
|
303
305
|
val = readline(current_prompt + indentation)
|
304
306
|
|
305
|
-
#
|
307
|
+
# invoke handler if we receive EOF character (^D)
|
306
308
|
if !val
|
307
309
|
output.puts ""
|
308
310
|
Pry.config.control_d_handler.call(eval_string, self)
|
309
|
-
|
310
|
-
@indent.reset if Pry.config.auto_indent
|
311
311
|
""
|
312
312
|
else
|
313
313
|
# Change the eval_string into the input encoding (Issue 284)
|
@@ -359,12 +359,14 @@ class Pry
|
|
359
359
|
end
|
360
360
|
|
361
361
|
# Run the specified command.
|
362
|
-
# @param [String] The command (and its params) to execute.
|
363
|
-
# @param [
|
362
|
+
# @param [String] val The command (and its params) to execute.
|
363
|
+
# @param [String] eval_string The current input buffer.
|
364
|
+
# @param [Binding] target The binding to use..
|
365
|
+
# @return [Pry::CommandContext::VOID_VALUE]
|
364
366
|
# @example
|
365
367
|
# pry_instance.run_command("ls -m")
|
366
|
-
def run_command(val, target = binding_stack.last)
|
367
|
-
process_line(val,
|
368
|
+
def run_command(val, eval_string = "", target = binding_stack.last)
|
369
|
+
process_line(val, eval_string, target)
|
368
370
|
Pry::CommandContext::VOID_VALUE
|
369
371
|
end
|
370
372
|
|
data/lib/pry/version.rb
CHANGED
data/test/test_pry.rb
CHANGED
@@ -184,10 +184,19 @@ describe Pry do
|
|
184
184
|
it 'should run a command in a specified context' do
|
185
185
|
b = Pry.binding_for(7)
|
186
186
|
p = Pry.new(:output => StringIO.new)
|
187
|
-
p.run_command("ls -m", b)
|
187
|
+
p.run_command("ls -m", "", b)
|
188
188
|
p.output.string.should =~ /divmod/
|
189
189
|
end
|
190
190
|
|
191
|
+
it 'should run a command that modifies the passed in eval_string' do
|
192
|
+
b = Pry.binding_for(7)
|
193
|
+
p = Pry.new(:output => StringIO.new)
|
194
|
+
eval_string = "def hello\npeter pan\n"
|
195
|
+
p.run_command("amend-line !", eval_string, b)
|
196
|
+
eval_string.should =~ /def hello/
|
197
|
+
eval_string.should.not =~ /peter pan/
|
198
|
+
end
|
199
|
+
|
191
200
|
it 'should run a command in the context of a session' do
|
192
201
|
mock_pry("@session_ivar = 10", "_pry_.run_command('ls')").should =~ /@session_ivar/
|
193
202
|
end
|
metadata
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
- 7
|
10
|
+
- 2
|
11
|
+
version: 0.9.7.2
|
6
12
|
platform: i386-mswin32
|
7
13
|
authors:
|
8
14
|
- John Mair (banisterfiend)
|
@@ -10,7 +16,7 @@ autorequire:
|
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
18
|
|
13
|
-
date: 2011-10-
|
19
|
+
date: 2011-10-28 00:00:00 Z
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: ruby_parser
|
@@ -20,6 +26,11 @@ dependencies:
|
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 1
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 3
|
33
|
+
- 1
|
23
34
|
version: 2.3.1
|
24
35
|
type: :runtime
|
25
36
|
version_requirements: *id001
|
@@ -31,6 +42,11 @@ dependencies:
|
|
31
42
|
requirements:
|
32
43
|
- - ~>
|
33
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 43
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 9
|
49
|
+
- 8
|
34
50
|
version: 0.9.8
|
35
51
|
type: :runtime
|
36
52
|
version_requirements: *id002
|
@@ -42,6 +58,11 @@ dependencies:
|
|
42
58
|
requirements:
|
43
59
|
- - ~>
|
44
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 11
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 1
|
65
|
+
- 0
|
45
66
|
version: 2.1.0
|
46
67
|
type: :runtime
|
47
68
|
version_requirements: *id003
|
@@ -53,6 +74,11 @@ dependencies:
|
|
53
74
|
requirements:
|
54
75
|
- - ~>
|
55
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 9
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
- 6
|
81
|
+
- 7
|
56
82
|
version: 0.6.7
|
57
83
|
type: :runtime
|
58
84
|
version_requirements: *id004
|
@@ -64,6 +90,11 @@ dependencies:
|
|
64
90
|
requirements:
|
65
91
|
- - ~>
|
66
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 19
|
94
|
+
segments:
|
95
|
+
- 1
|
96
|
+
- 1
|
97
|
+
- 0
|
67
98
|
version: 1.1.0
|
68
99
|
type: :development
|
69
100
|
version_requirements: *id005
|
@@ -75,6 +106,11 @@ dependencies:
|
|
75
106
|
requirements:
|
76
107
|
- - ~>
|
77
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 21
|
110
|
+
segments:
|
111
|
+
- 1
|
112
|
+
- 0
|
113
|
+
- 1
|
78
114
|
version: 1.0.1
|
79
115
|
type: :development
|
80
116
|
version_requirements: *id006
|
@@ -86,6 +122,10 @@ dependencies:
|
|
86
122
|
requirements:
|
87
123
|
- - ~>
|
88
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 25
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
- 9
|
89
129
|
version: "0.9"
|
90
130
|
type: :development
|
91
131
|
version_requirements: *id007
|
@@ -97,6 +137,11 @@ dependencies:
|
|
97
137
|
requirements:
|
98
138
|
- - ~>
|
99
139
|
- !ruby/object:Gem::Version
|
140
|
+
hash: 27
|
141
|
+
segments:
|
142
|
+
- 1
|
143
|
+
- 3
|
144
|
+
- 0
|
100
145
|
version: 1.3.0
|
101
146
|
type: :runtime
|
102
147
|
version_requirements: *id008
|
@@ -207,17 +252,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
252
|
requirements:
|
208
253
|
- - ">="
|
209
254
|
- !ruby/object:Gem::Version
|
255
|
+
hash: 3
|
256
|
+
segments:
|
257
|
+
- 0
|
210
258
|
version: "0"
|
211
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
260
|
none: false
|
213
261
|
requirements:
|
214
262
|
- - ">="
|
215
263
|
- !ruby/object:Gem::Version
|
264
|
+
hash: 3
|
265
|
+
segments:
|
266
|
+
- 0
|
216
267
|
version: "0"
|
217
268
|
requirements: []
|
218
269
|
|
219
270
|
rubyforge_project:
|
220
|
-
rubygems_version: 1.8.
|
271
|
+
rubygems_version: 1.8.10
|
221
272
|
signing_key:
|
222
273
|
specification_version: 3
|
223
274
|
summary: An IRB alternative and runtime developer console
|