No description, website, or topics provided.
Ruby HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin First commit. May 12, 2015
config
lib
test
.gitignore
.ruby-gemset
.ruby-version
CHANGELOG.md Updated changelog format. Jan 10, 2018
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
shogun.gemspec

README.md

Shogun

Add Shogun to your Gemfile:

# Gemfile
gem 'shogun', github: 'getshogun/shogun_rails'

Run bundle install

Sign up and find your environment variables in settings. Add these to your env:

SHOGUN_SITE_ID={your site id}
SHOGUN_SECRET_TOKEN={your secret token}

If you are using Unicorn, you also need to add this line in your after_fork configuration block:

Shogun.daemon.call

Full example:

# config/unicorn.rb
after_fork do
  ...
  Shogun.daemon.call
  ...
end

Advanced configuration options

automount

Shogun will automatically mount itself in your routes. You can disable this functionality and manually mount shogun by creating an initializer:

# config/initializers/shogun.rb
Shogun.automount = false

You will then need to mount Shogun manually in your config/routes.rb file:

# config/routes.rb
mount Shogun::Engine => '/'

layout

Shogun will use your application layout by default. You can override this with the name of another layout:

# config/initializers/shogun.rb
Shogun.layout = "my_special_layout"

Manually setting site_id and secret_token

If you name your environment variables appropriately, these are picked up automatically by Shogun. These can also be set manually:

# config/initializers/shogun.rb
Shogun.site_id = "the_site_id"
Shogun.secret_token = "the_secret_token"

This project rocks and uses MIT-LICENSE.