paquito 0.11.1 → 0.11.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16e714e285eb20638e454a8f16b25cca8de5cd8823f5e54c41682e4d89ecb117
4
- data.tar.gz: aa0cfbae2407f420372f14ea51dec65ac1c4e76ae15052a4ac5138030fb09604
3
+ metadata.gz: 5ede4c0254b56d0c34d1d664903ffcd51db1ce717723a82858973c76d41231bb
4
+ data.tar.gz: 97d7ac64e05043df851dd6ef49cec163991c91afc6b25e98e1b4649a5a808eb8
5
5
  SHA512:
6
- metadata.gz: 319017b42b899a7048320919b54b7539ffd8cd2863171ac4b65939108add519808731bd35bcf2040df4651e0b34c05b8c4c0eb280cfab9404fc207636cdcad6b
7
- data.tar.gz: 8b6777bc73a75db05c218621983f8fe1fa77320250b9dadaa963a4a841f6c7e7f0161482d2fd45bd3f0f871d4b65c4943e18be689122ecb5a0d6b029978a0468
6
+ metadata.gz: 650bc85b15bbf5c2516941222d3de02e6c7b622a0998e9ccd2db2adf439964d5edc877227b750fad06903c0d00f58a61004e3e6271b37bf6d67f8a1aeb45dcfc
7
+ data.tar.gz: b2b03a2c958c622e68b8f1cf3745d89b4cefc9ac4070875d85174ed3c5943c27a31df049f44b677d9fd6c33e958c8ddc9b834f4d8870ed8a547fe7b30b1df8ba
@@ -0,0 +1,7 @@
1
+ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2
+ ARG RUBY_VERSION=3.4.1
3
+ FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ libsqlite3-dev \
7
+ pkg-config
@@ -0,0 +1,25 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "dockerFile": "Dockerfile",
7
+ "features": {
8
+ "ghcr.io/devcontainers/features/github-cli:1": {}
9
+ }
10
+
11
+ // Features to add to the dev container. More info: https://containers.dev/features.
12
+ // "features": {},
13
+
14
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
15
+ // "forwardPorts": [],
16
+
17
+ // Use 'postCreateCommand' to run commands after the container is created.
18
+ // "postCreateCommand": "ruby --version",
19
+
20
+ // Configure tool-specific properties.
21
+ // "customizations": {},
22
+
23
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24
+ // "remoteUser": "root"
25
+ }
@@ -9,32 +9,60 @@ jobs:
9
9
  fail-fast: false
10
10
  steps:
11
11
  - name: Checkout
12
- uses: actions/checkout@v3
12
+ uses: actions/checkout@v4
13
13
  - name: Set up Ruby
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
- ruby-version: '3.2'
17
16
  bundler-cache: true
18
17
  - name: Run test
19
18
  run: bundle exec rubocop
20
19
 
20
+ install:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ fail-fast: false
24
+
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Set up Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: '3.4'
33
+ bundler-cache: true
34
+
35
+ - name: Install gem
36
+ run: bundle exec rake install
37
+
38
+
21
39
  rubies:
22
40
  runs-on: ubuntu-latest
23
41
  strategy:
24
42
  fail-fast: false
25
43
  matrix:
26
- ruby: [ ruby-head, '3.3', '3.2', '3.1', '3.0', '2.7' ]
44
+ ruby: [ ruby-head, '3.4', '3.3', '3.2']
45
+ rails: [ '8.0', '7.2', '7.1']
46
+ include:
47
+ - ruby: '2.7'
48
+ rails: '7.1'
49
+ - ruby: '3.0'
50
+ rails: '7.1'
51
+ - ruby: '3.1'
52
+ rails: '7.1'
53
+ - ruby: '3.1'
54
+ rails: '7.2'
55
+ env:
56
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
27
57
  steps:
28
58
  - name: Checkout
29
- uses: actions/checkout@v3
30
- - name: Remove Gemfile.lock
31
- run: rm Gemfile.lock
59
+ uses: actions/checkout@v4
60
+
32
61
  - name: Set up Ruby
33
62
  uses: ruby/setup-ruby@v1
34
63
  with:
35
64
  ruby-version: ${{ matrix.ruby }}
36
65
  bundler-cache: true
66
+
37
67
  - name: Run test
38
68
  run: bundle exec rake
