universalid 0.1.0 → 0.1.1
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 +34 -2
- data/lib/universal_id/contrib/active_record.rb +4 -0
- data/lib/universal_id/contrib/active_support.rb +3 -0
- data/lib/universal_id/contrib/global_id.rb +3 -0
- data/lib/universal_id/contrib/rails.rb +6 -0
- data/lib/universal_id/contrib/signed_global_id.rb +3 -0
- data/lib/universal_id/message_pack_factory.rb +20 -6
- data/lib/universal_id/message_pack_types/ruby/scalars/complex.rb +1 -1
- data/lib/universal_id/message_pack_types/ruby/scalars/date.rb +1 -1
- data/lib/universal_id/message_pack_types/ruby/scalars/date_time.rb +1 -1
- data/lib/universal_id/message_pack_types/ruby/scalars/range.rb +1 -1
- data/lib/universal_id/message_pack_types/ruby/scalars/rational.rb +1 -1
- data/lib/universal_id/message_pack_types/ruby/scalars/regexp.rb +1 -1
- data/lib/universal_id/message_pack_types.rb +17 -19
- data/lib/universal_id/version.rb +1 -1
- data/lib/universal_id.rb +2 -0
- metadata +17 -18
- data/contrib/active_record.rb +0 -8
- data/contrib/active_support.rb +0 -7
- data/contrib/global_id.rb +0 -7
- data/contrib/signed_global_id.rb +0 -7
- data/contrib/tags +0 -75
- data/lib/universal_id/contrib.rb +0 -14
- /data/{contrib → lib/universal_id/contrib}/active_record/base_message_pack_type.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/active_record/base_packer.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/active_record/base_unpacker.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/active_record/relation_message_pack_type.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/active_support/time_with_zone_message_pack_type.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/global_id/global_id_model.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/global_id/global_id_uid_extension.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/global_id/message_pack_type.rb +0 -0
- /data/{contrib → lib/universal_id/contrib}/signed_global_id/message_pack_type.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e55004b7c0b0346e1186784b7962857ae5a010dc85011093703c8e616359c7a9
|
4
|
+
data.tar.gz: c3ed66a1d494c536851cb642c7b8d538092792ec2e4b78d6b3b4db9f3628d666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bad79ee6a4b23619b894846e9499493d37d59ee88772a86327ba5d822bbc2436df05c16b5dfbdc39e276002f0703476365a45b79590af95cd2ef7558531cbd5
|
7
|
+
data.tar.gz: d4a48f15ea08f0cb2f0291f74ff20202c8fd2af431f0e73ba701af178c18f3219d73bc10d8269c9360d6b2f4ffe4a1a521bcbe92ca7688bd7f208acd827ec1a8
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<h1 align="center">Universal ID</h1>
|
3
3
|
<p align="center">
|
4
4
|
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
|
5
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-
|
5
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-721-47d299.svg" />
|
6
6
|
</a>
|
7
7
|
<a href="https://codeclimate.com/github/hopsoft/universalid/maintainability">
|
8
8
|
<img src="https://api.codeclimate.com/v1/badges/567624cbe733fafc2330/maintainability" />
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<img alt="Twitter Follow" src="https://img.shields.io/twitter/url?label=%40hopsoft&style=social&url=https%3A%2F%2Ftwitter.com%2Fhopsoft">
|
34
34
|
</a>
|
35
35
|
</p>
|
36
|
-
<h2 align="center">URL-Safe Portability for Ruby
|
36
|
+
<h2 align="center">URL-Safe Portability for any Ruby Object</h2>
|
37
37
|
</p>
|
38
38
|
|
39
39
|
**Universal ID introduces a paradigm shift in Ruby development with powerful recursive serialization.**
|
@@ -64,6 +64,7 @@ This is just a fraction of what's possible with Universal ID. It's an invaluable
|
|
64
64
|
- [Supported Data Types](#supported-data-types)
|
65
65
|
- [Scalars](#scalars)
|
66
66
|
- [Composites](#composites)
|
67
|
+
- [Contributed Types](#contributed-types)
|
67
68
|
- [ActiveRecord](#activerecord)
|
68
69
|
- [Why Universal ID with ActiveRecord?](#why-universal-id-with-activerecord)
|
69
70
|
- [Custom Datatypes](#custom-datatypes)
|
@@ -216,6 +217,37 @@ Composite support is where things start to get interesting. All of the composite
|
|
216
217
|
```
|
217
218
|
</details>
|
218
219
|
|
220
|
+
### Contributed Types
|
221
|
+
|
222
|
+
Universal ID is designed to be highly extensible, allowing for third-party contributions to enhance its capabilities.
|
223
|
+
These contributions can introduce support for additional data types, further broadening the scope of Universal ID’s utility.
|
224
|
+
The following are some notable contrib extensions:
|
225
|
+
|
226
|
+
- **ActiveRecord::Base**: Integrates Universal ID with ActiveRecord base models, enabling intelligent serialization of database records
|
227
|
+
- **ActiveRecord::Relation**: Supports the serialization of ActiveRecord relations, making it possible to encode complex query structures
|
228
|
+
- **ActiveSupport::TimeWithZone**: Adds the ability to serialize ActiveSupport's TimeWithZone objects
|
229
|
+
- **GlobalID**: Extends support to include GlobalIDs
|
230
|
+
- **SignedGlobalID**: Extends support to include SignedGlobalIDs
|
231
|
+
|
232
|
+
#### Requiring Contributed Types
|
233
|
+
|
234
|
+
To utilize the contributed types, you must explicitly require them in your application.
|
235
|
+
This ensures the extensions are loaded and available for use.
|
236
|
+
Here is an example illustrating how to include contributed types:
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
# load contrib types
|
240
|
+
require "universal_id/contrib/active_record"
|
241
|
+
require "universal_id/contrib/active_support"
|
242
|
+
require "universal_id/contrib/global_id"
|
243
|
+
require "universal_id/contrib/signed_global_id"
|
244
|
+
|
245
|
+
# or simply
|
246
|
+
require "universal_id/contrib/rails"
|
247
|
+
```
|
248
|
+
|
249
|
+
> :bulb: **Implicit Contribs**: Whenever the `Rails` constant is defined, the related contribs are auto-loaded.
|
250
|
+
|
219
251
|
### ActiveRecord
|
220
252
|
|
221
253
|
> :information_source: **Broad Compatibility**: Universal ID has built-in support for ActiveRecord, yet it maintains independence from Rails-specific dependencies. This versatile design enables integration into **any Ruby project**.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "active_record" if defined? ActiveRecord
|
4
|
+
require_relative "active_support" if defined? ActiveSupport
|
5
|
+
require_relative "global_id" if defined? GlobalID
|
6
|
+
require_relative "signed_global_id" if defined? SignedGlobalID
|
@@ -11,16 +11,30 @@ UniversalID::MessagePackFactory = MessagePack::Factory.new.tap do |factory|
|
|
11
11
|
@msgpack_pool = UniversalID::MessagePackFactory.pool([Etc.nprocessors.to_i, 1].max)
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
15
|
-
id
|
14
|
+
def register_scalar(type:, recreate_pool: true, **options)
|
15
|
+
register id: next_type_id(order: :asc), type: type, **options
|
16
|
+
end
|
17
|
+
|
18
|
+
def register(type:, id: nil, recreate_pool: true, **options)
|
16
19
|
options[:recursive] = true unless options.key?(:recursive)
|
17
|
-
register_type(id, type, options)
|
20
|
+
register_type(id || next_type_id(order: :desc), type, options)
|
18
21
|
create_msgpack_pool if recreate_pool
|
19
22
|
end
|
20
23
|
|
21
|
-
def next_type_id
|
22
|
-
|
23
|
-
|
24
|
+
def next_type_id(order:)
|
25
|
+
range = 0..127
|
26
|
+
|
27
|
+
case order
|
28
|
+
when :asc
|
29
|
+
id = range.first
|
30
|
+
id += 1 while type_registered?(id)
|
31
|
+
when :desc
|
32
|
+
id = range.last
|
33
|
+
id -= 1 while type_registered?(id)
|
34
|
+
end
|
35
|
+
|
36
|
+
id = nil unless range.cover?(id)
|
37
|
+
id
|
24
38
|
end
|
25
39
|
end
|
26
40
|
end
|
@@ -1,26 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# IMPORTANT: More specific types should be registered before more general types
|
6
|
-
# because MessagePack will use the first registered type that matches
|
7
|
-
# MessagePack scans registered type in linear order and first match wins
|
3
|
+
# NOTE: MessagePack scans registered type in linear order and first match wins
|
8
4
|
|
9
|
-
|
5
|
+
# scalars
|
6
|
+
require_relative "message_pack_types/ruby/scalars/complex"
|
7
|
+
require_relative "message_pack_types/ruby/scalars/rational"
|
8
|
+
require_relative "message_pack_types/ruby/scalars/date_time"
|
9
|
+
require_relative "message_pack_types/ruby/scalars/date"
|
10
|
+
require_relative "message_pack_types/ruby/scalars/range"
|
11
|
+
require_relative "message_pack_types/ruby/scalars/regexp"
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
message_pack_types/ruby/composites/struct.rb
|
16
|
-
message_pack_types/ruby/scalars/complex.rb
|
17
|
-
message_pack_types/ruby/scalars/rational.rb
|
18
|
-
message_pack_types/ruby/scalars/date_time.rb
|
19
|
-
message_pack_types/ruby/scalars/date.rb
|
20
|
-
message_pack_types/ruby/scalars/range.rb
|
21
|
-
message_pack_types/ruby/scalars/regexp.rb
|
22
|
-
]
|
13
|
+
# composites
|
14
|
+
require_relative "message_pack_types/ruby/composites/open_struct"
|
15
|
+
require_relative "message_pack_types/ruby/composites/struct"
|
16
|
+
require_relative "message_pack_types/ruby/composites/set"
|
23
17
|
|
24
|
-
|
18
|
+
# uid
|
19
|
+
require_relative "message_pack_types/uri/uid/type"
|
20
|
+
|
21
|
+
# contribs
|
22
|
+
require_relative "contrib/rails" if defined? Rails
|
25
23
|
|
26
24
|
UniversalID::MessagePackFactory.create_msgpack_pool
|
data/lib/universal_id/version.rb
CHANGED
data/lib/universal_id.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: universalid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Hopkins (hopsoft)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brotli
|
@@ -263,22 +263,21 @@ files:
|
|
263
263
|
- Rakefile
|
264
264
|
- config/default.yml
|
265
265
|
- config/example.yml
|
266
|
-
- contrib/active_record.rb
|
267
|
-
- contrib/active_record/base_message_pack_type.rb
|
268
|
-
- contrib/active_record/base_packer.rb
|
269
|
-
- contrib/active_record/base_unpacker.rb
|
270
|
-
- contrib/active_record/relation_message_pack_type.rb
|
271
|
-
- contrib/active_support.rb
|
272
|
-
- contrib/active_support/time_with_zone_message_pack_type.rb
|
273
|
-
- contrib/global_id.rb
|
274
|
-
- contrib/global_id/global_id_model.rb
|
275
|
-
- contrib/global_id/global_id_uid_extension.rb
|
276
|
-
- contrib/global_id/message_pack_type.rb
|
277
|
-
- contrib/signed_global_id.rb
|
278
|
-
- contrib/signed_global_id/message_pack_type.rb
|
279
|
-
- contrib/tags
|
280
266
|
- lib/universal_id.rb
|
281
|
-
- lib/universal_id/contrib.rb
|
267
|
+
- lib/universal_id/contrib/active_record.rb
|
268
|
+
- lib/universal_id/contrib/active_record/base_message_pack_type.rb
|
269
|
+
- lib/universal_id/contrib/active_record/base_packer.rb
|
270
|
+
- lib/universal_id/contrib/active_record/base_unpacker.rb
|
271
|
+
- lib/universal_id/contrib/active_record/relation_message_pack_type.rb
|
272
|
+
- lib/universal_id/contrib/active_support.rb
|
273
|
+
- lib/universal_id/contrib/active_support/time_with_zone_message_pack_type.rb
|
274
|
+
- lib/universal_id/contrib/global_id.rb
|
275
|
+
- lib/universal_id/contrib/global_id/global_id_model.rb
|
276
|
+
- lib/universal_id/contrib/global_id/global_id_uid_extension.rb
|
277
|
+
- lib/universal_id/contrib/global_id/message_pack_type.rb
|
278
|
+
- lib/universal_id/contrib/rails.rb
|
279
|
+
- lib/universal_id/contrib/signed_global_id.rb
|
280
|
+
- lib/universal_id/contrib/signed_global_id/message_pack_type.rb
|
282
281
|
- lib/universal_id/encoder.rb
|
283
282
|
- lib/universal_id/message_pack_factory.rb
|
284
283
|
- lib/universal_id/message_pack_types.rb
|
@@ -327,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
326
|
- !ruby/object:Gem::Version
|
328
327
|
version: '0'
|
329
328
|
requirements: []
|
330
|
-
rubygems_version: 3.2.
|
329
|
+
rubygems_version: 3.2.33
|
331
330
|
signing_key:
|
332
331
|
specification_version: 4
|
333
332
|
summary: URL-Safe String Serialization for any Ruby Object
|
data/contrib/active_record.rb
DELETED
data/contrib/active_support.rb
DELETED
data/contrib/global_id.rb
DELETED
data/contrib/signed_global_id.rb
DELETED
data/contrib/tags
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
!_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/
|
2
|
-
!_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/
|
3
|
-
!_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/
|
4
|
-
!_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/
|
5
|
-
!_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/
|
6
|
-
!_TAG_FIELD_DESCRIPTION file /File-restricted scoping/
|
7
|
-
!_TAG_FIELD_DESCRIPTION input /input file/
|
8
|
-
!_TAG_FIELD_DESCRIPTION name /tag name/
|
9
|
-
!_TAG_FIELD_DESCRIPTION pattern /pattern/
|
10
|
-
!_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/
|
11
|
-
!_TAG_FIELD_DESCRIPTION!Ruby mixin /how the class or module is mixed in (mixin:HOW:MODULE)/
|
12
|
-
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
13
|
-
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
14
|
-
!_TAG_KIND_DESCRIPTION!Ruby A,accessor /accessors/
|
15
|
-
!_TAG_KIND_DESCRIPTION!Ruby C,constant /constants/
|
16
|
-
!_TAG_KIND_DESCRIPTION!Ruby L,library /libraries/
|
17
|
-
!_TAG_KIND_DESCRIPTION!Ruby S,singletonMethod /singleton methods/
|
18
|
-
!_TAG_KIND_DESCRIPTION!Ruby a,alias /aliases/
|
19
|
-
!_TAG_KIND_DESCRIPTION!Ruby c,class /classes/
|
20
|
-
!_TAG_KIND_DESCRIPTION!Ruby f,method /methods/
|
21
|
-
!_TAG_KIND_DESCRIPTION!Ruby m,module /modules/
|
22
|
-
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
|
23
|
-
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
|
24
|
-
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
|
25
|
-
!_TAG_OUTPUT_VERSION 0.0 /current.age/
|
26
|
-
!_TAG_PARSER_VERSION!Ruby 0.0 /current.age/
|
27
|
-
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
|
28
|
-
!_TAG_PROC_CWD /Users/nathan/work/hopsoft/universalid/contrib/ //
|
29
|
-
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
|
30
|
-
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
|
31
|
-
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
|
32
|
-
!_TAG_PROGRAM_VERSION 6.0.0 //
|
33
|
-
!_TAG_ROLE_DESCRIPTION!Ruby!library loaded /loaded by "load" method/
|
34
|
-
!_TAG_ROLE_DESCRIPTION!Ruby!library required /loaded by "require" method/
|
35
|
-
!_TAG_ROLE_DESCRIPTION!Ruby!library requiredRel /loaded by "require_relative" method/
|
36
|
-
ActiveRecordPacker active_record/active_record_packer.rb /^class UniversalID::Contrib::ActiveRecordPacker$/;" c module:UniversalID.Contrib
|
37
|
-
ActiveRecordUnpacker active_record/active_record_unpacker.rb /^class UniversalID::Contrib::ActiveRecordUnpacker$/;" c module:UniversalID.Contrib
|
38
|
-
ClassMethods global_id/global_id_uid_extension.rb /^ module ClassMethods$/;" m module:GlobalIDUIDExtension
|
39
|
-
DESCENDANTS_KEY active_record/active_record_packer.rb /^ DESCENDANTS_KEY = "uid:descendants"$/;" C class:ActiveRecordPacker
|
40
|
-
GlobalID global_id/message_pack_type.rb /^module UniversalID::Contrib::GlobalID; end$/;" m module:UniversalID.Contrib
|
41
|
-
GlobalIDModel global_id/global_id_model.rb /^class UniversalID::Contrib::GlobalIDModel$/;" c module:UniversalID.Contrib mixin:include:GlobalID.Identification
|
42
|
-
GlobalIDUIDExtension global_id/global_id_uid_extension.rb /^module UniversalID::Contrib::GlobalIDUIDExtension$/;" m module:UniversalID.Contrib mixin:extend:Forwardable
|
43
|
-
HAS_MANY_ASSOCIATIONS active_record/active_record_packer.rb /^ HAS_MANY_ASSOCIATIONS = [$/;" C class:ActiveRecordPacker
|
44
|
-
add_descendants! active_record/active_record_packer.rb /^ def add_descendants!(hash)$/;" f class:ActiveRecordPacker
|
45
|
-
assign_attributes active_record/active_record_unpacker.rb /^ def assign_attributes(record, attributes)$/;" S class:ActiveRecordUnpacker
|
46
|
-
assign_descendants active_record/active_record_unpacker.rb /^ def assign_descendants(record, attributes)$/;" S class:ActiveRecordUnpacker
|
47
|
-
associations active_record/active_record_packer.rb /^ def associations$/;" f class:ActiveRecordPacker
|
48
|
-
create_instance active_record/active_record_unpacker.rb /^ def create_instance(class_name, attributes)$/;" S class:ActiveRecordUnpacker
|
49
|
-
find global_id/global_id_model.rb /^ def self.find(value)$/;" S class:GlobalIDModel
|
50
|
-
foreign_key_column_names active_record/active_record_packer.rb /^ def foreign_key_column_names$/;" f class:ActiveRecordPacker
|
51
|
-
from_gid global_id/global_id_uid_extension.rb /^ alias_method :from_gid, :from_global_id$/;" a module:GlobalIDUIDExtension.ClassMethods
|
52
|
-
from_global_id global_id/global_id_uid_extension.rb /^ def from_global_id(gid, options = {})$/;" f module:GlobalIDUIDExtension.ClassMethods
|
53
|
-
from_global_id_record global_id/global_id_uid_extension.rb /^ def from_global_id_record(gid_record)$/;" f module:GlobalIDUIDExtension.ClassMethods
|
54
|
-
from_sgid global_id/global_id_uid_extension.rb /^ alias_method :from_sgid, :from_signed_global_id$/;" a module:GlobalIDUIDExtension.ClassMethods
|
55
|
-
from_signed_global_id global_id/global_id_uid_extension.rb /^ def from_signed_global_id(sgid, options = {})$/;" f module:GlobalIDUIDExtension.ClassMethods
|
56
|
-
has_many_associations active_record/active_record_packer.rb /^ def has_many_associations$/;" f class:ActiveRecordPacker
|
57
|
-
id global_id/global_id_model.rb /^ attr_reader :id, :uid$/;" A class:GlobalIDModel
|
58
|
-
id_only? active_record/active_record_packer.rb /^ def id_only?(prepack_database_options)$/;" f class:ActiveRecordPacker
|
59
|
-
include_descendants? active_record/active_record_packer.rb /^ def include_descendants?$/;" f class:ActiveRecordPacker
|
60
|
-
included global_id/global_id_uid_extension.rb /^ def self.included(mixer)$/;" S module:GlobalIDUIDExtension
|
61
|
-
initialize active_record/active_record_packer.rb /^ def initialize(record)$/;" f class:ActiveRecordPacker
|
62
|
-
initialize global_id/global_id_model.rb /^ def initialize(universal_id)$/;" f class:GlobalIDModel
|
63
|
-
loaded_has_many_relations_by_name active_record/active_record_packer.rb /^ def loaded_has_many_relations_by_name$/;" f class:ActiveRecordPacker
|
64
|
-
pack_with active_record/active_record_packer.rb /^ def pack_with(packer)$/;" f class:ActiveRecordPacker
|
65
|
-
packable_attributes active_record/active_record_packer.rb /^ def packable_attributes$/;" f class:ActiveRecordPacker
|
66
|
-
prepack_database_options active_record/active_record_packer.rb /^ def prepack_database_options$/;" f class:ActiveRecordPacker
|
67
|
-
prepack_options active_record/active_record_packer.rb /^ def prepack_options$/;" f class:ActiveRecordPacker
|
68
|
-
record active_record/active_record_packer.rb /^ attr_reader :record$/;" A class:ActiveRecordPacker
|
69
|
-
reject_keys! active_record/active_record_packer.rb /^ def reject_keys!(hash)$/;" f class:ActiveRecordPacker
|
70
|
-
reject_timestamps! active_record/active_record_packer.rb /^ def reject_timestamps!(hash)$/;" f class:ActiveRecordPacker
|
71
|
-
reject_unsaved_changes! active_record/active_record_packer.rb /^ def reject_unsaved_changes!(hash)$/;" f class:ActiveRecordPacker
|
72
|
-
timestamp_column_names active_record/active_record_packer.rb /^ def timestamp_column_names$/;" f class:ActiveRecordPacker
|
73
|
-
to_global_id_model global_id/global_id_uid_extension.rb /^ def to_global_id_model$/;" f module:GlobalIDUIDExtension
|
74
|
-
uid global_id/global_id_model.rb /^ attr_reader :id, :uid$/;" A class:GlobalIDModel
|
75
|
-
unpack_with active_record/active_record_unpacker.rb /^ def unpack_with(unpacker)$/;" S class:ActiveRecordUnpacker
|
data/lib/universal_id/contrib.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module UniversalID::Contrib; end
|
4
|
-
|
5
|
-
# A list of all MessagePack types in the preferred registration order
|
6
|
-
#
|
7
|
-
# IMPORTANT: More specific types should be registered before more general types
|
8
|
-
# because MessagePack will use the first registered type that matches
|
9
|
-
# MessagePack scans registered type in linear order and first match wins
|
10
|
-
|
11
|
-
require_relative "../../contrib/signed_global_id"
|
12
|
-
require_relative "../../contrib/global_id"
|
13
|
-
require_relative "../../contrib/active_support"
|
14
|
-
require_relative "../../contrib/active_record"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{contrib → lib/universal_id/contrib}/active_support/time_with_zone_message_pack_type.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|