Skip to content

Commit

Permalink
Merge pull request #469 from hanami/hanami
Browse files Browse the repository at this point in the history
Hanami
  • Loading branch information
jodosha committed Jan 22, 2016
2 parents f68481f + df8a285 commit 28c7a81
Show file tree
Hide file tree
Showing 419 changed files with 2,529 additions and 2,504 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tmp
mkmf.log
.greenbar
.DS_Store
.lotusrc
.hanamirc
test/fixtures/static_assets/public/assets*
test/fixtures/static_assets_app/public/assets*
test/fixtures/rake/rake_tasks/public/assets*
Expand Down
16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,8 @@ script:
- 'bundle install'
- './script/ci'
rvm:
- 2.0.0
- 2.1.0
- 2.1.1
- 2.1.2
- 2.1.3
- 2.1.4
- 2.1.5
- 2.1.6
- 2.1.7
- 2.1.8
- 2.2.0
- 2.2.1
- 2.2.2
- 2.2.3
- 2.2.4
- 2.3.0
- rbx-2
- jruby-9000
- jruby-9.0.1.0
- jruby-9.0.3.0
Expand All @@ -35,7 +20,6 @@ rvm:

matrix:
allow_failures:
- rvm: rbx-2
- rvm: jruby-head
- rvm: ruby-head
- rvm: jruby-9000
Expand Down
102 changes: 53 additions & 49 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lotus is an open source project and we would love you to help us make it better.
Hanami is an open source project and we would love you to help us make it better.

## Reporting Issues

Expand All @@ -21,7 +21,7 @@ but we just don't know.

## Pull requests

We accept pull requests to Lotus for:
We accept pull requests to Hanami for:

* Adding documentation
* Fixing bugs
Expand All @@ -47,6 +47,6 @@ request; Questions, clarifications, and so on.

Some things that will increase the chance that your pull request is accepted:

* Use Lotus idioms
* Use Hanami idioms
* Include tests that fail without your code, and pass with it
* Update the documentation, guides, etc.
52 changes: 26 additions & 26 deletions FEATURES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lotus
# Hanami
### A complete web framework for Ruby

## Features
Expand All @@ -20,16 +20,16 @@
* `asset_url`
- Content Delivery Network (CDN) support for static assets (CDN mode)
- Checksum suffix for static assets in production mode (Digest mode)
- Support for third party gems as assets distribution channel (eg. `lotus-jquery`)
- CLI: `lotus assets` command `precompile`: preprocess, minify and append checksum suffix
- CLI: `lotus destroy` destroy apps, models, actions, migrations and mailers
- Support for third party gems as assets distribution channel (eg. `hanami-jquery`)
- CLI: `hanami assets` command `precompile`: preprocess, minify and append checksum suffix
- CLI: `hanami destroy` destroy apps, models, actions, migrations and mailers
- Custom initializers (`apps/web/config/initializers`)
- Rake tasks `:preload` and `:environment`

## v0.5.0 - 2015-09-30

- Mailers
- CLI: `lotus generate mailer`
- CLI: `hanami generate mailer`
- SQL joins
- Custom coercers for data mapper

Expand All @@ -39,7 +39,7 @@

- Application architecture
- Database migrations
- CLI: `lotus db` commands: `create`, `drop`, `prepare`, `migrate`, `version`, `apply`.
- CLI: `hanami db` commands: `create`, `drop`, `prepare`, `migrate`, `version`, `apply`.
- HTML5 Form helpers
- Cross Site Request Forgery (CSRF) protection
- Force SSL
Expand All @@ -50,26 +50,26 @@
- Automatic secure cookies
- Routing helpers for actions
- Send files from actions
- `Lotus.root` returns top level directory of the project.
- `Hanami.root` returns top level directory of the project.

## v0.3.1 - 2015-05-15

- CLI: `lotus generate app admin` creates a new application (`apps/admin`).
- CLI: `lotus generate model user`. It generates entity, repository and related unit test files.
- `Lotus.env` and `Lotus.env?` for current environment introspection (eg. `Lotus.env?(:test)` or `Lotus.env?(:staging, :production)`)
- CLI: `hanami generate app admin` creates a new application (`apps/admin`).
- CLI: `hanami generate model user`. It generates entity, repository and related unit test files.
- `Hanami.env` and `Hanami.env?` for current environment introspection (eg. `Hanami.env?(:test)` or `Hanami.env?(:staging, :production)`)
- Allow repositories to execute raw query/commands against database
- Automatic timestamps update for entities
– Dirty Tracking for entities (via `Lotus::Entity::DirtyTracking`)
– Dirty Tracking for entities (via `Hanami::Entity::DirtyTracking`)
- Nested RESTful resource(s)
- String pluralization and singularization

