A Bridge component, in Ruby On Rails, to generate embeds for media items.
- Copy
config/bridgembed.yml.example
toconfig/bridgembed.yml
and set the configurations appropriately - Add configuration files for projects at
config/projects/<environment>/<project-name>.yml
- Copy
config/database.yml.example
toconfig/database.yml
and configure your database appopriately - Install the dependencies:
bundle install
- Copy
config/initializers/secret_token.rb.example
toconfig/initializers/secret_token.rb
- Run
bundle exec rake db:migrate
- Start the server:
bundle exec rails s
- Install the Bridge-embed-ui dependences in package.json with
npm install
— this gives you gulp and browsersync. - At the top level of the sass theme, there is a central Sass file that
@imports
other sass files. - Make sure you run the rails app (per above) and hit the route to trigger the cached embed codes.
gulp
to start watching the Sass files.- Navigate to
http://localhost:3000/medias/embed/test
- You should see confirmation that browser sync loaded in the browser.
- Save your sass file.
- Refresh the browser manually to see your changes (Browsersync is not working at the moment.)
If you need to edit the template (ie by editing the view files, which contain erb) you will want to flush the cache after each HTML change with: rake bridgembed:clear_all_cache
.
- Run
bundle exec rake test
- Or just run specific tests like this:
bundle exec ruby ./test/helpers/medias_test.rb
If you get a Faraday SSL error it's likely trying to read a certificate from an incorrect directory. Checkout http://toadle.me/2015/04/16/fixing-failing-ssl-verification-with-rvm.html and Open-SSL tools to diagnose https://github.com/mislav/ssl-tools