Class: Rails::Hyperdrive::InstallPlan::Entry
- Inherits:
-
Struct
- Object
- Struct
- Rails::Hyperdrive::InstallPlan::Entry
- Defined in:
- lib/rails/hyperdrive/install_plan.rb
Instance Attribute Summary collapse
-
#artifact ⇒ Object
Returns the value of attribute artifact.
-
#collision ⇒ Object
Returns the value of attribute collision.
-
#dest ⇒ Object
Returns the value of attribute dest.
-
#final_name ⇒ Object
Returns the value of attribute final_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #artifact_kind ⇒ Object
-
#install_ready_body ⇒ Object
The renamed name: is part of the hashed body, so a postfixed skill hashes to a stable value.
- #source_gem ⇒ Object
- #source_label ⇒ Object
- #support_files ⇒ Object
- #version ⇒ Object
Instance Attribute Details
#artifact ⇒ Object
Returns the value of attribute artifact
9 10 11 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 9 def artifact @artifact end |
#collision ⇒ Object
Returns the value of attribute collision
9 10 11 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 9 def collision @collision end |
#dest ⇒ Object
Returns the value of attribute dest
9 10 11 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 9 def dest @dest end |
#final_name ⇒ Object
Returns the value of attribute final_name
9 10 11 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 9 def final_name @final_name end |
#type ⇒ Object
Returns the value of attribute type
9 10 11 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 9 def type @type end |
Instance Method Details
#artifact_kind ⇒ Object
38 39 40 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 38 def artifact_kind type.to_s end |
#install_ready_body ⇒ Object
The renamed name: is part of the hashed body, so a postfixed skill hashes to a stable value.
12 13 14 15 16 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 12 def install_ready_body body = BundlerArtifactDiscovery.install_ready_body(artifact) return body unless type == :skill && final_name != artifact.name body.sub(/^name:\s*.+$/, "name: #{final_name}") end |
#source_gem ⇒ Object
26 27 28 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 26 def source_gem artifact.source_gem end |
#source_label ⇒ Object
34 35 36 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 34 def source_label "#{source_gem}@#{version}" end |
#support_files ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 18 def support_files return [] unless type == :skill dir = File.dirname(dest) Array(artifact.support_files).map do |file| { path: file[:path], body: file[:body], dest: "#{dir}/#{file[:path]}" } end end |
#version ⇒ Object
30 31 32 |
# File 'lib/rails/hyperdrive/install_plan.rb', line 30 def version artifact.spec_version end |