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

Add support Aliyun provider to authenticated_url aliyun #2381

Merged
merged 2 commits into from Apr 30, 2019

Conversation

Nitrino
Copy link
Contributor

@Nitrino Nitrino commented Mar 19, 2019

Adds authenticated_url support when using fog-aliyun

@@ -204,6 +204,9 @@ def authenticated_url(options = {})
connection.get_object_https_url(@uploader.fog_directory, path, expire_at, options)
when 'OpenStack'
connection.get_object_https_url(@uploader.fog_directory, path, expire_at)
when 'Aliyun'
expire_at = expire_at - Time.now
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for this feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this logic require testing?
expire_at is defined in this function and passed to another library.
I see here only the opportunity to test that the url method with the correct parameter was called inside the authenticated_url method. But this test is not of great use.

@mshibuya mshibuya merged commit 44dba53 into carrierwaveuploader:master Apr 30, 2019
@mshibuya
Copy link
Member

fog-aliyun does not support fog mocking, so writing spec is not so easy.
Merging this for now, thanks.

@Nitrino Nitrino deleted the add-azure-and-aliyun branch April 30, 2019 11:16
@Nitrino Nitrino restored the add-azure-and-aliyun branch June 6, 2019 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants