rack-graphite 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d2dc776e618ab4437671a1ad0a633b7fff5a8853
4
- data.tar.gz: 197ba030806dd7afe72d98738792780777d1abde
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODUwYmI4ZDI2ZmFiNjgyYTQ3YWI2NGRhZGEyOWU4NWZkZGE2ZmE5ZQ==
5
+ data.tar.gz: !binary |-
6
+ MWU3YTJhYWMzZTk2MTQzZDczZGQxNTUwM2E2MzY4NGY1OGIwYmYyYQ==
5
7
  SHA512:
6
- metadata.gz: a37ad68c38df792a99404e573f4c8814f865d82cf933399a0e6a6cc2f7db50986015ae8a309b29e266cb1301b9d04be31db5ec292b8fe63d243587bf78135e49
7
- data.tar.gz: 1c3b24ecdbb52da24a636af2ef6a0697c7ba4085513cd996e49bb351a0fe7a3928e7c5b992effed98803795c79307dffb08725a5eca3f3f2d9e64eaae82ddc14
8
+ metadata.gz: !binary |-
9
+ ZGIzMGVhMTNhMWZkYTRmZWQ3ZWFjZjFhNGM1YWYzNzM3ZmY4ODI2MzA3NGY3
10
+ ODdjMTRlNjdiNzc0ZmZlZGMyYmM3NDYyZTE5NjE2YmZlZDIwZTE1YjRhNDNk
11
+ NjBiMmNjZGUxNzBhYTlkYzFjZDZiZjI4NDNmZWI4YzJjY2RhOWY=
12
+ data.tar.gz: !binary |-
13
+ MDU2M2Y3NzM5M2MwNTNiYzI5OWEyNTE1YzRlMWJmYmQ1ODc5YzdkMTJiOWRj
14
+ NjI4MWNhMTRiZWE5NGFkMTU3ZDRlM2Q5ZmZlNTM5MmQ5MzU1OThmMTM4M2Fl
15
+ YmVkYTc3MzQzOWNkYjZhYmU2NDg2YWY3ZDg3MjFiY2VmNmFmYzk=
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class Graphite
3
- VERSION = '1.4.1'
3
+ VERSION = '1.5.0'
4
4
  end
5
5
  end
data/lib/rack/graphite.rb CHANGED
@@ -5,8 +5,8 @@ module Rack
5
5
  PREFIX = 'requests'
6
6
  ID_REGEXP = %r{/\d+(/|$)} # Handle /123/ or /123
7
7
  ID_REPLACEMENT = '/id\1'.freeze
8
- GUID_REGEXP = %r{/\h{8}-\h{4}-\h{4}-\h{4}-\h{12}(/|$)} # Handle /GUID/ or /GUID
9
- GUID_REPLACEMENT = '/guid\1'.freeze
8
+ GUID_REGEXP = %r{\h{8}-\h{4}-\h{4}-\h{4}-\h{12}} # Handle *GUID*
9
+ GUID_REPLACEMENT = 'guid'.freeze
10
10
 
11
11
  def initialize(app, options={})
12
12
  @app = app
@@ -57,11 +57,16 @@ describe Rack::Graphite do
57
57
  it { should eql('requests.get.one.v1.two') }
58
58
  end
59
59
 
60
- context 'with a guid embedded in a path' do
60
+ context 'with a guid embedded in a path with slashes' do
61
61
  let(:path) { "/one/#{guid}/five" }
62
62
  it { should eql('requests.get.one.guid.five') }
63
63
  end
64
64
 
65
+ context 'with a guid embedded in a path without slashes' do
66
+ let(:path) { "/one_#{guid}_one/five" }
67
+ it { should eql('requests.get.one_guid_one.five') }
68
+ end
69
+
65
70
  context 'with a path ending in a guid' do
66
71
  let(:path) { "/one/#{guid}" }
67
72
  it { should eql('requests.get.one.guid') }
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - R. Tyler Croy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2017-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lookout-statsd
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.2'
41
41
  description: Simple Rack middleware for logging request counts/timing information
@@ -45,7 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".gitignore"
48
+ - .gitignore
49
49
  - Gemfile
50
50
  - LICENSE
51
51
  - README.md
@@ -65,17 +65,17 @@ require_paths:
65
65
  - lib
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ">="
68
+ - - ! '>='
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.4.5
78
+ rubygems_version: 2.4.6
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple Rack middleware for logging request counts/timing information