Sha256: 894e404eef713898985d046bab73f628ce200629912a69e07a49cda29e097e63

Contents?: true

Size: 670 Bytes

Versions: 5

Compression:

Stored size: 670 Bytes

Contents

<%= config[:camel_cased_app_name] %>::Container.namespace "persistence" do |persistence|
  persistence.finalize(:rom) do
    init do
      require "sequel"
      require "rom"

      Sequel.database_timezone = :utc
      Sequel.application_timezone = :local

      rom_config = ROM::Configuration.new(
        :sql,
        persistence.settings.database_url,
        extensions: [:error_sql]
      )

      persistence.register("config", rom_config)
    end

    start do
      config = persistence["persistence.config"]
      config.auto_registration(persistence.root.join("lib/persistence"))

      persistence.register("rom", ROM.container(config))
    end
  end
end

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
dry-web-roda-0.6.1 lib/dry/web/roda/skeletons/flat_project/system/boot/rom.rb.tt
dry-web-roda-0.6.1 lib/dry/web/roda/skeletons/umbrella_project/system/boot/rom.rb.tt
dry-web-roda-0.6.0 lib/dry/web/roda/skeletons/umbrella/system/boot/rom.rb.tt
dry-web-roda-0.5.1 lib/dry/web/roda/skeletons/umbrella/system/boot/rom.rb.tt
dry-web-roda-0.5.0 lib/dry/web/roda/skeletons/umbrella/system/boot/rom.rb.tt