Object
# File lib/dm-rails/storage.rb, line 11 def self.create_all with_local_repositories { |config| create_environment(config) } end
# File lib/dm-rails/storage.rb, line 19 def self.create_environment(config) config.each { |repo_name, repo_config| new(repo_name, repo_config).create } end
# File lib/dm-rails/storage.rb, line 15 def self.drop_all with_local_repositories { |config| drop_environment(config) } end
# File lib/dm-rails/storage.rb, line 23 def self.drop_environment(config) config.each { |repo_name, repo_config| new(repo_name, repo_config).drop } end
Create the configured database
This is a noop so that calling this method won’t explode on people who use adapters that don’t support creating a storage recepticle
# File lib/dm-rails/storage.rb, line 106 def _create true end
Drop the configured database
This is a noop so that calling this method won’t explode on people who use adapters that don’t support dropping a storage recepticle
# File lib/dm-rails/storage.rb, line 115 def _drop true end
# File lib/dm-rails/storage.rb, line 89 def charset @charset ||= config['charset'] || ENV['CHARSET'] || 'utf8' end
# File lib/dm-rails/storage.rb, line 69 def create puts create_message if _create end
# File lib/dm-rails/storage.rb, line 93 def create_message "[datamapper] Created database '#{database}'" end
# File lib/dm-rails/storage.rb, line 77 def database @database ||= config['database'] || config['path'] end
# File lib/dm-rails/storage.rb, line 73 def drop puts drop_message if _drop end
# File lib/dm-rails/storage.rb, line 97 def drop_message "[datamapper] Dropped database '#{database}'" end
Generated with the Darkfish Rdoc Generator 2.