Sha256: 504c75b5b57ab81849f9ffbde60cadf6cc514bc6dfd23df01d9e756740a80a10

Contents?: true

Size: 274 Bytes

Versions: 19

Compression:

Stored size: 274 Bytes

Contents

# frozen_string_literal: true

class String
  def self.clean_certificate(str)
    CGI.unescape(str).gsub(/(\n|-----(BEGIN|END) CERTIFICATE-----)/, '').strip
  end

  def clean_certificate
    clean_certificate(self)
  end

  alias_method :clean_cert, :clean_certificate
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
better_record-0.10.9 config/initializers/core_ext/string.rb
better_record-0.10.8 config/initializers/core_ext/string.rb
better_record-0.10.7 config/initializers/core_ext/string.rb
better_record-0.10.6 config/initializers/core_ext/string.rb
better_record-0.10.5 config/initializers/core_ext/string.rb
better_record-0.10.4 config/initializers/core_ext/string.rb
better_record-0.10.3 config/initializers/core_ext/string.rb
better_record-0.10.2 config/initializers/core_ext/string.rb
better_record-0.10.1 config/initializers/core_ext/string.rb
better_record-0.10.0 config/initializers/core_ext/string.rb
better_record-0.9.3 config/initializers/core_ext/string.rb
better_record-0.9.1 config/initializers/core_ext/string.rb
better_record-0.9.0 config/initializers/core_ext/string.rb
better_record-0.8.6 config/initializers/core_ext/string.rb
better_record-0.8.5 config/initializers/core_ext/string.rb
better_record-0.8.4 config/initializers/core_ext/string.rb
better_record-0.8.3 config/initializers/core_ext/string.rb
better_record-0.8.2 config/initializers/core_ext/string.rb
better_record-0.8.1 config/initializers/core_ext/string.rb