Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Add support for proc arg for fog_public #2302

Merged
merged 1 commit into from
Sep 12, 2016

Conversation

johnnyshields
Copy link
Contributor

This mirrors the implementation for many other args including fog_file

if @options[:fog_public].respond_to?(:has_key?) && @options[:fog_public].has_key?(style)
@options[:fog_public][style]
value = @options[:fog_public]
if value.respond_to?(:has_key?) && value.has_key?(style)

Choose a reason for hiding this comment

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

Use Hash#key? instead of Hash#has_key?.

end

it 'sets the @fog_public instance variable to false' do
assert_equal proc, @dummy.avatar.instance_variable_get('@options')[:fog_public]

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [89/80]

@tute
Copy link
Contributor

tute commented Sep 12, 2016

This looks good, thank you! Why does it fail on Ruby 2.2.2, though?

@johnnyshields
Copy link
Contributor Author

No clue, I don't believe the failures are related to this PR.

@tute
Copy link
Contributor

tute commented Sep 12, 2016

I don't believe the failures are related to this PR.

Indeed it's not: https://travis-ci.org/thoughtbot/paperclip/jobs/159380084

@tute tute merged commit b19f897 into thoughtbot:master Sep 12, 2016
@tute
Copy link
Contributor

tute commented Sep 12, 2016

Thank you!

@johnnyshields johnnyshields deleted the fog-public-proc-master branch September 13, 2016 05:46
@johnnyshields
Copy link
Contributor Author

Thanks for merging so quickly!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants