pry 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 19/2/2010 version 0.5.5
2
+ * Added Pry.run_command
3
+ * More useful error messages
4
+ * Easter eggs (game and cohen-poem)
5
+
1
6
  17/2/2010 version 0.5.0
2
7
  * Use clipped version of Pry.view() for large objects
3
8
  * Exit Pry session on ^d
data/lib/pry.rb CHANGED
@@ -1,20 +1,11 @@
1
- # (C) John Mair (banisterfiend) 2010
1
+ # (C) John Mair (banisterfiend) 2011
2
2
  # MIT License
3
3
 
4
4
  direc = File.dirname(__FILE__)
5
5
 
6
6
  require "method_source"
7
7
  require "readline"
8
- require "#{direc}/pry/version"
9
- require "#{direc}/pry/hooks"
10
- require "#{direc}/pry/print"
11
- require "#{direc}/pry/command_base"
12
- require "#{direc}/pry/commands"
13
- require "#{direc}/pry/prompts"
14
- require "#{direc}/pry/completion"
15
- require "#{direc}/pry/core_extensions"
16
- require "#{direc}/pry/pry_class"
17
- require "#{direc}/pry/pry_instance"
18
-
19
-
20
8
 
9
+ Dir["#{direc}/pry/*.rb"].each do |file|
10
+ require file
11
+ end
data/lib/pry/commands.rb CHANGED
@@ -69,7 +69,7 @@ class Pry
69
69
  end
70
70
 
71
71
  command "version", "Show Pry version." do
72
- output.puts "Pry version: #{Pry::VERSION}"
72
+ output.puts "Pry version: #{Pry::VERSION} on Ruby #{RUBY_VERSION}."
73
73
  end
74
74
 
75
75
  command "exit-all", "End all nested Pry sessions." do
@@ -343,6 +343,7 @@ e.g show-doc hello_method
343
343
 
344
344
  output.puts "--\nFrom #{file} @ line ~#{line}:\n--"
345
345
  output.puts doc
346
+ doc
346
347
  end
347
348
 
348
349
  command "show-method", "Show the source for METH. Type `show-method --help` for more info." do |*args|
@@ -384,6 +385,11 @@ e.g: show-method hello_method
384
385
  meth = target.eval("method(:#{meth_name})")
385
386
  end
386
387
  rescue
388
+ target_self = target.eval('self')
389
+ if !options[:M]&& target_self.is_a?(Module) &&
390
+ target_self.method_defined?(meth_name)
391
+ output.puts "Did you mean: show-method -M #{meth_name} ?"
392
+ end
387
393
  output.puts "Invalid method name: #{meth_name}. Type `show-method --help` for help"
388
394
  next
389
395
  end
data/lib/pry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ruby_parser
17
- requirement: &17267820 !ruby/object:Gem::Requirement
17
+ requirement: &17241432 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 2.0.5
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *17267820
25
+ version_requirements: *17241432
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: method_source
28
- requirement: &17267508 !ruby/object:Gem::Requirement
28
+ requirement: &17241156 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *17267508
36
+ version_requirements: *17241156
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bacon
39
- requirement: &17267196 !ruby/object:Gem::Requirement
39
+ requirement: &17124828 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 1.1.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *17267196
47
+ version_requirements: *17124828
48
48
  description: attach an irb-like session to any object at runtime
49
49
  email: jrmair@gmail.com
50
50
  executables: []