Class: Rails::Hyperdrive::AutoInstall::Result
- Inherits:
-
Struct
- Object
- Struct
- Rails::Hyperdrive::AutoInstall::Result
- Defined in:
- lib/rails/hyperdrive/auto_install.rb
Instance Attribute Summary collapse
-
#advisories ⇒ Object
Returns the value of attribute advisories.
-
#error ⇒ Object
Returns the value of attribute error.
-
#fence_warnings ⇒ Object
Returns the value of attribute fence_warnings.
-
#halted ⇒ Object
Returns the value of attribute halted.
-
#installed ⇒ Object
Returns the value of attribute installed.
-
#orphaned ⇒ Object
Returns the value of attribute orphaned.
-
#outdated ⇒ Object
Returns the value of attribute outdated.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#unwired ⇒ Object
Returns the value of attribute unwired.
Instance Method Summary collapse
Instance Attribute Details
#advisories ⇒ Object
Returns the value of attribute advisories
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def advisories @advisories end |
#error ⇒ Object
Returns the value of attribute error
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def error @error end |
#fence_warnings ⇒ Object
Returns the value of attribute fence_warnings
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def fence_warnings @fence_warnings end |
#halted ⇒ Object
Returns the value of attribute halted
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def halted @halted end |
#installed ⇒ Object
Returns the value of attribute installed
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def installed @installed end |
#orphaned ⇒ Object
Returns the value of attribute orphaned
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def orphaned @orphaned end |
#outdated ⇒ Object
Returns the value of attribute outdated
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def outdated @outdated end |
#skipped ⇒ Object
Returns the value of attribute skipped
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def skipped @skipped end |
#unwired ⇒ Object
Returns the value of attribute unwired
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def unwired @unwired end |
Instance Method Details
#installed_anything? ⇒ Boolean
22 23 24 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 22 def installed_anything? !Array(installed).empty? end |
#messages ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 26 def return [] unless ran? return [halted] if halted lines = [] unless Array(installed).empty? lines << "installed #{installed.size} artifact(s):" installed.each { |path| lines << " #{path}" } end lines << "installed guideline(s) are not in context yet — run bin/rails hyperdrive:sync" if unwired stale = Array(outdated) + Array(orphaned) unless stale.empty? lines << "#{stale.size} artifact(s) need attention — run bin/rails hyperdrive:sync" stale.each { |entry| lines << " #{entry}" } end # An advisory names content that installed but not as the manifest # asked; ordinary skips are init/sync's to report, not a bundle # install's. (Array(advisories) | Array(fence_warnings)).each { |warning| lines << warning } lines end |
#ran? ⇒ Boolean
18 19 20 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 18 def ran? skipped.nil? end |