perus 0.1.3 → 0.1.4

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: bae9eee51f945b6f2ba014af73f5cdfa8fa6ab03
4
- data.tar.gz: 3253602c339568d245a4a448abbd3990cf89479f
3
+ metadata.gz: 40d2722b9e4a1770182427f3e21d750752d11458
4
+ data.tar.gz: 0e4ad7c96d8e1a1615baab6637bfeb9277e9db02
5
5
  SHA512:
6
- metadata.gz: 4a88068ed77a22b0e7fa210394931994053dcca0d0e8b025f01e1638623f462024ebabf83a9e67c8a4f442879bdaa6f5dbda86485698bc86d57af327c253bd36
7
- data.tar.gz: e7611359ef127aef4bbad47f0ed74baf32cf59fd808e7484fd658e108d2b0f93008655d41b672b022143ddea8cac3358629a963c274e187f13e4955bfe0e720c
6
+ metadata.gz: a30cfd9e9e034c02c344c15d8a9d4736398c33292fc84a08145720e1471dacbc97705ea9a9a3a3d664217dff36b9671567c56ad859b44edfd6ce2e9ad687a13c
7
+ data.tar.gz: 96ddb1fd262be6906b7bfdbfd1cb0f03afabe2d39a711bac3b990026921f9cf8bb85b62eec04fe4dcb3e03db5acb00bf8c100e7d27cee697fa6228fcb012ae62
@@ -4,7 +4,7 @@ module Perus::Pinger
4
4
  metric!
5
5
 
6
6
  def run
7
- percent = shell(%q[cat /proc/meminfo | awk '{if ($1=="MemTotal:") total = $2; if ($1 == "MemFree:") free = $2;} END {print (1 - (free / total))*100}'])
7
+ percent = shell(%Q[cat /proc/meminfo | awk '{if ($1=="MemTotal:") total = $2; if ($1 == "MemFree:") free = $2;} END {print (1 - (free / total))*100}'])
8
8
  {mem_all: percent.to_f}
9
9
  end
10
10
  end
@@ -9,7 +9,7 @@ module Perus::Pinger
9
9
  if darwin?
10
10
  degrees = shell('istats cpu temp').split[2].match(/([0-9\.]+)/)[0]
11
11
  else
12
- degrees = shell(%q[sensors | grep "#{options.device}:"]).match(/#{options.device}:\s+(\S+)/)[1]
12
+ degrees = shell(%Q[sensors | grep "#{options.device}:"]).match(/#{options.device}:\s+(\S+)/)[1]
13
13
  end
14
14
 
15
15
  {temp: degrees.to_f}
@@ -10,8 +10,8 @@ module Perus::Pinger
10
10
  metric!
11
11
 
12
12
  def run
13
- grep = optipns.grep.gsub('"', '\\"')
14
- line = shell(%q[cat #{options.path} | egrep "#{grep}"])
13
+ grep = options.grep.gsub('"', '\\"')
14
+ line = shell(%Q[cat #{options.path} | egrep "#{grep}"])
15
15
  value = line.match(Regexp.compile(options.match))[1]
16
16
  {options.name => value}
17
17
  end
data/lib/perus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Perus
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Cannings