0.0
No commit activity in last 3 years
No release in over 3 years
This is a basic vide management admin tool for spud. Useful for allowing customers to add videos to a video library, control order, link to vimeo or youtube.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 1.0.0.RC1
= 0.14.0
= 0.3.11
= 2.14.0
= 2.14.0
~> 3.0.1
~> 0.6.4

Runtime

>= 0
>= 4.0.0
>= 1.0.0
 Project Readme

Spud Videos

Spud Videos is an engine for managing and embedding Youtube / Vimeo videos, designed for use with Spud and Spud CMS.

Installation/Usage

  1. In your Gemfile add the following

    gem 'spud_videos'

  2. Run bundle install

  3. Copy in database migrations to your new rails project

    bundle exec rake railties:install:migrations rake db:migrate

  4. Run a rails server instance and point your browser to /spud/admin

Configuration

Spud Videos accepts the following configuration options:

Spud::Videos.configure do |config|
  config.base_layout = "application"
  config.enable_videos_route = true
  config.default_dimensions = [560,315]
end

Adding a Video

Videos are added in the Spud admin. When adding a video, you can specify wether the video is hosted on youtube or vimeo. It is also possible to specify a name and description for the video which can be rendered on the /videos url. In many cases, it may be unnecessary to have the videos route. Spud Videos makes it easy to embed videos into spud_cms pages by using liquid tags.

Helpers

Videos provides a helper method for rendering these embedded videos:

spud_video(set_or_identifier, options)

Example:

spud_video(:promotional, {:width => 500, :height => 300})

Liquid

Spud Videos comes with its own custom Liquid tag. For now the liquid tag only supports rendering the standard html as generated by the spud_video. Will support more advanced options in the future.

Usage:

  <%= raw Liquid::Template.parse("{% video Promotion width=500 height=300 %}").render %>

Testing

Spud uses RSpec for testing. Get the tests running with a few short commands:

  1. Create and migrate the databases:

    rake db:create rake db:migrate

  2. Load the schema in to the test database:

    rake app:db:test:prepare

  3. Run the tests with RSpec

    rspec spec

After the tests have completed the current code coverage stats is available by opening /coverage/index.html in a browser.