Skip to content

Configuring browse everything

flyingzumwalt edited this page Apr 1, 2014 · 4 revisions

Using the Generator

If you want to auto-generate a sample config/browse_everything_providers.yml and automatically add BrowseEverything to your routes, run this generator:

$ rails g browse_anything:config

Below is an explanation of how to do these things manually.

Configuring Providers

To use the gem you need to configure the providers by providing applcation keys that are required by each provider

An example config/browse_everything_providers.yml:

---
file_system:
  :home: /<location for server file drop>
sky_drive:
  :client_id: <your client id>
  :client_secret: <your client secret>
box:
  :client_id: <your client id>
  :client_secret: <your client secret>
drop_box:
  :app_key: <your client id>
  :app_secret: <your app secret>
google_drive:
  :client_id: <your client id>
  :client_secret: <your client secret>

You must register your application with each cloud provider separately:

Adding the Routes

You must mount the engine in your routes.rb. You can mount it to any path you wish. If you use the generator, it will automatically mount the engine as shown here:

  mount BrowseEverything::Engine => '/browse'

Note: If you are loading browse-everything into your views via JavaScript, you will need to provide this path in the 'route:' option that you pass into the browseEverything() method.

Clone this wiki locally