Socket
Book a DemoInstallSign in
Socket

sinatra-simple-navigation

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinatra-simple-navigation

4.1.0
bundlerRubygems
Version published
Maintainers
2
Created
Source

!https://badge.fury.io/rb/sinatra-simple-navigation.png!:http://badge.fury.io/rb/sinatra-simple-navigation

h1. sinatra-simple-navigation

sinatra-simple-navigation is a sinatra extension enabling the use of the "simple-navigation":http://github.com/codeplant/simple-navigation gem in your sinatra and padrino applications.

h2. Installation

Either manually install the gem

@gem install sinatra-simple-navigation@

or preferably use bundler and add it to your Gemfile

@gem 'sinatra-simple-navigation'@

and run @bundle install@

h2. Usage

h3. Sinatra Applications

h4. Classic Style

To use simple-navigation in your classic style sinatra application, just require 'sinatra/simple-navigation':

require 'rubygems'
require 'sinatra'
require 'sinatra/simple-navigation'

# Your app code goes here

h4. Modular Style

If you're developing a module style sinatra application (i.e. subclassing Sinatra::Base), you have to register Sinatra::SimpleNavigation:

require 'rubygems'
require 'sinatra/base'
require 'sinatra/simple-navigation'

class MyApp < Sinatra::Base
  register Sinatra::SimpleNavigation
  
  # Your app code goes here
end

h3. Padrino Applications

Using simple-navigation in your padrino application is similar to the modular sinatra style. In your @app/app.rb@ file:

require 'sinatra/simple-navigation'

class MyApp < Padrino::Application
  register Sinatra::SimpleNavigation
  
  # Your app code goes here
end

Instead of requiring sinatra/simple-navigation at the top of the file, you could add this to your Gemfile:

@gem 'sinatra-simple-navigation', :require => 'sinatra/simple-navigation'@

h2. Resources

h2. Legal

Copyright (c) 2014 codeplant GmbH, released under the MIT license

FAQs

Package last updated on 15 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.