Gemfile, by changing Hanami version:
gem 'hanami', '~> 1.0'
Gemfile, by changing Hanami Model version:
gem 'hanami-model', '~> 1.0'
Gemfile, by removing Bundler:
gem 'bundler' can be deleted
config/boot.rb as shown below
config/environment.rb as shown below
lib/bookshelf.rb as shown below
Edit all the applications to remove the
logger settings. Eg.
Edit the project using
Hanami.logger instead of application level loggers. Eg.
require_relative './environment' Hanami.boot
This file can be used to boot your project from external commands. For instance to use it with Sidekiq.
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 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/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
module Bookshelf end
If you have any problem, don't hesitate to look for help in chat.