active_uxid 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +1 -1
 - data/active_uxid.gemspec +0 -1
 - data/lib/active_uxid.rb +1 -1
 - data/lib/active_uxid/base.rb +3 -4
 - data/lib/active_uxid/configuration.rb +28 -0
 - data/lib/active_uxid/hash.rb +2 -0
 - data/lib/active_uxid/ulid.rb +1 -1
 - data/lib/active_uxid/version.rb +1 -1
 - data/lib/generators/active_uxid/templates/install.rb +1 -1
 - metadata +2 -17
 - data/_config.yml +0 -1
 - data/lib/active_uxid/settings.rb +0 -14
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: adba934e86aea61e08652d5d89ebe9f8a1b88141
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 990e14ab42cc2ce10d8c9859db614f17fd93e5c2
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9fce81f1babe2f16126d0b2f8019d8c57704f95b17a5be066ca21641cac3834f7410305066a45ae6d8ea292893915a21af07c1fde56c3a1d1bb4e7ad0fa485da
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1bfc2e086ff1fce0325059c6ed55983eb4e90ad2e0c55b52a3565db535b11225005006da38ecaf5b9411322f0dab87f77d1f6f04c543142a41c1ac5bc2500c4c
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -34,7 +34,7 @@ Or install it yourself as: 
     | 
|
| 
       34 
34 
     | 
    
         
             
            `../config/initalizers/active_uxid.rb`
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
            ```ruby
         
     | 
| 
       37 
     | 
    
         
            -
            ActiveUxid 
     | 
| 
      
 37 
     | 
    
         
            +
            ActiveUxid.configure do |config|
         
     | 
| 
       38 
38 
     | 
    
         
             
              config.encoding_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
         
     | 
| 
       39 
39 
     | 
    
         
             
              config.encoding_length = 26
         
     | 
| 
       40 
40 
     | 
    
         
             
              config.encoding_salt = 1369136
         
     | 
    
        data/active_uxid.gemspec
    CHANGED
    
    | 
         @@ -24,7 +24,6 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
              spec.add_runtime_dependency 'activerecord'
         
     | 
| 
       26 
26 
     | 
    
         
             
              spec.add_runtime_dependency 'activesupport'
         
     | 
| 
       27 
     | 
    
         
            -
              spec.add_runtime_dependency 'dry-configurable'
         
     | 
| 
       28 
27 
     | 
    
         | 
| 
       29 
28 
     | 
    
         
             
              spec.add_development_dependency 'bundler'
         
     | 
| 
       30 
29 
     | 
    
         
             
              spec.add_development_dependency 'rake'
         
     | 
    
        data/lib/active_uxid.rb
    CHANGED
    
    
    
        data/lib/active_uxid/base.rb
    CHANGED
    
    | 
         @@ -3,10 +3,9 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module ActiveUxid
         
     | 
| 
       4 
4 
     | 
    
         
             
              class Base
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
       7 
     | 
    
         
            -
                 
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
       9 
     | 
    
         
            -
                ENCODING_SALT ||= ActiveUxid::Settings.config.encoding_salt
         
     | 
| 
      
 6 
     | 
    
         
            +
                ENCODING_CHARS ||= ActiveUxid.configuration.encoding_chars
         
     | 
| 
      
 7 
     | 
    
         
            +
                ENCODING_LENGTH ||= ActiveUxid.configuration.encoding_length
         
     | 
| 
      
 8 
     | 
    
         
            +
                ENCODING_SALT ||= ActiveUxid.configuration.encoding_salt
         
     | 
| 
       10 
9 
     | 
    
         | 
| 
       11 
10 
     | 
    
         
             
              end
         
     | 
| 
       12 
11 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module ActiveUxid
         
     | 
| 
      
 4 
     | 
    
         
            +
              class Configuration
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                attr_accessor :encoding_chars, :encoding_length, :encoding_salt
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 9 
     | 
    
         
            +
                  @encoding_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @encoding_length = 26
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @encoding_salt = 1369136
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              def self.configuration
         
     | 
| 
      
 17 
     | 
    
         
            +
                @configuration ||= Configuration.new
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              def self.configuration=(config)
         
     | 
| 
      
 21 
     | 
    
         
            +
                @configuration = config
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              def self.configure
         
     | 
| 
      
 25 
     | 
    
         
            +
                yield(configuration)
         
     | 
| 
      
 26 
     | 
    
         
            +
              end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/active_uxid/hash.rb
    CHANGED
    
    
    
        data/lib/active_uxid/ulid.rb
    CHANGED
    
    
    
        data/lib/active_uxid/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Juan Gomez
         
     | 
| 
         @@ -38,20 +38,6 @@ dependencies: 
     | 
|
| 
       38 
38 
     | 
    
         
             
                - - ">="
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
40 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       41 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
     | 
    
         
            -
              name: dry-configurable
         
     | 
| 
       43 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
     | 
    
         
            -
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       46 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       48 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       49 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       50 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
     | 
    
         
            -
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       53 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       55 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
42 
     | 
    
         
             
              name: bundler
         
     | 
| 
       57 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -195,17 +181,16 @@ files: 
     | 
|
| 
       195 
181 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       196 
182 
     | 
    
         
             
            - README.md
         
     | 
| 
       197 
183 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       198 
     | 
    
         
            -
            - _config.yml
         
     | 
| 
       199 
184 
     | 
    
         
             
            - active_uxid.gemspec
         
     | 
| 
       200 
185 
     | 
    
         
             
            - bin/console
         
     | 
| 
       201 
186 
     | 
    
         
             
            - bin/rake
         
     | 
| 
       202 
187 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       203 
188 
     | 
    
         
             
            - lib/active_uxid.rb
         
     | 
| 
       204 
189 
     | 
    
         
             
            - lib/active_uxid/base.rb
         
     | 
| 
      
 190 
     | 
    
         
            +
            - lib/active_uxid/configuration.rb
         
     | 
| 
       205 
191 
     | 
    
         
             
            - lib/active_uxid/hash.rb
         
     | 
| 
       206 
192 
     | 
    
         
             
            - lib/active_uxid/record/hash.rb
         
     | 
| 
       207 
193 
     | 
    
         
             
            - lib/active_uxid/record/ulid.rb
         
     | 
| 
       208 
     | 
    
         
            -
            - lib/active_uxid/settings.rb
         
     | 
| 
       209 
194 
     | 
    
         
             
            - lib/active_uxid/ulid.rb
         
     | 
| 
       210 
195 
     | 
    
         
             
            - lib/active_uxid/version.rb
         
     | 
| 
       211 
196 
     | 
    
         
             
            - lib/generators/active_uxid/install_generator.rb
         
     | 
    
        data/_config.yml
    DELETED
    
    | 
         @@ -1 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            theme: jekyll-theme-cayman
         
     | 
    
        data/lib/active_uxid/settings.rb
    DELETED
    
    | 
         @@ -1,14 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'dry-configurable'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            module ActiveUxid
         
     | 
| 
       6 
     | 
    
         
            -
              class Settings
         
     | 
| 
       7 
     | 
    
         
            -
                extend Dry::Configurable
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                setting :encoding_chars, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
         
     | 
| 
       10 
     | 
    
         
            -
                setting :encoding_length, 26
         
     | 
| 
       11 
     | 
    
         
            -
                setting :encoding_salt, 1369136
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
              end
         
     | 
| 
       14 
     | 
    
         
            -
            end
         
     |