Parent

Class Index [+]

Quicksearch

Jeweler::Commands::CheckDependencies

Attributes

gemspec[RW]
type[RW]

Public Class Methods

build_for(jeweler) click to toggle source
    # File lib/jeweler/commands/check_dependencies.rb, line 43
43:       def self.build_for(jeweler)
44:         command = new
45: 
46:         command.gemspec = jeweler.gemspec
47: 
48:         command
49:       end

Public Instance Methods

dependencies() click to toggle source
    # File lib/jeweler/commands/check_dependencies.rb, line 33
33:       def dependencies
34:         case type
35:         when :runtime, :development
36:           gemspec.send("#{type}_dependencies")
37:         else
38:           gemspec.dependencies
39:         end
40:         
41:       end
run() click to toggle source
    # File lib/jeweler/commands/check_dependencies.rb, line 10
10:       def run
11:         missing_dependencies = dependencies.select do |dependency|
12:           begin
13:             Gem.activate dependency.name, dependency.version_requirements.to_s
14:             false
15:           rescue LoadError => e
16:             true
17:           end
18:         end
19: 
20:         if missing_dependencies.empty?
21:           puts "#{type || 'All'} dependencies seem to be installed."
22:         else
23:           puts "Missing some dependencies. Install them with the following commands:"
24:           missing_dependencies.each do |dependency|
25:             puts %{\tgem install #{dependency.name} --version "#{dependency.version_requirements}"}
26:           end
27:           
28:           abort "Run the specified gem commands before trying to run this again: #{$0} #{ARGV.join(' ')}"
29:         end
30:         
31:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.