debian-mirror-gitlab/app/finders/packages/conan/package_file_finder.rb

29 lines
673 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module Packages
module Conan
class PackageFileFinder < ::Packages::PackageFileFinder
private
def package_files
files = super
files = by_conan_file_type(files)
files = by_conan_package_reference(files)
files
end
def by_conan_file_type(files)
return files unless params[:conan_file_type]
files.with_conan_file_type(params[:conan_file_type])
end
def by_conan_package_reference(files)
return files unless params[:conan_package_reference]
files.with_conan_package_reference(params[:conan_package_reference])
end
end
end
end