active_uxid 1.0.6 → 1.0.7

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: bfdec5e36cf4b2e1696beb02da0212762a127334
4
- data.tar.gz: 89ac8fea751f7e41c74a69003196c8c3ba1f1198
3
+ metadata.gz: 5591852e4fc7ad73580cfc24f30e148b06414239
4
+ data.tar.gz: bb20521689e1c59c502b576c16e5791b96252d37
5
5
  SHA512:
6
- metadata.gz: 596a2b094dcc5a820487a27c1fa0d72324a02464abe6261a3e20086a1d5f69eafed8567f2aed0b21f0063d4e71ac1cc494ec4b6bf867e426d474e4f6a6117313
7
- data.tar.gz: de27fb2a69352eff6b6de473712f7ad09cee0992aa74750d988aadf0edb255dea31d4dac57e3a8af0ed1beffb2bb64d0b09d605ce9f45a3dfd1e3ae81bad2f79
6
+ metadata.gz: dc06dfd7c88071a873ef3b1ee7a0dce5e1aff6dd2ca2f333b02b3d475fdeeada8d1889a015a5840b0f631145908e3dd6145f4cdecc92d07e4560b75d3ecfcff7
7
+ data.tar.gz: e7c235a3943aedf6ed806460441bc716bbcc6c735dba1d07a9b61a2c64c0c5902f24acc2cb6c1c90aa4d6126b9927f3e6faa195daa0f67e178a373a0b45dae92
@@ -3,6 +3,9 @@
3
3
  module ActiveUxid
4
4
  class Ulid < ActiveUxid::Base
5
5
 
6
+ ENCODING_CHARS ||= ActiveUxid.configuration.encoding_chars
7
+ ENCODING_LENGTH ||= ActiveUxid.configuration.encoding_length
8
+
6
9
  def initialize; end
7
10
 
8
11
  def self.encode
@@ -11,7 +14,7 @@ module ActiveUxid
11
14
  end
12
15
 
13
16
  def uxid_encode
14
- (1..ActiveUxid.configuration.encoding_length).reduce('') do |str, num|
17
+ (1..ENCODING_LENGTH).reduce('') do |str, num|
15
18
  shift = 128 - 5 * num
16
19
  "#{str}#{ENCODING_CHARS[(uxid_octect >> shift) & 0x1f]}"
17
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRegulation
4
- VERSION ||= '1.0.6'
4
+ VERSION ||= '1.0.7'
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.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez