right_support 2.8.43 → 2.8.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NGQzNzdhMjM4MmVhM2NmZWFkNjYwYzMxYjU3Y2U1NjllMTVhOTBkNA==
5
- data.tar.gz: !binary |-
6
- ZjZkZmExZWIzZDMzYmViY2RiMjY1N2YwZDdkMmMxNDVmM2Y0NjEyMA==
2
+ SHA1:
3
+ metadata.gz: 1ccf49df438e59a3e68687d16f2d02c3d4c3b063
4
+ data.tar.gz: a1b49f1bbd8c6636b7486c3ed80ef59098d46143
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YjY4MGJlMmVhNDdmMzFiNjA5OGI2NjZhZjNhY2ExNDJkYjE5NGE5YWZhZGFj
10
- ZTllMzAxNDYxMjFiOWQ0N2JhMzVhYTZlNmY0ZmEwYWE0OWY4MDQ4ZDNhZWZk
11
- OThkMTFhZTY1ZDAxOWQ3Yjg2NDMwNmRjOTUzNTg2MmViYTBlNzY=
12
- data.tar.gz: !binary |-
13
- MmJmNGRkZWQxYWU0NWNlNjE1Njc5OWY2MjYyZTBmNjYxZmJlMmNjMWM1ODAx
14
- MGJjYjYwZWE5YWU2Mjg5NWI3ZTc0Y2QxMWYxZGRlMTAxYjkwZjFlZDY5OGRj
15
- ZjQ1NDNhMDQ3Mjg1YmMxMDcxYzNiZjgzZjFkMDU0YTk1MTJiMDg=
6
+ metadata.gz: 619e4d070d39eb4b6c0ccfd1b1320414c91a3b761879e6fd42c0965aab2f57b4626f0af2832029664e7856fb52ba226ada85c2dd1016c2be32375fd109b657e1
7
+ data.tar.gz: d8eefa6e0c4b6b3240c26cd77e7000f1a5847f7cff5d629647bf4d60ad4160165f998f71ad74ad15186c6b36cdb6d1cb426f83cc5e69aba6b82056423990db69
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.43
1
+ 2.8.44
@@ -94,9 +94,20 @@ module RightSupport::Rack
94
94
  # @return [Boolean] enabled or not
95
95
  def logging_enabled?(logger, env)
96
96
  path = env["PATH_INFO"]
97
- env["HTTP_X_DEBUG"] || [Logger::DEBUG, :debug].include?(logger.level) ||
98
- @only.any? { |o| o.is_a?(Regexp) ? (path =~ o) : (path == o) } ||
99
- @except.none? { |e| e.is_a?(Regexp) ? (path =~ e) : (path == e) }
97
+
98
+ # the request can always ask for debugging
99
+ if env["HTTP_X_DEBUG"]
100
+ true
101
+ # some apps have a blacklist of boring requests (e.g. health checks)
102
+ elsif @except.any? { |e| e.is_a?(Regexp) ? (path =~ e) : (path == e) }
103
+ false
104
+ # some apps have a whitelist of interesting requests
105
+ elsif @only.any? { |o| o.is_a?(Regexp) ? (path =~ o) : (path == o) }
106
+ true
107
+ # last chance: if whitelist is empty, then we log everything
108
+ else
109
+ @only.empty?
110
+ end
100
111
  end
101
112
 
102
113
  # Log beginning of request
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: right_support 2.8.40 ruby lib
5
+ # stub: right_support 2.8.44 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "right_support"
9
- s.version = "2.8.43"
9
+ s.version = "2.8.44"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Tony Spataro", "Sergey Sergyenko", "Ryan Williamson", "Lee Kirchhoff", "Alexey Karpik", "Scott Messier"]
14
- s.date = "2015-02-02"
14
+ s.date = "2015-04-02"
15
15
  s.description = "A toolkit of useful, reusable foundation code created by RightScale."
16
16
  s.email = "support@rightscale.com"
17
17
  s.extra_rdoc_files = [
@@ -175,3 +175,4 @@ Gem::Specification.new do |s|
175
175
  s.add_dependency(%q<pry-byebug>, [">= 0"])
176
176
  end
177
177
  end
178
+
@@ -54,7 +54,7 @@ describe RightSupport::Rack::RequestLogger do
54
54
  end
55
55
  end
56
56
 
57
- context 'when limit logging extent' do
57
+ context 'given limiting options' do
58
58
  before(:each) do
59
59
  @options = {:except => [/bar/]}
60
60
  @env.merge!('PATH_INFO' => '/foo/bar')
@@ -62,9 +62,9 @@ describe RightSupport::Rack::RequestLogger do
62
62
  @logger.should_receive(:level).and_return(Logger::INFO).by_default
63
63
  end
64
64
 
65
- it 'does not limit if logger in debug mode' do
65
+ it 'limits if logger in debug mode' do
66
66
  @logger.should_receive(:level).and_return(Logger::DEBUG)
67
- @logger.should_receive(:info).at_least.once
67
+ @logger.should_receive(:info).never
68
68
  @middleware.call(@env)
69
69
  end
70
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.43
4
+ version: 2.8.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Spataro
@@ -13,76 +13,76 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-02-02 00:00:00.000000000 Z
16
+ date: 2015-04-07 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rake
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
- - - ~>
22
+ - - "~>"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '10.0'
25
25
  type: :development
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - ~>
29
+ - - "~>"
30
30
  - !ruby/object:Gem::Version
31
31
  version: '10.0'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: jeweler
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ~>
36
+ - - "~>"
37
37
  - !ruby/object:Gem::Version
38
38
  version: '2.0'
39
39
  type: :development
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ~>
43
+ - - "~>"
44
44
  - !ruby/object:Gem::Version
45
45
  version: '2.0'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: ruby-debug
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ! '>='
50
+ - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  type: :development
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ! '>='
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: pry
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ! '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ! '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: pry-byebug
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ! '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  type: :development
82
82
  prerelease: false
83
83
  version_requirements: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  description: A toolkit of useful, reusable foundation code created by RightScale.
@@ -93,10 +93,10 @@ extra_rdoc_files:
93
93
  - LICENSE
94
94
  - README.md
95
95
  files:
96
- - .coveralls.yml
97
- - .rspec
98
- - .simplecov
99
- - .travis.yml
96
+ - ".coveralls.yml"
97
+ - ".rspec"
98
+ - ".simplecov"
99
+ - ".travis.yml"
100
100
  - CHANGELOG.rdoc
101
101
  - Gemfile
102
102
  - Gemfile.lock
@@ -229,12 +229,12 @@ require_paths:
229
229
  - lib
230
230
  required_ruby_version: !ruby/object:Gem::Requirement
231
231
  requirements:
232
- - - ! '>='
232
+ - - ">="
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  requirements:
237
- - - ! '>='
237
+ - - ">="
238
238
  - !ruby/object:Gem::Version
239
239
  version: '0'
240
240
  requirements: []