Sha256: d9f516b5a07b35ea35567afcdd87bfb3d30a8b66be49ae67761255c8d7cb45fe

Contents?: true

Size: 379 Bytes

Versions: 11

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true

module Shark
  module RSpec
    module FakeAssetService
      module PublicId
        module_function

        def decode_public_id(public_id)
          Base64.urlsafe_decode64(public_id)
        rescue ArgumentError
          nil
        end

        def encode_id(id)
          Base64.urlsafe_encode64(id)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bima-shark-sdk-3.1.1 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.5.0 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-3.1.0 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-3.0.0 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.4.4 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.4.3 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.4.2 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.4.1 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.4.0 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.3.1 lib/shark/rspec/fake_asset_service/public_id.rb
bima-shark-sdk-2.3.0 lib/shark/rspec/fake_asset_service/public_id.rb