harness 1.0.2 → 2.0.0

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: c621f0565fab4b45960f6a814fd7ed3d1d89d0d8
4
- data.tar.gz: 8c7dbfafe7e69c8d804b16b71efdf795857d34b4
3
+ metadata.gz: fd199367bd92325be222da9cfe81f057b872c6d5
4
+ data.tar.gz: 01dc5207e0adef3848d8134a265796e932396bdb
5
5
  SHA512:
6
- metadata.gz: 1edb1b9764a41e950b1c497c438349ad9f89cdc91959661442c20549dec30d4ab0567bd44bde4a705d85665a8c406d14ecedef07ccadee35fe849af7045082e8
7
- data.tar.gz: 919ed338cf840796b308548f537e1aaaf8c2eef107eb3d2a0cae91c34568c3312432ce8b5c9f38332c38bb21934e8103b1914c871768fbbe65a4ddfec2e518c6
6
+ metadata.gz: 0ae1b7e04c1e8cab252f5e843a545d756a77a9ec90044e46e06c5369105232d4424555d835470ad28b1a0fe71f494363de403e223cb23e5767c40bc338f56058
7
+ data.tar.gz: 8b7a00485f0fb64d333517a2abb26c6f738e303ba618419924bdc0427e9404e6a85b43154f3fbee9fa785dd5e0acba8e08558d9b43d0e0e3a1f1173b514c1937
@@ -1,3 +1,7 @@
1
+ # Version 2.0.0 - 2014-12-01
2
+
3
+ * Remove `ActiveSupport::Notifications` support
4
+
1
5
  # Version 0.5.0 - 2013-02-26
2
6
 
3
7
  * Adapters are no longer required for you. See #16
@@ -15,7 +15,6 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Harness::VERSION
17
17
 
18
- gem.add_dependency "activesupport", ">= 3"
19
18
  gem.add_dependency "statsd-ruby"
20
19
 
21
20
  gem.add_development_dependency "simplecov"
@@ -1,7 +1,6 @@
1
1
  require "harness/version"
2
2
 
3
3
  require 'statsd'
4
- require 'active_support/notifications'
5
4
 
6
5
  module Harness
7
6
  class Config
@@ -103,6 +102,5 @@ require 'harness/null_collector'
103
102
  require 'harness/fake_collector'
104
103
 
105
104
  require 'harness/instrumentation'
106
- require 'harness/subscription'
107
105
 
108
106
  Harness.config.queue = Harness::AsyncQueue.new
@@ -1,3 +1,3 @@
1
1
  module Harness
2
- VERSION = "1.0.2"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -46,10 +46,6 @@ class MiniTest::Unit::TestCase
46
46
  assert counter, "counter #{name} not logged!"
47
47
  end
48
48
 
49
- def instrument(name, data = {}, &block)
50
- ActiveSupport::Notifications.instrument name, data, &block
51
- end
52
-
53
49
  def collector
54
50
  Harness.config.collector
55
51
  end
metadata CHANGED
@@ -1,69 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ahawkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-05 00:00:00.000000000 Z
11
+ date: 2014-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '3'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '3'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: statsd-ruby
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - '>='
17
+ - - ">="
32
18
  - !ruby/object:Gem::Version
33
19
  version: '0'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - '>='
24
+ - - ">="
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: simplecov
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - '>='
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
33
  version: '0'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - '>='
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - '>='
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - '>='
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  description: Collect high level application performance metrics and forward them for
@@ -74,8 +60,8 @@ executables: []
74
60
  extensions: []
75
61
  extra_rdoc_files: []
76
62
  files:
77
- - .gitignore
78
- - .travis.yml
63
+ - ".gitignore"
64
+ - ".travis.yml"
79
65
  - CHANGELOG.md
80
66
  - Gemfile
81
67
  - LICENSE
@@ -87,11 +73,9 @@ files:
87
73
  - lib/harness/fake_collector.rb
88
74
  - lib/harness/instrumentation.rb
89
75
  - lib/harness/null_collector.rb
90
- - lib/harness/subscription.rb
91
76
  - lib/harness/sync_queue.rb
92
77
  - lib/harness/version.rb
93
78
  - test/acceptance_test.rb
94
- - test/active_support_notifications_test.rb
95
79
  - test/async_queue_test.rb
