stackdriver 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/stackdriver.rb +14 -0
  3. metadata +6 -10
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Mjk4N2FlN2I5NTIyYTNiZGRmODljMjAzMTFiNWM4NTJmYzZkZDZmNQ==
5
+ data.tar.gz: !binary |-
6
+ ZWUxYmE0NGU2ZTU2Y2U3NjZiZjgxZWRkODkxMTdhMjFiYzZmM2RlMw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MGNjNThmN2M3NzYxZTJmZTU0ODcwZjIxNTJiYjRhNzdlYTU1YzJhNDQxYzMz
10
+ NDc1MDE4YTg4OGNlMmM3M2ZiM2U5ZDkyMDE3MTU1ZWZlNTUyZmY1MWJiNzE5
11
+ ZTEyZGRlOGMyZTM5ZmNmYTMzNTg1ZGVkYjNjYjBiY2M3NTkyYTg=
12
+ data.tar.gz: !binary |-
13
+ OTk0YjkyYWFjOTVkYmNiNjdlMmIzY2JmNDgyN2JjMjc3ODBlYjI3NTcwYzBl
14
+ MDEwODZlODE1MGU2MDA1MDE0NjM5NGFlNDBhN2IwNzU5ODQ3OWNlY2EzM2Mx
15
+ MDcxNGJlNzM5OWMzOTdlYjUwNGI4MGIzYTFkOTNlMzg5ZjkwNTc=
@@ -17,6 +17,11 @@ end
17
17
  post MultiJson.dump(msg), StackDriver::POST_URI
18
18
  end
19
19
 
20
+ def self.send_multi_metrics data
21
+ msg = build_multi_message data
22
+ post MultiJson.dump(msg), StackDriver::POST_URI
23
+ end
24
+
20
25
  def self.delete_metric name, time
21
26
  msg = build_message name, nil, time
22
27
  post MultiJson.dump(msg), StackDriver::DELETE_URI
@@ -46,4 +51,13 @@ end
46
51
  data_point.merge!('instance' => instance) unless instance.empty?
47
52
  {'timestamp' => Time.now.to_i, 'proto_version' => '1', 'data' => data_point}
48
53
  end
54
+
55
+ def self.build_multi_message data
56
+ data_point = data
57
+ {
58
+ 'timestamp' => Time.now.to_i,
59
+ 'proto_version' => '1',
60
+ 'data' => data_point
61
+ }
62
+ end
49
63
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.2.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Grant T. Olson
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-03-31 00:00:00.000000000 Z
12
+ date: 2014-12-19 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: multi_json
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ! '>='
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ! '>='
29
26
  - !ruby/object:Gem::Version
@@ -35,31 +32,30 @@ executables: []
35
32
  extensions: []
36
33
  extra_rdoc_files: []
37
34
  files:
38
- - LICENSE
39
35
  - ./lib/stackdriver.rb
36
+ - LICENSE
40
37
  homepage: https://github.com/sammarx/stackdriver-ruby
41
38
  licenses:
42
39
  - BSD 3 Clause
40
+ metadata: {}
43
41
  post_install_message:
44
42
  rdoc_options: []
45
43
  require_paths:
46
44
  - lib
47
45
  required_ruby_version: !ruby/object:Gem::Requirement
48
- none: false
49
46
  requirements:
50
47
  - - ! '>='
51
48
  - !ruby/object:Gem::Version
52
49
  version: '0'
53
50
  required_rubygems_version: !ruby/object:Gem::Requirement
54
- none: false
55
51
  requirements:
56
52
  - - ! '>='
57
53
  - !ruby/object:Gem::Version
58
54
  version: '0'
59
55
  requirements: []
60
56
  rubyforge_project:
61
- rubygems_version: 1.8.25
57
+ rubygems_version: 2.2.2
62
58
  signing_key:
63
- specification_version: 3
59
+ specification_version: 4
64
60
  summary: StackDriver custom metrics gem
65
61
  test_files: []