Sha256: a8b1f002428f7d5e509a8478eb9aea97efce2aa996ca1045d13693229824c491
Contents?: true
Size: 982 Bytes
Versions: 34
Compression:
Stored size: 982 Bytes
Contents
require 'rubygems/commands/install_command' module PowerStencil module Plugins module Gem include PowerStencil::Utils::GemUtils NO_DOC = %w(--no-document).freeze def is_available_gem?(gem_name) end def install_gem(plugin_name, plugin_requirements) ::Gem.install plugin_name, plugin_requirements end def find_locally_installed_gem_spec(gem_name, gem_requirements = ::Gem::Requirement.default) # Normal method to find gem_spec doesn't work in the context of bundler !! # candidates = ::Gem::Specification.find_all_by_name gem_name candidates = find_gemspec_manually(gem_name) .select {|candidate| gem_requirements.satisfied_by? candidate.version} .sort {|a, b| a.version <=> b.version} PowerStencil.logger.error "Could not find required plugin '#{gem_name}'" if candidates.empty? candidates.last end end end end
Version data entries
34 entries across 34 versions & 1 rubygems