dashing-contrib 0.1.11 → 0.1.12

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: 44f002b8039b2408c19002e7bb0e911b98ad8246
4
- data.tar.gz: 545ee247920c1d287d1fb683b7fc9422efb332dc
3
+ metadata.gz: 5c4f833763c66a8d55882aa3148dd0e9f3cd4cd0
4
+ data.tar.gz: 04db4b265177f482a994b6d268229fef6fbdbfdb
5
5
  SHA512:
6
- metadata.gz: 25b611c60180ed0ecc0a2966cc4b15960872e23ae43964b585c0f23b2b1e0ec490eb74d0459918b336e799b77d4b29abfae9b6c74500b389e9465e12111d5c05
7
- data.tar.gz: d8e3b58114b4d095321b031b0758468004010a1f41c1342b19df748d8ae610aba6089c573554eedae6c2a3617da0dd59acbc3f1bcecc25a838609bbc02adb386
6
+ metadata.gz: 6770777c4fa20f77e4937c035f4ca3fa9f7d60ab070f53ddf74c92326c9d5738f076928a7e8d14d79ab87d222fe88135f203abe3d43f09fc6d5c7cb7d4d5e51b
7
+ data.tar.gz: ce75dedd3e3eae470b3871595d7c0b7b85deea78b75516ad1906c32a88d8b9d506a58f945bea821a13952bc68a33f703b529355c73ce3fe0c54cf4ca538a00aa
data/README.md CHANGED
@@ -18,7 +18,7 @@ Read each individual widget documentation to use dashing-contrib built-in widget
18
18
  ## Installation
19
19
  Requires Ruby >= 1.9.3. Add this line to your Dashing's dashboard Gemfile:
20
20
 
21
- gem 'dashing-contrib', '~> 0.1.10'
21
+ gem 'dashing-contrib', '~> 0.1.12'
22
22
 
23
23
  Update dependencies:
24
24
 
@@ -20,6 +20,12 @@ module DashingContrib
20
20
  second_uptime = client.uptime(id, user_opt[:second_date_range], user_opt[:now])
21
21
  status = client.checks(id)
22
22
 
23
+ if status[:check][:lasterrortime].nil ?
24
+ last_down = "never"
25
+ else
26
+ last_down = ::DashingContrib::Time.readable_diff(::Time.at(status[:check][:lasterrortime]))
27
+ end
28
+
23
29
  # returns this dataset
24
30
  {
25
31
  current: current_uptime.to_s,
@@ -29,7 +35,7 @@ module DashingContrib
29
35
  second_title: user_opt[:second_title],
30
36
  is_up: status[:check][:status] == 'up',
31
37
  current_response_time: status[:check][:lastresponsetime],
32
- last_downtime: ::DashingContrib::Time.readable_diff(::Time.at(status[:check][:lasterrortime]))
38
+ last_downtime: last_down
33
39
  }
34
40
  end
35
41
 
@@ -1,3 +1,3 @@
1
1
  module DashingContrib
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dashing-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jing Dong