graphite_client 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -0,0 +1,60 @@
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 = "graphite_client"
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Alex Dean"]
12
+ s.date = "2012-11-09"
13
+ s.description = "Original code by https://github.com/joakimk."
14
+ s.email = "alex@crackpot.org"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "graphite_client.gemspec",
29
+ "lib/graphite_client.rb",
30
+ "spec/graphite_client_spec.rb",
31
+ "spec/spec_helper.rb"
32
+ ]
33
+ s.homepage = "http://github.com/tedconf/graphite_client"
34
+ s.licenses = ["MIT"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = "1.8.24"
37
+ s.summary = "Very simple ruby client for graphite."
38
+
39
+ if s.respond_to? :specification_version then
40
+ s.specification_version = 3
41
+
42
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
+ s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
44
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
45
+ s.add_development_dependency(%q<bundler>, ["~> 1.2.0"])
46
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
47
+ else
48
+ s.add_dependency(%q<rspec>, ["~> 2.11.0"])
49
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
50
+ s.add_dependency(%q<bundler>, ["~> 1.2.0"])
51
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
52
+ end
53
+ else
54
+ s.add_dependency(%q<rspec>, ["~> 2.11.0"])
55
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.2.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
58
+ end
59
+ end
60
+
@@ -1,6 +1,6 @@
1
1
  require 'socket'
2
2
 
3
- class Graphite
3
+ class GraphiteClient
4
4
  def initialize(host)
5
5
  @host = host
6
6
  end
@@ -7,7 +7,7 @@ describe "GraphiteClient" do
7
7
  time = Time.now
8
8
  TCPSocket.should_receive(:new).with("host", 2003).and_return(socket = mock(:closed? => false))
9
9
  socket.should_receive(:write).with("hello.world 10.5 #{time.to_i}\n")
10
- graphite = Graphite.new("host")
10
+ graphite = GraphiteClient.new("host")
11
11
  graphite.report("hello.world", 10.5, time)
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ describe "GraphiteClient" do
15
15
  time = Time.now
16
16
  TCPSocket.should_receive(:new).once.with("host", 2003).and_return(socket = mock(:closed? => false))
17
17
  socket.should_receive(:write).twice
18
- graphite = Graphite.new("host")
18
+ graphite = GraphiteClient.new("host")
19
19
  graphite.report("hello.world", 10.5, time)
20
20
  graphite.report("hello.world", 10, time)
21
21
  end
@@ -25,7 +25,7 @@ describe "GraphiteClient" do
25
25
  TCPSocket.should_receive(:new).twice.with("host", 2003).and_return(socket = mock(:closed? => false))
26
26
  socket.should_receive(:write)
27
27
  socket.should_receive(:write)
28
- graphite = Graphite.new("host")
28
+ graphite = GraphiteClient.new("host")
29
29
  graphite.report("hello.world", 10.5, time)
30
30
  socket.stub!(:closed? => true)
31
31
  graphite.report("hello.world", 10, time)
@@ -38,14 +38,14 @@ describe "GraphiteClient" do
38
38
  TCPSocket.should_receive(:new).twice.with("host", 2003).and_return(socket = mock(:closed? => false))
39
39
  socket.should_receive(:write).and_raise(Errno::EPIPE)
40
40
  socket.should_receive(:write)
41
- graphite = Graphite.new("host")
41
+ graphite = GraphiteClient.new("host")
42
42
  graphite.report("hello.world", 10.5, time)
43
43
  graphite.report("hello.world", 10, time)
44
44
  end
45
45
 
46
46
  it "should fail silently on Errno::EHOSTUNREACH" do
47
47
  TCPSocket.should_receive(:new).and_raise(Errno::EHOSTUNREACH)
48
- graphite = Graphite.new("host")
48
+ graphite = GraphiteClient.new("host")
49
49
  -> {
50
50
  graphite.report("hello.world", 10.5, Time.now)
51
51
  }.should_not raise_error
@@ -53,7 +53,7 @@ describe "GraphiteClient" do
53
53
 
54
54
  it "should fail silently on Errno::ECONNREFUSED" do
55
55
  TCPSocket.should_receive(:new).and_raise(Errno::ECONNREFUSED)
56
- graphite = Graphite.new("host")
56
+ graphite = GraphiteClient.new("host")
57
57
  -> {
58
58
  graphite.report("hello.world", 10.5, Time.now)
59
59
  }.should_not raise_error
@@ -66,7 +66,7 @@ describe "GraphiteClient" do
66
66
  TCPSocket.should_receive(:new).twice.with("host", 2003).and_return(socket = mock(:closed? => false))
67
67
  socket.should_receive(:write)
68
68
  socket.should_receive(:write)
69
- graphite = Graphite.new("host")
69
+ graphite = GraphiteClient.new("host")
70
70
  graphite.report("hello.world", 10.5, time)
71
71
  socket.should_receive(:close)
72
72
  graphite.close_socket
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphite_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -91,6 +91,7 @@ files:
91
91
  - README.md
92
92
  - Rakefile
93
93
  - VERSION
94
+ - graphite_client.gemspec
94
95
  - lib/graphite_client.rb
95
96
  - spec/graphite_client_spec.rb
96
97
  - spec/spec_helper.rb
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
110
  version: '0'
110
111
  segments:
111
112
  - 0
112
- hash: 205199542589791166
113
+ hash: -3905685037471380646
113
114
  required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  none: false
115
116
  requirements: