lib/manifest_handler.rb in inqlude-0.0.6 vs lib/manifest_handler.rb in inqlude-0.0.7
- old
+ new
@@ -14,11 +14,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
class ManifestHandler
- attr_reader :manifests, :libraries
+ attr_reader :manifests, :libraries, :settings
def initialize settings
@settings = settings
@libraries = Array.new
@@ -30,13 +30,16 @@
@libraries.each do |library|
if library.name == name
return library.manifests.last
end
end
- nil
+ raise "Unable to find manifest '#{name}'"
end
def read_remote
+ @libraries.clear
+ @manifests.clear
+
if !@settings.offline
fetch_remote
end
Dir.glob( "#{@settings.manifest_path}/*" ).sort.each do |dirname|