arvicco-avalon 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/avalon/utils.rb CHANGED
@@ -10,7 +10,7 @@ module Avalon
10
10
  file = [ tune,
11
11
  File.expand_path("../../../sound/#{tune}", __FILE__),
12
12
  File.expand_path("~/sound/#{tune}", __FILE__),
13
- File.expand_path("/System/Library/Sounds/#{tune}")
13
+ File.expand_path("/System/Library/Sounds/#{tune}"),
14
14
  ].find {|f| File.exist?(f)}
15
15
 
16
16
  case system
@@ -18,7 +18,7 @@ module Avalon
18
18
  `afplay #{file}`
19
19
  when 'Linux'
20
20
  raise 'Please install sox package: sudo apt-get install sox' if `which sox`.empty?
21
- `play #{file}`
21
+ `play -q #{file}`
22
22
  end
23
23
  end
24
24
 
@@ -34,7 +34,7 @@ module Avalon
34
34
  # Helper method: ping the Node, return ping time in ms
35
35
  def ping ip
36
36
  ping_result = `ping -c 1 #{ip}`
37
- if ping_result =~ / 0.0% packet loss/
37
+ if ping_result =~ /( | 0.)0% packet loss/
38
38
  ping_result.match(/time=([\.\d]*) ms/)[1].to_f
39
39
  end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module Avalon
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvicco-avalon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: