lib/ronin/database/database.rb in ronin-1.2.0 vs lib/ronin/database/database.rb in ronin-1.3.0
- old
+ new
@@ -140,13 +140,18 @@
#
# @option options [IO] :stream
# The stream to use for the log.
#
# @option options [Symbol] :level
- # The level of messages to log.
- # May be either `:fatal`, `:error`, `:warn`, `:info` or `:debug`.
+ # The level of messages to log. May one of:
#
+ # * `:fatal`
+ # * `:error`
+ # * `:warn`
+ # * `:info`
+ # * `:debug`
+ #
# @return [true]
# Specifies that the log has been setup.
#
# @api private
#
@@ -164,11 +169,11 @@
#
# @param [Symbol] name
# The database repository name.
#
# @return [Boolean]
- # Specifies wether or not the Database is setup.
+ # Specifies whether or not the Database is setup.
#
# @api semipublic
#
def Database.setup?(name=:default)
repository = DataMapper.repository(name)
@@ -213,9 +218,12 @@
# setup the database repositories
repositories.each do |name,uri|
DataMapper.setup(name,uri)
end
+
+ # finalize the Models
+ DataMapper.finalize
# apply any new migrations to the database
upgrade!
end