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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd3a891430b40fa7fad9d50b8f383070cee22cba06d19c0db67670324c575613
4
- data.tar.gz: 752e27818f5781652fc91407b51a7f5c16e0a8a07baa0f1285b3e4a3c9029bb0
3
+ metadata.gz: b6fef6b415e3f3f99d82d937b412923f77675f2fd2b458c67a79b17325df5c4b
4
+ data.tar.gz: a3805612f06f9a04a2c3c452f571798d086113ff601ee550623e975abd66ac15
5
5
  SHA512:
6
- metadata.gz: 7b25933ab48ec3327e7e2c781f6502f90ed7a440163e58c3255d43bb1473fc5da5414b44d85f06de7f0d90ef05d57871bd8fcb3aabd22caa19d97df3422240d2
7
- data.tar.gz: aca4aa6e5d417d40926d9cf57045157d1eaffdae225cc051b97ad861e0dc2d19fecf1f6acdea1a9fa91982697cee231326d410a21b0c130f327fc21f967c914e
6
+ metadata.gz: 76457976e3d2bbf665b38922d0e9be0d62bfa7ecb34e7a55c3931eff29260646a92e7b5f6ed04ff53a350cc035c4e794e9a079be39cb95b1f6f261211db94a2e
7
+ data.tar.gz: ed1156971e6736ee6b9abab62edb2b6eabb5ad1751a3d6d2aa48b84c444b5720dc21ba713721f82c10a7f0cbf629520ef0bc1e8625702afc683494b4fd940e22
@@ -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.7'
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
@@ -2,4 +2,4 @@ inherit_gem:
2
2
  rubocop-shopify: rubocop.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.7
5
+ TargetRubyVersion: 2.6
data/Gemfile CHANGED
@@ -8,8 +8,8 @@ gemspec
8
8
  gem "msgpack", github: "msgpack/msgpack-ruby"
9
9
 
10
10
  gem "rake", "~> 13.0"
11
- gem "activesupport", ">= 7.0.0"
12
- gem "activerecord", ">= 7.0.0"
11
+ gem "activesupport"
12
+ gem "activerecord"
13
13
  gem "sqlite3"
14
14
  gem "benchmark-ips"
15
15
 
data/Gemfile.lock CHANGED
@@ -7,22 +7,23 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- paquito (0.4.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 (7.0.2.3)
17
- activesupport (= 7.0.2.3)
18
- activerecord (7.0.2.3)
19
- activemodel (= 7.0.2.3)
20
- activesupport (= 7.0.2.3)
21
- activesupport (7.0.2.3)
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 (>= 7.0.0)
67
- activesupport (>= 7.0.0)
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, :activerecord]
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
@@ -2,7 +2,7 @@ name: paquito
2
2
 
3
3
  up:
4
4
  - ruby:
5
- version: 2.7.4
5
+ version: 2.6.9
6
6
  - bundler
7
7
 
8
8
  commands:
@@ -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
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paquito
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
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.7.0"
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.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-09 00:00:00.000000000 Z
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.7.0
81
+ version: 2.6.0
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ">="