-
Notifications
You must be signed in to change notification settings - Fork 8
Allow passing multiple resources when using resource options #18
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
base: master
Are you sure you want to change the base?
Conversation
leonelgalan
left a comment
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.
Sorry for the late review, I'm hoping the new Github Inbox, make sit less likely that I would dismiss important notifications.
Thanks for your contribution!
| end | ||
|
|
||
| def self.build_resources(resource, conditions) | ||
| [ resource ].flatten.map do |r| |
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.
We could change [resource].flatten to Array(resource).
| With multiple resources | ||
|
|
||
| ```ruby | ||
| url = Aws::CF::Signer.sign_url 'http://d604721fxaaqy9.cloudfront.net/training/orientation.avi', | ||
| expires: 'Sat, 14 Nov 2009 22:20:00 GMT', | ||
| resource: [ 'http://d604721fxaaqy9.cloudfront.net/training/*', 'http://d604721fxaaqy9.cloudfront.net/lessons/*' ], | ||
| ip_range: '145.168.143.0/24' | ||
| ``` | ||
|
|
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.
What's the use case here?
Why not http://d604721fxaaqy9.cloudfront.net/*?
In "Creating a Policy Statement for a Signed URL That Uses a Custom Policy", it says:
Note the following:
- You can include only one statement.
| end | ||
| end | ||
|
|
||
| def self.build_resources(resource, conditions) |
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.
Don't you think build_statements would be a more appropriate name? It seem you are building an array of statements, all with Resource and Condition.
No description provided.