Multimedia story telling for the web.
Ruby JavaScript CSS HTML
Latest commit 2450064 Dec 28, 2016 @tf tf committed on GitHub Merge pull request #690 from tf/upload-rights-plus-signs
Improve special character handling in formDataUtils
Permalink
Failed to load latest commit information.
admins/pageflow Add embed code field to entry admin attributes table Oct 28, 2016
app Improve special character handling in formDataUtils Dec 28, 2016
bin Add scss_lint and rubocop to development dependency Sep 8, 2016
config Add alt text attribute to files Dec 16, 2016
db/migrate Add TextTrackFile Nov 18, 2016
doc Make file meta data items more flexible Dec 16, 2016
lib Add tab for text tracks Nov 25, 2016
spec Improve special character handling in formDataUtils Dec 28, 2016
vendor/assets/javascripts Do not Rely on Events to Set Audio Player Playing State Jun 29, 2015
.doclets.yml Add doclets config file Oct 6, 2016
.gitignore Git ignore coverage directory Oct 20, 2016
.hound.yml Configure Hound for scss and js Aug 20, 2015
.jshintignore extract rails engine from pageflow project May 5, 2014
.jshintrc Render storylines as array in seed data Dec 13, 2016
.pr_log.yml Update PrLog Configuration Jul 27, 2015
.rspec Use Instafail RSpec formatter Nov 4, 2014
.rubocop.yml Do not warn about missing frozen string comment Oct 20, 2016
.rubocop_hound.yml Import new Rubocop Default from Hound Repository Jul 15, 2016
.sassdocrc Add further theme options for player controls Jun 30, 2016
.scss-lint.yml Relax Scss lint config Jun 22, 2016
.travis.yml Try parallel coveralls Aug 31, 2016
CHANGELOG.md Bump version to 0.12.0.dev Sep 9, 2016
CONTRIBUTING.md Optionally specify a host for the dummy instance Mar 4, 2016
Gemfile Update Teaspoon to 2.3 Jul 1, 2016
MIT-LICENSE extract rails engine from pageflow project May 5, 2014
README.md Link to plugins wiki page from README Nov 17, 2016
Rakefile Install semmy release rake tasks Jun 9, 2016
pageflow.gemspec Add policy and specs Sep 22, 2016

README.md

Pageflow

Gem Version Build Status Coverage Status Code Climate

Multimedia story telling for the web.

For a high level introduction and example Pageflow stories see pageflow.io.

Updating

For instructions on how to update from a prior version of the gem see the Updating Pageflow wiki page.

Ingredients

Pageflow is a Rails engine which roughly consists of the following components:

  • A full MVC stack to manage and display Pageflow stories
  • User and permission management with support for isolated accounts and user collaboration
  • A client side application for live preview editing of stories
  • Background jobs to process and encode images, audios and videos
  • Generators to quickly bootstrap a new Rails application

Pageflow assumes the following choice of libraries:

Requirements

Pageflow runs in environments with:

  • Ruby >= 2.1
  • Rails 4.2
  • Redis server (for Resque)
  • A database server supported by Active Record (tested with MySQL)
  • ImageMagick

Accounts of the following cloud services have to be registered:

Installation

Generate a new Rails application using the MySQL database adapter:

$ rails new my_pageflow --database=mysql
$ cd my_pageflow

Do not name your application "pageflow" since it will cause conflicts which constant names created by Pageflow itself.

Database Setup

Enter valid MySQL credentials inside config/database.yml and create the database:

$ rake db:create

Gem Dependencies

Add this line to your application's Gemfile:

# Gemfile
gem 'pageflow'

# Required for Rails 4.1:
gem 'state_machine', git: 'https://github.com/codevise/state_machine.git'

Run bundler to install dependencies:

$ bundle install

Running the Generator

Now you can run the generator to setup Pageflow and its dependencies:

$ rails generate pageflow:install

The generator will invoke Active Admin and Devise generators in turn and apply some configuration changes. When asked to overwrite the db/seeds.rb file, choose yes.

To better understand Pageflow's configuration choices, you can run the single steps of the install generator one by one. See the wiki page The Install Generator in Detail for more. If you'd rather not look behind the scenes for now, you can safely read on.

Database Migration

Now you can migrate the database.

$ rake db:migrate

Finally, you can populate the database with some example data, so things do not look too blank in development mode.

$ rake db:seed

Configuration

Pageflow stores files in S3 buckets also in development mode. Otherwise there's no way to have Zencoder encode them. See the wiki page Setting up external services.

The host application can utilize environment variables to configure the API keys for S3 and Zencoder. The variables can be found in the generated Pageflow initializer.

For available configuration options and examples see the inline docs in config/initializers/pageflow.rb in your generated rails app.

Ensure you have defined default url options in your environments files. Here is an example of default_url_options appropriate for a development environment in config/environments/development.rb:

config.action_mailer.default_url_options = {host: 'localhost:3000'}

In production, :host should be set to the actual host of your application.

Running Pageflow

In addition to the Rails server, you need to start two Rake tasks for the background job processing. These tasks are listed in Procfile which is generated in the project root folder by the Pageflow installer.

Consider using the foreman gem to start all of these processes (including the Rails server) with a single command in your development environment.

Troubleshooting

If you run into problems during the installation of Pageflow, please refer to the Troubleshooting wiki page. If that doesn't help, consider filing an issue.

Special Thanks

We would like to express our special thanks to the following services for supporting Pageflow through free open source plans:

BrowserStack Travis CI