l2meter 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9d24762c770d4796433243c9a0e79fdab77a3a9
4
- data.tar.gz: 4132e41611d13554df9caffe440764ef5d9c915d
3
+ metadata.gz: 0b8cfc00c1a6cbda74012122b4e767ae10e8721d
4
+ data.tar.gz: 6f9e05a2828f438d5a7105bbca3cd78ce4b78fc9
5
5
  SHA512:
6
- metadata.gz: e97d987cf5098a46759a41ea4102d96c5c25ea8c82b4c0555b6aec077958a5af78ea64d0e972611a882f0ad11ff90497d0672f972d5dba27cb1acebc51df7b14
7
- data.tar.gz: aabc3a2a2861904bab33896aab903a922d103d45d8e6c503fb9065911e3abda36fcc41a1198783a0a6c0ea8c86a5f7f7e5d5e416926ae77a2b7ff1bf1439b36f
6
+ metadata.gz: b067f592722b372bfd78ff272a72fa50adb5adf73a169db08d5084c98888e51d803f707dd73511f38ddc1c2f6e44997376d9b920719cd13c666ab3ce42a31762
7
+ data.tar.gz: 222b0436a4c08bc6cd7f5dbfd58cb2ddb64f7ddca2b60d7f45eecfc8e8f3994ec6cffdb91bc4fee49d6096843f2efe7ab0ca5e60f703ac82a540e99f631ae962
@@ -18,6 +18,14 @@ module L2meter
18
18
  end
19
19
  end
20
20
 
21
+ def silence
22
+ output = configuration.output
23
+ configuration.output = NullObject.new
24
+ yield
25
+ ensure
26
+ configuration.output = output
27
+ end
28
+
21
29
  private
22
30
 
23
31
  def context
@@ -0,0 +1,5 @@
1
+ module L2meter
2
+ class NullObject
3
+ def method_missing(*); end
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module L2meter
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
data/lib/l2meter.rb CHANGED
@@ -5,6 +5,7 @@ module L2meter
5
5
 
6
6
  autoload :Configuration, "l2meter/configuration"
7
7
  autoload :Emitter, "l2meter/emitter"
8
+ autoload :NullObject, "l2meter/null_object"
8
9
 
9
10
  def build
10
11
  Emitter.new.tap do |emitter|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: l2meter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-09 00:00:00.000000000 Z
11
+ date: 2015-09-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -22,6 +22,7 @@ files:
22
22
  - lib/l2meter.rb
23
23
  - lib/l2meter/configuration.rb
24
24
  - lib/l2meter/emitter.rb
25
+ - lib/l2meter/null_object.rb
25
26
  - lib/l2meter/version.rb
26
27
  homepage: https://github.com/heroku/l2meter
27
28
  licenses: