Skip to content

Commit

Permalink
Merge branch 'build' into hanami
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jan 19, 2016
2 parents 60d3bd1 + 09ea1ba commit 062932d
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 19 deletions.
2 changes: 1 addition & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def encode_text(text)
end

def hanami_version
'0.6.0'
'0.6.1'
end
end

Expand Down
43 changes: 43 additions & 0 deletions source/blog/2016-01-19-announcing-lotus-061.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Announcing Lotus v0.6.1
date: 2016-01-19 8:48 UTC
tags: announcements
author: Luca Guidi
image: true
excerpt: >
Minor fixes for CLI, cookie sessions and database exceptions.
---

This is a patch release that addresses some bugs reported after [v0.6.0 release](/blog/2016/01/12/announcing-lotus-060.html).

## Bug Fixes

### lotusrb [v0.6.1](https://github.com/lotus/lotus/blob/master/CHANGELOG.md#v061---2016-01-19)

- Show the current app name in Welcome page (eg. `/admin` shows instructions on how to generate an action for `Admin` app) [[Anton Davydov](https://github.com/davydovanton)]
- Fix project creation when name contains dashes (eg. `"awesome-project" => "AwesomeProject"`) [[Anton Davydov](https://github.com/davydovanton)]
- Ensure to add assets related entries to `.gitignore` when a project is generated with the `--database` flag [[Anton Davydov](https://github.com/davydovanton)]
- Avoid blank lines in generated `Gemfile` [[deepj](https://github.com/deepj)]
- Fix for `lotus destroy app`: it doesn't cause a syntax error in `config/application.rb` anymore [[trexnix](https://github.com/trexnix)]
- Ensure console to use the bundled engine [[Serg Ikonnikov](https://github.com/sergikon) & [Trung Lê](https://github.com/joneslee85)]

### lotus-utils [v0.6.1](https://github.com/lotus/utils/blob/master/CHANGELOG.md#v061---2016-01-19)

- Ensure `Lotus::Utils::String#classify` to work properly with dashes (eg. `"app-store" => "App::Store"`) [[Anton Davydov](https://github.com/davydovanton)]

### lotus-router [v0.5.1](https://github.com/lotus/router/blob/master/CHANGELOG.md#v051---2016-01-19)

- Print stacked lines for routes inspection [[Anton Davydov](https://github.com/davydovanton)]

### lotus-controller [v0.5.1](https://github.com/lotus/controller/blob/master/CHANGELOG.md#v051---2016-01-19)

- Ensure `rack.session` cookie to not be sent twice when both `Lotus::Action::Cookies` and `Rack::Session::Cookie` are used together [[Alfonso Uceda](https://github.com/AlfonsoUceda)]

### lotus-model [v0.5.2](https://github.com/lotus/model/blob/master/CHANGELOG.md#v052---2016-01-19)

- Improved error message for `Lotus::Model::Adapters::NoAdapterError` [[Sean Collins](https://github.com/cllns)]
- Catch Sequel exceptions and re-raise as `Lotus::Model::Error` [[Kyle Chong](https://github.com/Moratorius) & [Trung Lê](https://github.com/joneslee85)]

## Upgrade Instructions

In order to get these bug fixes, just run `bundle update` from the root of the project.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions source/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,15 @@ describe Web::Controllers::Books::Create do
response = action.call(params)
response[0].must_equal 200
end

it 'sets errors attribute accordingly' do
action.call(params)

refute action.params.valid?

action.errors.for('book.title').wont_be_empty
action.errors.for('book.author').wont_be_empty
end
end
end
```
Expand Down Expand Up @@ -923,6 +932,32 @@ describe Web::Views::Books::New do

rendered.must_include('There was a problem with your submission')
rendered.must_include('title is required')
rendered.must_include('author is required')
end
end
```

We should also update our feature spec to reflect this new behavior:

```ruby
# spec/web/features/add_book_spec.rb
require 'features_helper'

describe 'Books' do
# Spec written sooner removed from brevity

it 'displays list of errors when params contains errors' do
visit '/books/new'

within 'form#book-form' do
click_button 'Create'
end

current_path.must_equal('/books')

assert page.has_content?('There was a problem with your submission')
assert page.has_content?('title is required')
assert page.has_content?('author is required')
end
end
```
Expand Down
34 changes: 17 additions & 17 deletions source/guides/routing/restful-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ end
<td>/books/:book_id/reviews</td>
<td>Books::Reviews::Create</td>
<td>:create</td>
<td>:create_book_reviews</td>
<td>:book_reviews</td>
</tr>
<tr>
<td>GET</td>
Expand Down Expand Up @@ -325,7 +325,7 @@ end
<td>/books/:book_id/cover</td>
<td>Books::Cover::Create</td>
<td>:create</td>
<td>:create_book_cover</td>
<td>:book_cover</td>
</tr>
<tr>
<td>GET</td>
Expand Down Expand Up @@ -370,49 +370,49 @@ end
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/api_keys</td>
<td>/account/api_keys</td>
<td>Account::ApiKeys::Index</td>
<td>:index</td>
<td>:account_api_keys</td>
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/api_keys/:id</td>
<td>/account/api_keys/:id</td>
<td>Account::ApiKeys::Show</td>
<td>:show</td>
<td>:account_api_key</td>
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/api_keys/new</td>
<td>/account/api_keys/new</td>
<td>Account::ApiKeys::New</td>
<td>:new</td>
<td>:new_account_api_key</td>
</tr>
<tr>
<td>POST</td>
<td>/accounts/:account_id/api_keys</td>
<td>/account/api_keys</td>
<td>Account::ApiKeys::Create</td>
<td>:create</td>
<td>:create_account_api_keys</td>
<td>:account_api_keys</td>
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/api_keys/:id/edit</td>
<td>/account/api_keys/:id/edit</td>
<td>Account::ApiKeys::Edit</td>
<td>:edit</td>
<td>:edit_account_api_key</td>
</tr>
<tr>
<td>PATCH</td>
<td>/accounts/:account_id/api_keys/:id</td>
<td>/account/api_keys/:id</td>
<td>Account::ApiKeys::Update</td>
<td>:update</td>
<td>:account_api_key</td>
</tr>
<tr>
<td>DELETE</td>
<td>/accounts/:account_id/api_keys/:id</td>
<td>/account/api_keys/:id</td>
<td>Account::ApiKeys::Destroy</td>
<td>:destroy</td>
<td>:account_api_key</td>
Expand All @@ -439,42 +439,42 @@ end
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/avatar</td>
<td>/account/avatar</td>
<td>Account::Avatar::Show</td>
<td>:show</td>
<td>:account_avatar</td>
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/avatar/new</td>
<td>/account/avatar/new</td>
<td>Account::Avatar::New</td>
<td>:new</td>
<td>:new_account_avatar</td>
</tr>
<tr>
<td>POST</td>
<td>/accounts/:account_id/avatar</td>
<td>/account/avatar</td>
<td>Account::Avatar::Create</td>
<td>:create</td>
<td>:create_account_avatar</td>
<td>:account_avatar</td>
</tr>
<tr>
<td>GET</td>
<td>/accounts/:account_id/avatar/edit</td>
<td>/account/avatar/edit</td>
<td>Account::Avatar::Edit</td>
<td>:edit</td>
<td>:edit_account_avatar</td>
</tr>
<tr>
<td>PATCH</td>
<td>/accounts/:account_id/avatar</td>
<td>/account/avatar</td>
<td>Account::Avatar::Update</td>
<td>:update</td>
<td>:account_avatar</td>
</tr>
<tr>
<td>DELETE</td>
<td>/accounts/:account_id/avatar</td>
<td>/account/avatar</td>
<td>Account::Avatar::Destroy</td>
<td>:destroy</td>
<td>:account_avatar</td>
Expand Down
2 changes: 1 addition & 1 deletion source/guides/upgrade-notes/v060.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Hanami | Guides - Upgrade Notes for v0.6.0

* Add `SERVE_STATIC_ASSETS="true"` to `.env.development` and `.env.test` in order to serve static assets locally.

* Add `require 'hanami/rake_tasks` to `Rakefile` in order to enable `:preload` and `:environment` Rake tasks
* Add `require 'hanami/rake_tasks'` to `Rakefile` in order to enable `:preload` and `:environment` Rake tasks

* Rename `default_format` into `default_request_format` for all the applications (eg. `apps/web/application.rb`)

Expand Down

0 comments on commit 062932d

Please sign in to comment.