## v0.3.0 - 2015-03-23

- CLI: `lotus generate action web dashboard#index`. It generates an action, a view, a template, a route and related unit test files.
- CLI: `lotus db console`. It starts a database REPL.
- CLI: `hanami generate action web dashboard#index`. It generates an action, a view, a template, a route and related unit test files.
- CLI: `hanami db console`. It starts a database REPL.
- Full featured HTML5 markup generator for views (Eg. `html.div { p "Hello World" }`)
- Routing helpers in views and templates (Eg. `routes.home_path`).
- `lotus new` supports `--database` (Eg. `lotus new bookshelf --database=postgresql`).
- `hanami new` supports `--database` (Eg. `hanami new bookshelf --database=postgresql`).
- Initialize a Git repository when generate a new application
- Security: XSS (Cross Site Scripting) protections
- Security: Clickhijacking protection
Expand All @@ -85,23 +85,23 @@
## v0.2.1 - 2015-02-06

- Allow entities to include validations.
- `lotus new .` to generate a Lotus application for an existing code base (Eg. a gem that needs a web UI).
- `lotus new` supports `--path` (for destination directory), `--test` (to generate Minitest or RSpec boilerplate).
- Lotus logger
- `hanami new .` to generate a Hanami application for an existing code base (Eg. a gem that needs a web UI).
- `hanami new` supports `--path` (for destination directory), `--test` (to generate Minitest or RSpec boilerplate).
- Hanami logger

## v0.2.0 - 2014-12-23

- Support Minitest as default testing framework (`bundle exec rake` runs the entire test suite of an application).
- Support for _Method Override_ technique.
- Custom templates for non successful responses (Eg. `404.html.erb`).
- Support distinct `.env` files for each Lotus environment.
- Allow to configure multiple applications and handle Lotus environments accordingly.
- Support distinct `.env` files for each Hanami environment.
- Allow to configure multiple applications and handle Hanami environments accordingly.
- Allow to configure middleware stack, routes, database mapping and adapter for each application.
- Show a welcome page with instructions for new generated apps.
- CLI: `lotus routes`. It prints all the routes available for all the applications.
- CLI: `lotus new`. It generates a new application which can run multiple Lotus applications (_Container_ architecture).
- CLI: `lotus console`. It starts a Ruby REPL. It supports IRB (default), Pry and Ripl.
- CLI: `lotus server`. It starts a web server that supports code reloading. It supports all the Rack web servers (default: WEBRick).
- CLI: `hanami routes`. It prints all the routes available for all the applications.
- CLI: `hanami new`. It generates a new application which can run multiple Hanami applications (_Container_ architecture).
- CLI: `hanami console`. It starts a Ruby REPL. It supports IRB (default), Pry and Ripl.
- CLI: `hanami server`. It starts a web server that supports code reloading. It supports all the Rack web servers (default: WEBRick).
- Database adapters: File system (default for new apps)
- Allow to share code for all the views and actions of an application
- Reusable validations framework (mixin). It supports: coercions and presence, format, acceptance, size, inclusion, exclusion, confirmation validations.
Expand All @@ -117,10 +117,10 @@

## v0.1.0 - 2014-06-23

- Run multiple Lotus applications in the same Ruby process
- Run multiple Hanami applications in the same Ruby process
- Serve static files
- Render default pages for non successful responses (404, 500, etc.)
- Support multiple Lotus environments (development, test and production)
- Support multiple Hanami environments (development, test and production)
- Full stack applications
- Data mapper
- Database adapters: Memory and SQL
Expand Down Expand Up @@ -148,7 +148,7 @@
- Nested route namespaces
- RESTful resource(s), including collection and member actions
- Named routes, routes constraints, variables, catch-all
- Compatibility with Lotus::Controller
- Compatibility with Hanami::Controller
- HTTP redirect from the router
- HTTP routing compatible with Rack
- Thread safety
18 changes: 9 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ if !ENV['TRAVIS']
end

