pry 0.9.8.3-i386-mswin32 → 0.9.8.4-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,8 +1,13 @@
1
+ 6/3/2012 version 0.9.8.4 major bugfix
2
+ * ~/.pry_history wasnt being created (if it did not exist)! FIXED
3
+ * `hist --save` saved colors! FIXED
4
+ * added Pry#add_sticky_local API for adding sticky locals to individual pry instances
5
+
1
6
  2/3/2012 version 0.9.8.3 minor update
2
7
  * various tweaks to improve rbx support
3
8
  * commands now support optional block arguments
4
9
  * much improved help command
5
- * updated method_source dependency
10
+ * updated method_source dependencya
6
11
  * added wtf command
7
12
  * jruby should now work in windows (though without color)
8
13
 
@@ -1,9 +1,5 @@
1
1
  [![Build Status](https://secure.travis-ci.org/pry/pry.png)](http://travis-ci.org/pry/pry)
2
2
 
3
- **RBX (Rubinius) users**
4
-
5
- Please report bugs that you find because we are working very hard right now to make Pry more RBX friendly and it would be great to hear of your problems with Pry in RBX. File a ticket if you run into problems with Pry on RBX so we can try to fix it for our next major release.
6
-
7
3
  <center>
8
4
  ![Alt text](http://dl.dropbox.com/u/26521875/pry_logo_350.png)
9
5
 
@@ -309,7 +309,7 @@ class Pry
309
309
  #
310
310
  # @return [String]
311
311
  def raw
312
- @lines.map(&:first).join("\n")
312
+ @lines.map(&:first).join("\n") + "\n"
313
313
  end
314
314
 
315
315
  # Return the number of lines stored.
@@ -86,7 +86,7 @@ class Pry
86
86
 
87
87
  output.puts "Saving history in #{file_name}..."
88
88
 
89
- File.open(file_name, 'w') { |f| f.write(@history.to_s) }
89
+ File.open(file_name, 'w') { |f| f.write(@history.raw) }
90
90
 
91
91
  output.puts "History saved."
92
92
  end
@@ -178,7 +178,7 @@ class Pry
178
178
 
179
179
  def format_locals(locals)
180
180
  locals.sort_by(&:downcase).map do |name|
181
- if _pry_.special_locals.include?(name.to_sym)
181
+ if _pry_.sticky_locals.include?(name.to_sym)
182
182
  color(:pry_var, name)
183
183
  else
184
184
  color(:local_var, name)
@@ -2,11 +2,6 @@ class Pry
2
2
  module ExtendedCommands
3
3
 
4
4
  Experimental = Pry::CommandSet.new do
5
-
6
- command "reload-method", "Reload the source specifically for a method", :requires_gem => "method_reload" do |meth_name|
7
- meth = get_method_or_raise(meth_name, target, {}, :omit_help)
8
- meth.reload
9
- end
10
5
  end
11
6
  end
12
7
  end
@@ -68,9 +68,8 @@ class Pry
68
68
  private
69
69
  # The default loader. Yields lines from `Pry.history.config.file`.
70
70
  def read_from_file
71
- history_file = File.expand_path(Pry.config.history.file)
72
-
73
71
  begin
72
+ history_file = File.expand_path(Pry.config.history.file)
74
73
  if File.exists?(history_file)
75
74
  File.foreach(history_file) { |line| yield(line) }
76
75
  end
@@ -86,10 +85,13 @@ class Pry
86
85
  def write_to_file(lines)
87
86
  history_file = File.expand_path(Pry.config.history.file)
88
87
 
89
- if File.writable?(history_file)
88
+ begin
90
89
  File.open(history_file, 'a') do |f|
91
90
  lines.each { |ln| f.puts ln }
92
91
  end
92
+ rescue Errno::EACCES => error
93
+ # We should probably create an option Pry.show_warnings?!?!?!
94
+ warn 'Unable to write to your history file, history not saved'
93
95
  end
94
96
  end
95
97
 
@@ -111,7 +111,7 @@ class Pry
111
111
  # @param [Binding] b The binding to set the local on.
112
112
  # @return [Object] The value the local was set to.
113
113
  def inject_local(name, value, b)
114
- Thread.current[:__pry_local__] = value
114
+ Thread.current[:__pry_local__] = value.is_a?(Proc) ? value.call : value
115
115
  b.eval("#{name} = Thread.current[:__pry_local__]")
116
116
  ensure
117
117
  Thread.current[:__pry_local__] = nil
@@ -128,36 +128,33 @@ class Pry
128
128
  @output_array = Pry::HistoryArray.new(size)
129
129
  end
130
130
 
131
- # Make sure special locals exist at start of session
132
- def initialize_special_locals(target)
133
- inject_local("_in_", @input_array, target)
134
- inject_local("_out_", @output_array, target)
135
- inject_local("_pry_", self, target)
136
- inject_local("_ex_", last_exception, target)
137
- inject_local("_file_", last_file, target)
138
- inject_local("_dir_", last_dir, target)
139
-
140
- # without this line we get 1 test failure, ask Mon_Ouie
141
- set_last_result(nil, target)
142
- inject_local("_", nil, target)
143
- end
144
- private :initialize_special_locals
145
-
146
- def inject_special_locals(target)
147
- special_locals.each_pair do |name, value|
131
+ # Inject all the sticky locals into the `target` binding.
132
+ # @param [Binding] target
133
+ def inject_sticky_locals(target)
134
+ sticky_locals.each_pair do |name, value|
148
135
  inject_local(name, value, target)
149
136
  end
150
137
  end
151
138
 
152
- def special_locals
153
- {
154
- :_in_ => @input_array,
155
- :_out_ => @output_array,
139
+ # Add a sticky local to this Pry instance.
140
+ # A sticky local is a local that persists between all bindings in a session.
141
+ # @param [Symbol] name The name of the sticky local.
142
+ # @yield The block that defines the content of the local. The local
143
+ # will be refreshed at each tick of the repl loop.
144
+ def add_sticky_local(name, &block)
145
+ sticky_locals[name] = block
146
+ end
147
+
148
+ # @return [Hash] The currently defined sticky locals.
149
+ def sticky_locals
150
+ @sticky_locals ||= {
151
+ :_in_ => proc { @input_array },
152
+ :_out_ => proc { @output_array },
156
153
  :_pry_ => self,
157
- :_ex_ => last_exception,
158
- :_file_ => last_file,
159
- :_dir_ => last_dir,
160
- :_ => last_result
154
+ :_ex_ => proc { last_exception },
155
+ :_file_ => proc { last_file },
156
+ :_dir_ => proc { last_dir },
157
+ :_ => proc { last_result }
161
158
  }
162
159
  end
163
160
 
@@ -165,7 +162,8 @@ class Pry
165
162
  # @param [Binding] target The target binding for the session.
166
163
  def repl_prologue(target)
167
164
  exec_hook :before_session, output, target, self
168
- initialize_special_locals(target)
165
+ set_last_result(nil, target)
166
+
169
167
 
170
168
  @input_array << nil # add empty input so _in_ and _out_ match
171
169
 
@@ -244,7 +242,7 @@ class Pry
244
242
 
245
243
  # It's not actually redundant to inject them continually as we may have
246
244
  # moved into the scope of a new Binding (e.g the user typed `cd`)
247
- inject_special_locals(target)
245
+ inject_sticky_locals(target)
248
246
 
249
247
  code = r(target)
250
248
 
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.9.8.3"
2
+ VERSION = "0.9.8.4"
3
3
  end
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "pry"
5
- s.version = "0.9.8.3"
5
+ s.version = "0.9.8.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["John Mair (banisterfiend)"]
9
- s.date = "2012-03-02"
9
+ s.date = "2012-03-06"
10
10
  s.description = "An IRB alternative and runtime developer console"
11
11
  s.email = "jrmair@gmail.com"
12
12
  s.executables = ["pry"]
13
- s.files = [".document", ".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "CONTRIBUTORS", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "TODO", "bin/pry", "examples/example_basic.rb", "examples/example_command_override.rb", "examples/example_commands.rb", "examples/example_hooks.rb", "examples/example_image_edit.rb", "examples/example_input.rb", "examples/example_input2.rb", "examples/example_output.rb", "examples/example_print.rb", "examples/example_prompt.rb", "examples/helper.rb", "lib/pry.rb", "lib/pry/cli.rb", "lib/pry/code.rb", "lib/pry/command.rb", "lib/pry/command_set.rb", "lib/pry/commands.rb", "lib/pry/completion.rb", "lib/pry/config.rb", "lib/pry/core_extensions.rb", "lib/pry/custom_completions.rb", "lib/pry/default_commands/cd.rb", "lib/pry/default_commands/commands.rb", "lib/pry/default_commands/context.rb", "lib/pry/default_commands/easter_eggs.rb", "lib/pry/default_commands/editing.rb", "lib/pry/default_commands/gems.rb", "lib/pry/default_commands/help.rb", "lib/pry/default_commands/hist.rb", "lib/pry/default_commands/input_and_output.rb", "lib/pry/default_commands/introspection.rb", "lib/pry/default_commands/ls.rb", "lib/pry/default_commands/misc.rb", "lib/pry/default_commands/navigating_pry.rb", "lib/pry/extended_commands/experimental.rb", "lib/pry/helpers.rb", "lib/pry/helpers/base_helpers.rb", "lib/pry/helpers/command_helpers.rb", "lib/pry/helpers/options_helpers.rb", "lib/pry/helpers/text.rb", "lib/pry/history.rb", "lib/pry/history_array.rb", "lib/pry/hooks.rb", "lib/pry/indent.rb", "lib/pry/method.rb", "lib/pry/plugins.rb", "lib/pry/pry_class.rb", "lib/pry/pry_instance.rb", "lib/pry/rbx_method.rb", "lib/pry/rbx_path.rb", "lib/pry/version.rb", "lib/pry/wrapped_module.rb", "man/pry.1", "man/pry.1.html", "man/pry.1.ronn", "pry.gemspec", "test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_help.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad", "wiki/Customizing-pry.md", "wiki/Home.md"]
13
+ s.files = [".document", ".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "CONTRIBUTORS", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "TODO", "bin/pry", "examples/example_basic.rb", "examples/example_command_override.rb", "examples/example_commands.rb", "examples/example_hooks.rb", "examples/example_image_edit.rb", "examples/example_input.rb", "examples/example_input2.rb", "examples/example_output.rb", "examples/example_print.rb", "examples/example_prompt.rb", "examples/helper.rb", "lib/pry.rb", "lib/pry/cli.rb", "lib/pry/code.rb", "lib/pry/command.rb", "lib/pry/command_set.rb", "lib/pry/commands.rb", "lib/pry/completion.rb", "lib/pry/config.rb", "lib/pry/core_extensions.rb", "lib/pry/custom_completions.rb", "lib/pry/default_commands/cd.rb", "lib/pry/default_commands/commands.rb", "lib/pry/default_commands/context.rb", "lib/pry/default_commands/easter_eggs.rb", "lib/pry/default_commands/editing.rb", "lib/pry/default_commands/gems.rb", "lib/pry/default_commands/help.rb", "lib/pry/default_commands/hist.rb", "lib/pry/default_commands/input_and_output.rb", "lib/pry/default_commands/introspection.rb", "lib/pry/default_commands/ls.rb", "lib/pry/default_commands/misc.rb", "lib/pry/default_commands/navigating_pry.rb", "lib/pry/extended_commands/experimental.rb", "lib/pry/helpers.rb", "lib/pry/helpers/base_helpers.rb", "lib/pry/helpers/command_helpers.rb", "lib/pry/helpers/options_helpers.rb", "lib/pry/helpers/text.rb", "lib/pry/history.rb", "lib/pry/history_array.rb", "lib/pry/hooks.rb", "lib/pry/indent.rb", "lib/pry/method.rb", "lib/pry/plugins.rb", "lib/pry/pry_class.rb", "lib/pry/pry_instance.rb", "lib/pry/rbx_method.rb", "lib/pry/rbx_path.rb", "lib/pry/version.rb", "lib/pry/wrapped_module.rb", "man/pry.1", "man/pry.1.html", "man/pry.1.ronn", "pry.gemspec", "test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_help.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_sticky_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad", "wiki/Customizing-pry.md", "wiki/Home.md"]
14
14
  s.homepage = "http://pry.github.com"
15
15
  s.require_paths = ["lib"]
16
16
  s.rubygems_version = "1.8.16"
17
17
  s.summary = "An IRB alternative and runtime developer console"
18
- s.test_files = ["test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_help.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad"]
18
+ s.test_files = ["test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_help.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_sticky_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad"]
19
19
 
20
20
  if s.respond_to? :specification_version then
21
21
  s.specification_version = 3
@@ -0,0 +1,75 @@
1
+ require 'helper'
2
+
3
+ describe "Sticky locals (_file_ and friends)" do
4
+ it 'locals should all exist upon initialization' do
5
+ mock_pry("_file_").should.not =~ /NameError/
6
+ mock_pry("_dir_").should.not =~ /NameError/
7
+ mock_pry("_ex_").should.not =~ /NameError/
8
+ mock_pry("_pry_").should.not =~ /NameError/
9
+ mock_pry("_").should.not =~ /NameError/
10
+ end
11
+
12
+ it 'locals should still exist after cd-ing into a new context' do
13
+ mock_pry("cd 0", "_file_").should.not =~ /NameError/
14
+ mock_pry("cd 0","_dir_").should.not =~ /NameError/
15
+ mock_pry("cd 0","_ex_").should.not =~ /NameError/
16
+ mock_pry("cd 0","_pry_").should.not =~ /NameError/
17
+ mock_pry("cd 0","_").should.not =~ /NameError/
18
+ end
19
+
20
+ it 'locals should keep value after cd-ing(_pry_ and _ex_)' do
21
+ mock_pry("$x = _pry_;", "cd 0", "_pry_ == $x").should =~ /true/
22
+ mock_pry("error blah;", "$x = _ex_;", "cd 0", "_ex_ == $x").should =~ /true/
23
+ end
24
+
25
+ it 'locals should keep value after cd-ing (_file_ and _dir_)' do
26
+ Pry.commands.command "file-and-dir-test" do
27
+ set_file_and_dir_locals("/blah/ostrich.rb")
28
+ end
29
+
30
+ mock_pry("file-and-dir-test", "cd 0", "_file_").should =~ /\/blah\/ostrich\.rb/
31
+ a = mock_pry("file-and-dir-test", "cd 0", "_dir_").should =~ /\/blah/
32
+ Pry.commands.delete "file-and-dir-test"
33
+ end
34
+
35
+ describe "User defined sticky locals, Pry#add_sticky_local()" do
36
+ it 'should create a new sticky local' do
37
+ o = Object.new
38
+ pi = Pry.new
39
+ pi.add_sticky_local(:test_local) { :test_value }
40
+ pi.input, pi.output = InputTester.new("@value = test_local", "exit-all"), StringIO.new
41
+ pi.repl(o)
42
+
43
+ o.instance_variable_get(:@value).should == :test_value
44
+ end
45
+
46
+ it 'should still exist after cd-ing into new binding' do
47
+ o = Object.new
48
+ o2 = Object.new
49
+ o.instance_variable_set(:@o2, o2)
50
+ pi = Pry.new
51
+ pi.add_sticky_local(:test_local) { :test_value }
52
+ pi.input = InputTester.new("cd @o2\n",
53
+ "@value = test_local", "exit-all")
54
+ pi.output = StringIO.new
55
+ pi.repl(o)
56
+
57
+ o2.instance_variable_get(:@value).should == :test_value
58
+ end
59
+
60
+ it 'should provide different values for successive block invocations' do
61
+ o = Object.new
62
+ pi = Pry.new
63
+ v = [1, 2]
64
+ pi.add_sticky_local(:test_local) { v.shift }
65
+ pi.input = InputTester.new("@value1 = test_local",
66
+ "@value2 = test_local", "exit-all")
67
+ pi.output = StringIO.new
68
+ pi.repl(o)
69
+
70
+ o.instance_variable_get(:@value1).should == 1
71
+ o.instance_variable_get(:@value2).should == 2
72
+ end
73
+ end
74
+
75
+ end
metadata CHANGED
@@ -1,106 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pry
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.8.4
4
5
  prerelease:
5
- version: 0.9.8.3
6
6
  platform: i386-mswin32
7
- authors:
7
+ authors:
8
8
  - John Mair (banisterfiend)
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-02 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: coderay
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70279431934120 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
23
21
  version: 1.0.5
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: slop
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70279431934120
25
+ - !ruby/object:Gem::Dependency
26
+ name: slop
27
+ requirement: &70279431933580 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
34
32
  version: 2.4.4
35
33
  - - <
36
- - !ruby/object:Gem::Version
37
- version: "3"
34
+ - !ruby/object:Gem::Version
35
+ version: '3'
38
36
  type: :runtime
39
- version_requirements: *id002
40
- - !ruby/object:Gem::Dependency
41
- name: method_source
42
37
  prerelease: false
43
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ version_requirements: *70279431933580
39
+ - !ruby/object:Gem::Dependency
40
+ name: method_source
41
+ requirement: &70279431932820 !ruby/object:Gem::Requirement
44
42
  none: false
45
- requirements:
43
+ requirements:
46
44
  - - ~>
47
- - !ruby/object:Gem::Version
45
+ - !ruby/object:Gem::Version
48
46
  version: 0.7.1
49
47
  type: :runtime
50
- version_requirements: *id003
51
- - !ruby/object:Gem::Dependency
52
- name: bacon
53
48
  prerelease: false
54
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ version_requirements: *70279431932820
50
+ - !ruby/object:Gem::Dependency
51
+ name: bacon
52
+ requirement: &70279431932100 !ruby/object:Gem::Requirement
55
53
  none: false
56
- requirements:
54
+ requirements:
57
55
  - - ~>
58
- - !ruby/object:Gem::Version
59
- version: "1.1"
56
+ - !ruby/object:Gem::Version
57
+ version: '1.1'
60
58
  type: :development
61
- version_requirements: *id004
62
- - !ruby/object:Gem::Dependency
63
- name: open4
64
59
  prerelease: false
65
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ version_requirements: *70279431932100
61
+ - !ruby/object:Gem::Dependency
62
+ name: open4
63
+ requirement: &70279431931640 !ruby/object:Gem::Requirement
66
64
  none: false
67
- requirements:
65
+ requirements:
68
66
  - - ~>
69
- - !ruby/object:Gem::Version
70
- version: "1.3"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
71
69
  type: :development
72
- version_requirements: *id005
73
- - !ruby/object:Gem::Dependency
74
- name: rake
75
70
  prerelease: false
76
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ version_requirements: *70279431931640
72
+ - !ruby/object:Gem::Dependency
73
+ name: rake
74
+ requirement: &70279431931100 !ruby/object:Gem::Requirement
77
75
  none: false
78
- requirements:
76
+ requirements:
79
77
  - - ~>
80
- - !ruby/object:Gem::Version
81
- version: "0.9"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.9'
82
80
  type: :development
83
- version_requirements: *id006
84
- - !ruby/object:Gem::Dependency
85
- name: win32console
86
81
  prerelease: false
87
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ version_requirements: *70279431931100
83
+ - !ruby/object:Gem::Dependency
84
+ name: win32console
85
+ requirement: &70279431930640 !ruby/object:Gem::Requirement
88
86
  none: false
89
- requirements:
87
+ requirements:
90
88
  - - ~>
91
- - !ruby/object:Gem::Version
92
- version: "1.3"
89
+ - !ruby/object:Gem::Version
90
+ version: '1.3'
93
91
  type: :runtime
94
- version_requirements: *id007
92
+ prerelease: false
93
+ version_requirements: *70279431930640
95
94
  description: An IRB alternative and runtime developer console
96
95
  email: jrmair@gmail.com
97
- executables:
96
+ executables:
98
97
  - pry
99
98
  extensions: []
100
-
101
99
  extra_rdoc_files: []
102
-
103
- files:
100
+ files:
104
101
  - .document
105
102
  - .gemtest
106
103
  - .gitignore
@@ -196,7 +193,7 @@ files:
196
193
  - test/test_pry_defaults.rb
197
194
  - test/test_pry_history.rb
198
195
  - test/test_pry_output.rb
199
- - test/test_special_locals.rb
196
+ - test/test_sticky_locals.rb
200
197
  - test/test_syntax_checking.rb
201
198
  - test/test_wrapped_module.rb
202
199
  - test/testrc
@@ -205,32 +202,29 @@ files:
205
202
  - wiki/Home.md
206
203
  homepage: http://pry.github.com
207
204
  licenses: []
208
-
209
205
  post_install_message:
210
206
  rdoc_options: []
211
-
212
- require_paths:
207
+ require_paths:
213
208
  - lib
214
- required_ruby_version: !ruby/object:Gem::Requirement
209
+ required_ruby_version: !ruby/object:Gem::Requirement
215
210
  none: false
216
- requirements:
217
- - - ">="
218
- - !ruby/object:Gem::Version
219
- version: "0"
220
- required_rubygems_version: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ! '>='
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ required_rubygems_version: !ruby/object:Gem::Requirement
221
216
  none: false
222
- requirements:
223
- - - ">="
224
- - !ruby/object:Gem::Version
225
- version: "0"
217
+ requirements:
218
+ - - ! '>='
219
+ - !ruby/object:Gem::Version
220
+ version: '0'
226
221
  requirements: []
227
-
228
222
  rubyforge_project:
229
- rubygems_version: 1.8.11
223
+ rubygems_version: 1.8.16
230
224
  signing_key:
231
225
  specification_version: 3
232
226
  summary: An IRB alternative and runtime developer console
233
- test_files:
227
+ test_files:
234
228
  - test/helper.rb
235
229
  - test/test_cli.rb
236
230
  - test/test_code.rb
@@ -257,7 +251,7 @@ test_files:
257
251
  - test/test_pry_defaults.rb
258
252
  - test/test_pry_history.rb
259
253
  - test/test_pry_output.rb
260
- - test/test_special_locals.rb
254
+ - test/test_sticky_locals.rb
261
255
  - test/test_syntax_checking.rb
262
256
  - test/test_wrapped_module.rb
263
257
  - test/testrc
@@ -1,35 +0,0 @@
1
- require 'helper'
2
-
3
- describe "Special locals (_file_ and friends)" do
4
- it 'locals should all exist upon initialization' do
5
- mock_pry("_file_").should.not =~ /NameError/
6
- mock_pry("_dir_").should.not =~ /NameError/
7
- mock_pry("_ex_").should.not =~ /NameError/
8
- mock_pry("_pry_").should.not =~ /NameError/
9
- mock_pry("_").should.not =~ /NameError/
10
- end
11
-
12
- it 'locals should still exist after cd-ing into a new context' do
13
- mock_pry("cd 0", "_file_").should.not =~ /NameError/
14
- mock_pry("cd 0","_dir_").should.not =~ /NameError/
15
- mock_pry("cd 0","_ex_").should.not =~ /NameError/
16
- mock_pry("cd 0","_pry_").should.not =~ /NameError/
17
- mock_pry("cd 0","_").should.not =~ /NameError/
18
- end
19
-
20
- it 'locals should keep value after cd-ing(_pry_ and _ex_)' do
21
- mock_pry("$x = _pry_;", "cd 0", "_pry_ == $x").should =~ /true/
22
- mock_pry("error blah;", "$x = _ex_;", "cd 0", "_ex_ == $x").should =~ /true/
23
- end
24
-
25
- it 'locals should keep value after cd-ing (_file_ and _dir_)' do
26
- Pry.commands.command "file-and-dir-test" do
27
- set_file_and_dir_locals("/blah/ostrich.rb")
28
- end
29
-
30
- mock_pry("file-and-dir-test", "cd 0", "_file_").should =~ /\/blah\/ostrich\.rb/
31
- a = mock_pry("file-and-dir-test", "cd 0", "_dir_").should =~ /\/blah/
32
- Pry.commands.delete "file-and-dir-test"
33
- end
34
-
35
- end