hosted_graphite 0.0.3 → 0.0.4

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: bf11312fbd83ce1b48007df57abe2e2c2521327b
4
- data.tar.gz: e0fc96df3a589328f8bc9cb912944df5458cd584
3
+ metadata.gz: 5c18a0daa07195018fdab806abc4124719af90a3
4
+ data.tar.gz: 0fbb3f5396d3b8465a7dfe74002b74a1ebe62a90
5
5
  SHA512:
6
- metadata.gz: 995e3f7630a2c77f77811faf2462981e0380f62b42b8d1e221cbb2db928057ca2bfb92dc37d3a4d6bd9ea5eb3994222ca5bd017c5bc13bcb23b5442d18ef6fa6
7
- data.tar.gz: d14de66879dc278375af325ceade1c2be7a192c6e57008729221e1eb735d1522692105618e04f60bbba2d7755dd8cded1eca2e17f092d3509a98c894b0a4fdf9
6
+ metadata.gz: 4eb9b126e6f4b158c83482527f3ea7bdea43d1b6eb698ec26c8ec061ec324a7bbd0ecf9a542e8e5f1729cdef88c214dd524dfc30dad9f0237a68f4a4ab507f0d
7
+ data.tar.gz: 186fa9363f0f4fd57e4415c881d3a2aea8cc097ac3ca25799e2f0194c237b1051a959c089a8ea17562c32370e3e081da18abf5371a226d6a64f09eaef372ca1e
@@ -28,31 +28,31 @@ module HostedGraphite
28
28
 
29
29
  class << self
30
30
  def increment(stat, sample_rate=1)
31
- @@statsd.count stat, 1, sample_rate
31
+ @@statsd.increment stat, sample_rate
32
32
  end
33
33
 
34
34
  def decrement(stat, sample_rate=1)
35
- @@statsd.count stat, -1, sample_rate
35
+ @@statsd.decrement stat, sample_rate
36
36
  end
37
37
 
38
38
  def count(stat, count, sample_rate=1)
39
- @@statsd.send_stats stat, count, :c, sample_rate
39
+ @@statsd.count stat, count, sample_rate
40
40
  end
41
41
 
42
42
  def gauge(stat, value, sample_rate=1)
43
- @@statsd.send_stats stat, value, :g, sample_rate
43
+ @@statsd.gauge stat, value, sample_rate
44
44
  end
45
45
 
46
46
  def set(stat, value, sample_rate=1)
47
- @@statsd.send_stats stat, value, :s, sample_rate
47
+ @@statsd.set stat, value, sample_rate
48
48
  end
49
49
 
50
50
  def timing(stat, ms, sample_rate=1)
51
- @@statsd.send_stats stat, ms, :ms, sample_rate
51
+ @@statsd.timing stat, ms, sample_rate
52
52
  end
53
53
 
54
- def time(stat, sample_rate=1)
55
- @@statsd.time(stat, sample_rate)
54
+ def time(stat, sample_rate=1, &blk)
55
+ @@statsd.time stat, sample_rate, &blk
56
56
  end
57
57
  end
58
- end
58
+ end
@@ -1,3 +1,3 @@
1
1
  module HostedGraphite
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -18,20 +18,22 @@ module HostedGraphite
18
18
  end
19
19
  end
20
20
 
21
- def self.api_key
22
- @@api_key
23
- end
21
+ class << self
22
+ def api_key
23
+ @@api_key
24
+ end
24
25
 
25
- def self.api_key=(key)
26
- @@api_key = key
27
- end
26
+ def api_key=(key)
27
+ @@api_key = key
28
+ end
28
29
 
29
- def self.protocol
30
- @@protocol
31
- end
30
+ def protocol
31
+ @@protocol
32
+ end
32
33
 
33
- def self.protocol=(protocol)
34
- # TODO, accept symbols and string (:udp, 'tcp')
35
- @@protocol = protocol.new
34
+ def protocol=(protocol)
35
+ # TODO, accept symbols and string (:udp, 'tcp')
36
+ @@protocol = protocol.new
37
+ end
36
38
  end
37
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hosted_graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-17 00:00:00.000000000 Z
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.2
103
+ rubygems_version: 2.2.2
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: A Ruby client for HostedGraphite