librato-rack 2.0.3 → 2.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: 2e87682af9b37ced1a2ba02d00b6635cad23e645
4
- data.tar.gz: b127abcd2ec03184ef80cd8a370c5f8fef4bac5a
3
+ metadata.gz: 486a5fc1c305930b8c60e71454c762936ce7d708
4
+ data.tar.gz: b6b876efe328ce7b4b45318c54cff89857f78bdf
5
5
  SHA512:
6
- metadata.gz: 53bdbf9cc39ccefe383e6688a282ffd417f7b4a70f6d402bb51b2e77a9029591bc09e6beccc4fc1d0d772400314afd6fb2bed73b5ab6e73c449a1d96dad63529
7
- data.tar.gz: 39101eb721b0b5412874eb88d119a42d48b1037616143b4e3d55176b232fec687f011e21bb73ebc52660c54c8ee690723023dfa02fd4c57f0794a03f520145df
6
+ metadata.gz: c1542c83e18eaadd2c555161ecdddfa83f2e63377fd4bc0b33b87693860f9088602ae04ae579e8fc318a3ac810f8ae5f08e1a3cf98ddd710d8a18906db98a90d
7
+ data.tar.gz: bfcae24e6b77da4644cabf0a7f8217ef681ba1ada3a8ebc9a757c447330f8c2f998a661ca7fd7c70437b29bac8d17cdfff0b345860267d8e3d28e05f4de650ab
@@ -50,7 +50,7 @@ module Librato
50
50
  EOS
51
51
 
52
52
  RECORD_RACK_METHOD_BODY = <<-'EOS'
53
- method_tags = { method: http_method.downcase! }
53
+ method_tags = { method: http_method.downcase }
54
54
  tracker.increment "rack.request.method", tags: method_tags, inherit_tags: true
55
55
  tracker.timing "rack.request.method.time", duration, tags: method_tags, inherit_tags: true
56
56
  EOS
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  class Rack
3
- VERSION = "2.0.3"
3
+ VERSION = "2.0.4"
4
4
  end
5
5
  end
@@ -19,19 +19,25 @@ class QueueWaitTest < Minitest::Test
19
19
  def test_milliseconds
20
20
  get '/milli'
21
21
 
22
+ # give jruby a bit more time since it can be slow
23
+ delta = defined?(JRUBY_VERSION) ? 5 : 4
24
+
22
25
  # puts "milli: #{aggregate["rack.request.queue.time"].inspect}"
23
26
  assert_equal 1, aggregate["rack.request.queue.time"][:count],
24
27
  'should track total queue time'
25
- assert_in_delta 5, aggregate["rack.request.queue.time"][:sum], 4
28
+ assert_in_delta 5, aggregate["rack.request.queue.time"][:sum], delta
26
29
  end
27
30
 
28
31
  def test_microseconds
29
32
  get '/micro'
30
33
 
34
+ # give jruby a bit more time since it can be slow
35
+ delta = defined?(JRUBY_VERSION) ? 6 : 4
36
+
31
37
  # puts "micro: #{aggregate["rack.request.queue.time"].inspect}"
32
38
  assert_equal 1, aggregate["rack.request.queue.time"][:count],
33
39
  'should track total queue time'
34
- assert_in_delta 10, aggregate["rack.request.queue.time"][:sum], 4
40
+ assert_in_delta 10, aggregate["rack.request.queue.time"][:sum], delta
35
41
  end
36
42
 
37
43
  def test_queue_start
@@ -46,20 +52,13 @@ class QueueWaitTest < Minitest::Test
46
52
  def test_with_t
47
53
  get '/with_t'
48
54
 
49
- # puts "micro: #{aggregate["rack.request.queue.time"].inspect}"
50
- assert_equal 1, aggregate["rack.request.queue.time"][:count],
51
- 'should track total queue time'
52
- assert_in_delta 20, aggregate["rack.request.queue.time"][:sum], 6
53
- end
54
-
55
- def test_with_period
56
- get '/with_period'
57
-
58
55
  # give jruby a bit more time since it can be slow
59
56
  delta = defined?(JRUBY_VERSION) ? 10 : 6
57
+
58
+ # puts "micro: #{aggregate["rack.request.queue.time"].inspect}"
60
59
  assert_equal 1, aggregate["rack.request.queue.time"][:count],
