Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.
/ bridge-reader Public archive

Channel and media reader for Meedan Bridge, a collaborative media translation app

Notifications You must be signed in to change notification settings

meedan/bridge-reader

Repository files navigation

Bridge Reader

Code Climate Test Coverage Travis

A Bridge component, in Ruby On Rails, to generate embeds for media items.

Workflow

Code Flow

Installing the system

  • Copy config/bridgembed.yml.example to config/bridgembed.yml and set the configurations appropriately
  • Add configuration files for projects at config/projects/<environment>/<project-name>.yml
  • Copy config/database.yml.example to config/database.yml and configure your database appopriately
  • Install the dependencies: bundle install
  • Copy config/initializers/secret_token.rb.example to config/initializers/secret_token.rb
  • Run bundle exec rake db:migrate
  • Start the server: bundle exec rails s

Editing the Sass

  • 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.)

Editing the HTML

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.

Running the tests

  • Run bundle exec rake test
  • Or just run specific tests like this: bundle exec ruby ./test/helpers/medias_test.rb

Special note for Mac El Capitan Users

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