chromembed_rails

Rails Engine for applications that are strongly coupled to Chrome extensions.

Features

This engine automates the scenario where you have a Chrome extension to accompany your Web application, and you’d like to deploy the extension in lock-step with your application.

If you need to use experimental APIs in your extension, you will also have to self-host your extension. This engine reduces the pain of hosting.

The engine adds the following routes to your application:

  • chrome_extension.crx serves your extension, readily packaged for installation

  • chrome_extension/update.xml works with Chrome’s auto-update engine

Usage

Add the engine gem to your Gemfile

gem 'chromembed_rails', '>= 0.1.0'

Run the generator to get your application set up.

rails g chromembed:all

Develop your Chrome extension in the desktop/chrome_extension directory. Alternatively, tweak config/initializers/chrome_extension.rb to reflect your extension’s path.

You can use chrome_extension_path in your views, to prompt your users to download the extension.

When you have an updated version of your extension that you’d like to push to your users, bump the version number in the extension’s manifest.json.

Contributing to chromembed_rails

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Victor Costan. See LICENSE.txt for further details.