Class: Paratrooper::PendingMigrationCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/paratrooper/pending_migration_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match_tag_name, heroku_wrapper, system_caller) ⇒ PendingMigrationCheck

Returns a new instance of PendingMigrationCheck.



7
8
9
10
11
# File 'lib/paratrooper/pending_migration_check.rb', line 7

def initialize(match_tag_name, heroku_wrapper, system_caller)
  self.heroku         = heroku_wrapper
  self.match_tag_name = match_tag_name
  self.system_caller  = system_caller
end

Instance Attribute Details

#diffObject

Returns the value of attribute diff.



5
6
7
# File 'lib/paratrooper/pending_migration_check.rb', line 5

def diff
  @diff
end

#herokuObject

Returns the value of attribute heroku.



5
6
7
# File 'lib/paratrooper/pending_migration_check.rb', line 5

def heroku
  @heroku
end

#match_tag_nameObject

Returns the value of attribute match_tag_name.



5
6
7
# File 'lib/paratrooper/pending_migration_check.rb', line 5

def match_tag_name
  @match_tag_name
end

#system_callerObject

Returns the value of attribute system_caller.



5
6
7
# File 'lib/paratrooper/pending_migration_check.rb', line 5

def system_caller
  @system_caller
end

Instance Method Details

#last_deployed_commitObject



17
18
19
# File 'lib/paratrooper/pending_migration_check.rb', line 17

def last_deployed_commit
  @last_deploy_commit ||= heroku.last_deploy_commit
end

#migrations_waiting?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/paratrooper/pending_migration_check.rb', line 13

def migrations_waiting?
  @migrations_waiting ||= check_for_pending_migrations
end