stf-client 0.3.0.rc3 → 0.3.0.rc4

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: c42eb5de85820926c60ae41603b489ed8b49b595
4
- data.tar.gz: 55dedb38b9389cd1440be901ecaba870daf9dc9d
3
+ metadata.gz: 562d8545197393597c1728a90beba6b24fa9e159
4
+ data.tar.gz: 6ea3632a8e4dd6caff094f5ad4a5be47224bcddb
5
5
  SHA512:
6
- metadata.gz: '0480c0e3c9908e915acabce93036707ac622e47d80145b03e81100f6a71b25b526e7ade64a2a32d77b2e18dc24dbc0a6bd1f1466f0ef1e1f69eae52ad61895d4'
7
- data.tar.gz: 61573ccb00f3873d0ff38f3c15d2a0504eace18147b732d04bff1a23be5a4945466f2ab2368cc52efd0310b3e9dce3491f62efd972949004b96c81434b11ef14
6
+ metadata.gz: 718698ff7b360406bcbd63f529547fb5b8a6e93c9e16bdd363db3ea5c94c8ff9cd3829281144b8bf95eb65b9ff2b93397ededc066ab947b67ec3b9f14bd4e05c
7
+ data.tar.gz: 18423074841db33f13bfa2169c0e1cede7533dcababc40a713ea118c76a166416a923f89bf224c9c3d2ccb44a6dafe1c4fc91f9b261145a3b7c65b616c5c0bae
@@ -48,7 +48,7 @@ module Stf
48
48
  DI[:stf].remove_device serial
49
49
  if test ?d, '/custom-metrics'
50
50
  File.open('/custom-metrics/openstf_connect_fail', 'a') do
51
- |f| f.write("openstf_connect_fail,reason=\"#{e.message}\" serial=\"#{serial}\" #{Time.now.to_i}\n")
51
+ |f| f.write("openstf_connect_fail,reason=\"#{escape(e.message)}\" serial=\"#{serial}\" #{Time.now.to_i}\n")
52
52
  end
53
53
  end
54
54
  rescue
@@ -58,5 +58,9 @@ module Stf
58
58
  return false
59
59
  end
60
60
  end
61
+
62
+ def escape(s)
63
+ s.gsub(/["]/, '\"')
64
+ end
61
65
  end
62
66
  end
data/lib/stf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stf
2
- VERSION = '0.3.0.rc3'
2
+ VERSION = '0.3.0.rc4'
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.rc3
4
+ version: 0.3.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Malinskiy