Class: OkComputer::ActiveRecordMigrationsCheck
- Defined in:
- lib/ok_computer/built_in_checks/active_record_migrations_check.rb
Constant Summary
Constants inherited from Check
Instance Attribute Summary
Attributes inherited from Check
#failure_occurred, #message, #registrant_name, #time
Instance Method Summary collapse
-
#check ⇒ Object
Public: Check if migrations are pending or not.
Methods inherited from Check
#<=>, #clear, #mark_failure, #mark_message, #run, #success?, #to_json, #to_text, #with_benchmarking
Instance Method Details
#check ⇒ Object
Public: Check if migrations are pending or not
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ok_computer/built_in_checks/active_record_migrations_check.rb', line 5 def check return unsupported unless ActiveRecord::Migrator.respond_to?(:needs_migration?) if ActiveRecord::Migrator.needs_migration? mark_failure "Pending migrations" else "NO pending migrations" end end |