X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fbase64%2Fencoding.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fbase64%2Fencoding.rb;h=a9656c138e5bd361cb715b68bd9b89ceded76a00;hb=437aa336c44c74a30aeea16a06743c32747ed661;hp=0000000000000000000000000000000000000000;hpb=97a0772b06264134cfe38e7494f9427efe0840a0;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb b/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb new file mode 100644 index 0000000..a9656c1 --- /dev/null +++ b/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb @@ -0,0 +1,16 @@ +module ActiveSupport #:nodoc: + module CoreExtensions #:nodoc: + module Base64 #:nodoc: + module Encoding + # Encodes the value as base64 without the newline breaks. This makes the base64 encoding readily usable as URL parameters + # or memcache keys without further processing. + # + # ActiveSupport::Base64.encode64s("Original unencoded string") + # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==" + def encode64s(value) + encode64(value).gsub(/\n/, '') + end + end + end + end +end