debian-mirror-gitlab/app/services/packages/maven/create_package_service.rb

21 lines
504 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module Packages
module Maven
2020-11-24 15:15:51 +05:30
class CreatePackageService < ::Packages::CreatePackageService
2020-07-28 23:09:34 +05:30
def execute
app_group, _, app_name = params[:name].rpartition('/')
app_group.tr!('/', '.')
2021-01-29 00:20:46 +05:30
create_package!(:maven,
2020-07-28 23:09:34 +05:30
maven_metadatum_attributes: {
path: params[:path],
app_group: app_group,
app_name: app_name,
app_version: params[:version]
}
)
end
end
end
end