letters 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  **Letters** is a little alphabetical library that makes sophisticated debugging easy & fun.
2
2
 
3
+ *Update*: Until I build a Rails-specific gem, I'm changing letters to patch Object by default. To only patch core classes, `require "letters/patch/core"`.
4
+
3
5
  For many of us, troubleshooting begins and ends with the `print` statement. Others recruit the debugger, too. (Maybe you use `print` statements to look at changes over time but the debugger to focus on a small bit of code.) These tools are good, but they are the lowest level of how we can debug in Ruby. Letters leverages `print`, the debugger, control transfer, computer beeps, and other side-effects for more well-rounded visibility into code and state.
4
6
 
5
7
  ### Installation ###
data/lib/letters.rb CHANGED
@@ -1,4 +1,4 @@
1
- require "letters/patch"
1
+ require "letters/patch/object"
2
2
  require "set"
3
3
 
4
4
  module Letters
@@ -10,15 +10,3 @@ module Letters
10
10
  @@object if defined?(@@object)
11
11
  end
12
12
  end
13
-
14
- Letters.patch! Numeric
15
- Letters.patch! Symbol
16
- Letters.patch! String
17
- Letters.patch! Regexp
18
- Letters.patch! Array
19
- Letters.patch! Set
20
- Letters.patch! Hash
21
- Letters.patch! Range
22
- Letters.patch! NilClass
23
- Letters.patch! TrueClass
24
- Letters.patch! FalseClass
@@ -30,7 +30,7 @@ module Letters
30
30
  def c(opts={})
31
31
  tap do
32
32
  Helpers.message opts
33
- Helpers.out Helpers.pretty_callstack(caller 4), opts
33
+ Helpers.out caller(4), opts
34
34
  end
35
35
  end
36
36
 
@@ -0,0 +1,13 @@
1
+ require "letters/patch"
2
+
3
+ Letters.patch! Numeric
4
+ Letters.patch! Symbol
5
+ Letters.patch! String
6
+ Letters.patch! Regexp
7
+ Letters.patch! Array
8
+ Letters.patch! Set
9
+ Letters.patch! Hash
10
+ Letters.patch! Range
11
+ Letters.patch! NilClass
12
+ Letters.patch! TrueClass
13
+ Letters.patch! FalseClass
@@ -0,0 +1,4 @@
1
+ require "letters/patch"
2
+
3
+ Letters.patch! Object
4
+ Letters.patch! NilClass
@@ -1,3 +1,3 @@
1
1
  module Letters
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-25 00:00:00.000000000Z
12
+ date: 2012-09-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
16
- requirement: &70179670061620 !ruby/object:Gem::Requirement
16
+ requirement: &70213291603560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70179670061620
24
+ version_requirements: *70213291603560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70179670061180 !ruby/object:Gem::Requirement
27
+ requirement: &70213291603120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70179670061180
35
+ version_requirements: *70213291603120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: xml-simple
38
- requirement: &70179670060760 !ruby/object:Gem::Requirement
38
+ requirement: &70213291602700 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70179670060760
46
+ version_requirements: *70213291602700
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: colorize
49
- requirement: &70179670060340 !ruby/object:Gem::Requirement
49
+ requirement: &70213291602280 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70179670060340
57
+ version_requirements: *70213291602280
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: debugger
60
- requirement: &70179670059920 !ruby/object:Gem::Requirement
60
+ requirement: &70213291601860 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70179670059920
68
+ version_requirements: *70213291601860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: timecop
71
- requirement: &70179670091740 !ruby/object:Gem::Requirement
71
+ requirement: &70213291601440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70179670091740
79
+ version_requirements: *70213291601440
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70179670091320 !ruby/object:Gem::Requirement
82
+ requirement: &70213291601020 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70179670091320
90
+ version_requirements: *70213291601020
91
91
  description: Letters brings Ruby debugging into the 21st century. It leverages print,
92
92
  the debugger, control transfer, even computer beeps to let you see into your code's
93
93
  state.
@@ -101,6 +101,8 @@ files:
101
101
  - lib/letters/empty_error.rb
102
102
  - lib/letters/helpers.rb
103
103
  - lib/letters/nil_error.rb
104
+ - lib/letters/patch/core.rb
105
+ - lib/letters/patch/object.rb
104
106
  - lib/letters/patch.rb
105
107
  - lib/letters/time_formats.rb
106
108
  - lib/letters/version.rb