lib/appfuel/storage/repository/base.rb in appfuel-0.5.9 vs lib/appfuel/storage/repository/base.rb in appfuel-0.5.10
- old
+ new
@@ -1,5 +1,7 @@
+require 'securerandom'
+
module Appfuel
module Repository
# The generic repository behavior. This represents repo behavior that is
# agnostic to any storage system. The following is a definition of this
# patter by Martin Fowler:
@@ -233,9 +235,13 @@
end
hash = mapper.to_entity_hash(domain_name, storage_attrs)
key = qualify_container_key(domain_name, "domains")
app_container[key].new(hash)
+ end
+
+ def generate_uuid
+ SecureRandom.uuid
end
private
def method_not_implemented_error
fail "must be implemented by a storage specific repository"