public
Description: An insignificant rack-based framework
Homepage: http://github.com/arthurgeek/nyane
Clone URL: git://github.com/arthurgeek/nyane.git
Click here to lend your support to: nyane and make a donation at www.pledgie.com !
commit  492f579f63b1d1e72e0d741c85be754542c8aa1b
tree    b787076cd5eff03ab2a5c870aa051a75b6de54fa
parent  18e393b70726374afc44478bd40406ea388f5d5b
nyane /
name age message
file .gitignore Fri Dec 19 22:37:41 -0800 2008 Implemented POST support :) [arthurgeek]
file LICENSE Mon Oct 27 17:33:30 -0700 2008 Packaging it as a gem [arthurgeek]
file README.markdown Fri Nov 07 21:32:47 -0800 2008 Updated README [arthurgeek]
file Rakefile Fri Nov 07 21:28:24 -0800 2008 Added some specs [arthurgeek]
directory demo/ Fri Dec 19 22:46:14 -0800 2008 Added redirect_to method [arthurgeek]
directory lib/ Fri Dec 19 22:46:14 -0800 2008 Added redirect_to method [arthurgeek]
file nyane.gemspec Fri Dec 19 23:47:22 -0800 2008 GitHub has issues with date on gemspec (http://... [arthurgeek]
directory spec/ Fri Dec 19 22:46:14 -0800 2008 Added redirect_to method [arthurgeek]
README.markdown

Nyane

DESCRIPTION:

Nyane means insignificant in Sesotho, a Bantu Language.

As it's name says, Nyane is an insignificant framework. It was build for educational purposes only. It's not intended to be used in production.

Nyane is based on Invisible (a nice pico-framework Rack-based) but way simpler.

INSTALLATION:

git clone git://github.com/arthurgeek/nyane.git
cd nyane
gem build nyane.gemspec
sudo gem install nyane --local

or

sudo gem install arthurgeek-nyane --source=http://gems.github.com

DEMO APP:

require "rubygems"
require "nyane"

app = Nyane.new do
  get "/" do
    "Hello!"
  end

  get "/bye" do
    "Goodbye"
  end

  get "/echo/(.*)" do |text|
    "#{text}"
  end

end

run app

ERB SUPPORT:

Nyane supports ERB, but you need to explicitly require it

require "rubygems"
require "nyane"
require "nyane/erb"

app = Nyane.new do
  get "/" do
    erb :index
  end

  get "/foo" do
    erb :foo, :layout => false
  end

end

run app

The views need to be at views/ or you can specify it with app.views_directory = "directory_of_views". The layout used is views/layout.erb. To not render a layout, use erb :template, :layout => false. You can also tell which layout to use with erb :template, :layout => :layout

RUNNING THE APP:

The app itself is a Rack config file, so, you can run with: rackup demo.ru and view it at http://localhost:9292 or with Thin: thin start -R demo.ru

The extension needs to be .ru (rack config file)

MAINTAINER

LICENSE:

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.