96
80
  - test/instrumentation_test.rb
97
81
  - test/null_collector_test.rb
@@ -105,23 +89,22 @@ require_paths:
105
89
  - lib
106
90
  required_ruby_version: !ruby/object:Gem::Requirement
107
91
  requirements:
108
- - - '>='
92
+ - - ">="
109
93
  - !ruby/object:Gem::Version
110
94
  version: '0'
111
95
  required_rubygems_version: !ruby/object:Gem::Requirement
112
96
  requirements:
113
- - - '>='
97
+ - - ">="
114
98
  - !ruby/object:Gem::Version
115
99
  version: '0'
116
100
  requirements: []
117
101
  rubyforge_project:
118
- rubygems_version: 2.0.3
102
+ rubygems_version: 2.2.0
119
103
  signing_key:
120
104
  specification_version: 4
121
105
  summary: ''
122
106
  test_files:
123
107
  - test/acceptance_test.rb
124
- - test/active_support_notifications_test.rb
125
108
  - test/async_queue_test.rb
126
109
  - test/instrumentation_test.rb
127
110
  - test/null_collector_test.rb
@@ -1,7 +0,0 @@
1
- ActiveSupport::Notifications.subscribe do |*args|
2
- event = ActiveSupport::Notifications::Event.new(*args)
3
- next if event.payload[:exception]
4
-
5
- Harness::Timer.from_event(event).log if event.payload[:timer]
6
- Harness::Counter.from_event(event).log if event.payload[:counter]
7
- end
@@ -1,93 +0,0 @@
1
- require_relative 'test_helper'
2
-
3
- class ActiveSupportNotificationsTestCase < MiniTest::Unit::TestCase
4
- def test_timers_are_logged
5
- instrument 'test', timer: true
6
-
7
- refute_empty timers
8
- timer = timers.first
9
- assert_equal 'test', timer.name
10
- assert_kind_of Float, timer.ms
11
- end
12
-
13
- def test_timer_name_can_be_customized
14
- instrument 'test', timer: 'foo'
15
-
16
- refute_empty timers
17
- timer = timers.first
18
- assert_equal 'foo', timer.name
19
- end
20
-
21
- def test_timer_rate_can_be_customized
22
- instrument 'test', timer: { rate: 0.5, name: 'foo', value: 5 }
23
-
24
- refute_empty timers
25
- timer = timers.first
26
- assert_equal 0.5, timer.rate
27
- assert_equal 'foo', timer.name
28
- end
29
-
30
- def test_passed_value_does_not_override_blocks
31
- instrument 'test', timer: { rate: 0.5, name: 'foo', value: 5 }
32
-
33
- refute_empty timers
34
- timer = timers.first
35
- refute_equal 5, timer.value
36
- end
37
-
38
- def test_does_not_log_timers_on_exception
39
- begin
40
- instrument 'test', timer: true do
41
- raise
42
- end
43
- rescue
44
- end
45
-
46
- assert_empty timers
47
- end
48
-
49
- def test_counters_with_no_value_are_treated_as_increments
50
- instrument 'test', counter: true
51
-
52
- refute_empty increments
53
- counter = increments.first
54
- assert_equal 'test', counter.name
55
- end
56
-
57
- def test_counters_can_have_explicit_values
58
- instrument 'test', counter: 5
59
-
60
- refute_empty counters
61
- counter = counters.first
62
- assert_equal 'test', counter.name
63
- end
64
-
65
- def test_counter_name_can_be_customized
66
- instrument 'test', counter: 'foo'
67
-
68
- refute_empty increments
69
- counter = increments.first
70
- assert_equal 'foo', counter.name
71
- end
72
-
73
- def test_counter_rate_can_be_customized
74
- instrument 'test', counter: { rate: 0.5, name: 'foo', value: 5 }
75
-
76
- refute_empty counters
77
- counter = counters.first
78
- assert_equal 0.5, counter.rate
79
- assert_equal 'foo', counter.name
80
- assert_equal 5, counter.value
81
- end
82
-
83
- def test_does_not_log_counters_on_exceptions
84
- begin
85
- instrument 'test', counter: true do
86
- raise
87
- end
88
- rescue
89
- end
90
-
91
- assert_empty counters
92
- end
93
- end