Sha256: 77f007c54297c4e2ad5fa44552d7715a5175c2fc16eff82f697a8b0ae3f50479

Contents?: true

Size: 594 Bytes

Versions: 27

Compression:

Stored size: 594 Bytes

Contents

module Dumper
  class Dependency
    LIBS = {
      'thor' =>       { :require => 'thor',       :version => '~> 0.14.0' },
      'rainbow' =>    { :require => 'rainbow',    :version => '~> 1.1.4' },
    }

    def self.load(name)
      begin
        gem(name, LIBS[name][:version])
        require(LIBS[name][:require])
      rescue LoadError
        abort <<-EOS
Dependency missing: #{name}
To install the gem, issue the following command:

    gem install #{name} -v '#{LIBS[name][:version]}'

Please try again after installing the missing dependency.
        EOS
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
dumper-0.2.0 lib/dumper/dependency.rb
dumper-0.1.1 lib/dumper/dependency.rb
dumper-0.1.0 lib/dumper/dependency.rb
dumper-0.0.7 lib/dumper/dependency.rb
dumper-0.0.6 lib/dumper/dependency.rb
dumper-0.0.5 lib/dumper/dependency.rb
dumper-0.0.4 lib/dumper/dependency.rb