module Polisher::RPM::SpecGemReference
Attributes
gem[RW]
.gem file associated with the RPM
specfile
Public Instance Methods
excluded_deps()
click to toggle source
Return list of dependencies of upstream gem which have not been included
# File lib/polisher/rpm/spec/gem_reference.rb, line 37 def excluded_deps missing_deps_for(upstream_gem) end
excluded_dev_deps()
click to toggle source
Return list of dev dependencies of upstream gem which have not been included
# File lib/polisher/rpm/spec/gem_reference.rb, line 48 def excluded_dev_deps missing_dev_deps_for(upstream_gem) end
excludes_dep?(gem_name)
click to toggle source
Return boolean indicating if the specified gem is on excluded list
# File lib/polisher/rpm/spec/gem_reference.rb, line 42 def excludes_dep?(gem_name) excluded_deps.any? { |d| d.name == gem_name } end
excludes_dev_dep?(gem_name)
click to toggle source
Return boolean indicating if the specified gem is on excluded dev dep list
# File lib/polisher/rpm/spec/gem_reference.rb, line 54 def excludes_dev_dep?(gem_name) excluded_dev_deps.any? { |d| d.name == gem_name } end
missing_deps_for(gem)
click to toggle source
Return list of gem dependencies for which we have no corresponding requirements
# File lib/polisher/rpm/spec/gem_reference.rb, line 22 def missing_deps_for(gem) # Comparison by name here assuming if it is in existing spec, # spec author will have ensured versions are correct for their purposes gem.deps.select { |dep| requirements_for_gem(dep.name).empty? } end
missing_dev_deps_for(gem)
click to toggle source
Return list of gem dev dependencies for which we have no corresponding requirements
# File lib/polisher/rpm/spec/gem_reference.rb, line 30 def missing_dev_deps_for(gem) # Same note as in #missing_deps_for above gem.dev_deps.select { |dep| build_requirements_for_gem(dep.name).empty? } end
upstream_gem()
click to toggle source
Return gem corresponding to spec name/version
# File lib/polisher/rpm/spec/gem_reference.rb, line 15 def upstream_gem @gem, @update_gem = nil, false if @update_gem @gem ||= Polisher::Gem.from_rubygems gem_name, version end