Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruby 2.7 argument warnings #38

Merged
merged 1 commit into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/web_pipe.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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