marked 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 complex_result
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.0
1
+ 1.1.1
@@ -3,7 +3,7 @@ module Marked
3
3
 
4
4
  returnable = block_given? ? yield : objects.last
5
5
 
6
- Marked.log "MARKED #{caller.first.split(':in ').first}"
6
+ Marked.log "\nMARKED #{caller.first.split(':in ').first}"
7
7
 
8
8
  if block_given?
9
9
  Marked.log Marked.pad returnable
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{marked}
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Danger Canty"]
@@ -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("MARKED ./test/marked_test.rb:22")
17
- Marked.expects(:print).with( "MARKED ./test/marked_test.rb:22")
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 "MARKED ./test/marked_test.rb:31"
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 "MARKED ./test/marked_test.rb:41"
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 "MARKED ./test/marked_test.rb:51"
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 "MARKED ./test/marked_test.rb:63"
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jack Danger Canty