pry 0.9.12.1pre1-i386-mswin32 → 0.9.12.2-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f87837e2b8e0b17f9f452bfa6c3bb781196379a
4
- data.tar.gz: a6668c23584f85c38d5257656a7e16ba15935d42
3
+ metadata.gz: d6bfd421d14a8dad94a244592b4774bf07f1be99
4
+ data.tar.gz: cf3293f037af9bcab05fed4300ff95a1ff861828
5
5
  SHA512:
6
- metadata.gz: 3b1edec7a5e823bd21ba1e3906da0e631d3a7755152c4103695cf17347dfe672a4db87576f627993ab5c44c8ebc23fa1686afc3e400fdc3f55c54f67f1a88d90
7
- data.tar.gz: 0de5c7841a875e99ea7b274b511d6d211f039c222ebe85636f4726931657a8d882c97bc974730d4581f8bc511e705edd377361bedbb5899351552825b0fa2f51
6
+ metadata.gz: b498f8300f000c7991ff76411e1b1bea2f1191b888773261b4d5ee5c55db2d06ee51a584da5656b5e91aa2535b322cf4ba5ded010b1959f8ef0bbbd8bd7486e8
7
+ data.tar.gz: 08aa73ffd0657256caa7cb7b160969e22ce8bb759727b4a4938903822e9b54b9a9be266dc6afac19ac18b17230c912a7155f6ab493e5caa9f6b2dc496296c7d7
data/CHANGELOG CHANGED
@@ -1,4 +1,12 @@
1
- 12/02/2012 version 0.9.12
1
+ 10/05/2013 version 0.9.12.2 minor fix
2
+ * reload-code (with no args) should reload 'current file', issue #920
3
+
4
+ 21/04/2013 version 0.9.12.1 HOTFIX
5
+ * Fixes #890, workaround for jruby crash related to http://jira.codehaus.org/browse/JRUBY-7114
6
+ * note this fix is just applied to the 0.9.12 tag, not master. However, master has
7
+ this fix applied too.
8
+
9
+ 12/02/2013 version 0.9.12
2
10
  Bug fixes:
3
11
  * Fix major bug where commands broke due to slop looking at ARGV
4
12
  instead of command parameters (#828)
@@ -17,23 +25,23 @@ Features:
17
25
  (displays warning)
18
26
  * show-source/show-doc now indicate when -a option is available.
19
27
 
20
- 20/01/2012 version 0.9.11.4
28
+ 20/01/2013 version 0.9.11.4
21
29
  * fixed pager bug (wouldn't render color codes in some circumstances)
22
30
  * added Pry.last_internal_error, useful for devs debugging commands
23
31
 
24
- 17/01/2012 version 0.9.11.3
32
+ 17/01/2013 version 0.9.11.3
25
33
  * fix Pry.run_command
26
34
  * improve `ls` output
27
35
  * add :requires_gem => "jist" to 'gist' command (so deps can be installed
28
36
  via install-command)
29
37
  * improve help for 'edit' command
30
38
 
31
- 16/01/2012 version 0.9.11.2
39
+ 16/01/2013 version 0.9.11.2
32
40
  * minor bug fix for gist on windows, rescuing Jist::ClipboardError
33
41
  rather than letting the scary error spill out to users and potentially
34
42
  have them think the gist didnt post.
35
43
 
36
- 16/01/2012 version 0.9.11.1
44
+ 16/01/2013 version 0.9.11.1
37
45
  * fixed minor bug in 'gist' command where i neglected to remove
38
46
  a call to a non-existent method (no_arg) which was called when
39
47
  `gist` is invoked with no parameters
@@ -15,21 +15,40 @@ class Pry
15
15
  BANNER
16
16
 
17
17
  def process
18
- code_object = Pry::CodeObject.lookup(obj_name, _pry_)
19
18
 
20
- check_for_reloadability(code_object)
21
- reload_code_object(code_object)
19
+ if obj_name.empty?
20
+ # if no parameters were provided then try to reload the
21
+ # current file (i.e target.eval("__FILE__"))
22
+ reload_current_file
23
+ else
24
+ code_object = Pry::CodeObject.lookup(obj_name, _pry_)
25
+ reload_code_object(code_object)
26
+ end
22
27
  end
23
28
 
24
29
  private
25
30
 
31
+ def current_file
32
+ File.expand_path target.eval("__FILE__")
33
+ end
34
+
35
+ def reload_current_file
36
+ if !File.exists?(current_file)
37
+ raise CommandError, "Current file: #{current_file} cannot be found on disk!"
38
+ end
39
+
40
+ load current_file
41
+ output.puts "The current file: #{current_file} was reloaded!"
42
+ end
43
+
26
44
  def reload_code_object(code_object)
45
+ check_for_reloadability(code_object)
27
46
  load code_object.source_file
28
47
  output.puts "#{obj_name} was reloaded!"
29
48
  end
30
49
 
31
50
  def obj_name
32
- @obj_name ||= args.empty? ? "self" : args.join(" ")
51
+ @obj_name ||= args.join(" ")
33
52
  end
34
53
 
35
54
  def check_for_reloadability(code_object)
data/lib/pry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.9.12.1pre1"
2
+ VERSION = "0.9.12.2"
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.9.12.1pre1
4
+ version: 0.9.12.2
5
5
  platform: i386-mswin32
6
6
  authors:
7
7
  - John Mair (banisterfiend)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-20 00:00:00.000000000 Z
13
+ date: 2013-05-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderay
@@ -352,9 +352,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
352
352
  version: '0'
353
353
  required_rubygems_version: !ruby/object:Gem::Requirement
354
354
  requirements:
355
- - - '>'
355
+ - - '>='
356
356
  - !ruby/object:Gem::Version
357
- version: 1.3.1
357
+ version: '0'
358
358
  requirements: []
359
359
  rubyforge_project:
360
360
  rubygems_version: 2.0.2