grape-listing 1.2.0 → 1.2.2
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 +4 -4
- data/lib/listing_service/serialization.rb +2 -5
- data/lib/listing_service/spreadsheet.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93c908d060e847beb9d2919d16e2d631168c97181c0522e008ac6cf2ea9b9957
|
4
|
+
data.tar.gz: c06c939b8ae46d8b900b3e652488b281c5858ea8abc6b7b6265e2c40000ce0a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f43ec4d90177802e01106f55b0e589a663c2f1013c176154f17a9bc5ef57fb57566b915ffc63c2c65aa324c154a8cad8d21c0da740d29811a32cd76a72d76e14
|
7
|
+
data.tar.gz: 82c8fd75f4eb8405a1706e03c3ce28cb8ae4456787b910aad3b423d4a705002c74165212adb11edf2d83344be92a7c6cbda37e1346f081e9db607931ba80b045
|
@@ -46,10 +46,7 @@ module GrapeListing
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def caching_entity_representation(record)
|
49
|
-
|
50
|
-
params_string = Rack::Utils.build_query(@params.except('offset', 'page'))
|
51
|
-
key = "#{@grape_entity}:#{record.id}:#{params_string}"
|
52
|
-
enc_key = Digest::MD5.hexdigest(key)
|
49
|
+
key = "#{@grape_entity}:#{record.id}"
|
53
50
|
|
54
51
|
# опции кеширования
|
55
52
|
opts =
|
@@ -59,7 +56,7 @@ module GrapeListing
|
|
59
56
|
{}
|
60
57
|
end
|
61
58
|
|
62
|
-
GrapeListing.cache.fetch(
|
59
|
+
GrapeListing.cache.fetch(key, opts) do
|
63
60
|
@grape_entity.represent(record, @entity_opts).as_json
|
64
61
|
end
|
65
62
|
end
|
@@ -3,6 +3,13 @@ require 'fast_excel'
|
|
3
3
|
module GrapeListing
|
4
4
|
module Spreadsheet
|
5
5
|
|
6
|
+
EXCLUDED_COLUMNS = %i[
|
7
|
+
created_at
|
8
|
+
updated_at
|
9
|
+
deleted_at
|
10
|
+
global_id
|
11
|
+
].freeze
|
12
|
+
|
6
13
|
def spreadsheet
|
7
14
|
# поиск и фильтрация
|
8
15
|
search
|
@@ -68,7 +75,7 @@ module GrapeListing
|
|
68
75
|
|
69
76
|
def grape_entity_columns
|
70
77
|
@grape_entity.root_exposures.map do |exposure|
|
71
|
-
|
78
|
+
if EXCLUDED_COLUMNS.exclude?(exposure.key)
|
72
79
|
exposure.key
|
73
80
|
end
|
74
81
|
end.compact
|
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.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Павел Бабин
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|