paquito 0.1.0

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.
data/lib/paquito.rb ADDED
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "digest/md5"
4
+ require "bigdecimal"
5
+ require "date"
6
+ require "set"
7
+ require "yaml"
8
+
9
+ require "msgpack"
10
+
11
+ require "paquito/version"
12
+ require "paquito/deflater"
13
+ require "paquito/allow_nil"
14
+ require "paquito/translate_errors"
15
+ require "paquito/safe_yaml"
16
+ require "paquito/conditional_compressor"
17
+ require "paquito/single_byte_prefix_version"
18
+ require "paquito/comment_prefix_version"
19
+ require "paquito/types"
20
+ require "paquito/codec_factory"
21
+ require "paquito/struct"
22
+ require "paquito/typed_struct"
23
+ require "paquito/serialized_column"
24
+
25
+ module Paquito
26
+ autoload :ActiveRecordCoder, "paquito/active_record_coder"
27
+
28
+ class << self
29
+ def cast(coder)
30
+ if coder.respond_to?(:load) && coder.respond_to?(:dump)
31
+ coder
32
+ elsif coder.respond_to?(:deflate) && coder.respond_to?(:inflate)
33
+ Deflater.new(coder)
34
+ else
35
+ raise TypeError, "Coders must respond to #dump and #load, #{coder.inspect} doesn't"
36
+ end
37
+ end
38
+
39
+ def chain(*coders)
40
+ CoderChain.new(*coders)
41
+ end
42
+
43
+ def allow_nil(coder)
44
+ AllowNil.new(coder)
45
+ end
46
+ end
47
+ end
data/paquito.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/paquito/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "paquito"
7
+ spec.version = Paquito::VERSION
8
+ spec.authors = ["Jean Boussier"]
9
+ spec.email = ["jean.boussier@gmail.com"]
10
+
11
+ spec.summary = "Framework for defining efficient and extendable serializers"
12
+ spec.description = "Framework for defining efficient and extendable serializers"
13
+ spec.homepage = "https://github.com/Shopify/paquito"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.7.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/Shopify/paquito"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ %x{git ls-files -z}.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency("msgpack")
32
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: paquito
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jean Boussier
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: msgpack
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
+ description: Framework for defining efficient and extendable serializers
28
+ email:
29
+ - jean.boussier@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".github/workflows/ci.yml"
35
+ - ".gitignore"
36
+ - ".rubocop.yml"
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE.txt
40
+ - README.md
41
+ - Rakefile
42
+ - bin/console
43
+ - bin/setup
44
+ - dev.yml
45
+ - lib/paquito.rb
46
+ - lib/paquito/active_record_coder.rb
47
+ - lib/paquito/allow_nil.rb
48
+ - lib/paquito/codec_factory.rb
49
+ - lib/paquito/coder_chain.rb
50
+ - lib/paquito/comment_prefix_version.rb
51
+ - lib/paquito/conditional_compressor.rb
52
+ - lib/paquito/deflater.rb
53
+ - lib/paquito/errors.rb
54
+ - lib/paquito/safe_yaml.rb
55
+ - lib/paquito/serialized_column.rb
56
+ - lib/paquito/single_byte_prefix_version.rb
57
+ - lib/paquito/struct.rb
58
+ - lib/paquito/translate_errors.rb
59
+ - lib/paquito/typed_struct.rb
60
+ - lib/paquito/types.rb
61
+ - lib/paquito/types/active_record_packer.rb
62
+ - lib/paquito/version.rb
63
+ - paquito.gemspec
64
+ homepage: https://github.com/Shopify/paquito
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ allowed_push_host: https://rubygems.org
69
+ homepage_uri: https://github.com/Shopify/paquito
70
+ source_code_uri: https://github.com/Shopify/paquito
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 2.7.0
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.2.20
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: Framework for defining efficient and extendable serializers
90
+ test_files: []