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

Improve Fog Loading #1620

Merged
merged 2 commits into from
Apr 12, 2015

Conversation

plribeiro3000
Copy link
Member

This PR is an attempt to create an easy support for both providers within fog and the ones that were already extracted.
Instead of rely on constant definition to load fog support, now it depends on a configuration.
If fog_provider is not defined carrierwave will try to load fog completely. If the user has only fog-aws on its Gemfile it will fail.
The use won't need to require any fog specifics before carrierwave anymore because carrierwave will do that now.
The optimized loading of fog is not necessary if the user is using an extracted provider and google was extracted so i did some changes on README reflecting this.

Let me know if i need to change something else or something is wrong.

@bensie
Copy link
Member

bensie commented Apr 12, 2015

Awesome, thanks!

bensie added a commit that referenced this pull request Apr 12, 2015
@bensie bensie merged commit 0579008 into carrierwaveuploader:master Apr 12, 2015
@plribeiro3000 plribeiro3000 deleted the improve-fog-loading branch April 12, 2015 14:37
@plribeiro3000
Copy link
Member Author

Wow. Thank you for the fast support. ❤️

@plribeiro3000
Copy link
Member Author

@bensie When will be a new release including this changes?

@avgerin0s
Copy link
Member

@plribeiro3000 Nice! :) Thanks

@plribeiro3000
Copy link
Member Author

@bensie @eavgerinos Did i forgot something in here?
In a second thought i think the tests should break somehow. Or perhaps i should add tests for this new config. Do you guys think it would be good to have tests for this?

@thejbsmith
Copy link

I was having the same issue, and this fixed it for the most part.

One note: config.fog_provider = 'fog-aws' should be config.fog_provider = 'fog/aws'. With the directory structure of the fog-aws gem, there is no fog-aws.rb file, the file is located at fog/aws.rb.

Once I got that switched, this seems to work great for me. Probably worth updating the README.

@avgerin0s
Copy link
Member

@thejbsmith Fixed :)

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.

4 participants