active_uxid 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.fasterer.yml +19 -0
- data/.gitignore +9 -0
- data/.reek +27 -0
- data/.rspec +3 -0
- data/.rubocop.yml +40 -0
- data/.travis.yml +13 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +6 -0
- data/README.md +84 -0
- data/Rakefile +5 -0
- data/_config.yml +1 -0
- data/active_uxid.gemspec +39 -0
- data/bin/console +15 -0
- data/bin/rake +16 -0
- data/bin/setup +7 -0
- data/lib/active_uxid.rb +11 -0
- data/lib/active_uxid/base.rb +12 -0
- data/lib/active_uxid/hash.rb +58 -0
- data/lib/active_uxid/record.rb +12 -0
- data/lib/active_uxid/record/hash.rb +26 -0
- data/lib/active_uxid/record/ulid.rb +20 -0
- data/lib/active_uxid/settings.rb +15 -0
- data/lib/active_uxid/ulid.rb +38 -0
- data/lib/active_uxid/version.rb +5 -0
- data/lib/generators/active_uxid/install_generator.rb +12 -0
- data/lib/generators/active_uxid/templates/install.rb +8 -0
- metadata +254 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1ef45b0b1fd32eb33f6849dd019edd5ade93154d
|
4
|
+
data.tar.gz: 84e9719c661f3f18b6e3abf624cd0d64d7355237
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 71eaa94fffd906a47ef8002e0e76f807538792ea525105ed2a4010197bc70421fc66635a784155d19494d2bdc77c57228c2c8cf8d1e29c4a2cbc95573b92cc7e
|
7
|
+
data.tar.gz: 860754811c07d43929748a8633b17e7b1a9a82ef4bd748f33d672d5d6ca2993356d0f8eaf660eb445095545db3deb847ea6df5832bb064cd30ac92e27ece5224
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.fasterer.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
speedups:
|
2
|
+
rescue_vs_respond_to: true
|
3
|
+
module_eval: true
|
4
|
+
shuffle_first_vs_sample: true
|
5
|
+
for_loop_vs_each: true
|
6
|
+
each_with_index_vs_while: false
|
7
|
+
map_flatten_vs_flat_map: true
|
8
|
+
reverse_each_vs_reverse_each: true
|
9
|
+
select_first_vs_detect: true
|
10
|
+
sort_vs_sort_by: true
|
11
|
+
fetch_with_argument_vs_block: true
|
12
|
+
keys_each_vs_each_key: true
|
13
|
+
hash_merge_bang_vs_hash_brackets: true
|
14
|
+
block_vs_symbol_to_proc: true
|
15
|
+
proc_call_vs_yield: true
|
16
|
+
gsub_vs_tr: true
|
17
|
+
select_last_vs_reverse_detect: true
|
18
|
+
getter_vs_attr_reader: true
|
19
|
+
setter_vs_attr_writer: true
|
data/.gitignore
ADDED
data/.reek
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
Attribute:
|
3
|
+
enabled: false
|
4
|
+
BooleanParameter:
|
5
|
+
enabled: false
|
6
|
+
ControlParameter:
|
7
|
+
enabled: false
|
8
|
+
FeatureEnvy:
|
9
|
+
enabled: false
|
10
|
+
IrresponsibleModule:
|
11
|
+
enabled: false
|
12
|
+
LongParameterList:
|
13
|
+
enabled: false
|
14
|
+
ManualDispatch:
|
15
|
+
enabled: false
|
16
|
+
NestedIterators:
|
17
|
+
max_allowed_nesting: 2
|
18
|
+
NilCheck:
|
19
|
+
enabled: false
|
20
|
+
PrimaDonnaMethod:
|
21
|
+
enabled: false
|
22
|
+
RepeatedConditional:
|
23
|
+
enabled: false
|
24
|
+
TooManyStatements:
|
25
|
+
max_statements: 10
|
26
|
+
UtilityFunction:
|
27
|
+
enabled: false
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
DisplayStyleGuide: true
|
4
|
+
TargetRubyVersion: 2.4
|
5
|
+
Exclude:
|
6
|
+
- 'spec/**/**/*'
|
7
|
+
Layout/ClosingParenthesisIndentation:
|
8
|
+
Enabled: false
|
9
|
+
Layout/EmptyLinesAroundBlockBody:
|
10
|
+
Enabled: false
|
11
|
+
Layout/EmptyLinesAroundClassBody:
|
12
|
+
Enabled: false
|
13
|
+
Layout/EmptyLinesAroundModuleBody:
|
14
|
+
Enabled: false
|
15
|
+
Layout/FirstParameterIndentation:
|
16
|
+
Enabled: false
|
17
|
+
Layout/MultilineMethodCallIndentation:
|
18
|
+
EnforcedStyle: aligned
|
19
|
+
LineLength:
|
20
|
+
Max: 100
|
21
|
+
Lint/ScriptPermission:
|
22
|
+
Enabled: false
|
23
|
+
Metrics/ClassLength:
|
24
|
+
Enabled: false
|
25
|
+
Metrics/ModuleLength:
|
26
|
+
Enabled: false
|
27
|
+
Style/Alias:
|
28
|
+
EnforcedStyle: prefer_alias_method
|
29
|
+
Style/BracesAroundHashParameters:
|
30
|
+
Enabled: false
|
31
|
+
Style/ClassAndModuleChildren:
|
32
|
+
Enabled: false
|
33
|
+
Style/Documentation:
|
34
|
+
Enabled: false
|
35
|
+
Style/HashSyntax:
|
36
|
+
Enabled: false
|
37
|
+
Style/NumericLiterals:
|
38
|
+
Enabled: false
|
39
|
+
Style/RescueModifier:
|
40
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# ActiveRegulation
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/active_uxid.svg)](http://badge.fury.io/rb/active_uxid)
|
4
|
+
[![Build Status](https://travis-ci.org/drexed/active_uxid.svg?branch=master)](https://travis-ci.org/drexed/active_uxid)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/drexed/active_uxid/badge.svg?branch=master)](https://coveralls.io/github/drexed/active_uxid?branch=master)
|
6
|
+
|
7
|
+
ActiveRegulation is a library for commonly used record states.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'active_uxid'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install active_uxid
|
24
|
+
|
25
|
+
## Table of Contents
|
26
|
+
|
27
|
+
* [Methods](#methods)
|
28
|
+
* [Usage](#usage)
|
29
|
+
|
30
|
+
## Methods
|
31
|
+
|
32
|
+
**Modules:**
|
33
|
+
* `activation`
|
34
|
+
* `containment`
|
35
|
+
* `expiration`
|
36
|
+
* `quarantine`
|
37
|
+
* `suspension`
|
38
|
+
* `visibility`
|
39
|
+
|
40
|
+
**Attributes:**
|
41
|
+
* `:inactivated_at`
|
42
|
+
* `:contained_at`
|
43
|
+
* `:expires_at`
|
44
|
+
* `:invisible_at`
|
45
|
+
* `:quarantined_at`
|
46
|
+
* `:suspended_at`
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
class User < ActiveRecord::Base
|
50
|
+
|
51
|
+
# Add one of the datetime attributes
|
52
|
+
# above to the corresponding table.
|
53
|
+
|
54
|
+
include ActiveRegulation::Containment
|
55
|
+
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
## Usage
|
60
|
+
```ruby
|
61
|
+
user.active? #=> true
|
62
|
+
user.inactive? #=> false
|
63
|
+
|
64
|
+
user.inactive!
|
65
|
+
user.active? #=> false
|
66
|
+
|
67
|
+
user.active!
|
68
|
+
user.active? #=> true
|
69
|
+
|
70
|
+
user.to_activation #=> 'Active'
|
71
|
+
|
72
|
+
User.active #=> retrieves all active records
|
73
|
+
User.inactive #=> retrieves all inactive records
|
74
|
+
```
|
75
|
+
|
76
|
+
## Contributing
|
77
|
+
|
78
|
+
Your contribution is welcome.
|
79
|
+
|
80
|
+
1. Fork it
|
81
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
82
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
83
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
84
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
theme: jekyll-theme-cayman
|
data/active_uxid.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# coding: utf-8
|
4
|
+
|
5
|
+
lib = File.expand_path('../lib', __FILE__)
|
6
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
|
+
require 'active_uxid/version'
|
8
|
+
|
9
|
+
Gem::Specification.new do |spec|
|
10
|
+
spec.name = 'active_uxid'
|
11
|
+
spec.version = ActiveRegulation::VERSION
|
12
|
+
spec.authors = ['Juan Gomez']
|
13
|
+
spec.email = ['j.gomez@drexed.com']
|
14
|
+
|
15
|
+
spec.summary = "Gem for generating lexicographical UXid's."
|
16
|
+
spec.description = 'Generate lexicographical UXids.'
|
17
|
+
spec.homepage = 'http://drexed.github.io/active_uxid'
|
18
|
+
spec.license = 'MIT'
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
spec.bindir = 'exe'
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = %w[lib support]
|
24
|
+
|
25
|
+
spec.add_runtime_dependency 'activerecord'
|
26
|
+
spec.add_runtime_dependency 'activesupport'
|
27
|
+
spec.add_runtime_dependency 'dry-configurable'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'bundler'
|
30
|
+
spec.add_development_dependency 'coveralls'
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'rspec'
|
33
|
+
spec.add_development_dependency 'sqlite3'
|
34
|
+
spec.add_development_dependency 'database_cleaner'
|
35
|
+
spec.add_development_dependency 'generator_spec'
|
36
|
+
spec.add_development_dependency 'fasterer'
|
37
|
+
spec.add_development_dependency 'reek'
|
38
|
+
spec.add_development_dependency 'rubocop'
|
39
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'active_uxid'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require 'pry'
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start
|
data/bin/rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rake' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'pathname'
|
11
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/setup
ADDED
data/lib/active_uxid.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
%w[hash ulid].each do |file_name|
|
4
|
+
require "active_uxid/record/#{file_name}"
|
5
|
+
end
|
6
|
+
|
7
|
+
%w[version settings base hash ulid record].each do |file_name|
|
8
|
+
require "active_uxid/#{file_name}"
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'generators/active_uxid/install_generator'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
class Base
|
5
|
+
|
6
|
+
ENCODING_BASE ||= ActiveUxid::Settings.config.encoding_chars.length
|
7
|
+
ENCODING_CHARS ||= ActiveUxid::Settings.config.encoding_chars
|
8
|
+
ENCODING_LENGTH ||= ActiveUxid::Settings.config.encoding_length
|
9
|
+
ENCODING_SALT ||= ActiveUxid::Settings.config.encoding_salt
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
class Hash < ActiveUxid::Base
|
5
|
+
|
6
|
+
def initialize(id)
|
7
|
+
@id = id
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.encode(id)
|
11
|
+
klass = new(id)
|
12
|
+
klass.encode_uxid
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.decode(id)
|
16
|
+
klass = new(id)
|
17
|
+
klass.decode_uxid
|
18
|
+
end
|
19
|
+
|
20
|
+
def encode_uxid
|
21
|
+
uxid_encode_chars((@id + ENCODING_SALT) << ENCODING_LENGTH)
|
22
|
+
end
|
23
|
+
|
24
|
+
def decode_uxid
|
25
|
+
(uxid_decode_chars(@id) >> ENCODING_LENGTH) - ENCODING_SALT
|
26
|
+
end
|
27
|
+
|
28
|
+
def uxid_encode_chars(id)
|
29
|
+
return '0' if id.zero?
|
30
|
+
return nil if id.negative?
|
31
|
+
|
32
|
+
str = ''
|
33
|
+
|
34
|
+
while id.positive?
|
35
|
+
str = "#{ENCODING_CHARS[id % ENCODING_BASE]}#{str}"
|
36
|
+
id /= ENCODING_BASE
|
37
|
+
end
|
38
|
+
|
39
|
+
str
|
40
|
+
end
|
41
|
+
|
42
|
+
def uxid_decode_chars(id)
|
43
|
+
pos = 0
|
44
|
+
num = 0
|
45
|
+
len = id.length
|
46
|
+
max = len - 1
|
47
|
+
|
48
|
+
while pos < len
|
49
|
+
pow = ENCODING_BASE**(max - pos)
|
50
|
+
num += ENCODING_CHARS.index(id[pos]) * pow
|
51
|
+
pos += 1
|
52
|
+
end
|
53
|
+
|
54
|
+
num
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
module Record
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
# rubocop:disable Metrics/LineLength
|
10
|
+
ActiveUxid::Record.include(ActiveUxid::Record::Hash) if ActiveUxid::Settings.config.encoder_type == 'hash'
|
11
|
+
ActiveUxid::Record.include(ActiveUxid::Record::Ulid) if ActiveUxid::Settings.config.encoder_type == 'ulid'
|
12
|
+
# rubocop:enable Metrics/LineLength
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
module Record
|
5
|
+
module Hash
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
after_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) }
|
10
|
+
end
|
11
|
+
|
12
|
+
def uxid_to_id
|
13
|
+
return unless respond_to?(:uxid)
|
14
|
+
ActiveUxid::Hash.decode(uxid)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def callback_generate_uxid!
|
20
|
+
hash = ActiveUxid::Hash.encode(id)
|
21
|
+
update_column(:uxid, hash)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
module Record
|
5
|
+
module Ulid
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
before_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) }
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def callback_generate_uxid!
|
15
|
+
self.uxid = ActiveUxid::Ulid.encode
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-configurable'
|
4
|
+
|
5
|
+
module ActiveUxid
|
6
|
+
class Settings
|
7
|
+
extend Dry::Configurable
|
8
|
+
|
9
|
+
setting :encoder_type, 'ulid'
|
10
|
+
setting :encoding_chars, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
11
|
+
setting :encoding_length, 26
|
12
|
+
setting :encoding_salt, 1369136
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveUxid
|
4
|
+
class Ulid < ActiveUxid::Base
|
5
|
+
|
6
|
+
def initialize; end
|
7
|
+
|
8
|
+
def self.encode
|
9
|
+
klass = new
|
10
|
+
klass.uxid_encode
|
11
|
+
end
|
12
|
+
|
13
|
+
def uxid_encode
|
14
|
+
(1..ENCODING_LENGTH).reduce('') do |str, num|
|
15
|
+
shift = 128 - 5 * num
|
16
|
+
str + ENCODING_CHARS[(uxid_octect >> shift) & 0x1f]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def uxid_bytes
|
21
|
+
"#{uxid_unixtime_48bit}#{SecureRandom.random_bytes(10)}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def uxid_octect
|
25
|
+
(hi, lo) = uxid_bytes.unpack('Q>Q>')
|
26
|
+
(hi << 64) | lo
|
27
|
+
end
|
28
|
+
|
29
|
+
def uxid_unixtime_flex
|
30
|
+
(Time.current.to_f * 10_000).to_i
|
31
|
+
end
|
32
|
+
|
33
|
+
def uxid_unixtime_48bit
|
34
|
+
[uxid_unixtime_flex].pack('Q>')[2..-1]
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails/generators'
|
4
|
+
|
5
|
+
class ActiveUxid::InstallGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
def copy_initializer_file
|
9
|
+
copy_file('install.rb', 'config/initializers/active_uxid.rb')
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ActiveUxid::Settings.configure do |config|
|
4
|
+
config.encoder_type = 'ulid'
|
5
|
+
config.encoding_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
6
|
+
config.encoding_length = 26
|
7
|
+
config.encoding_length = 1369136
|
8
|
+
end
|
metadata
ADDED
@@ -0,0 +1,254 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: active_uxid
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Juan Gomez
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
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
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: database_cleaner
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: generator_spec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: fasterer
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: reek
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
description: Generate lexicographical UXids.
|
196
|
+
email:
|
197
|
+
- j.gomez@drexed.com
|
198
|
+
executables: []
|
199
|
+
extensions: []
|
200
|
+
extra_rdoc_files: []
|
201
|
+
files:
|
202
|
+
- ".coveralls.yml"
|
203
|
+
- ".fasterer.yml"
|
204
|
+
- ".gitignore"
|
205
|
+
- ".reek"
|
206
|
+
- ".rspec"
|
207
|
+
- ".rubocop.yml"
|
208
|
+
- ".travis.yml"
|
209
|
+
- CODE_OF_CONDUCT.md
|
210
|
+
- Gemfile
|
211
|
+
- README.md
|
212
|
+
- Rakefile
|
213
|
+
- _config.yml
|
214
|
+
- active_uxid.gemspec
|
215
|
+
- bin/console
|
216
|
+
- bin/rake
|
217
|
+
- bin/setup
|
218
|
+
- lib/active_uxid.rb
|
219
|
+
- lib/active_uxid/base.rb
|
220
|
+
- lib/active_uxid/hash.rb
|
221
|
+
- lib/active_uxid/record.rb
|
222
|
+
- lib/active_uxid/record/hash.rb
|
223
|
+
- lib/active_uxid/record/ulid.rb
|
224
|
+
- lib/active_uxid/settings.rb
|
225
|
+
- lib/active_uxid/ulid.rb
|
226
|
+
- lib/active_uxid/version.rb
|
227
|
+
- lib/generators/active_uxid/install_generator.rb
|
228
|
+
- lib/generators/active_uxid/templates/install.rb
|
229
|
+
homepage: http://drexed.github.io/active_uxid
|
230
|
+
licenses:
|
231
|
+
- MIT
|
232
|
+
metadata: {}
|
233
|
+
post_install_message:
|
234
|
+
rdoc_options: []
|
235
|
+
require_paths:
|
236
|
+
- lib
|
237
|
+
- support
|
238
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
243
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - ">="
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
248
|
+
requirements: []
|
249
|
+
rubyforge_project:
|
250
|
+
rubygems_version: 2.6.13
|
251
|
+
signing_key:
|
252
|
+
specification_version: 4
|
253
|
+
summary: Gem for generating lexicographical UXid's.
|
254
|
+
test_files: []
|