lib/fig/repository.rb in fig-0.1.53 vs lib/fig/repository.rb in fig-0.1.54

- old
+ new

@@ -9,10 +9,12 @@ module Fig # Overall management of a repository. Handles local operations itself; # defers remote operations to others. class Repository + METADATA_SUBDIRECTORY = '_meta' + def self.is_url?(url) not (/ftp:\/\/|http:\/\/|file:\/\/|ssh:\/\// =~ url).nil? end def initialize( @@ -42,14 +44,17 @@ @operating_system.list(File.join(@local_repository_dir, package_name)).each do |version_name| results << "#{package_name}/#{version_name}" end end end - results + + return results end def list_remote_packages - @operating_system.download_list(@remote_repository_url) + paths = @operating_system.download_list(@remote_repository_url) + + return paths.reject { |path| path =~ %r< ^ #{METADATA_SUBDIRECTORY} / >xs } end def get_package(package_name, version_name, disable_updating = false) package = @packages.get_package(package_name, version_name) return package if package