gem 'sass'
gem 'lotus-utils', '~> 0.6', require: false, github: 'lotus/utils', branch: '0.6.x'
gem 'lotus-validations', '~> 0.4', require: false, github: 'lotus/validations', branch: '0.4.x'
gem 'lotus-router', '~> 0.5', require: false, github: 'lotus/router', branch: '0.5.x'
gem 'lotus-controller', '~> 0.5', require: false, github: 'lotus/controller', branch: '0.5.x'
gem 'lotus-view', '~> 0.5', require: false, github: 'lotus/view', branch: '0.5.x'
gem 'lotus-model', '~> 0.5', require: false, github: 'lotus/model', branch: '0.5.x'
gem 'lotus-helpers', '~> 0.2', require: false, github: 'lotus/helpers', branch: '0.2.x'
gem 'lotus-mailer', '~> 0.1', require: false, github: 'lotus/mailer', branch: '0.1.x'
gem 'lotus-assets', '~> 0.1', require: false, github: 'lotus/assets', branch: '0.1.x'
gem 'hanami-utils', '~> 0.7', require: false, github: 'hanami/utils', branch: '0.7.x'
gem 'hanami-validations', '~> 0.5', require: false, github: 'hanami/validations', branch: '0.5.x'
gem 'hanami-router', '~> 0.6', require: false, github: 'hanami/router', branch: '0.6.x'
gem 'hanami-controller', '~> 0.6', require: false, github: 'hanami/controller', branch: '0.6.x'
gem 'hanami-view', '~> 0.6', require: false, github: 'hanami/view', branch: '0.6.x'
gem 'hanami-model', '~> 0.6', require: false, github: 'hanami/model', branch: '0.6.x'
gem 'hanami-helpers', '~> 0.3', require: false, github: 'hanami/helpers', branch: '0.3.x'
gem 'hanami-mailer', '~> 0.2', require: false, github: 'hanami/mailer', branch: '0.2.x'
gem 'hanami-assets', '~> 0.2', require: false, github: 'hanami/assets', branch: '0.2.x'

platforms :ruby do
gem 'sqlite3'
Expand Down
73 changes: 37 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
# Lotus
# Hanami

A complete web framework for Ruby
The web, with simplicity.

## Frameworks

Lotus combines small yet powerful frameworks:
Hanami combines small yet powerful frameworks:

