Sha256: f3f289dc8ec3b6d79c3ca04540c9236dc6404c9aa22973ddab0d3ec1233e44d1
Contents?: true
Size: 593 Bytes
Versions: 71
Compression:
Stored size: 593 Bytes
Contents
module KnapsackPro module Crypto class BranchEncryptor NON_ENCRYPTABLE_BRANCHES = %w(develop development dev master staging) def self.call(branch) if KnapsackPro::Config::Env.branch_encrypted? new(branch).call else branch end end def initialize(branch) @branch = branch end def call if NON_ENCRYPTABLE_BRANCHES.include?(branch) branch else Digestor.salt_hexdigest(branch)[0..6] end end private attr_reader :branch end end end
Version data entries
71 entries across 71 versions & 1 rubygems