2016-12-17 13:32:31 +00:00
# Hanami :cherry_blossom:
2014-05-08 08:08:53 +00:00
2016-01-20 16:06:26 +00:00
The web, with simplicity.
2014-06-16 09:30:02 +00:00
2021-06-17 07:57:05 +00:00
## Version
**This branch contains the code for `hanami` 2.0.x.**
2014-12-21 14:49:49 +00:00
## Frameworks
2016-12-17 13:32:31 +00:00
Hanami is a **full-stack** Ruby web framework.
It's made up of smaller, single-purpose libraries.
2014-12-21 14:49:49 +00:00
2016-12-17 13:32:31 +00:00
This repository is for the full-stack framework,
which provides the glue that ties all the parts together:
* [**Hanami::View** ](https://github.com/hanami/view ) - Presentation with a separation between views and templates
* [**Hanami::Controller** ](https://github.com/hanami/controller ) - Full featured, fast and testable actions for Rack
* [**Hanami::Router** ](https://github.com/hanami/router ) - Rack compatible HTTP router for Ruby
2016-01-20 16:06:26 +00:00
* [**Hanami::Helpers** ](https://github.com/hanami/helpers ) - View helpers for Ruby applications
* [**Hanami::Mailer** ](https://github.com/hanami/mailer ) - Mail for Ruby applications
* [**Hanami::Assets** ](https://github.com/hanami/assets ) - Assets management for Ruby
2016-12-17 13:32:31 +00:00
* [**Hanami::Utils** ](https://github.com/hanami/utils ) - Ruby core extensions and class utilities
2014-12-21 14:49:49 +00:00
2016-01-20 16:06:26 +00:00
These components are designed to be used independently or together in a Hanami application.
2016-12-17 13:32:31 +00:00
2018-07-30 11:42:54 +00:00
## Status
[![Gem Version ](https://badge.fury.io/rb/hanami.svg )](https://badge.fury.io/rb/hanami)
2021-06-17 07:57:05 +00:00
[![CI ](https://github.com/hanami/hanami/workflows/ci/badge.svg?branch=main )](https://github.com/hanami/hanami/actions?query=workflow%3Aci+branch%3Amain)
[![Test Coverage ](https://codecov.io/gh/hanami/hanami/branch/main/graph/badge.svg )](https://codecov.io/gh/hanami/hanami)
2018-07-30 11:42:54 +00:00
[![Depfu ](https://badges.depfu.com/badges/ba000e0f69e6ef1c44cd3038caaa1841/overview.svg )](https://depfu.com/github/hanami/hanami?project=Bundler)
[![Inline Docs ](http://inch-ci.org/github/hanami/hanami.svg )](http://inch-ci.org/github/hanami/hanami)
2016-12-17 13:32:31 +00:00
## Installation
2018-07-30 11:42:54 +00:00
2022-02-02 10:02:15 +00:00
__Hanami__ supports Ruby (MRI) 3.0+
2016-12-17 13:32:31 +00:00
```shell
gem install hanami
```
## Usage
```shell
hanami new bookshelf
cd bookshelf & & bundle
bundle exec hanami server # visit http://localhost:2300
```
2018-10-23 07:29:08 +00:00
Please follow along with the [Getting Started guide ](https://guides.hanamirb.org/getting-started/ ).
2014-12-21 14:49:49 +00:00
2016-05-05 11:42:01 +00:00
## Donations
2022-07-01 08:31:14 +00:00
You can give back to Open Source, by supporting Hanami development via [GitHub Sponsors ](https://github.com/sponsors/hanami ).
2016-05-05 11:42:01 +00:00
2016-05-23 08:36:26 +00:00
### Supporters
2022-01-10 05:58:34 +00:00
* [Trung Lê ](https://github.com/runlevel5 )
2016-05-23 08:36:26 +00:00
* [James Carlson ](https://github.com/jxxcarlson )
2017-06-02 14:37:58 +00:00
* [Creditas ](https://www.creditas.com.br/ )
2016-05-23 08:36:26 +00:00
2014-06-16 09:30:02 +00:00
## Contact
2016-01-20 16:06:26 +00:00
* Home page: http://hanamirb.org
* Community: http://hanamirb.org/community
2018-10-23 07:29:08 +00:00
* Guides: https://guides.hanamirb.org
* Snippets: https://snippets.hanamirb.org
2016-01-20 16:06:26 +00:00
* Mailing List: http://hanamirb.org/mailing-list
* API Doc: http://rdoc.info/gems/hanami
* Bugs/Issues: https://github.com/hanami/hanami/issues
2016-12-17 13:32:31 +00:00
* Stack Overflow: http://stackoverflow.com/questions/tagged/hanami
2016-12-17 13:33:59 +00:00
* Forum: https://discourse.hanamirb.org
2016-12-17 13:32:31 +00:00
* **Chat**: http://chat.hanamirb.org
2014-05-08 08:08:53 +00:00
2015-06-22 15:41:29 +00:00
## Community
2014-06-22 19:12:28 +00:00
2016-12-18 10:08:28 +00:00
We strive for an inclusive and helpful community.
2016-01-20 16:06:26 +00:00
We have a [Code of Conduct ](http://hanamirb.org/community/#code-of-conduct ) to handle controversial cases.
2015-06-22 15:41:29 +00:00
In general, we expect **you** to be **nice** with other people.
Our hope is for a great software and a great Community.
2014-06-22 19:12:28 +00:00
2018-02-27 20:54:12 +00:00
## Contributing [![Open Source Helpers](https://www.codetriage.com/hanami/hanami/badges/users.svg)](https://www.codetriage.com/hanami/hanami)
2014-05-08 08:08:53 +00:00
2016-01-20 16:06:26 +00:00
1. Fork it ( https://github.com/hanami/hanami/fork )
2014-05-08 08:08:53 +00:00
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
2014-06-22 19:12:28 +00:00
2018-02-27 20:54:12 +00:00
In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to hanami on CodeTriage ](https://www.codetriage.com/hanami/hanami ).
2016-05-28 09:45:24 +00:00
### How To Use Hanami HEAD
2016-11-17 06:39:45 +00:00
If you want to test Hanami's HEAD to try a new feature or to test a bug fix, here's how to do:
2016-05-28 09:45:24 +00:00
```
git clone https://github.com/hanami/hanami.git
cd hanami & & bundle
2017-12-11 21:31:19 +00:00
bundle exec hanami new bookshelf --hanami-head
2016-05-28 09:45:24 +00:00
cd bookshelf
vim Gemfile # edit with: gem 'hanami', path: '..'
bundle
```
2016-10-25 12:15:52 +00:00
### Development Requirements
* Ruby 2.3+ / JRuby 9.1.5.0+
* Bundler
2016-12-09 20:23:01 +00:00
* [PhantomJS ](http://phantomjs.org/download.html )
2016-10-25 12:15:52 +00:00
* Node.js (MacOS)
### Testing
In order to simulate installed gems on developers' computers, the build installs
all the gems locally in `vendor/cache` , including `hanami` code from `lib/` .
2016-11-17 06:39:45 +00:00
**Before running a test, please make sure you have a fresh version of the code:**
2016-10-25 12:15:52 +00:00
```shell
2016-12-17 13:32:31 +00:00
./script/setup
bundle exec rspec spec/path/to/file_spec.rb
2016-10-25 12:15:52 +00:00
```
To run all the tests, please use:
```shell
2016-12-17 13:32:31 +00:00
./script/ci
2016-10-25 12:15:52 +00:00
```
2014-06-22 19:12:28 +00:00
## Versioning
2016-01-20 16:06:26 +00:00
__Hanami__ uses [Semantic Versioning 2.0.0 ](http://semver.org )
2014-06-22 19:12:28 +00:00
## Copyright
2022-02-10 08:52:19 +00:00
Copyright © 2014-2022 Hanami Team – Released under MIT License.