uffizzi_core 2.0.11 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87cdaba8e373d94f9cb26dc3dcb997d3a9fe03e6073b0ed9f051f01817d42888
4
- data.tar.gz: cd4d760782ffdda75d6f03a61cc7c96df3bc369163444cf4b33d1c16d5b084aa
3
+ metadata.gz: 1ce237a7f1c46dcb9abbe62124bae678aa95e5a91a371da56c1358295dfaf035
4
+ data.tar.gz: a5afbb4dbe4b8bd0df78b4f7abb8f402dee2a0122ec409a004b344abadf560c7
5
5
  SHA512:
6
- metadata.gz: 17e87a12097459db02a890b6a456a6f644bdb1aadb0843b2f6527e2f2c47b77bb5e180103035a2623047253b28656f8e868af7f5fa75d61a06ccb05327d3f4bd
7
- data.tar.gz: 26ae9224028cf8e7f8fbc40697df8481fa8579407f11d44d26ca237395feaec42bfa5668e2a8643bfc14c33992b27dbc3ca3471859eb6fee5617ee70a0e8dda6
6
+ metadata.gz: 3c96a8dbd89bf163574a28c4d5d01f884a64d4f82f5f665c6322e1030fe33107976410d418478f997824fd2b1d9be4b568e34efa6dcd7c6963d5aa8a309b9be5
7
+ data.tar.gz: c60515fe9eff88d86a9b5a3d8bd30617a56e33271e671d02a52737e369ee09bdf17a83ab7e9a378f4d7c21161e0e0bad6ee24340b50a952f65471a0208b5100a
@@ -100,7 +100,7 @@ class UffizziCore::DeploymentService
100
100
  repo_name, pull_request_number = pull_request_data(deployment)
101
101
  raise UffizziCore::Deployment::LabelsNotFoundError if repo_name.nil? || pull_request_number.nil?
102
102
 
103
- formatted_repo_name = repo_name.split('/').last.downcase
103
+ formatted_repo_name = format_url_safe(repo_name.split('/').last.downcase)
104
104
  subdomain = "pr-#{pull_request_number}-#{name(deployment)}-#{formatted_repo_name}"
105
105
  format_subdomain(subdomain)
106
106
  end
@@ -272,6 +272,7 @@ class UffizziCore::DeploymentService
272
272
  end
273
273
 
274
274
  envs.push('name' => 'UFFIZZI_URL', 'value' => "https://#{deployment.preview_url}")
275
+ envs.push('name' => 'UFFIZZI_DOMAIN', 'value' => deployment.preview_url)
275
276
 
276
277
  container.variables = [] if container.variables.nil?
277
278
 
@@ -309,5 +310,9 @@ class UffizziCore::DeploymentService
309
310
 
310
311
  [gitlab_data['repo'], gitlab_data.dig('merge_request', 'number')]
311
312
  end
313
+
314
+ def format_url_safe(name)
315
+ name.gsub(/ /, '-').gsub(/[^\w-]+/, '-')
316
+ end
312
317
  end
313
318
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.0.11'
4
+ VERSION = '2.0.13'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-23 00:00:00.000000000 Z
12
+ date: 2022-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm