Skip to content

somawater/deckhand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deckhand

A card-based, user-centric admin interface.

It's a Rails engine with a DSL that produces an Angular.js app for viewing and manipulating your domain objects.

Requirements

Tested with the latest Ruby (2.0)

Node.js, NPM and Browserify are required.

Usage

Make the following changes in your main app:

# Gemfile
gem 'deckhand', github: 'somawater/deckhand'
gem 'sprockets-browserify', github: 'somawater/sprockets-browserify'
# config/initializers/deckhand.rb
Deckhand.configure do
  # examples forthcoming...
end

Tips and troubleshooting

Auto-reloading in development

Add the following to config/initializers/deckhand.rb or anywhere else in the Rails startup sequence:

if Rails.env.development?
  config_file = Rails.root.join('config/initializers/deckhand.rb')
  Deckhand::Engine.config.watchable_files << config_file
end

Spork

Add this to the prefork block in spec_helper.rb (why?):

require 'deckhand'
Spork.trap_method(Deckhand::Configuration, :run)

Heroku

You may want to use this Ruby buildpack, which uses the newest version of Node.js according to semver.io.

Its as simple as creating your Heroku App like this:

heroku create --stack cedar --buildpack https://github.com/somawater/heroku-buildpack-ruby.git#use_latest_stable_node_version

ddollar's multi-buildpack is another option, which we haven't tested.


Lawrence and Matthias at Soma