greek_fire 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52d4b2a0c074d282dcd088c39063823dcfd8380d
4
- data.tar.gz: 682e0be969250332cb4245fc62d9185962f09df7
3
+ metadata.gz: 41151febd6fe48b5ad477f84972314d98461084a
4
+ data.tar.gz: 8d67d0659e1397c3ae4d8d87fc53bbda5dcc70fa
5
5
  SHA512:
6
- metadata.gz: ca467b13f3ff2f7336dc548603ed4c0403bbe5ccc13f67f26c2a624e83ddaffafca0d196e65af91d4fc6adce23c3229e5067533fb08582ac56bac13ef9b33c4d
7
- data.tar.gz: 7aec0f52d9359f3a695ca46ef68c73e923b32f51fcb7ee308b8f2ae43fee3f1aec143881aa9ead9355ad7b49275aff5bdc829e78fbeb8e982318996fcfc30642
6
+ metadata.gz: ace3291cd59dbcc2141e8bf364e5dbbe065aced0076938508b3d7e8d687c7acb60750e237a15b326db2d53161247c6ffa7647d0a9692a2f3a15c426a23945369
7
+ data.tar.gz: ae04df429f6f0431c632bb9f37b5975d49c6f2a7bd7a0de1d6d7158b9fc1f7b06864f8d92a485b223abc7ec66b68f102b1f10120206ddb173b99bbefd4cdf77e
@@ -0,0 +1,20 @@
1
+ require 'active_model'
2
+
3
+ module GreekFire
4
+ class MeasureSet
5
+ include Enumerable
6
+ include ActiveModel::Conversion
7
+
8
+ def to_partial_path
9
+ GreekFire::MeasureSet._to_partial_path
10
+ end
11
+
12
+ def each(&block)
13
+ return enum_for(:each) unless block_given?
14
+
15
+ self.items.each do |x|
16
+ block.call(x)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -14,9 +14,9 @@ module GreekFire
14
14
  end
15
15
 
16
16
  def metrics
17
- @dynamic_measures.map do |stat|
17
+ (@dynamic_measures.map do |stat|
18
18
  stat.call
19
- end.flatten.compact + @registry
19
+ end + @registry).flatten.compact
20
20
  end
21
21
 
22
22
  def clear_metrics
@@ -0,0 +1 @@
1
+ <% measure_set.each do |measure| %><%= render measure %><% end %>
@@ -1,3 +1,3 @@
1
1
  module GreekFire
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greek_fire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cconstantine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-29 00:00:00.000000000 Z
11
+ date: 2017-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -83,9 +83,11 @@ files:
83
83
  - app/models/greek_fire/counter.rb
84
84
  - app/models/greek_fire/gauge.rb
85
85
  - app/models/greek_fire/measure.rb
86
+ - app/models/greek_fire/measure_set.rb
86
87
  - app/models/greek_fire/metric.rb
87
88
  - app/views/greek_fire/counters/_counter.html.erb
88
89
  - app/views/greek_fire/gauges/_gauge.html.erb
90
+ - app/views/greek_fire/measure_sets/_measure_set.erb
89
91
  - app/views/greek_fire/metrics/_labels.html.erb
90
92
  - app/views/greek_fire/metrics/_metric.html.erb
91
93
  - config/routes.rb