Class: Bundler::ParallelInstaller::SpecInstallation
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/bundler/installer/parallel_installer.rb |
Class Method Summary
- .new(spec) ⇒ SpecInstallation constructor
Instance Attribute Summary
- #enqueued? ⇒ Boolean readonly
- #error rw
- #failed? ⇒ Boolean readonly
- #full_name rw
- #has_post_install_message? ⇒ Boolean readonly
- #installed? ⇒ Boolean readonly
- #name rw
- #post_install_message rw
- #ready_to_enqueue? ⇒ Boolean readonly
- #spec rw
- #state rw
Instance Method Summary
-
#all_dependencies
Represents all dependencies.
-
#dependencies
Represents only the non-development dependencies, the ones that are itself and are in the total list.
-
#dependencies_installed?(all_specs) ⇒ Boolean
Checks installed dependencies against spec’s dependencies to make sure needed dependencies have been installed.
- #ignorable_dependency?(dep) ⇒ Boolean
- #to_s
Constructor Details
.new(spec) ⇒ SpecInstallation
Instance Attribute Details
#enqueued? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/installer/parallel_installer.rb', line 23
def enqueued? state == :enqueued end
#error (rw)
[ GitHub ]
#failed? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/installer/parallel_installer.rb', line 27
def failed? state == :failed end
#full_name (rw)
[ GitHub ]
#has_post_install_message? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/installer/parallel_installer.rb', line 35
def ! .empty? end
#installed? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/installer/parallel_installer.rb', line 19
def installed? state == :installed end
#name (rw)
[ GitHub ]#post_install_message (rw)
[ GitHub ]
#ready_to_enqueue? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/installer/parallel_installer.rb', line 31
def ready_to_enqueue? state == :none end
#spec (rw)
[ GitHub ]#state (rw)
[ GitHub ]Instance Method Details
#all_dependencies
Represents all dependencies
# File 'lib/bundler/installer/parallel_installer.rb', line 57
def all_dependencies @spec.dependencies end
#dependencies
Represents only the non-development dependencies, the ones that are itself and are in the total list.
# File 'lib/bundler/installer/parallel_installer.rb', line 52
def dependencies @dependencies ||= all_dependencies.reject {|dep| ignorable_dependency? dep } end
#dependencies_installed?(all_specs) ⇒ Boolean
Checks installed dependencies against spec’s dependencies to make sure needed dependencies have been installed.
# File 'lib/bundler/installer/parallel_installer.rb', line 45
def dependencies_installed?(all_specs) installed_specs = all_specs.select(&:installed?).map(&:name) dependencies.all? {|d| installed_specs.include? d.name } end
#ignorable_dependency?(dep) ⇒ Boolean
# File 'lib/bundler/installer/parallel_installer.rb', line 39
def ignorable_dependency?(dep) dep.type == :development || dep.name == @name end