-
Notifications
You must be signed in to change notification settings - Fork 3
Add basic Credentials wrapper + ManagedNative mixin #20
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b306424
Add basic Credentials wrapper + Sigv base interface
alextwoods 33158d0
Rubocop cleanups
alextwoods 5356c0f
Clang format
alextwoods 1f64ed8
Fix cleanup issues (use correct function...)
alextwoods a7a1acf
Fix Jruby issue with UINT64 out of range for Time
alextwoods 63577a5
WIP signing config
alextwoods ac50ada
Ensure strings are copied and cleaned up
alextwoods 110459c
Clang cleanup
alextwoods 3e8c886
WIP - Signable impl
alextwoods 0cbdd18
Clean up PR - only include credentials binding
alextwoods 86ce4e7
Add a ManagedNative mixin module to add some generic functionality.
alextwoods 477f093
Merge branch 'master' into signer
alextwoods a16f86c
Use a ByteCursor struct for return types instead of :string
alextwoods 4a23229
Fix jruby failures from missing FFI methods...
alextwoods 6ff266f
Extend attach_function to add error wrapping + custom naming
alextwoods 13fb4f7
Remove credential SDK interface methods
alextwoods 5db602e
Cleanups from PR - remove signer interface
alextwoods 73ec9f3
Rubocop cleanup
alextwoods File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe Aws::Crt::Native do | ||
describe '.attach_function' do | ||
it 'removes the aws_crt_ prefix from C functions' do | ||
expect(Aws::Crt::Native).to respond_to(:test_error) | ||
expect(Aws::Crt::Native).not_to respond_to(:aws_crt_test_error) | ||
end | ||
|
||
it 'creates a ! version of the function' do | ||
expect(Aws::Crt::Native).to respond_to(:test_error!) | ||
end | ||
|
||
it 'raises an error when called on a function that returns an int' do | ||
expect do | ||
Aws::Crt::Native.test_error(3) | ||
end.to raise_error(Aws::Crt::Error) | ||
end | ||
|
||
it 'raises an error when called on a function that returns a pointer' do | ||
expect do | ||
Aws::Crt::Native.test_pointer_error | ||
end.to raise_error(NoMemoryError) | ||
end | ||
|
||
it 'the ! function does not raise an error' do | ||
expect do | ||
Aws::Crt::Native.test_error!(3) | ||
end.not_to raise_error | ||
end | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.