Upgrade Notes for v1.0.0

config/boot.rb

require_relative './environment'
Hanami.boot

This file can be used to boot your project from external commands. For instance to use it with Sidekiq.

config/environment.rb

require 'bundler/setup'
require 'hanami/setup'
require 'hanami/model'
require_relative '../lib/bookshelf'
require_relative '../apps/web/application'

Hanami.configure do
  mount Web::Application, at: '/'

  model do
    adapter :sql, ENV['DATABASE_URL']

    migrations 'db/migrations'
    schema     'db/schema.sql'
  end

  mailer do
    # Make sure this folder exists, or delete this row.
    root Hanami.root.join("lib", "bookshelf", "mailers")

    # This has changed. It used to be a block, now it's a setting
    delivery :test
  end

  # These two blocks are new.
  # They MUST be after the general settings like `mount`, `model`, `mailer`.
  environment :development do
    # See: http://hanamirb.org/guides/1.1/projects/logging
    logger level: :info
  end

  environment :production do
    logger level: :info, formatter: :json

    mailer do
      delivery :smtp, address: ENV['SMTP_HOST'], port: ENV['SMTP_PORT']
    end
  end
end

lib/bookshelf.rb

module Bookshelf
end

If you have any problem, don't hesitate to look for help in chat.


Looking for Lotus? We renamed the project and it's now called Hanami. Read the announcement.