Sha256: 0ee76db24ea28723398c4e13ef4e912dc2a374ed2f8b0040ab1e2e4ad253054e
Contents?: true
Size: 907 Bytes
Versions: 3
Compression:
Stored size: 907 Bytes
Contents
module Niso class Dependency def self.all { 'highline' => { :require => 'highline', :version => '>= 1.7.8'}, 'droplet_kit' => { :require => 'droplet_kit', :version => '>= 2.1.0' }, } end def self.load(name) begin gem(name, all[name][:version]) require(all[name][:require]) rescue LoadError if $!.to_s =~ /Gemfile/ Logger.error <<-EOS Dependency missing: #{name} Add this line to your application's Gemfile. gem '#{name}', '#{all[name][:version]}' Please try again after running "bundle install". EOS else 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 end abort end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
niso-2.0.6 | lib/niso/dependency.rb |
niso-2.0.4 | lib/niso/dependency.rb |
niso-2.0.3 | lib/niso/dependency.rb |