Method: LibGems::SourceIndex#load_gems_in
- Defined in:
- lib/libgems/source_index.rb
#load_gems_in(*spec_dirs) ⇒ Object
Reconstruct the source index from the specifications in spec_dirs.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/libgems/source_index.rb', line 146 def load_gems_in(*spec_dirs) @gems.clear spec_dirs.reverse_each do |spec_dir| spec_files = Dir.glob File.join(spec_dir, '*.gemspec') spec_files.each do |spec_file| gemspec = self.class.load_specification spec_file.untaint add_spec gemspec if gemspec end end self end |