letters 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/COPYING CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  **Letters** is a little alphabetical library that makes sophisticated debugging easy & fun.
2
2
 
3
- *Quick note about Rails*: 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"`. For Rails support, `require "letters/patch/rails"`. Make sure to do this after `Bundler.require` in `application.rb`.
3
+ *Quick note about Rails*: 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"`. For Rails support, `require "letters/patch/rails"`. Make sure to do this after `Bundler.require` in `application.rb`.
4
4
 
5
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.
6
6
 
@@ -32,7 +32,7 @@ That's simple enough, but not really useful. Things get interesting when you're
32
32
  words.grep(/interesting/).
33
33
  map(&:downcase).
34
34
  group_by(&:length).
35
- values_at(5, 10)
35
+ values_at(5, 10).
36
36
  slice(0..2).
37
37
  join(", ")
38
38
  ```
@@ -43,7 +43,7 @@ If I want to know the state of your code after lines 3 and 5, all I have to do i
43
43
  words.grep(/interesting/).
44
44
  map(&:downcase).
45
45
  group_by(&:length).p.
46
- values_at(5, 10)
46
+ values_at(5, 10).
47
47
  slice(0..2).p.
48
48
  join(", ")
49
49
  ```
@@ -1,3 +1,3 @@
1
1
  module Letters
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -0,0 +1,16 @@
1
+ module Letters
2
+ describe "core patches" do
3
+ it "adds methods to each of the specified core classes" do
4
+ require "letters/patch/core"
5
+
6
+ instances = [1, "string", :symbol,
7
+ /regexp/, [], Set.new,
8
+ {}, 1..3, nil,
9
+ true, false]
10
+
11
+ instances.each do |instance|
12
+ instance.should respond_to(:a)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,23 @@
1
+ class ActiveRecord
2
+ class Base; end
3
+ end
4
+
5
+ class ActionController
6
+ class Base; end
7
+ end
8
+
9
+ class ActionMailer
10
+ class Base; end
11
+ end
12
+
13
+ describe "Rails patches" do
14
+ it "adds methods to each of the specified core classes" do
15
+ require "letters/patch/core"
16
+
17
+ [ActiveRecord::Base,
18
+ ActionController::Base,
19
+ ActionMailer::Base].each do |klass|
20
+ klass.new.should respond_to(:a)
21
+ end
22
+ end
23
+ 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.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
16
- requirement: &70300877008800 !ruby/object:Gem::Requirement
16
+ requirement: &70104704631580 !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: *70300877008800
24
+ version_requirements: *70104704631580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70300877008360 !ruby/object:Gem::Requirement
27
+ requirement: &70104704631140 !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: *70300877008360
35
+ version_requirements: *70104704631140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: xml-simple
38
- requirement: &70300877007940 !ruby/object:Gem::Requirement
38
+ requirement: &70104692351160 !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: *70300877007940
46
+ version_requirements: *70104692351160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: colorize
49
- requirement: &70300877007520 !ruby/object:Gem::Requirement
49
+ requirement: &70104692350740 !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: *70300877007520
57
+ version_requirements: *70104692350740
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: debugger
60
- requirement: &70300877007100 !ruby/object:Gem::Requirement
60
+ requirement: &70104692350320 !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: *70300877007100
68
+ version_requirements: *70104692350320
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: timecop
71
- requirement: &70300877006680 !ruby/object:Gem::Requirement
71
+ requirement: &70104692349900 !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: *70300877006680
79
+ version_requirements: *70104692349900
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70300877006260 !ruby/object:Gem::Requirement
82
+ requirement: &70104692349480 !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: *70300877006260
90
+ version_requirements: *70104692349480
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.
@@ -113,10 +113,12 @@ files:
113
113
  - Gemfile
114
114
  - spec/letters/core_ext_spec.rb
115
115
  - spec/letters/helpers_spec.rb
116
+ - spec/letters/patch/core_spec.rb
117
+ - spec/letters/patch/rails_spec.rb
116
118
  - spec/letters/patch_spec.rb
117
119
  - spec/letters/time_formats_spec.rb
118
120
  - spec/spec_helper.rb
119
- homepage: http://github.com/davejacobs/letters
121
+ homepage: http://lettersrb.com
120
122
  licenses: []
121
123
  post_install_message:
122
124
  rdoc_options: []
@@ -143,6 +145,8 @@ summary: A tiny debugging library for Ruby
143
145
  test_files:
144
146
  - spec/letters/core_ext_spec.rb
145
147
  - spec/letters/helpers_spec.rb
148
+ - spec/letters/patch/core_spec.rb
149
+ - spec/letters/patch/rails_spec.rb
146
150
  - spec/letters/patch_spec.rb
147
151
  - spec/letters/time_formats_spec.rb
148
152
  - spec/spec_helper.rb