Class: Bleib::Migrations
- Inherits:
-
Object
- Object
- Bleib::Migrations
- Defined in:
- lib/bleib/migrations.rb
Overview
Finds out if all migrations are up.
Knows how to handle multitenancy with Apartment, if used. Checks also migrations with Wagons, if used.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Migrations
constructor
A new instance of Migrations.
- #wait_until_done ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Migrations
Returns a new instance of Migrations.
7 8 9 |
# File 'lib/bleib/migrations.rb', line 7 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#wait_until_done ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/bleib/migrations.rb', line 11 def wait_until_done logger.info('Waiting for migrations') logger.info('Also checking apartment tenants:' + " #{apartment_gem? ? 'yes' : 'no'}") logger.info('Also checking wagon migrations:' + " #{wagons_gem? ? 'yes' : 'no'}") wait while pending_migrations? logger.info('All migrations are up') end |