Skip to content

Commit aa13c4d

Browse files
committed
Satisfy rubocop
1 parent 54d4ce2 commit aa13c4d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/rack_reverse_proxy/errors.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module RackReverseProxy
22
module Errors
33
# GenericURI indicates that url is too generic
4-
class GenericURI < Exception
4+
class GenericURI < RuntimeError
55
attr_reader :url
66

77
def intialize(url)
@@ -14,7 +14,7 @@ def to_s
1414
end
1515

1616
# AmbiguousMatch indicates that path matched more than one endpoint
17-
class AmbiguousMatch < Exception
17+
class AmbiguousMatch < RuntimeError
1818
attr_reader :path, :matches
1919

2020
def initialize(path, matches)

rack-reverse-proxy.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ lib = File.expand_path("../lib", __FILE__)
22
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
33
require "rack_reverse_proxy/version"
44

5+
# rubocop:disable
56
Gem::Specification.new do |spec|
67
spec.name = "rack-reverse-proxy"
78
spec.version = RackReverseProxy::VERSION
@@ -40,3 +41,4 @@ eos
4041
spec.add_development_dependency "bundler", "~> 1.7"
4142
spec.add_development_dependency "rake", "~> 10.3"
4243
end
44+
# rubocop:enable

spec/rack/reverse_proxy_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,9 @@ def app
672672
#:nodoc:
673673
class MatcherHeaders
674674
def self.match(path, headers)
675-
if path.match(%r{^/test}) && headers["ACCEPT"] && headers["ACCEPT"] == "foo.bar"
676-
MatcherHeaders.new
677-
end
675+
MatcherHeaders.new if path.match(%r{^/test}) &&
676+
headers["ACCEPT"] &&
677+
headers["ACCEPT"] == "foo.bar"
678678
end
679679

680680
def url(path)

0 commit comments

Comments
 (0)