![Exotic Fruit](http://www.bctree.com/images/photos/sourced-mango.jpg) Image courtesy of [B.C. Tree Fruits LTD.](http://www.bctree.com/products/sourced/mango.php) Mango release 0.5.0.beta4 (October 24, 2010) ============================================ Copyright (c) 2010 Ryan Sobol. Licensed under the MIT license. Please see the {file:LICENSE} for more information. * **Source Code**: [http://github.com/ryansobol/mango](http://github.com/ryansobol/mango) * **Documentation**: [http://rubydoc.info/github/ryansobol/mango](http://rubydoc.info/github/ryansobol/mango) * **Issue Tracker**: [http://github.com/ryansobol/mango/issues](http://github.com/ryansobol/mango/issues) * **Wiki**: [http://wiki.github.com/ryansobol/mango](http://wiki.github.com/ryansobol/mango) **Mango respects [Semantic Versioning](http://semver.org/)!** WHAT'S NEW? ----------- ### Features * Mango has been split into two pieces! 1. A web framework, distributed as a Ruby gem, that is completely abstracted away from application code. 2. A `mango` command-line tool that generates a [demo Mango application](http://mango-fireworks.heroku.com/). * Mango now supports theme-switching! * For example, add `class Mango::Application; set :theme, "theme_name"; end` to your application's config.ru. * As a result of the new command-line application generator, all embedded application code has been removed. * Now routes like `GET /images/` return a 200 response if the `themes/default/public/images/index.html` file is exists. ### Dependencies * Added [RubyGems](https://rubygems.org/) 1.3.7 * Updated [Ruby](http://www.ruby-lang.org/) to 1.9.1 or 1.9.2 * Updated [Bundler](http://gembundler.com/) to 1.0.3 * Updated [Haml](http://haml-lang.com/) to 3.0.22 * Updated [Sass](http://sass-lang.com/) to 3.0.22 (bundled with Haml) * Updated [BlueCloth](http://deveiate.org/projects/BlueCloth) to 2.0.9 * Updated [Rack::Test](http://github.com/brynary/rack-test) to 0.5.6 * Updated [RSpec](http://rspec.info/) to 2.0.1 * Updated [YARD](http://yardoc.org/) to 0.5.8 * Updated [YARD::Sinatra](http://github.com/rkh/yard-sinatra) to 0.5.1 ### Bugs * The NOT_FOUND handler no longer renders the 404 template within a layout template. * Improved install-time and run-time error messages for Ruby 1.8 environments Please see {file:CHANGES.mdown} for the historical overview of the project. SYNOPSIS -------- **Mango is a dynamic, database-free, and open source website framework that is designed to make life easier for small teams of designers, developers, and content writers.** FEATURES -------- 1. Easy to install: Mango installs as a RubyGem and can generate a basic website structure in seconds. 2. Easy to publish: Supports many types of deployments like direct SFTP uploading and source control systems like Git, Mercurial, SVN, CSV, etc. 3. Easy to write: Mango let's you publish to the web using the tools you're already familiar with -- the file system and your trusty text editor. Mango supports a variety of formats include Markdown, HAML, HTML, SASS, CSS, and JavaScript. These files are easier to create and revise then working with database records. Say goodbye to clunky administrator interfaces for managing content! 4. Easy to deploy: There's no database to install, configure, and manage. 5. Easy to understand: Mango is perfect for smalls teams of varying levels of coding expertise. Why not take the simple route where everyone is on the same page? Instead of struggling with complex platforms, which most CMS are, Mango is perfect for people who has no coding experience. 6. Easy on the wallet: It's free! 7. Easy to... SPEED: A major advantage of a database-less website framework is speed. Database queries slow down servers. On a high traffic website, this has a dramatic effect on the speed of the site. With minimal server side scripting and zero database queries, Mango is lightening fast. REQUIREMENTS ------------ **Required dependencies** * [Ruby](http://www.ruby-lang.org/) 1.9.1 or 1.9.2 ([RVM](http://rvm.beginrescueend.com/) recommended) * [RubyGems](https://rubygems.org/) 1.3.7 (bundled with Ruby) * [Bundler](http://gembundler.com/) 1.0.3 * [Rack](http://rack.rubyforge.org/) 1.2.1 * [Sinatra](http://www.sinatrarb.com/) 1.0 * [Haml](http://haml-lang.com/) 3.0.22 * [Sass](http://sass-lang.com/) 3.0.22 (bundled with Haml) * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.9 **Optional development dependencies** * [Rake](http://rake.rubyforge.org/) 0.8.7 (bundled with Ruby) * [Rack::Test](http://github.com/brynary/rack-test) 0.5.6 * [RSpec](http://rspec.info/) 2.0.1 * [YARD](http://yardoc.org/) 0.5.8 * [YARD::Sinatra](http://github.com/rkh/yard-sinatra) 0.5.1 * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.9 INSTALLING ---------- $ gem install mango -v 0.5.0.beta4 Note: Depending on how RubyGems is installed on your machine, you *may* need to prepend the command with `sudo`. USAGE ----- ### Generating a Mango application $ mango create /path/to/your/app ### Starting the application $ cd /path/to/your/app $ rackup ### Generated application structure $ tree . ├── Gemfile ├── README.md ├── config.ru ├── content │ └── index.md └── themes └── default ├── public │ ├── favicon.ico │ ├── images │ │ └── particles.gif │ ├── javascripts │ │ ├── fireworks.js │ │ └── timer.js │ ├── robots.txt │ └── styles │ ├── fireworks.css │ └── reset.css ├── styles │ └── screen.sass └── views ├── 404.haml ├── layout.haml └── page.haml UNDER THE HOOD -------------- * Mango tries to route HTTP requests to static files first * Then it tries to route HTTP requests to Markdown or Haml content pages or Sass style templates * Finally, it routes unknown HTTP requests to a customizable 404 page * Wraps content pages within a customizable Haml template and layout * Supports any Rack-based application server (e.g. Phusion Passenger, thin, mongrel, webrick, etc.) MOTIVATION ---------- Scratching my own itch. Inspired by [Nesta](http://effectif.com/nesta) and [Jekyll](http://jekyllrb.com/). REPORTING ISSUES ---------------- Is Mango not behaving like you expect it should? Please forgive me! Would you take a moment to shed light on my negligence over at the [Issue Tracker](http://github.com/ryansobol/mango/issues)? Here's a **Pro Tip** -- you can read through existing issues and vote for which issues you'd like to see resolved first! Thank you for taking the time to help improve Mango. CONTRIBUTING ------------ Is Mango not behaving like you need? Open-source to the rescue! There is a plethora of documentation to bring a Rubyist of any level up to speed. The API documentation is generated, once the dependencies are met (please see the REQUIREMENTS section), by issuing the follow command: $ rake yard Patches are always welcome and appreciated! The process is straight-forward for contributing your work back to the source: * Fork the project -- may I suggest [Github](http://www.github.com)? * Make your feature addition or bug fix **with specifications**. It's important that I don't break your hard work in a future version unintentionally. * Please do not casually alter files in the project root. (e.g. LICENSE, Rakefile, README.mdown, VERSION, etc.) * Commit your changes and publish the change-set. * Send me a pull request. Remember, all specs must pass! Before making your change, take a moment to get a feel for the style of coding, specifications, and in-line documentation. Visit the [Issue Tracker](http://github.com/ryansobol/mango/issues) learn how you can lend a hand and where to start. Again, thank you for taking the time to help improve Mango.