61
60
  'should track total queue time'
62
- assert_in_delta 25, aggregate["rack.request.queue.time"][:sum], delta
61
+ assert_in_delta 20, aggregate["rack.request.queue.time"][:sum], delta
63
62
  end
64
63
 
65
64
  def test_with_period
@@ -61,6 +61,13 @@ class RequestTest < Minitest::Test
61
61
  assert_equal 1, aggregate.fetch("rack.request.method.time", tags: @tags.merge({ method: "post" }))[:count]
62
62
  end
63
63
 
64
+ def test_request_method_not_mutated
65
+ get '/', {}, {'REQUEST_METHOD' => "GET".freeze}
66
+
67
+ assert_equal 1, counters.fetch("rack.request.method", tags: @tags.merge({ method: "GET" }))[:value]
68
+ assert_equal 1, aggregate.fetch("rack.request.method.time", tags: @tags.merge({ method: "get" }))[:count]
69
+ end
70
+
64
71
  def test_track_exceptions
65
72
  begin
66
73
  get '/exception'
metadata CHANGED
@@ -1,41 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librato-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Sanders
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARydWJ5
14
- MRcwFQYKCZImiZPyLGQBGRYHbGlicmF0bzETMBEGCgmSJomT8ixkARkWA2NvbTAe
15
- Fw0xNzAxMTExODI3MDdaFw0xODAxMTExODI3MDdaMD0xDTALBgNVBAMMBHJ1Ynkx
16
- FzAVBgoJkiaJk/IsZAEZFgdsaWJyYXRvMRMwEQYKCZImiZPyLGQBGRYDY29tMIIB
17
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA58LirwsWnKL1uuClQ0uwA1XL
18
- GpxDuFzSosipiPkzZY3hiHazC8SHDREZQXlm7ITX/o+dueNoB7dt0BR3RPVipH7V
19
- 7cvbCUaZNjEXR5Lal6PsmUsbMTrddkvj3e7flmJv+kMj+teeJ7MDeJTU5wXXV9pD
20
- ThiCDILJMF5CdP8Jru4rSBOP6RmmzYU+0cN5+5pt9xqrycA+Poo2ZuoUMCMsSBvl
21
- PimM3PPvoWTuE41GTn/bLoOVoXQmdwZIbwUSVH8rCDjZSlttOst+xrBw4KG0dYUp
22
- 2UvEe8iCyqEMQ8fEZ7EXuP2WMVICutFbz8Pt4hIMq+OTnDX+mIfma7GvPaKAFwID
23
- AQABozkwNzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQBSxu9Jj4VTrXTpLujPwk9Kzwp
24
- 2jALBgNVHQ8EBAMCBLAwDQYJKoZIhvcNAQEFBQADggEBACvNsw1pGv72xp3LiDlZ
25
- 0tphNP/85RcYyJMklslG3tIYblyo71xHW1UbK5ArUK6k0BN43MuDn3pqLJQttVmi
26
- bUdA3yYi13GeSrrAMlr4nH8Yt/Bn/XpZGliouJUBwh1BjG6dSj1iuR4/9pt9/LtO
27
- QTdIc+07qGspypT0Uh/w/BodEcGuAaZZFlkU9vottTe6wWNnM6hfRExiSIsr+oVe
28
- s8s83ObshjuSzjOqS56IBtNlPEL+D6ghjZZLP3lS6l9p70Pcpcl+IcE4veqZmmKC
29
- sGepgRclC6UbZh+yQ3alXVghM2qsonAwI/rTNmFJN9kQn6nP9+f1Uf/qZFNcjn4L
30
- 9bg=
31
- -----END CERTIFICATE-----
32
- date: 2017-06-23 00:00:00.000000000 Z
11
+ - certs/librato-public.pem
12
+ date: 2018-08-07 00:00:00.000000000 Z
33
13
  dependencies:
34
14
  - !ruby/object:Gem::Dependency
35
15
  name: librato-metrics
36
16
  requirement: !ruby/object:Gem::Requirement
37
17
  requirements:
38
18
  - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2.1'
21
+ - - ">="
39
22
  - !ruby/object:Gem::Version
40
23
  version: 2.1.0
41
24
  type: :runtime
