pulse_meter_visualizer 0.4.17 → 0.4.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjUxYjFhNTdhYWJjZThhYmZjN2ZmZjgwMDVkZjIwNDYyZTkyZThkZQ==
4
+ NGNkZmMxOTVkYTBlYWE1YzhkMzIwYmFjOTRkNjAwMDUyODAwMTVkMg==
5
5
  data.tar.gz: !binary |-
6
- MDc4NGZiNjYwMjNlMjZmNDk5ZTlmMjBlYjVjYzRkMDAyZjYzMWY1OQ==
6
+ ZTI0YmFhMjkwODk1MWY0OTk1Y2Y5ODk4NmMzOTM4YmY3YjkyZmNiOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTg5ODEwY2MwOTE0NDBkMWFjMWFlMDY1ZWUwZTcyYmQ2ZjQ1YjU3NjdlZmQ1
10
- NjVhY2QyZTVkN2FjOGUxZDEwNmVmOWIxZTdmYmFlMTA1MjM2MjFiY2Y0OGRk
11
- MTBiODJkZWNiOTVhYWI0MWUwOGM0N2M3OTdmYjI0M2VlYmEzNDc=
9
+ MDdmNGZiNDI1Y2IxYzFjOWE3NmExZDc4ODAzYTgxYzhjYWM5NGE4YmRhZjE2
10
+ OTA4MTA1OWExYzkyMTUxZTdjYTcxMWQyOWMwMjRlNDkxMTJiZmExZTA1NzA0
11
+ NjczMjQzOWY2MzA1ZDBiZDU0Mzg3MWQ5NzYyMWU3YWM4NDEzMTk=
12
12
  data.tar.gz: !binary |-
13
- MGNkN2YyNjllOTVlMDk3ZTkxZjQ1ODUzOTM5ODM5YTMwOGY0NjZhMjFiMmZm
14
- MDM0ZmIxZGY4ZDE1MzY3ZmY3YzI0NmQ3Y2E1ZjVjMWI1N2FlNDFjZThhZDc4
15
- N2Q2MTczODAzYjc0ZWQxY2RhNzU5MDUxOTkwMjNjZTE1NzQ2N2Y=
13
+ MmU0ZWZkOTNlNTMyYjg4YzBlNTU3ZjFmOWYyYTNhZjY0NmI2ZGZiMjU3ZTU3
14
+ YzFiOTVmMTI0NzY5ODgyNjcxOTM2ZmJjYzRhZjAxMTdjZjY5MjdhYWQ1MWNj
15
+ MTAzZWE2NDI0NjNiMWZkZGUzZWMzMDlkYWNmNWQ0MDM4YjllZTY=
@@ -90,7 +90,7 @@ module PulseMeter
90
90
 
91
91
  def interval
92
92
  if sensors.empty?
93
- nil
93
+ 0
94
94
  else
95
95
  sensors.first.interval
96
96
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.name = "pulse_meter_visualizer"
16
16
  gem.require_paths = ["lib"]
17
- gem.version = "0.4.17"
17
+ gem.version = "0.4.18"
18
18
 
19
19
  gem.add_runtime_dependency('pulse_meter_core')
20
20
  gem.add_runtime_dependency('gon-sinatra')
@@ -46,11 +46,23 @@ shared_examples_for "widget" do
46
46
  w.to_data
47
47
  end
48
48
 
49
- it "handles nonexistant widgets seamlessly" do
49
+ it "handles nonexistant sensors seamlessly" do
50
50
  expect{broken_widget.data}.not_to raise_exception
51
51
  end
52
52
  end
53
53
 
54
+ context "when all widget sensors are nonexistant" do
55
+ let(:broken_widget) do
56
+ w = dsl_class.new(widget_name)
57
+ w.sensor :c_sensor
58
+ w.to_data
59
+ end
60
+
61
+ describe "data[interval]" do
62
+ subject{ broken_widget.data[:interval] }
63
+ it{ should == 0 }
64
+ end
65
+ end
54
66
 
55
67
  it "should contains type, title, redraw_interval, width, gchart_options, timespan attriutes" do
56
68
  wdata = widget.data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulse_meter_visualizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.17
4
+ version: 0.4.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Averyanov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-21 00:00:00.000000000 Z
12
+ date: 2014-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pulse_meter_core