Method: ArtifactoryExtensions::ClassMethods#search
- Defined in:
- lib/packaging/artifactory/extensions.rb
#search(options = {}) ⇒ Object
This adds the ‘exact_match` option to artifactory search, and defaults it to true. With `exact_match` set to `true` the artifact will only be returned if the name in the download uri matches the name we’re trying to download
60 61 62 63 64 65 66 67 68 |
# File 'lib/packaging/artifactory/extensions.rb', line 60 def search( = {}) exact_match = [:exact_match].nil? ? true : [:exact_match] artifacts = super if exact_match artifacts.select! { |artifact| File.basename(artifact.download_uri) == [:name] } end artifacts end |