@@ -43,6 +26,9 @@ dependencies:
43
26
  version_requirements: !ruby/object:Gem::Requirement
44
27
  requirements:
45
28
  - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '2.1'
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
33
  version: 2.1.0
48
34
  - !ruby/object:Gem::Dependency
@@ -63,14 +49,14 @@ dependencies:
63
49
  name: minitest
64
50
  requirement: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - "~>"
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  type: :development
70
56
  prerelease: false
71
57
  version_requirements: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
61
  version: '0'
76
62
  description: Rack middleware to report key app statistics and custom instrumentation
@@ -145,32 +131,32 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
131
  version: '0'
146
132
  requirements: []
147
133
  rubyforge_project:
148
- rubygems_version: 2.4.5.1
134
+ rubygems_version: 2.6.11
149
135
  signing_key:
150
136
  specification_version: 4
151
137
  summary: Use Librato Metrics with your rack application
152
138
  test_files:
153
- - test/apps/basic.ru
154
- - test/apps/custom.ru
155
- - test/apps/custom_suites.ru
156
- - test/apps/no_stats.ru
157
- - test/apps/queue_wait.ru
158
- - test/integration/custom_test.rb
159
- - test/integration/no_stats_test.rb
160
- - test/integration/no_suites_test.rb
161
- - test/integration/queue_wait_test.rb
162
- - test/integration/request_test.rb
163
- - test/integration/suites_test.rb
164
- - test/remote/tracker_test.rb
165
- - test/support/environment_helpers.rb
166
- - test/test_helper.rb
167
- - test/unit/collector/aggregator_test.rb
139
+ - test/unit/collector_test.rb
168
140
  - test/unit/collector/counter_cache_test.rb
169
141
  - test/unit/collector/group_test.rb
170
- - test/unit/collector_test.rb
142
+ - test/unit/collector/aggregator_test.rb
171
143
  - test/unit/rack/configuration/suites_test.rb
172
- - test/unit/rack/configuration_test.rb
173
144
  - test/unit/rack/logger_test.rb
174
145
  - test/unit/rack/tracker_test.rb
175
- - test/unit/rack/validating_queue_test.rb
146
+ - test/unit/rack/configuration_test.rb
176
147
  - test/unit/rack/worker_test.rb
148
+ - test/unit/rack/validating_queue_test.rb
149
+ - test/integration/no_stats_test.rb
150
+ - test/integration/queue_wait_test.rb
151
+ - test/integration/request_test.rb
152
+ - test/integration/custom_test.rb
153
+ - test/integration/no_suites_test.rb
154
+ - test/integration/suites_test.rb
155
+ - test/support/environment_helpers.rb
156
+ - test/test_helper.rb
157
+ - test/apps/queue_wait.ru
158
+ - test/apps/custom_suites.ru
159
+ - test/apps/custom.ru
160
+ - test/apps/no_stats.ru
161
+ - test/apps/basic.ru
162
+ - test/remote/tracker_test.rb
@@ -1,2 +0,0 @@
1
- s@��[�W�����X�O���b�`HN�����*�=���
2
- 6!C�j��=�F��U���^�^�~eU�"�Kݦ�x��,��1��鑜L>�����x�u�$�ڳ�~N�c����T�%��E�h�ì>���z����� aZ8sb/�
data.tar.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- �&���}}�I����*H��!���� Fm!|���A"��´ޠi��l�-wPO�7ܩ� H&�C���6i�!��x;��n�v\��86�f���TY��yfS<�MD���A% �=���<�1~a
2
- ���X�'�Nİ�����"��߯��o�X���V�u�����<,�����Ȍ�H|�D����d��\aFh7���
metadata.gz.sig DELETED
@@ -1,4 +0,0 @@
1
- �SY��c� �] �;ql�}z���Z����l�A�U:����7��O暣�
2
- iD�����)��9���T�)'����M�!( ]�z<�~�Jظ��
3
- b�����
4
- CRęA;�tZ)l��ۅ?��5�G" j���~Z�����1q�vk:�#H��Ū1����m��g R?o�ޥ���*:���j��rP��GR��-�td��F&Y�L�K�0�ο�Q�Q�����m�.�5ǎ��n 꾛��%?X�ֹ���f�wϑD