active_uxid 1.0.9 → 1.0.10

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
  SHA1:
3
- metadata.gz: e88ff6945d1bb597c29d9845de014ff9863271c2
4
- data.tar.gz: d1318a09e9548a03b063ff544ac0a1a3da5be8b9
3
+ metadata.gz: f268252b89f510be74aee33cf4f05c3c7d42ed92
4
+ data.tar.gz: 41a5e44b636ec6d8c93e9fe6a19228ecde6dc8f0
5
5
  SHA512:
6
- metadata.gz: d30539b61c15faab36e4fac2da20d4460ae9352bcebeb8bf49d7d4f8c7daf9787c7b6e1bd64311befd4988a9cbb4f34ea68007dd52c1a1fccb0f682900ab5f3b
7
- data.tar.gz: e6dd1337e463dec62dce2fe596f4b21d9d2a897c6fca3a8a6b1b388788052e4b548b3f3c131b7465461b903e8ef70ba3cbe66002e6b4f499a6e3c0f3eabaab3a
6
+ metadata.gz: 788be6648a7c161283f8296be871f09e4928990f9543dc90190f9998b068ae32aa897fc318e749165c6dd64282cdcf13751508fd52e54bd8ff4ff0c15482f357
7
+ data.tar.gz: 1696f6915cb835be739f48c56bdf1a092669707270993438b075dafbbee6b00b50d4cfc6a01cf9ecab67e50d4c36a25d64f2b8b63f7ae6f64cd25469e9b8b180
@@ -6,7 +6,9 @@ module ActiveUxid
6
6
  ENCODING_CHARS ||= ActiveUxid.configuration.encoding_chars
7
7
  ENCODING_LENGTH = ActiveUxid.configuration.encoding_length
8
8
 
9
- def initialize; end
9
+ def initialize
10
+ @encoding_length = ActiveUxid.configuration.encoding_length
11
+ end
10
12
 
11
13
  def self.encode
12
14
  klass = new
@@ -14,7 +16,7 @@ module ActiveUxid
14
16
  end
15
17
 
16
18
  def uxid_encode
17
- (1..ENCODING_LENGTH).reduce('') do |str, num|
19
+ (1..@encoding_length).reduce('') do |str, num|
18
20
  shift = 128 - 5 * num
19
21
  "#{str}#{ENCODING_CHARS[(uxid_octect >> shift) & 0x1f]}"
20
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRegulation
4
- VERSION ||= '1.0.9'
4
+ VERSION ||= '1.0.10'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_uxid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez