readymade 0.2.7 → 0.2.8

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: 78de03a88081398d6f7a8a5f3a16b5311d12488e9e0418e9cd3c8fba74295605
4
- data.tar.gz: '0924386861d20eb8bb83426e1cbd824d35b7c72d027b8bc812ca21d8df858984'
3
+ metadata.gz: 8b21e8901b1feeed09d060f31d886d21041a3c13c000e4c6a90c11a0cd50de12
4
+ data.tar.gz: 2909b312ed7110ff519b67a203023389c45db97e00be314e599df9d1b8f60337
5
5
  SHA512:
6
- metadata.gz: 5a8182a959f3f8509835963292334ab7eb7912557ac04a312e86d746f77f406c4eb5252da002ba85226881e61e5ac7c8c37a5b818cd48b0c4270355320682834
7
- data.tar.gz: 9b716935a3c69428018453240eb60d95a871b3a5862ad2e684258f8f152c737226766b33813a97047df86f3833825c2d4df184f7a7ff27cfe02cf1442f6548f0
6
+ metadata.gz: 359f4a10a9afbcadfff88b655d27dc8f5d4e971cf812f5ab7bc74e27b48b81b273fb79678e0de057ddc3d70c44077420e7fd13da7b11e0a2225fed1c35432213
7
+ data.tar.gz: '08a127d29a24149dab9e1ac7d8eac89eb008c36f90c1fb569e83cc5ee7920f9ed3503bf2fac43b92e90c47a0fb4861a76bc308922fe61a6fd5098860bca24740'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.2.8] - 2022-11-10
5
+
6
+ ### Fixes
7
+
8
+ * Fix `Readymade::Controller::Serialization` collection_response method raised an error.
9
+
4
10
  ## [0.2.7] - 2022-06-03
5
11
 
6
12
  ### Improvement
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- readymade (0.2.6)
4
+ readymade (0.2.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,15 +21,12 @@ module Readymade
21
21
  end
22
22
 
23
23
  def collection_response(collection, *args)
24
- options = args.extract_options!
25
-
26
- render_json(
27
- {
28
- (options.delete(:root).presence || :items) => serialize_collection(paginate(collection, options), options),
29
- count: collection.count
30
- },
31
- options[:status] || :ok
32
- )
24
+ args.extract_options!.then do |options|
25
+ render_json(
26
+ serialize_collection(paginate(collection, options), options).merge(count: collection.count),
27
+ options[:status] || :ok
28
+ )
29
+ end
33
30
  end
34
31
 
35
32
  def render_json(message, status)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Readymade
4
- VERSION = '0.2.7'
4
+ VERSION = '0.2.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: readymade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - OrestF
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2022-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug