Sha256: 997eb2936fee1fe22e9884f1af50616a3264d57c502fc16ce22d1eaf7e383a3b

Contents?: true

Size: 923 Bytes

Versions: 30

Compression:

Stored size: 923 Bytes

Contents

#
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'base64'

module Backstage
  module Util
    class << self
      def encode_name(name)
        #ugh, I'd rather encode a different way, but other attempts
        #seem to break sinatra?
        Base64.encode64( name ).gsub("\n", '')
      end

      def decode_name(name)
        Base64.decode64( name )
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
torquebox-backstage-1.1.2 lib/util.rb
torquebox-backstage-1.1.1 lib/util.rb
torquebox-backstage-1.1.0 lib/util.rb
torquebox-backstage-1.0.7 lib/util.rb
torquebox-backstage-1.0.6 lib/util.rb
torquebox-backstage-1.0.5 lib/util.rb
torquebox-backstage-1.0.4 lib/util.rb
torquebox-backstage-1.0.3 lib/util.rb
torquebox-backstage-1.0.2 lib/util.rb
torquebox-backstage-1.0.1 lib/util.rb
torquebox-backstage-1.0.0 lib/util.rb
torquebox-backstage-1.0.0.beta2 lib/util.rb
torquebox-backstage-1.0.0.beta1 lib/util.rb
torquebox-backstage-0.5.4 lib/util.rb
torquebox-backstage-0.5.3 lib/util.rb
torquebox-backstage-0.5.2 lib/util.rb
torquebox-backstage-0.5.1 lib/util.rb
torquebox-backstage-0.5 lib/util.rb
torquebox-backstage-0.4.3 lib/util.rb
torquebox-backstage-0.4.2 lib/util.rb