Sha256: 379e3e223389eafaafe5952e67ef3e031b49e5cb29face454c1fd7aba83fd267

Contents?: true

Size: 395 Bytes

Versions: 12

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

class PreviewService
  class << self
    def read_deployment_id(deployment_name)
      return nil unless deployment_name.start_with?('deployment-')
      return nil unless deployment_name.split('-').size == 2

      deployment_id = deployment_name.split('-').last
      return nil if deployment_id.to_i.to_s != deployment_id

      deployment_id
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
uffizzi-cli-0.6.0 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.5.2 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.5.1 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.5.0 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.4.0 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.8 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.7 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.6 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.5 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.4 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.3 lib/uffizzi/services/preview_service.rb
uffizzi-cli-0.3.2 lib/uffizzi/services/preview_service.rb