based_uuid 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5499342189f8b46811d3d620d6074dbd6620bc3cbc8882f39261b428a5fbcc41
4
- data.tar.gz: 4ed71b83bf2f7271466256c5a215f217ba4c300665aeb895e6fa2da2b1308ea9
3
+ metadata.gz: 5efa8c1cc0d82b116e8e4bfd6a5170bb83fd01258f19eb35b32aa28a0bc39804
4
+ data.tar.gz: 15e4f3a03f286ec1bbc40f3fd1da6d19c2d5b0b17db9718762d4a632966484ac
5
5
  SHA512:
6
- metadata.gz: edaf5ab4385cb65dff10739d12801b98c0085fb9d54d9841c480783c014ff47d2359b16acaf03b426a7a17049968f0bea1d54e0cc5063d4679105bb5813a9655
7
- data.tar.gz: c81d9c3aa7c122516c846cb0470b45d2352f2db8bcc051a22c6da6d5d7f9a33892dab095f719677512cfd9d29d8f891f971c1d084f212cbe4283ea76425a87c5
6
+ metadata.gz: a94e6cf70c7cc5954f97c2720032885ad7bee008f30e41dd6af341c67ad04756940d4e5a8d865d33135abf737a0ed4c9170812d7135e711e848e68d23442b9ec
7
+ data.tar.gz: f7eba4f45b4deaadd65d4ac731411bc86a15b47197972bb9ee4c2f0f5ede773a99d79a6b3f50a3a30cc5b47c845f564cc89d628e18d9a28fce67b055b0d6b801
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # BasedUUID: URL-friendly UUIDs for Rails models
2
2
 
3
- [![Build Status](https://github.com/pch/based_uuid/workflows/Tests/badge.svg)](https://github.com/pch/based_uuid/actions) [![Gem Version](https://badge.fury.io/rb/based_uuid.svg)](https://badge.fury.io/rb/based_uuid)
4
-
3
+ [![Build Status](https://github.com/pch/based_uuid/workflows/Tests/badge.svg)](https://github.com/pch/based_uuid/actions)
5
4
 
6
5
  Generate “double-clickable”, URL-friendly UUIDs with (optional) prefixes:
7
6
 
@@ -98,6 +97,7 @@ end
98
97
  BasedUUID can be used outside ActiveRecord, too. You can encode any UUID with it:
99
98
 
100
99
  ```ruby
100
+ BasedUUID.encode(uuid: "226d037c-3b35-40f3-a30b-0ebb78779d9b")
101
101
  BasedUUID.encode(uuid: "226d037c-3b35-40f3-a30b-0ebb78779d9b", prefix: :bpo)
102
102
  BasedUUID.decode("bpo_12dm1qresn83st62reqdw7f7cv")
103
103
  ```
@@ -1,3 +1,3 @@
1
1
  module BasedUUID
2
- VERSION = "0.6.1".freeze
2
+ VERSION = "0.6.2".freeze
3
3
  end
data/lib/based_uuid.rb CHANGED
@@ -30,7 +30,7 @@ module BasedUUID
30
30
  [prefix.presence, uuid_base32]
31
31
  end
32
32
 
33
- def encode(uuid:, prefix:)
33
+ def encode(uuid:, prefix: nil)
34
34
  uuid_base32 = Base32UUID.encode(uuid)
35
35
  return uuid_base32 unless prefix
36
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: based_uuid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Chmolowski