rogerdpack-sane 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/_dbg.rb +3 -0
  2. data/lib/sane.rb +8 -3
  3. metadata +7 -6
data/lib/_dbg.rb ADDED
@@ -0,0 +1,3 @@
1
+ # helper file to 'just' pull up a debugger prompt
2
+ require 'sane'
3
+ _dbg # that's all we need
data/lib/sane.rb CHANGED
@@ -9,7 +9,7 @@ class File
9
9
  #
10
10
  # Returns the number of bytes written.
11
11
  #
12
- # CREDIT: Gavin Sinclair
12
+ # CREDIT: facets/Gavin Sinclair
13
13
 
14
14
  def self.write(path, data)
15
15
  File.open(path, "wb") do |file|
@@ -42,8 +42,13 @@ class Object
42
42
  # for 1.8, run gem install ruby-debug
43
43
  def _dbg
44
44
  require 'rubygems'
45
- require 'ruby-debug'
46
- debugger
45
+ require 'pp' # who would want debug without pp? not I
46
+ begin
47
+ require 'ruby-debug'
48
+ debugger
49
+ rescue LoadError => e
50
+ throw "unable to load ruby-debug gem for _dbg... #{e}"
51
+ end
47
52
  end
48
53
 
49
54
  # a method like puts but all on one line--very much like java's println, quite useful
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogerdpack-sane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
- - Roger PacK
7
+ - Roger Pack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-02 00:00:00 -07:00
12
+ date: 2009-05-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "1.1"
24
24
  version:
25
- description: Helper methods for ruby to make it easier to work with
25
+ description: Helper methods for ruby to make it easier to work with out of the box--things that are missing from core but should be there
26
26
  email:
27
27
  - rogerdpack@gmail.com
28
28
  executables: []
@@ -35,8 +35,9 @@ files:
35
35
  - README
36
36
  - lib/sane.rb
37
37
  - lib/enumerable-extra.rb
38
+ - lib/_dbg.rb
38
39
  has_rdoc: false
39
- homepage:
40
+ homepage: http://github.com/rogerdpack/sane_ruby
40
41
  licenses:
41
42
  post_install_message:
42
43
  rdoc_options:
@@ -62,6 +63,6 @@ rubyforge_project:
62
63
  rubygems_version: 1.3.5
63
64
  signing_key:
64
65
  specification_version: 2
65
- summary: Helper methods for ruby to make it easier to work with
66
+ summary: Helper methods for ruby to make it easier to work with out of the box--things that are missing from core but should be there
66
67
  test_files: []
67
68