hosted_graphite 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5436f82e5b70c838801d306685513bf9afdd7691
4
- data.tar.gz: 75cae3e795e3b762258f2f5953ca988fada3921e
3
+ metadata.gz: a0d29154a861702dfcd2155ef22739d047c17fc6
4
+ data.tar.gz: 476a3169cfa6373caca77419637ad6adea807197
5
5
  SHA512:
6
- metadata.gz: 64b437897dbd4f2ca251c795d07bab35c7d75d588261026bc1c343a3a28677853a1bf5d365d669b11ddabafe6536fd23e3a2b81ade96f93cff3f126dd490be88
7
- data.tar.gz: 450ccbc22c3a6c05811e314ec04c9c710f68e44d5b18c641fb7a928899377268a007a51bcc8b95bd1763ec71101a012c7455090cc76a0a994ee7dbf4a0fe0e2b
6
+ metadata.gz: 9545456f268a0565ab8722caeb444ce7ea6f3f9ec8fa49193c7cbdce54966a027aa984b14e7df1a5f0f3e4934b2e7c6f6f4c5d6f4b41305ce850aa7f51af6dbf
7
+ data.tar.gz: 973d23666396403fde56a792fb52a7fbf2becb6af05ceb1da597aaf336ee1d03433324a421fed1e6c8a00226d839f8498b5a59a0470e2837939a3782a708c78f
@@ -0,0 +1,26 @@
1
+ require 'hosted_graphite'
2
+ module HostedGraphite
3
+ [TCP, UDP, HTTP].each do |protocol|
4
+ protocol.class_eval do
5
+
6
+ private
7
+
8
+ def send_message(message)
9
+ message
10
+ end
11
+ end
12
+ end
13
+
14
+ class << self
15
+ def testing(*)
16
+ yield if block_given?
17
+ end
18
+ alias_method :increment, :testing
19
+ alias_method :decrement, :testing
20
+ alias_method :count, :testing
21
+ alias_method :gauge, :testing
22
+ alias_method :set, :testing
23
+ alias_method :timing, :testing
24
+ alias_method :time, :testing
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module HostedGraphite
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -5,4 +5,5 @@ rescue LoadError
5
5
  end
6
6
  require 'securerandom'
7
7
  require 'minitest/autorun'
8
- require 'hosted_graphite'
8
+ require 'hosted_graphite/testing'
9
+
@@ -1,5 +1,4 @@
1
1
  require_relative 'helper'
2
- require_relative 'fake_adapters'
3
2
 
4
3
  class HTTPProtocolTest < Minitest::Test
5
4
  attr_reader :api_key
@@ -1,5 +1,4 @@
1
1
  require_relative 'helper'
2
- require_relative 'fake_adapters'
3
2
 
4
3
  class TCPProtocolTest < Minitest::Test
5
4
  attr_reader :api_key
@@ -1,5 +1,4 @@
1
1
  require_relative 'helper'
2
- require_relative 'fake_adapters'
3
2
 
4
3
  class UDPProtocolTest < Minitest::Test
5
4
  attr_reader :api_key
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-21 00:00:00.000000000 Z
11
+ date: 2015-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -71,9 +71,9 @@ files:
71
71
  - lib/hosted_graphite/protocol.rb
72
72
  - lib/hosted_graphite/statsd.rb
73
73
  - lib/hosted_graphite/tcp.rb
74
+ - lib/hosted_graphite/testing.rb
74
75
  - lib/hosted_graphite/udp.rb
75
76
  - lib/hosted_graphite/version.rb
76
- - test/fake_adapters.rb
77
77
  - test/helper.rb
78
78
  - test/test_http_protocol.rb
79
79
  - test/test_missing_apikey.rb
@@ -105,7 +105,6 @@ signing_key:
105
105
  specification_version: 4
106
106
  summary: A Ruby client for HostedGraphite
107
107
  test_files:
108
- - test/fake_adapters.rb
109
108
  - test/helper.rb
110
109
  - test/test_http_protocol.rb
111
110
  - test/test_missing_apikey.rb
@@ -1,13 +0,0 @@
1
- # TODO: Remove this hack and use fake adapters
2
- module HostedGraphite
3
- [TCP, UDP, HTTP].each do |protocol|
4
- protocol.class_eval do
5
-
6
- private
7
-
8
- def send_message(message)
9
- message
10
- end
11
- end
12
- end
13
- end