Skip to content

Commit 289c3ae

Browse files
committed
fix: use initialize signature compatible with ActionPack 8.1.3
ActionDispatch::MiddlewareStack::Middleware expects 2 arguments, but sees `initialize(app, options={})` as having one argument.
1 parent 291face commit 289c3ae

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/ipinfo-rails.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def is_bot(request)
1717
end
1818

1919
class IPinfoMiddleware
20-
def initialize(app, options = {})
20+
def initialize(app, _args = [], **options )
2121
@app = app
2222
@token = options.fetch(:token, nil)
2323
@ipinfo = IPinfo.create(@token, options)
@@ -47,7 +47,7 @@ def call(env)
4747
end
4848

4949
class IPinfoLiteMiddleware
50-
def initialize(app, options = {})
50+
def initialize(app, _args = [], **options )
5151
@app = app
5252
@token = options.fetch(:token, nil)
5353
@ipinfo = IPinfoLite.create(@token, options)
@@ -77,7 +77,7 @@ def call(env)
7777
end
7878

7979
class IPinfoCoreMiddleware
80-
def initialize(app, options = {})
80+
def initialize(app, _args = [], **options)
8181
@app = app
8282
@token = options.fetch(:token, nil)
8383
@ipinfo = IPinfoCore.create(@token, options)
@@ -107,7 +107,7 @@ def call(env)
107107
end
108108

109109
class IPinfoPlusMiddleware
110-
def initialize(app, options = {})
110+
def initialize(app, _args = [], **options)
111111
@app = app
112112
@token = options.fetch(:token, nil)
113113
@ipinfo = IPinfoPlus.create(@token, options)
@@ -137,7 +137,7 @@ def call(env)
137137
end
138138

139139
class IPinfoResproxyMiddleware
140-
def initialize(app, options = {})
140+
def initialize(app, _args = [], **options)
141141
@app = app
142142
@token = options.fetch(:token, nil)
143143
@ipinfo = IPinfo.create(@token, options)

0 commit comments

Comments
 (0)