39
- - name: Install gem
40
- run: bundle exec rake install
data/.gitignore CHANGED
@@ -6,3 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /gemfiles/*.lock
10
+
data/.rubocop.yml CHANGED
@@ -1,9 +1,6 @@
1
1
  inherit_gem:
2
2
  rubocop-shopify: rubocop.yml
3
3
 
4
- AllCops:
5
- TargetRubyVersion: 2.7
6
-
7
4
  Style/ClassMethodsDefinitions:
8
5
  Enabled: false
9
6
 
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.1
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- # Unreleased
1
+ # 0.11.3
2
+
3
+ * Deserialize records with extra unused array elements in payload (#52)
4
+
5
+ # 0.11.2
6
+
7
+ * Attempt to load `active_support/core_ext/time/calculations` before `Paquito::Types.time_unpack` is defined (#47)
2
8
 
3
9
  # 0.11.1
4
10
 
data/Gemfile.lock CHANGED
@@ -1,61 +1,81 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paquito (0.11.1)
4
+ paquito (0.11.3)
5
5
  msgpack (>= 1.5.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.7.1)
11
- activesupport (= 7.0.7.1)
12
- activerecord (7.0.7.1)
13
- activemodel (= 7.0.7.1)
14
- activesupport (= 7.0.7.1)
15
- activesupport (7.0.7.1)
16
- concurrent-ruby (~> 1.0, >= 1.0.2)
10
+ activemodel (7.2.1)
11
+ activesupport (= 7.2.1)
12
+ activerecord (7.2.1)
13
+ activemodel (= 7.2.1)
14
+ activesupport (= 7.2.1)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.2.1)
17
+ base64
18
+ bigdecimal
19
+ concurrent-ruby (~> 1.0, >= 1.3.1)
20
+ connection_pool (>= 2.2.5)
21
+ drb
17
22
  i18n (>= 1.6, < 2)
23
+ logger (>= 1.4.2)
18
24
  minitest (>= 5.1)
19
- tzinfo (~> 2.0)
25
+ securerandom (>= 0.3)
26
+ tzinfo (~> 2.0, >= 2.0.5)
20
27
  ast (2.4.2)
28
+ base64 (0.2.0)
21
29
  benchmark-ips (2.12.0)
30
+ bigdecimal (3.1.8)
22
31
  byebug (11.1.3)
23
- concurrent-ruby (1.2.2)
24
- i18n (1.14.1)
32
+ concurrent-ruby (1.3.4)
33
+ connection_pool (2.4.1)
34
+ drb (2.2.1)
35
+ i18n (1.14.5)
25
36
  concurrent-ruby (~> 1.0)
26
- json (2.6.3)
27
- minitest (5.18.0)
37
+ json (2.7.1)
38
+ language_server-protocol (3.17.0.3)
39
+ logger (1.6.0)
40
+ mini_portile2 (2.8.8)
41
+ minitest (5.25.1)
28
42
  msgpack (1.7.2)
29
- parallel (1.22.1)
30
- parser (3.2.1.1)
43
+ parallel (1.24.0)
44
+ parser (3.3.0.5)
31
45
  ast (~> 2.4.1)
46
+ racc
47
+ racc (1.7.3)
32
48
  rainbow (3.1.1)
33
49
  rake (13.0.6)
34
- regexp_parser (2.7.0)
35
- rexml (3.2.5)
36
- rubocop (1.48.1)
50
+ regexp_parser (2.9.0)
51
+ rexml (3.3.9)
52
+ rubocop (1.62.1)
37
53
  json (~> 2.3)
54
+ language_server-protocol (>= 3.17.0)
38
55
  parallel (~> 1.10)
39
- parser (>= 3.2.0.0)
56
+ parser (>= 3.3.0.2)
40
57
  rainbow (>= 2.2.2, < 4.0)
41
58
  regexp_parser (>= 1.8, < 3.0)
42
59
  rexml (>= 3.2.5, < 4.0)
43
- rubocop-ast (>= 1.26.0, < 2.0)
60
+ rubocop-ast (>= 1.31.1, < 2.0)
44
61
  ruby-progressbar (~> 1.7)
45
62
  unicode-display_width (>= 2.4.0, < 3.0)
46
- rubocop-ast (1.27.0)
47
- parser (>= 3.2.1.0)
63
+ rubocop-ast (1.31.2)
64
+ parser (>= 3.3.0.4)
48
65
  rubocop-shopify (2.12.0)
49
66
  rubocop (~> 1.44)
50
67
  ruby-progressbar (1.13.0)
51
- sorbet-runtime (0.5.10712)
52
- sqlite3 (1.7.3-arm64-darwin)
53
- sqlite3 (1.7.3-x86_64-linux)
68
+ securerandom (0.3.1)
69
+ sorbet-runtime (0.5.11633)
70
+ sqlite3 (2.0.4)
71
+ mini_portile2 (~> 2.8.0)
72
+ timeout (0.4.1)
54
73
  tzinfo (2.0.6)
55
74
  concurrent-ruby (~> 1.0)
56
- unicode-display_width (2.4.2)
75
+ unicode-display_width (2.5.0)
57
76
 
58
77
  PLATFORMS
78
+ aarch64-linux
59
79
  arm64-darwin
60
80
  x86_64-linux
61
81
 
@@ -73,4 +93,4 @@ DEPENDENCIES
73
93
  sqlite3
74
94
 
75
95
  BUNDLED WITH
76
- 2.3.22
96
+ 2.6.3
data/dev.yml CHANGED
@@ -1,8 +1,7 @@
1
1
  name: paquito
2
2
 
3
3
  up:
4
- - ruby:
5
- version: 2.7.8
4
+ - ruby
6
5
  - bundler
7
6
 
8
7
  commands:
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "msgpack", ">= 1.5.2"
6
+
7
+ gem "rake", "~> 13.0"
8
+ gem "activesupport", "~> 7.1.0"
9
+ gem "activerecord", "~> 7.1.0"
10
+ gem "sqlite3", "< 2"
11
+ gem "benchmark-ips"
12
+
13
+ gem "minitest", "~> 5.0"
14
+
15
+ gem "rubocop"
16
+ gem "rubocop-shopify", "~> 2.0", require: false
17
+ gem "byebug"
18
+
19
+ gem "sorbet-runtime"
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "msgpack", ">= 1.5.2"
6
+
7
+ gem "rake", "~> 13.0"
8
+ gem "activesupport", "~> 7.2.0"
9
+ gem "activerecord", "~> 7.2.0"
10
+ gem "sqlite3"
11
+ gem "benchmark-ips"
12
+
13
+ gem "minitest", "~> 5.0"
14
+
15
+ gem "rubocop"
16
+ gem "rubocop-shopify", "~> 2.0", require: false
17
+ gem "byebug"
18
+
19
+ gem "sorbet-runtime"
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "msgpack", ">= 1.5.2"
6
+
7
+ gem "rake", "~> 13.0"
8
+ gem "activesupport", "~> 8.0.0"
9
+ gem "activerecord", "~> 8.0.0"
10
+ gem "sqlite3"
11
+ gem "benchmark-ips"
12
+
13
+ gem "minitest", "~> 5.0"
14
+
15
+ gem "rubocop"
16
+ gem "rubocop-shopify", "~> 2.0", require: false
17
+ gem "byebug"
18
+
19
+ gem "sorbet-runtime"
@@ -99,7 +99,7 @@ module Paquito
99
99
  attributes
100
100
  end
101
101
 
102
- def deserialize_record(class_name, attributes_from_database, new_record = false)
102
+ def deserialize_record(class_name, attributes_from_database, new_record = false, *)
103
103
  begin
104
104
  klass = Object.const_get(class_name)
105
105
  rescue NameError
data/lib/paquito/types.rb CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  require "paquito/errors"
4
4
 
5
+ begin
6
+ require "active_support"
7
+ require "active_support/core_ext/time/calculations"
8
+ rescue LoadError
9
+ # We don't actually depend on ActiveSupport, we just want to use
10
+ # Time.at_without_coercion if it's available. Otherwise, we'll just use
11
+ # Time.at and ignore this error.
12
+ end
13
+
5
14
  module Paquito
6
15
  module Types
7
16
  autoload :ActiveRecordPacker, "paquito/types/active_record_packer"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paquito
4
- VERSION = "0.11.1"
4
+ VERSION = "0.11.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paquito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-03-20 00:00:00.000000000 Z
10
+ date: 2025-02-06 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: msgpack
@@ -31,10 +30,13 @@ executables: []
31
30
  extensions: []
32
31
  extra_rdoc_files: []
33
32
  files:
33
+ - ".devcontainer/Dockerfile"
34
+ - ".devcontainer/devcontainer.json"
34
35
  - ".github/workflows/ci.yml"
35
36
  - ".github/workflows/cla.yml"
36
37
  - ".gitignore"
37
38
  - ".rubocop.yml"
39
+ - ".ruby-version"
38
40
  - CHANGELOG.md
39
41
  - Gemfile
40
42
  - Gemfile.lock
@@ -47,6 +49,9 @@ files:
47
49
  - bin/console
48
50
  - bin/setup
49
51
  - dev.yml
52
+ - gemfiles/rails_7.1.gemfile
53
+ - gemfiles/rails_7.2.gemfile
54
+ - gemfiles/rails_8.0.gemfile
50
55
  - lib/paquito.rb
51
56
  - lib/paquito/active_record_coder.rb
52
57
  - lib/paquito/allow_nil.rb
@@ -77,7 +82,6 @@ metadata:
77
82
  allowed_push_host: https://rubygems.org
78
83
  homepage_uri: https://github.com/Shopify/paquito
79
84
  source_code_uri: https://github.com/Shopify/paquito
80
- post_install_message:
81
85
  rdoc_options: []
82
86
  require_paths:
83
87
  - lib
@@ -92,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
96
  - !ruby/object:Gem::Version
93
97
  version: '0'
94
98
  requirements: []
95
- rubygems_version: 3.5.6
96
- signing_key:
99
+ rubygems_version: 3.6.3
97
100
  specification_version: 4
98
101
  summary: Framework for defining efficient and extendable serializers
99
102
  test_files: []