paquito 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.rubocop.yml +1 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +11 -9
- data/Rakefile +2 -1
- data/dev.yml +1 -1
- data/lib/paquito/active_record_coder.rb +5 -4
- data/lib/paquito/safe_yaml.rb +2 -1
- data/lib/paquito/version.rb +1 -1
- data/paquito.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6fef6b415e3f3f99d82d937b412923f77675f2fd2b458c67a79b17325df5c4b
|
4
|
+
data.tar.gz: a3805612f06f9a04a2c3c452f571798d086113ff601ee550623e975abd66ac15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76457976e3d2bbf665b38922d0e9be0d62bfa7ecb34e7a55c3931eff29260646a92e7b5f6ed04ff53a350cc035c4e794e9a079be39cb95b1f6f261211db94a2e
|
7
|
+
data.tar.gz: ed1156971e6736ee6b9abab62edb2b6eabb5ad1751a3d6d2aa48b84c444b5720dc21ba713721f82c10a7f0cbf629520ef0bc1e8625702afc683494b4fd940e22
|
data/.github/workflows/ci.yml
CHANGED
@@ -13,7 +13,7 @@ jobs:
|
|
13
13
|
- name: Set up Ruby
|
14
14
|
uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
|
-
ruby-version: '2.
|
16
|
+
ruby-version: '2.6'
|
17
17
|
bundler-cache: true
|
18
18
|
- name: Run test
|
19
19
|
run: bundle exec rubocop
|
@@ -23,7 +23,7 @@ jobs:
|
|
23
23
|
strategy:
|
24
24
|
fail-fast: false
|
25
25
|
matrix:
|
26
|
-
ruby: [ ruby-head, '3.0', '2.7' ]
|
26
|
+
ruby: [ ruby-head, '3.0', '2.7', '2.6' ]
|
27
27
|
steps:
|
28
28
|
- name: Checkout
|
29
29
|
uses: actions/checkout@v2
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -7,22 +7,23 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
paquito (0.
|
10
|
+
paquito (0.5.0)
|
11
11
|
msgpack
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activemodel (
|
17
|
-
activesupport (=
|
18
|
-
activerecord (
|
19
|
-
activemodel (=
|
20
|
-
activesupport (=
|
21
|
-
activesupport (
|
16
|
+
activemodel (6.1.5)
|
17
|
+
activesupport (= 6.1.5)
|
18
|
+
activerecord (6.1.5)
|
19
|
+
activemodel (= 6.1.5)
|
20
|
+
activesupport (= 6.1.5)
|
21
|
+
activesupport (6.1.5)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
23
|
i18n (>= 1.6, < 2)
|
24
24
|
minitest (>= 5.1)
|
25
25
|
tzinfo (~> 2.0)
|
26
|
+
zeitwerk (~> 2.3)
|
26
27
|
ast (2.4.2)
|
27
28
|
benchmark-ips (2.10.0)
|
28
29
|
byebug (11.1.3)
|
@@ -56,6 +57,7 @@ GEM
|
|
56
57
|
tzinfo (2.0.4)
|
57
58
|
concurrent-ruby (~> 1.0)
|
58
59
|
unicode-display_width (2.1.0)
|
60
|
+
zeitwerk (2.5.4)
|
59
61
|
|
60
62
|
PLATFORMS
|
61
63
|
ruby
|
@@ -63,8 +65,8 @@ PLATFORMS
|
|
63
65
|
x86_64-linux
|
64
66
|
|
65
67
|
DEPENDENCIES
|
66
|
-
activerecord
|
67
|
-
activesupport
|
68
|
+
activerecord
|
69
|
+
activesupport
|
68
70
|
benchmark-ips
|
69
71
|
byebug
|
70
72
|
minitest (~> 5.0)
|
data/Rakefile
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rake/testtask"
|
5
5
|
|
6
|
-
suites = [:vanilla, :activesupport
|
6
|
+
suites = [:vanilla, :activesupport]
|
7
|
+
suites << :activerecord if RUBY_VERSION >= "2.7"
|
7
8
|
namespace :test do
|
8
9
|
suites.each do |suite|
|
9
10
|
Rake::TestTask.new(suite) do |t|
|
data/dev.yml
CHANGED
@@ -119,13 +119,14 @@ module Paquito
|
|
119
119
|
@ids = {}.compare_by_identity
|
120
120
|
end
|
121
121
|
|
122
|
-
def map(
|
123
|
-
@instances.map(
|
122
|
+
def map(&block)
|
123
|
+
@instances.map(&block)
|
124
124
|
end
|
125
125
|
|
126
|
-
def fetch(
|
127
|
-
@instances.fetch(
|
126
|
+
def fetch(*args, &block)
|
127
|
+
@instances.fetch(*args, &block)
|
128
128
|
end
|
129
|
+
ruby2_keywords :fetch if respond_to?(:ruby2_keywords, true)
|
129
130
|
|
130
131
|
def push(instance)
|
131
132
|
id = @ids[instance] = @instances.size
|
data/lib/paquito/safe_yaml.rb
CHANGED
@@ -53,7 +53,7 @@ module Paquito
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def initialize(
|
56
|
+
def initialize(*)
|
57
57
|
super
|
58
58
|
@permitted_classes = Set.new(@options[:permitted_classes])
|
59
59
|
@dispatch_cache = DispatchCache.new(self, @dispatch_cache)
|
@@ -65,6 +65,7 @@ module Paquito
|
|
65
65
|
h[klass] = true
|
66
66
|
end.compare_by_identity
|
67
67
|
end
|
68
|
+
ruby2_keywords :initialize if respond_to?(:ruby2_keywords, true)
|
68
69
|
|
69
70
|
def dump_coder(target)
|
70
71
|
return unless permitted_class?(target.class)
|
data/lib/paquito/version.rb
CHANGED
data/paquito.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "Framework for defining efficient and extendable serializers"
|
13
13
|
spec.homepage = "https://github.com/Shopify/paquito"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
16
|
|
17
17
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paquito
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
79
79
|
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
81
|
+
version: 2.6.0
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - ">="
|