Skip to content

Commit

Permalink
Fix ruby 2.7 argument warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
waiting-for-dev committed Dec 30, 2019
1 parent 5136880 commit 4ef8bfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/web_pipe.rb
Expand Up @@ -14,8 +14,8 @@ def self.included(klass)
klass.include(call)
end

def self.call(*args)
DSL::Builder.new(*args)
def self.call(**opts)
DSL::Builder.new(**opts)
end

register_extension :cookies do
Expand Down
6 changes: 4 additions & 2 deletions lib/web_pipe/extensions/dry_view/dry_view.rb
Expand Up @@ -125,7 +125,7 @@ def view(view_spec, **kwargs)

set_response_body(
view_instance.call(
view_input
**view_input
).to_str
)
end
Expand All @@ -145,7 +145,9 @@ def view_input(kwargs, view_instance)
.config
.default_context
.with(
fetch_config(VIEW_CONTEXT_KEY, DEFAULT_VIEW_CONTEXT).call(self)
**fetch_config(
VIEW_CONTEXT_KEY, DEFAULT_VIEW_CONTEXT
).call(self)
)
kwargs.merge(context: context)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/support/middlewares.rb
Expand Up @@ -17,9 +17,9 @@ class LastNameMiddleware
attr_reader :app
attr_reader :name

def initialize(app, name:)
def initialize(app, opts)
@app = app
@name = name
@name = opts[:name]
end

def call(env)
Expand Down

0 comments on commit 4ef8bfa

Please sign in to comment.