* [**Lotus::Utils**](https://github.com/lotus/utils) - Ruby core extensions and class utilities
* [**Lotus::Router**](https://github.com/lotus/router) - Rack compatible HTTP router for Ruby
* [**Lotus::Validations**](https://github.com/lotus/validations) - Validations mixin for Ruby objects
* [**Lotus::Helpers**](https://github.com/lotus/helpers) - View helpers for Ruby applications
* [**Lotus::Mailer**](https://github.com/lotus/mailer) - Mail for Ruby applications
* [**Lotus::Model**](https://github.com/lotus/model) - Persistence with entities, repositories and data mapper
* [**Lotus::Assets**](https://github.com/lotus/assets) - Assets management for Ruby
* [**Lotus::View**](https://github.com/lotus/view) - Presentation with a separation between views and templates
* [**Lotus::Controller**](https://github.com/lotus/controller) - Full featured, fast and testable actions for Rack
* [**Hanami::Utils**](https://github.com/hanami/utils) - Ruby core extensions and class utilities
* [**Hanami::Router**](https://github.com/hanami/router) - Rack compatible HTTP router for Ruby
* [**Hanami::Validations**](https://github.com/hanami/validations) - Validations mixin for Ruby objects
* [**Hanami::Helpers**](https://github.com/hanami/helpers) - View helpers for Ruby applications
* [**Hanami::Mailer**](https://github.com/hanami/mailer) - Mail for Ruby applications
* [**Hanami::Model**](https://github.com/hanami/model) - Persistence with entities, repositories and data mapper
* [**Hanami::Assets**](https://github.com/hanami/assets) - Assets management for Ruby
* [**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

These components are designed to be used independently or together in a Lotus application.
These components are designed to be used independently or together in a Hanami application.
If you aren't familiar with them, please take time to go through their READMEs.

## Status

[![Gem Version](https://badge.fury.io/rb/lotusrb.svg)](http://badge.fury.io/rb/lotusrb)
[![Build Status](https://secure.travis-ci.org/lotus/lotus.svg?branch=master)](http://travis-ci.org/lotus/lotus?branch=master)
[![Coverage](https://coveralls.io/repos/lotus/lotus/badge.svg?branch=master)](https://coveralls.io/r/lotus/lotus)
[![Code Climate](https://codeclimate.com/github/lotus/lotus.svg)](https://codeclimate.com/github/lotus/lotus)
[![Dependencies](https://gemnasium.com/lotus/lotus.svg)](https://gemnasium.com/lotus/lotus)
[![Inline docs](http://inch-ci.org/github/lotus/lotus.svg)](http://inch-ci.org/github/lotus/lotus)
[![Gem Version](https://badge.fury.io/rb/hanami.svg)](http://badge.fury.io/rb/hanami)
[![Build Status](https://secure.travis-ci.org/hanami/hanami.svg?branch=master)](http://travis-ci.org/hanami/hanami?branch=master)
[![Coverage](https://coveralls.io/repos/hanami/hanami/badge.svg?branch=master)](https://coveralls.io/r/hanami/hanami)
[![Code Climate](https://codeclimate.com/github/hanami/hanami.svg)](https://codeclimate.com/github/hanami/hanami)
[![Dependencies](https://gemnasium.com/hanami/hanami.svg)](https://gemnasium.com/hanami/hanami)
[![Inline docs](http://inch-ci.org/github/hanami/hanami.svg)](http://inch-ci.org/github/hanami/hanami)

## Contact

* Home page: http://lotusrb.org
* Community: http://lotusrb.org/community
* Guides: http://lotusrb.org/guides
* Mailing List: http://lotusrb.org/mailing-list
* API Doc: http://rdoc.info/gems/lotusrb
* Bugs/Issues: https://github.com/lotus/lotus/issues
* Support: http://stackoverflow.com/questions/tagged/lotus-ruby
* Forum: https://discuss.lotusrb.org
* Chat: http://chat.lotusrb.org
* Home page: http://hanamirb.org
* Community: http://hanamirb.org/community
* Guides: http://hanamirb.org/guides
* Mailing List: http://hanamirb.org/mailing-list
* API Doc: http://rdoc.info/gems/hanami
* Bugs/Issues: https://github.com/hanami/hanami/issues
* Support: http://stackoverflow.com/questions/tagged/hanami
* Forum: https://discuss.hanamirb.org
* Chat: http://chat.hanamirb.org

## Rubies

__Lotus__ supports Ruby (MRI) 2+
__Hanami__ supports Ruby (MRI) 2+

## Installation

```shell
% gem install lotusrb
% gem install hanami
```

## Usage

```shell
% lotus new bookshelf
% hanami new bookshelf
% cd bookshelf && bundle
% bundle exec lotus server # visit http://localhost:2300
% bundle exec hanami server # visit http://localhost:2300
```

Please follow along with the [Getting Started guide](http://lotusrb.org/guides/getting-started).
Please follow along with the [Getting Started guide](http://hanamirb.org/guides/getting-started).

## Community

We strive for a Community made of **inclusive, helpful and smart people**.
We have a [Code of Conduct](http://lotusrb.org/community/#code-of-conduct) to handle controversial cases.
We have a [Code of Conduct](http://hanamirb.org/community/#code-of-conduct) to handle controversial cases.
In general, we expect **you** to be **nice** with other people.
Our hope is for a great software and a great Community.

Expand All @@ -85,16 +85,17 @@ This Code of Conduct is adapted from the Contributor Covenant, version 1.1.0, av

## Contributing

1. Fork it ( https://github.com/lotus/lotus/fork )
1. Fork it ( https://github.com/hanami/hanami/fork )
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

## Versioning

__Lotus__ uses [Semantic Versioning 2.0.0](http://semver.org)
__Hanami__ uses [Semantic Versioning 2.0.0](http://semver.org)

## Copyright

Copyright © 2014-2016 Luca Guidi – Released under MIT License
This project was formerly known as Lotus (`lotusrb`).
4 changes: 2 additions & 2 deletions bin/lotus → bin/hanami
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

require 'bundler'
require 'lotus/cli'
Lotus::Cli.start
require 'hanami/cli'
Hanami::Cli.start
38 changes: 38 additions & 0 deletions hanami.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'hanami/version'

Gem::Specification.new do |spec|
spec.name = 'hanami'
spec.version = Hanami::VERSION
spec.authors = ['Luca Guidi', 'Trung Lê', 'Alfonso Uceda Pompa']
spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com', 'uceda73@gmail.com']
spec.summary = %q{The web, with simplicity.}
spec.description = %q{Hanami is a web framework for Ruby}
spec.homepage = 'http://hanamirb.org'
spec.license = 'MIT'

spec.files = `git ls-files -z -- lib/* bin/* LICENSE.md README.md CHANGELOG.md FEATURES.md hanami.gemspec`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test)/})
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.2.0'

spec.add_dependency 'hanami-utils', '~> 0.7'
spec.add_dependency 'hanami-router', '~> 0.6'
spec.add_dependency 'hanami-controller', '~> 0.6'
spec.add_dependency 'hanami-view', '~> 0.6'
spec.add_dependency 'hanami-helpers', '~> 0.3'
spec.add_dependency 'hanami-mailer', '~> 0.2'
spec.add_dependency 'hanami-assets', '~> 0.2'
spec.add_dependency 'shotgun', '~> 0.9'
spec.add_dependency 'dotenv', '~> 2.0'
spec.add_dependency 'thor', '~> 0.19'
spec.add_dependency 'bundler', '~> 1.6'

spec.add_development_dependency 'minispec-metadata', '~> 3.2.1'
spec.add_development_dependency 'minitest', '~> 5'
spec.add_development_dependency 'rack-test', '~> 0.6'
spec.add_development_dependency 'rake', '~> 10'
end
Loading

0 comments on commit 28c7a81

Please sign in to comment.