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(deployment_sha, 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(deployment_sha, heroku_wrapper, system_caller)
  self.heroku         = heroku_wrapper
  self.deployment_sha = deployment_sha
  self.system_caller  = system_caller
end

Instance Attribute Details

#deployment_shaObject

Returns the value of attribute deployment_sha.



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

def deployment_sha
  @deployment_sha
end

#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

#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



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

def last_deployed_commit
  @last_deploy_commit ||= heroku.last_deploy_commit
end

#migrations_waiting?Boolean

Returns:

  • (Boolean)


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

def migrations_waiting?
  defined?(@migrations_waiting) or @migrations_waiting = check_for_pending_migrations
  @migrations_waiting
end