telemetry 1.1.16 → 1.1.17

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: 61ce494e39c20a91da002a825fca096cb0f91169
4
- data.tar.gz: e7929168331c150d1e12a91d6b84329b0892bc17
3
+ metadata.gz: 8b4bd391de1c6290032e814a39da14bac76dc4c1
4
+ data.tar.gz: d5899c6456d2b8c889a67c0b15671d174c57428e
5
5
  SHA512:
6
- metadata.gz: 82e7cfeb4ab001bac20043cd9c864f766a23dbf7163149d6bc9b2bc756290823cc196c3a3d85f3f0ca65778a57ea3b7b44a46464aec252d4bdbc962dc83086d3
7
- data.tar.gz: f78f373ed23e021cf272d591cc192ed456dd6b8e656a1e1c6299db6849efbecd80ecf664a35a0ad269ee87f5681f2c2d50ced45580ffaffd3cfbbc9507bc862f
6
+ metadata.gz: d7ad1123a4359b0b9b895cd64c3293c028d66e63c4098901edc9b1cb6e625b435b76bef8daf32385934ee7d46ca7c3a18b58f3494acfc26e1a799d32589c894b
7
+ data.tar.gz: 217c442e59bbdd23d5e1bfbfae91f830c71343c5026b0df3e86bb1793182fba3df89cdb0962814ef9cf705c808ff3946b633d7a6ebff455ca8bb07125ecdb37a
data/README.md CHANGED
@@ -26,6 +26,32 @@ Set a hash of values for the flow to update. Each hash must contain the tag of
26
26
 
27
27
  For documentation on flows and the properties they support please see the [flow documentation](https://www.telemetryapp.com/documentation/flows) pages.
28
28
 
29
+ ## Encryption
30
+
31
+ While Telemetry is SSL based and we protect our customers data with utmost caution, some corporate policies will not approve of any third party having the possibility of access to their data. Therefore we support optional encryption of the data with AES-256-CBC before sending it to the Telemetry API. The Telemetry Javascript application that runs in your browser to view the data can be configured with the same key in order to decrypt the data and display it for you while making it invisible to any prying eyes in the middle.
32
+
33
+ require 'telemetry'
34
+
35
+ Telemetry.token = "test-api-token"
36
+ ENCRYPTIONKEY = "Unique Random Password"
37
+
38
+ properties = {
39
+ tag: "test-flow-value",
40
+ value: 3434
41
+ }
42
+ value = Telemetry::Value.new(properties)
43
+ value.encrypt(ENCRYPTIONKEY)
44
+ value.emit
45
+
46
+ Please be careful that your data isn't able to be validated by the Telemetry API since it cannot see it. Therefore we suggest testing with dummy uncrypted data first. Additionally there will be performance implications for large amounts of changing data for some browsers.
47
+
48
+ In order to view encrypted data in your browser you will need to append the key to the end of the URL by adding it like the following:
49
+
50
+ https://boards.telemetryapp.com/board.html?channel_id=467177c0126e4d8d4809c2414b995e01#encryption_key=ENCRYPTIONKEY
51
+
52
+ Note that the # part will not be sent to the server, it's a local argument only visible to the local javascript running in the browser. Certain attributes like tags and priority will not be encrypted as they're needed by the system.
53
+
54
+
29
55
  ## Affiliates
30
56
 
31
57
  This gem supports affiliate data sending. In order to use this capability call the Telemetry::Api.affiliate_send(flows, unique-identifier) method. You must have an enterprise account and get support to enable your account for affiliates first.
@@ -81,6 +107,7 @@ Custom update intervals are supported on a per flow basis. To configure the upd
81
107
  set value: 50
82
108
  end
83
109
 
110
+ Deamon mode does not currently support encrypting values.
84
111
 
85
112
  ## Contributing
86
113
 
@@ -1,11 +1,24 @@
1
1
  #/usr/bin/env ruby
2
2
 
3
3
  require 'hashie'
4
+ require 'gibberish'
5
+ require 'multi_json'
6
+ require 'oj'
4
7
 
5
8
  module TelemetryFlows
6
9
  def emit
7
10
  Telemetry::Api.flow_update(self)
8
11
  end
12
+ def encrypt(encrytion_key)
13
+ cipher = Gibberish::AES.new(encrytion_key)
14
+ skipped_keys = ["tag", "expires_at", "priority", "icon"]
15
+ self.keys.each do |key|
16
+ unless skipped_keys.include?(key)
17
+ self[key] = {enc_json: cipher.enc(MultiJson.dump(self[key]))}
18
+ end
19
+ end
20
+ puts self.to_hash
21
+ end
9
22
  end
10
23
 
11
24
  module Telemetry
@@ -77,7 +90,7 @@ module Telemetry
77
90
  property :x_labels
78
91
  end
79
92
 
80
- # Icons
93
+ # Icon
81
94
  class Icon < Hashie::Dash
82
95
  include TelemetryFlows
83
96
  property :title
@@ -1,3 +1,3 @@
1
1
  module Telemetry
2
- TELEMETRY_VERSION = "1.1.16"
2
+ TELEMETRY_VERSION = "1.1.17"
3
3
  end
data/spec/flows_spec.rb CHANGED
@@ -46,12 +46,12 @@ describe "Flows" do
46
46
  Telemetry::Graph.new(properties).emit
47
47
  end
48
48
 
49
- it "should update a Icons" do
49
+ it "should update a Icon" do
50
50
  properties = {
51
- tag: "test-flow-icons",
51
+ tag: "test-flow-icon",
52
52
  icons: [{type: "icon-dashboard", label: "Alert", color: "red"}]
53
53
  }
54
- Telemetry::Icons.new(properties).emit
54
+ Telemetry::Icon.new(properties).emit
55
55
  end
56
56
 
57
57
  it "should update a Iframe" do
data/telemetry.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency "dante"
23
23
  gem.add_dependency "hashie"
24
24
  gem.add_dependency "net-http-persistent"
25
+ gem.add_dependency "gibberish"
25
26
  gem.add_development_dependency "rspec"
26
27
  gem.add_development_dependency "rake"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telemetry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.16
4
+ version: 1.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - W. Gersham Meharg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2013-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: gibberish
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec
85
99
  requirement: !ruby/object:Gem::Requirement