Sha256: f9d52bfc035020cb086ead00efed955f87b633ae25dbd6bf0f5bcc793a9b7d33

Contents?: true

Size: 702 Bytes

Versions: 9

Compression:

Stored size: 702 Bytes

Contents

module Sunzi
  class Dependency
    def self.all
      {
        'linode' =>   { :require => 'linode',   :version => '>= 0.7.7' },
        'highline' => { :require => 'highline', :version => '>= 1.6.11'},
        'route53' =>  { :require => 'route53',  :version => '>= 0.2.1' },
      }
    end

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

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sunzi-0.8.0 lib/sunzi/dependency.rb
sunzi-0.7.0 lib/sunzi/dependency.rb
sunzi-0.6.0 lib/sunzi/dependency.rb
sunzi-0.5.1 lib/sunzi/dependency.rb
sunzi-0.5.0 lib/sunzi/dependency.rb
sunzi-0.4.4 lib/sunzi/dependency.rb
sunzi-0.4.3 lib/sunzi/dependency.rb
sunzi-0.4.2 lib/sunzi/dependency.rb
sunzi-0.4.1 lib/sunzi/dependency.rb