-
Notifications
You must be signed in to change notification settings - Fork 6
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
Interceptors #137
Interceptors #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Looks good so far.
codegen/smithy-ruby-codegen-test/integration-specs/interceptor_spec.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just minor nit picky stuff
let(:client) { Client.new(config) } | ||
|
||
it 'applies interceptors in expected order' do | ||
expect(Plugins::TestPlugin::TEST_CLASS_INTERCEPTOR).to receive(hook).ordered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use any_instance_of with the above change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to be specific rather than use any_instance_of.
let(:operation_interceptor) { interceptor_class.new('op') } | ||
|
||
let(:config_plugin) do | ||
proc { |cfg| cfg.interceptors << config_plugin_interceptor} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space before }
on this and below - we should enable rubocop styling/auto correct on spec files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ran rubocop on all of these. But we should long term find a way to run it on all of these integration specs, but not on generated gems....
...-codegen/src/main/java/software/amazon/smithy/ruby/codegen/middleware/MiddlewareBuilder.java
Show resolved
Hide resolved
last_error | ||
end | ||
|
||
def dup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal @return
docs for these
Description of changes:
Adds Interceptors to Hearth:
interceptor_hook
method).VALIDATE
). Updated host_prefix to to use Relative to (before) Build.Future PRs:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.