Skip to content

Commit

Permalink
Rename Application.call to handle_lambda to work with exists app
Browse files Browse the repository at this point in the history
  • Loading branch information
elct9620 committed Jan 6, 2024
1 parent 0359408 commit 198df8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/hanami/lambda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.app
# @api public
def self.call(event:, context:)
app.boot
app.call(event: event, context: context)
app.handle_lambda(event: event, context: context)
end

# Inflector to convert event key
Expand Down
2 changes: 1 addition & 1 deletion lib/hanami/lambda/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module ClassMethods
#
# @api private
# @since 0.1.0
def call(event:, context:)
def handle_lambda(event:, context:)
dispatcher.call(event: event, context: context)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/hanami/lambda/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Application < Hanami::Lambda::Application
end
end

describe ".call" do
subject(:call) { app.call(event: event, context: context) }
describe ".handle_lambda" do
subject(:call) { app.handle_lambda(event: event, context: context) }

let(:rack_app) do
lambda do |_env|
Expand Down

0 comments on commit 198df8e

Please sign in to comment.