diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-05 21:09:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-05 21:09:15 +0300 |
commit | 6d18e2830d07abf6f3318bd0e11a784bb67dbf52 (patch) | |
tree | bcef28df295708ef804447fed5ae5bdb0cca1db0 /lib/api/helpers/packages | |
parent | 2f229658aea96b45edbb28c97a2aa0c58b3433eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers/packages')
-rw-r--r-- | lib/api/helpers/packages/conan/api_helpers.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/api/helpers/packages/conan/api_helpers.rb b/lib/api/helpers/packages/conan/api_helpers.rb index 24ebeb007d3..5499b6fe653 100644 --- a/lib/api/helpers/packages/conan/api_helpers.rb +++ b/lib/api/helpers/packages/conan/api_helpers.rb @@ -32,19 +32,15 @@ module API end def recipe_upload_urls - { upload_urls: Hash[ - file_names.select(&method(:recipe_file?)).map do |file_name| - [file_name, build_recipe_file_upload_url(file_name)] - end - ] } + { upload_urls: file_names.select(&method(:recipe_file?)).to_h do |file_name| + [file_name, build_recipe_file_upload_url(file_name)] + end } end def package_upload_urls - { upload_urls: Hash[ - file_names.select(&method(:package_file?)).map do |file_name| - [file_name, build_package_file_upload_url(file_name)] - end - ] } + { upload_urls: file_names.select(&method(:package_file?)).to_h do |file_name| + [file_name, build_package_file_upload_url(file_name)] + end } end def recipe_file?(file_name) |