stf-client 0.3.0.rc4 → 0.3.0.rc5

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: 562d8545197393597c1728a90beba6b24fa9e159
4
- data.tar.gz: 6ea3632a8e4dd6caff094f5ad4a5be47224bcddb
3
+ metadata.gz: 18e4b966ae9b724edac48f9de91437c4018fbe12
4
+ data.tar.gz: 9dd7879d424aafa1b6b22701166ed17b43fe9029
5
5
  SHA512:
6
- metadata.gz: 718698ff7b360406bcbd63f529547fb5b8a6e93c9e16bdd363db3ea5c94c8ff9cd3829281144b8bf95eb65b9ff2b93397ededc066ab947b67ec3b9f14bd4e05c
7
- data.tar.gz: 18423074841db33f13bfa2169c0e1cede7533dcababc40a713ea118c76a166416a923f89bf224c9c3d2ccb44a6dafe1c4fc91f9b261145a3b7c65b616c5c0bae
6
+ metadata.gz: 360fb34f71844e5ca57dfd8cecdaa7658b1ed8d70454902615ce4218ed3143273f8b88b7c1971af974ad893d9743fa592f7e2a3e674e0f88ab66324231f37073
7
+ data.tar.gz: d9bbf0b9e2e21be8031d7abda264db7f18edab1e8f682228c00b75318862c1dce0ef61ebbbdf48a7625cf9759200decda5c64b11f23c3fabe027acde7745e3f3
@@ -47,8 +47,9 @@ module Stf
47
47
  # we will try clean anyway
48
48
  DI[:stf].remove_device serial
49
49
  if test ?d, '/custom-metrics'
50
- File.open('/custom-metrics/openstf_connect_fail', 'a') do
51
- |f| f.write("openstf_connect_fail,reason=\"#{escape(e.message)}\" serial=\"#{serial}\" #{Time.now.to_i}\n")
50
+ File.open('/custom-metrics/openstf_connect_fail', 'a') do |f|
51
+ message = (!e.nil? && !e.message.nil?) ? e.message : ""
52
+ f.write("openstf_connect_fail,reason=\"#{escape(message)}\" serial=\"#{serial}\" #{Time.now.to_i}\n")
52
53
  end
53
54
  end
54
55
  rescue
@@ -60,7 +61,7 @@ module Stf
60
61
  end
61
62
 
62
63
  def escape(s)
63
- s.gsub(/["]/, '\"')
64
+ s.gsub(/["]/, '\"').gsub(/[ ]/, '\ ').gsub(/[=]/, '\=').gsub(/[,]/, '\,')
64
65
  end
65
66
  end
66
67
  end
data/lib/stf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stf
2
- VERSION = '0.3.0.rc4'
2
+ VERSION = '0.3.0.rc5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stf-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.rc4
4
+ version: 0.3.0.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Malinskiy