marked 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +6 -3
- data/VERSION +1 -1
- data/lib/marked.rb +1 -1
- data/marked.gemspec +1 -1
- data/test/marked_test.rb +6 -6
- metadata +3 -3
data/README.markdown
CHANGED
@@ -24,7 +24,7 @@ Before:
|
|
24
24
|
|
25
25
|
class User < ActiveRecord::Base
|
26
26
|
def some_method
|
27
|
-
complex_result
|
27
|
+
complex_result.with_chaining( omg.I_lost_track )
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -34,12 +34,15 @@ You write tests. Okay, but after that, if you're tracking down a bug?
|
|
34
34
|
|
35
35
|
class User < ActiveRecord::Base
|
36
36
|
def some_method
|
37
|
-
mark
|
37
|
+
complex_result.with_chaining( mark omg.I_lost_track )
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
And you'll get the value of `complex_result` printed to your console and to the Rails log (if it exists)
|
42
42
|
|
43
|
+
MARKED /code/my_file:5
|
44
|
+
"omg.I_lost_track contents"
|
45
|
+
|
43
46
|
Can take multiple arguments, always returning the last:
|
44
47
|
|
45
48
|
|
@@ -67,4 +70,4 @@ INSTALL
|
|
67
70
|
* gem install marked
|
68
71
|
|
69
72
|
|
70
|
-
Copyright 2011 [Jack Danger Canty](http://jackcanty.com). Patches welcome, forks celebrated
|
73
|
+
Copyright 2011 [Jack Danger Canty](http://jackcanty.com). Patches welcome, forks celebrated
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/marked.rb
CHANGED
data/marked.gemspec
CHANGED
data/test/marked_test.rb
CHANGED
@@ -13,8 +13,8 @@ class MarkedTest < Test::Unit::TestCase
|
|
13
13
|
|
14
14
|
context "logging" do
|
15
15
|
setup {
|
16
|
-
Rails.logger.expects(:debug).with("
|
17
|
-
Marked.expects(:print).with( "
|
16
|
+
Rails.logger.expects(:debug).with("\nMARKED ./test/marked_test.rb:22")
|
17
|
+
Marked.expects(:print).with( "\nMARKED ./test/marked_test.rb:22")
|
18
18
|
Rails.logger.expects(:debug).with(" this should be printed")
|
19
19
|
Marked.expects(:print).with( " this should be printed")
|
20
20
|
}
|
@@ -24,7 +24,7 @@ class MarkedTest < Test::Unit::TestCase
|
|
24
24
|
end
|
25
25
|
context "printing and logging a single argument" do
|
26
26
|
setup {
|
27
|
-
expect_unpadded_log "
|
27
|
+
expect_unpadded_log "\nMARKED ./test/marked_test.rb:31"
|
28
28
|
expect_log "this should be printed"
|
29
29
|
}
|
30
30
|
should "return its argument" do
|
@@ -33,7 +33,7 @@ class MarkedTest < Test::Unit::TestCase
|
|
33
33
|
end
|
34
34
|
context "printing and logging multiple arguments" do
|
35
35
|
setup {
|
36
|
-
expect_unpadded_log "
|
36
|
+
expect_unpadded_log "\nMARKED ./test/marked_test.rb:41"
|
37
37
|
expect_log "this should be printed"
|
38
38
|
expect_log "this too"
|
39
39
|
}
|
@@ -43,7 +43,7 @@ class MarkedTest < Test::Unit::TestCase
|
|
43
43
|
end
|
44
44
|
context "printing and logging non-strings" do
|
45
45
|
setup {
|
46
|
-
expect_unpadded_log "
|
46
|
+
expect_unpadded_log "\nMARKED ./test/marked_test.rb:51"
|
47
47
|
expect_log({:a =>'a'})
|
48
48
|
expect_log [1, 2, 3]
|
49
49
|
}
|
@@ -55,7 +55,7 @@ class MarkedTest < Test::Unit::TestCase
|
|
55
55
|
setup {
|
56
56
|
@obj = {}
|
57
57
|
@obj.expects(:called!).returns('returned!').once
|
58
|
-
expect_unpadded_log "
|
58
|
+
expect_unpadded_log "\nMARKED ./test/marked_test.rb:63"
|
59
59
|
expect_log "first arg"
|
60
60
|
expect_log "returned!"
|
61
61
|
}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jack Danger Canty
|