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

28 lines
651 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)
2021-04-29 21:17:54 +05:30
by_conan_package_reference(files)
2020-07-28 23:09:34 +05:30
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