pry 0.9.12.1pre1-java → 0.9.12.2-java

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: 1f878ba857c1285ea50000010126adac6cc81557
4
- data.tar.gz: a18924f343e5af30d738abfb75b44758a88ae055
3
+ metadata.gz: b78a5d0b8a29388dec9723a0b2af86b0c8aeffc8
4
+ data.tar.gz: cf3293f037af9bcab05fed4300ff95a1ff861828
5
5
  SHA512:
6
- metadata.gz: de73ac99dd09ea156835660e10a3d8811390b9253b02e8b8cb33623b6b8a490fb8b4b3a61406f5252ebb9308624a7685dc190d95c9631a34fd1cc44169893451
7
- data.tar.gz: ffd25d77324658129f8a47d55cab97e2ab5bb8c05719e42b3c2c1501d36ff262836f9aeebad2fc9969c8a48fb63c0d0b18161507bcec3333e253ad43f1d6bfaf
6
+ metadata.gz: 4b19cbcf53f412672ce9d45e03ca926361036f72e7f2357b4f10090677aad30d02496319f6978d2252a0b7fa22571a677d2022cd96fccce0eb744a90afa7a6fb
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)
@@ -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: java
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