Move license creation via license key/file into a service class
Prior to this change, the logic used to create a new `License` when applying a license key or uploading a license file was handled directly in the `LicensesController`. The logic is already too complex for a controller. With upcoming changes, the logic needs to be modified which increased the complexity more. This change moves the logic to create a `License` when a license key is applied or a license file is uploaded to a dedicated service. This simplifies the controller specs and makes extending the logic easier and better maintainable.
显示
- config/bounded_contexts.yml 1 个添加, 1 个删除config/bounded_contexts.yml
- ee/app/controllers/admin/licenses_controller.rb 6 个添加, 33 个删除ee/app/controllers/admin/licenses_controller.rb
- ee/app/services/gitlab_subscriptions/upload_license_service.rb 66 个添加, 0 个删除...p/services/gitlab_subscriptions/upload_license_service.rb
- ee/spec/controllers/admin/licenses_controller_spec.rb 17 个添加, 79 个删除ee/spec/controllers/admin/licenses_controller_spec.rb
- ee/spec/services/gitlab_subscriptions/upload_license_service_spec.rb 128 个添加, 0 个删除...vices/gitlab_subscriptions/upload_license_service_spec.rb
- ee/spec/services/licenses/destroy_service_spec.rb 1 个添加, 0 个删除ee/spec/services/licenses/destroy_service_spec.rb
加载中
想要评论请 注册 或 登录