-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup smarter type registration (#21)
- Loading branch information
Showing
34 changed files
with
112 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
cloc contrib lib | ||
cloc lib |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "active_record/base_message_pack_type" | ||
require_relative "active_record/relation_message_pack_type" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "active_support/time_with_zone_message_pack_type" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "global_id/message_pack_type" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "active_record" if defined? ActiveRecord | ||
require_relative "active_support" if defined? ActiveSupport | ||
require_relative "global_id" if defined? GlobalID | ||
require_relative "signed_global_id" if defined? SignedGlobalID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "signed_global_id/message_pack_type" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
# A list of all MessagePack types in the preferred registration order | ||
# | ||
# IMPORTANT: More specific types should be registered before more general types | ||
# because MessagePack will use the first registered type that matches | ||
# MessagePack scans registered type in linear order and first match wins | ||
# NOTE: MessagePack scans registered type in linear order and first match wins | ||
|
||
require_relative "contrib" | ||
# scalars | ||
require_relative "message_pack_types/ruby/scalars/complex" | ||
require_relative "message_pack_types/ruby/scalars/rational" | ||
require_relative "message_pack_types/ruby/scalars/date_time" | ||
require_relative "message_pack_types/ruby/scalars/date" | ||
require_relative "message_pack_types/ruby/scalars/range" | ||
require_relative "message_pack_types/ruby/scalars/regexp" | ||
|
||
paths = %w[ | ||
message_pack_types/uri/uid/type.rb | ||
message_pack_types/ruby/composites/set.rb | ||
message_pack_types/ruby/composites/open_struct.rb | ||
message_pack_types/ruby/composites/struct.rb | ||
message_pack_types/ruby/scalars/complex.rb | ||
message_pack_types/ruby/scalars/rational.rb | ||
message_pack_types/ruby/scalars/date_time.rb | ||
message_pack_types/ruby/scalars/date.rb | ||
message_pack_types/ruby/scalars/range.rb | ||
message_pack_types/ruby/scalars/regexp.rb | ||
] | ||
# composites | ||
require_relative "message_pack_types/ruby/composites/open_struct" | ||
require_relative "message_pack_types/ruby/composites/struct" | ||
require_relative "message_pack_types/ruby/composites/set" | ||
|
||
paths.each { |path| require_relative path } | ||
# uid | ||
require_relative "message_pack_types/uri/uid/type" | ||
|
||
# contribs | ||
require_relative "contrib/rails" if defined? Rails | ||
|
||
UniversalID::MessagePackFactory.create_msgpack_pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters