cabin 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cabin/channel.rb CHANGED
@@ -44,6 +44,7 @@ require "logger"
44
44
  #
45
45
  class Cabin::Channel
46
46
  include Cabin::Mixins::Logger
47
+ attr_accessor :metrics
47
48
 
48
49
  # Create a new logging channel.
49
50
  # The default log level is 'info'
@@ -52,6 +53,7 @@ class Cabin::Channel
52
53
  @outputs = []
53
54
  @data = {}
54
55
  @level = :info
56
+ @metrics = Cabin::Metrics.new
55
57
  end # def initialize
56
58
 
57
59
  # Subscribe a new input
data/test/test_metrics.rb CHANGED
@@ -49,6 +49,12 @@ describe Cabin::Metrics do
49
49
  end
50
50
  end
51
51
 
52
+ test "metrics from logger" do
53
+ @logger = Cabin::Channel.new
54
+ meter = @logger.metrics.meter(self)
55
+ assert_equal(0, meter.value)
56
+ end
57
+
52
58
  test "timer histogram" # TODO(sissel): implement
53
59
  test "histogram" # TODO(sissel): implement
54
60
  end # describe Cabin::Channel do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cabin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jordan Sissel