Sha256: 06a124ffdf3eef818381da62c3b28940ed7531cc755c0af9f40429bd59d04487

Contents?: true

Size: 770 Bytes

Versions: 10

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true

require 'pathname'
require 'chamber/keys/base'

module  Chamber
module  Keys
class   Encryption < Chamber::Keys::Base
  NAMESPACE_PATTERN = /
                        \A          # Beginning of Filename
                        \.chamber   # Initial Chamber Prefix
                        \.          # Pre-Namespace Dot
                        (\w+)       # Namespace
                        \.pub\.pem  # Extension
                        \z          # End of Filename
                      /x.freeze

  private

  def environment_variable_from_path(path)
    [
      'CHAMBER',
      namespace_from_path(path),
      'PUBLIC_KEY',
    ]
      .compact
      .join('_')
  end

  def key_filename_extension
    '.pub.pem'
  end
end
end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chamber-3.1.1 lib/chamber/keys/encryption.rb
chamber-3.1.0 lib/chamber/keys/encryption.rb
chamber-3.0.1 lib/chamber/keys/encryption.rb
chamber-3.0.0 lib/chamber/keys/encryption.rb
chamber-3.0.0rc2 lib/chamber/keys/encryption.rb
chamber-2.14.3 lib/chamber/keys/encryption.rb
chamber-3.0.0rc1 lib/chamber/keys/encryption.rb
chamber-2.14.2 lib/chamber/keys/encryption.rb
chamber-2.14.1 lib/chamber/keys/encryption.rb
chamber-2.14.0 lib/chamber/keys/encryption.rb