grape-listing 1.4.8 → 1.4.9

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: 5c0462204c8f88aa2bea915bc141c9d76a92fbaa72645dd0e47773b1ffaa0bc0
4
- data.tar.gz: 0f62eba637efd957873256a6b3173bbcb7a4f02ec6f7f9273c9c26f74bf748db
3
+ metadata.gz: 7592347db2557ed4440d1a1f3aba6c5f689b3bafd51283a0700415fc19ffac63
4
+ data.tar.gz: 4356d99acc0afe7dd2b7aba09251eb353a972c057bdcbfd587ce60ad407633ac
5
5
  SHA512:
6
- metadata.gz: af1a0cd9fdfe14582ccf8ff76fa7be30b4049fb4a45b31d4880ae79904425ae9d1e88675ec04ddca0dc1dd3ea7701dadfd51081f1b6bc12ab6ba306a40375874
7
- data.tar.gz: 3a0dde7ac439a7df0c64f00cafc58166e2baa5bbe14b38bf6b43f3e1b08e3a8826c0db0a8da79a405043dfd4e30bc5feddc1ad33baa3b9486140fbccdce40135
6
+ metadata.gz: 108cb395525e600c10922475215f8ef63d6ec195ac6da6c444bace446010e2abf0429c8b363eee269f8d5ee066ac89234efb5f24a2e0e3a8e9de534b6d2368d1
7
+ data.tar.gz: db57306ef8b287b44a57414d84479a34410a0063714b690b8e58c5bbfb5e6910d4d18f448d7796b3aaf509b876e85bcf0af251fcb9cf661d009c7ce702c3a476
data/lib/grape/dsl.rb CHANGED
@@ -4,13 +4,13 @@ module Grape
4
4
  module DSL
5
5
  module InsideRoute
6
6
 
7
- def listing(model:, entity:, scopes: nil, search: nil, sortable: nil, paginate: true, cache: nil, preload: nil)
7
+ def listing(model:, entity: nil, fields: nil, scopes: nil, search: nil, sortable: nil, paginate: true, cache: nil, preload: nil)
8
8
  # параметры запроса API
9
9
  request_method = request.env['REQUEST_METHOD']
10
10
  request_uri = request.env['REQUEST_URI']
11
11
 
12
12
  # опции для сервиса
13
- opts = listing_opts(model, entity, scopes, search, sortable, cache, request_method, request_uri, preload)
13
+ opts = listing_opts(model, entity, fields, scopes, search, sortable, cache, request_method, request_uri, preload)
14
14
 
15
15
  if params[:spreadsheet]
16
16
  listing_spreadsheet(**opts)
@@ -23,12 +23,13 @@ module Grape
23
23
 
24
24
  private
25
25
 
26
- def listing_opts(model, entity, scopes, search, sortable, cache, request_method, request_uri, preload)
26
+ def listing_opts(model, entity, fields, scopes, search, sortable, cache, request_method, request_uri, preload)
27
27
  # стандартные опции
28
28
  opts = {
29
29
  model:,
30
30
  preload:,
31
31
  entity:,
32
+ fields:,
32
33
  scopes:,
33
34
  search:,
34
35
  sortable:,
@@ -1,3 +1,3 @@
1
1
  module GrapeListing
2
- VERSION = '1.4.8'.freeze
2
+ VERSION = '1.4.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-listing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Павел Бабин
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-22 00:00:00.000000000 Z
11
+ date: 2025-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack