dawanda-statsd-client 0.1.0 → 0.1.1

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.
data/README.md CHANGED
@@ -5,7 +5,7 @@ A Ruby client for [StatsD](https://github.com/etsy/statsd), Etsy's daemon for ea
5
5
 
6
6
  Usage
7
7
  -----
8
-
8
+ require 'statsd/client'
9
9
  client = Statsd::Client.new(host, port)
10
10
  client.timing('example.stat.1', 350)
11
11
  client.increment('example.stat.2')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'optparse'
5
5
  $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
6
6
 
7
- require 'statsd-client'
7
+ require 'statsd/client'
8
8
 
9
9
  options = {}
10
10
  OptionParser.new do |opts|
@@ -0,0 +1,69 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{dawanda-statsd-client}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Tom Taylor"]
12
+ s.date = %q{2011-02-23}
13
+ s.default_executable = %q{statsd-send}
14
+ s.description = %q{A Ruby client for statsd}
15
+ s.email = %q{tom@tomtaylor.co.uk}
16
+ s.executables = ["statsd-send"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".rspec",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE.txt",
27
+ "README.md",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "bin/statsd-send",
31
+ "dawanda-statsd-client.gemspec",
32
+ "lib/statsd/client.rb",
33
+ "spec/spec_helper.rb",
34
+ "spec/statsd-client_spec.rb",
35
+ "statsd-client.example.yml"
36
+ ]
37
+ s.homepage = %q{http://github.com/dawanda/statsd-client}
38
+ s.licenses = ["MIT"]
39
+ s.require_paths = ["lib"]
40
+ s.rubygems_version = %q{1.3.7}
41
+ s.summary = %q{Client for statds}
42
+ s.test_files = [
43
+ "spec/spec_helper.rb",
44
+ "spec/statsd-client_spec.rb"
45
+ ]
46
+
47
+ if s.respond_to? :specification_version then
48
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
53
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
54
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
55
+ s.add_development_dependency(%q<rcov>, [">= 0"])
56
+ else
57
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
58
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
59
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
60
+ s.add_dependency(%q<rcov>, [">= 0"])
61
+ end
62
+ else
63
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ end
68
+ end
69
+
@@ -45,7 +45,7 @@ class Statsd
45
45
 
46
46
  # statds reports with default configs 1/10 of actual value
47
47
  def factor
48
- config['factor'] || 10
48
+ config['factor'] || 1
49
49
  end
50
50
 
51
51
  def deactivated?
@@ -63,7 +63,7 @@ class Statsd
63
63
 
64
64
 
65
65
  class Client
66
- VERSION = File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
66
+ VERSION = File.read( File.join(File.dirname(__FILE__),'..', '..', 'VERSION') ).strip
67
67
  attr_reader :host, :port
68
68
 
69
69
  # Initializes a Statsd client.
@@ -123,7 +123,6 @@ class Statsd
123
123
  private
124
124
 
125
125
  def send(data, sample_rate = 1)
126
- puts "sending #{data}"
127
126
  sampled_data = {}
128
127
 
129
128
  if sample_rate < 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dawanda-statsd-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Taylor
@@ -99,7 +99,8 @@ files:
99
99
  - Rakefile
100
100
  - VERSION
101
101
  - bin/statsd-send
102
- - lib/statsd-client.rb
102
+ - dawanda-statsd-client.gemspec
103
+ - lib/statsd/client.rb
103
104
  - spec/spec_helper.rb
104
105
  - spec/statsd-client_spec.rb
105
106
  - statsd-client.example.yml