public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
markbates (author)
Sun Feb 22 18:14:23 -0800 2009
commit  81973d4bb2540f040d1534d64cb6c86cc2b4edb7
tree    8e7e5b87ffc4dbbf1bc2eb2867a56d678ffdb366
parent  88b9f8a1b65bd025566b8368b2b75612543a6650
mack / lib / gems.rb
100644 20 lines (18 sloc) 0.534 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'mack-facets'
require File.join(File.dirname(__FILE__), 'mack', 'core_extensions', 'gem_kernel')
 
path = File.expand_path(File.join(File.dirname(__FILE__), 'gems'))
Gem.set_paths(path)
 
Dir.glob(File.join(path, '*')).each do |p|
  full_gem_name = File.basename(p)
  version = full_gem_name.match(/([\d\.?]+)/).to_s
  gem_name = full_gem_name.gsub("-#{version}", '')
  $:.unshift(File.join(p, 'lib'))
  begin
    if v1_9?
      gem gem_name
    else
      gem gem_name, "~> #{version}"
    end
  rescue Gem::LoadError
  end
end