liquid-ext 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,14 +13,26 @@ end
13
13
  module Metrics
14
14
 
15
15
  @@registry = MetricRegistry.new
16
+ @@reporters = []
16
17
 
17
18
  def self.start
18
- reporters = [
19
- JmxReporter.forRegistry(@@registry).build,
20
- LoggerReporter.new(@@registry),
21
- ]
22
- reporters.each(&:start)
23
- Signal.register_shutdown_handler { reporters.each(&:stop) }
19
+ @@reporters << JmxReporter.forRegistry(@@registry).build
20
+ @@reporters << LoggerReporter.new(@@registry)
21
+
22
+ @@reporters.each(&:start)
23
+ Signal.register_shutdown_handler { self.stop }
24
+ end
25
+
26
+ def self.stop
27
+ @@reporters.each do |reporter|
28
+ if reporter.respond_to?(:run)
29
+ reporter.run
30
+ end
31
+
32
+ reporter.stop
33
+ end
34
+
35
+ @@reporters.clear
24
36
  end
25
37
 
26
38
  def self.registry
data/liquid-ext.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "liquid-ext"
5
- spec.version = "2.0.2"
5
+ spec.version = "2.0.3"
6
6
  spec.authors = ["LiquidM, Inc."]
7
7
  spec.email = ["opensource@liquidm.com"]
8
8
  spec.description = %q{Ruby core extensions and helper libraries}
@@ -35,12 +35,10 @@ describe WeightedSelector do
35
35
 
36
36
  before do
37
37
  subject.add 'a', 2
38
- subject.add 'b', 2
39
- subject.add 'c', 0
40
38
  end
41
39
 
42
40
  it do
43
- ['a', 'b'].should include subject.pick_one
41
+ ['a'].should include subject.pick_one
44
42
  end
45
43
 
46
44
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - LiquidM, Inc.
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-02-10 00:00:00.000000000 Z
12
+ date: 2014-02-14 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -17,11 +18,13 @@ dependencies:
17
18
  - - '>='
18
19
  - !ruby/object:Gem::Version
19
20
  version: '0'
21
+ none: false
20
22
  requirement: !ruby/object:Gem::Requirement
21
23
  requirements:
22
24
  - - '>='
23
25
  - !ruby/object:Gem::Version
24
26
  version: '0'
27
+ none: false
25
28
  prerelease: false
26
29
  type: :runtime
27
30
  - !ruby/object:Gem::Dependency
@@ -31,11 +34,13 @@ dependencies:
31
34
  - - '>='
32
35
  - !ruby/object:Gem::Version
33
36
  version: '0'
37
+ none: false
34
38
  requirement: !ruby/object:Gem::Requirement
35
39
  requirements:
36
40
  - - '>='
37
41
  - !ruby/object:Gem::Version
38
42
  version: '0'
43
+ none: false
39
44
  prerelease: false
40
45
  type: :runtime
41
46
  - !ruby/object:Gem::Dependency
@@ -45,11 +50,13 @@ dependencies:
45
50
  - - '>='
46
51
  - !ruby/object:Gem::Version
47
52
  version: 2.0.0
53
+ none: false
48
54
  requirement: !ruby/object:Gem::Requirement
49
55
  requirements:
50
56
  - - '>='
51
57
  - !ruby/object:Gem::Version
52
58
  version: 2.0.0
59
+ none: false
53
60
  prerelease: false
54
61
  type: :runtime
55
62
  - !ruby/object:Gem::Dependency
@@ -59,11 +66,13 @@ dependencies:
59
66
  - - '>='
60
67
  - !ruby/object:Gem::Version
61
68
  version: '0'
69
+ none: false
62
70
  requirement: !ruby/object:Gem::Requirement
63
71
  requirements:
64
72
  - - '>='
65
73
  - !ruby/object:Gem::Version
66
74
  version: '0'
75
+ none: false
67
76
  prerelease: false
68
77
  type: :runtime
69
78
  - !ruby/object:Gem::Dependency
@@ -73,11 +82,13 @@ dependencies:
73
82
  - - '>='
74
83
  - !ruby/object:Gem::Version
75
84
  version: '0'
85
+ none: false
76
86
  requirement: !ruby/object:Gem::Requirement
77
87
  requirements:
78
88
  - - '>='
79
89
  - !ruby/object:Gem::Version
80
90
  version: '0'
91
+ none: false
81
92
  prerelease: false
82
93
  type: :runtime
83
94
  description: Ruby core extensions and helper libraries
@@ -148,7 +159,6 @@ files:
148
159
  homepage: https://github.com/liquidm/ext
149
160
  licenses:
150
161
  - MIT
151
- metadata: {}
152
162
  post_install_message:
153
163
  rdoc_options: []
154
164
  require_paths:
@@ -158,16 +168,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
168
  - - '>='
159
169
  - !ruby/object:Gem::Version
160
170
  version: '0'
171
+ none: false
161
172
  required_rubygems_version: !ruby/object:Gem::Requirement
162
173
  requirements:
163
174
  - - '>='
164
175
  - !ruby/object:Gem::Version
165
176
  version: '0'
177
+ none: false
166
178
  requirements: []
167
179
  rubyforge_project:
168
- rubygems_version: 2.2.1
180
+ rubygems_version: 1.8.24
169
181
  signing_key:
170
- specification_version: 4
182
+ specification_version: 3
171
183
  summary: Ruby core extensions and helper libraries
172
184
  test_files:
173
185
  - spec/lib/liquid/ext/enumerable_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 8aa7b84c68a7498ea4647ee80ea58cdbef4f3901
4
- data.tar.gz: 1020c2f7b1a6eb24aa620d5cf5a42e0b87bb0754
5
- SHA512:
6
- metadata.gz: 3a4a529f887f6b64e570fa053da747a8203284f7aabd5d0dd3f41344d05b7777c8f6b265da8709cec2c680d8d185c732096241a9c95f734e5a801578bf0e8a60
7
- data.tar.gz: d69120e65caeaffb0d5cecff3152228a5bb7dbf130e94acd2b55cec941b8d68817972548061fbf840356a86f1eb3252dd285e85fbcd4cf73dc4095ab9dd361a5