Class: RubygemsAnalyzer
Instance Attribute Summary
Attributes inherited from DepAnalyzer
#g
Instance Method Summary
collapse
Methods inherited from DepAnalyzer
#initialize, #run, #setup
Methods inherited from Cache
#cache, #initialize
Constructor Details
This class inherits a constructor from DepAnalyzer
Instance Method Details
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/rubygems_analyzer.rb', line 31
def decorate
developer_dependency = g.gray
installed = self.installed
installed.each do |gem|
deps = self.deps gem
deps.each do |dep|
next if dep.type == :runtime
name = dep.name
developer_dependency << g[gem][name] if $a or installed.include? name
end
end
end
|
#deps(gem_name) ⇒ Object
26
27
28
29
|
# File 'lib/rubygems_analyzer.rb', line 26
def deps gem_name
gem = Gem::Specification.find_by_name gem_name
gem.dependencies
end
|
#installed ⇒ Object
14
15
16
17
18
|
# File 'lib/rubygems_analyzer.rb', line 14
def installed
puts "scanning installed rubygems"
Gem::Specification.map(&:name).sort
end
|
20
21
22
23
24
|
# File 'lib/rubygems_analyzer.rb', line 20
def outdated
puts "scanning outdated rubygems"
Gem::Specification.outdated.sort
end
|