isomorfeus-data 22.9.0.rc6 → 22.9.0.rc8

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: 1dab78ab7b005d0d6826b4bca29287ee55c12a0907866fd4eee981f5f66242ef
4
- data.tar.gz: b9cf6a4cf8b4cde106c26eb498e24a89276b1977145a404f519c75a9c832ed8c
3
+ metadata.gz: 9f1fdef2a32d5424e15e32368ebd41683580824a9cc673b0c8191414caba0d51
4
+ data.tar.gz: e41fbb39486e1d71560f750fe41524dd21dacc5dbc5885d178aeb544e0b23163
5
5
  SHA512:
6
- metadata.gz: aa3ceecb95e14566765c2a6dd826dd890086150ef78411feaba7ba33b41a25ab5d4bc5f67120793adc9e96377d9f915341063a17c807539f27bc72f915e026f2
7
- data.tar.gz: 14b38eb7167e71d8bc25332058acb2b68c93e3cce8d3626ca63791f7a618f124daa99934bd121e527c1cc2430430f1dc70ad8b66991ba2b2861af60e3932d443
6
+ metadata.gz: '095d67f6a557ccf8f7bde297b551b33eebf295a8765b14d501213165103ce618e174ded292cf34386365c7f9597dbade35dc325b0428aa040c1eed92da4df45f'
7
+ data.tar.gz: 4d740d28993dcdb866642520b69395672334abb257c931296bc211edec776f3b699f6975fc9930205ecefdc0356f687943889dd09dc54b313b9a6463d6783da4
@@ -147,7 +147,7 @@ module Isomorfeus
147
147
  sid_s = oa.load_sid_s(id: id)
148
148
  result << sid_s if sid_s
149
149
  end
150
- action = { type: 'DATA_MERGE', data: { queries: { item_class_name => { query => { Oj.dump(params, mode: :strict) => result }}}}}
150
+ action = { type: 'DATA_MERGE', data: { queries: { item_class_name => { query => { Oj.dump(params, mode: :strict) => { result_time: Time.now.httpdate, result: result }}}}}}
151
151
  elsif action_type == 'DATA_DESTROY'
152
152
  item_class_name = action[:class_name]
153
153
  item_key = action[:key]
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Data
3
- VERSION = '22.9.0.rc6'
3
+ VERSION = '22.9.0.rc8'
4
4
  end
5
5
  end
data/lib/lucid_object.rb CHANGED
@@ -13,11 +13,12 @@ class LucidObject < LucidDataGeneric
13
13
  end
14
14
 
15
15
  def loaded?
16
- !!as_sid_s
16
+ rt = result_time
17
+ rt && ((Time.now - rt) < 60)
17
18
  end
18
19
 
19
20
  def as_sid_s
20
- Isomorfeus.store.dig(*@store_path)
21
+ Isomorfeus.store.dig(*@store_path, :result)
21
22
  end
22
23
 
23
24
  def as_keys
@@ -49,6 +50,11 @@ class LucidObject < LucidDataGeneric
49
50
  as_sid_s&.size || 0
50
51
  end
51
52
  alias size length
53
+
54
+ def result_time
55
+ t_s = Isomorfeus.store.dig(*@store_path, :result_time)
56
+ Time.parse(t_s) if t_s
57
+ end
52
58
  end
53
59
 
54
60
  OBJECT_VALIDATION_PROC = proc do |v|
@@ -82,8 +88,10 @@ class LucidObject < LucidDataGeneric
82
88
  class << self
83
89
  def search(query, params = nil)
84
90
  proxy_instance = LucidObject::SearchResultProxy.new(self.name, query, params)
85
- Isomorfeus.something_loading!
86
- Isomorfeus.store.deferred_dispatch(type: 'DATA_SEARCH', class_name: self.name, query: query, params: params)
91
+ unless proxy_instance.loaded?
92
+ Isomorfeus.something_loading!
93
+ Isomorfeus.store.deferred_dispatch(type: 'DATA_SEARCH', class_name: self.name, query: query, params: params)
94
+ end
87
95
  proxy_instance
88
96
  end
89
97
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.9.0.rc6
4
+ version: 22.9.0.rc8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-26 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.15.4
89
+ version: 0.15.5
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.15.4
96
+ version: 0.15.5
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: isomorfeus-ferret
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,84 +114,84 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 22.9.0.rc6
117
+ version: 22.9.0.rc8
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 22.9.0.rc6
124
+ version: 22.9.0.rc8
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: isomorfeus-policy
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 22.9.0.rc6
131
+ version: 22.9.0.rc8
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 22.9.0.rc6
138
+ version: 22.9.0.rc8
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: isomorfeus-preact
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 22.9.0.rc6
145
+ version: 22.9.0.rc8
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 22.9.0.rc6
152
+ version: 22.9.0.rc8
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: isomorfeus-redux
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 22.9.0.rc6
159
+ version: 22.9.0.rc8
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 22.9.0.rc6
166
+ version: 22.9.0.rc8
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: isomorfeus-transport
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 22.9.0.rc6
173
+ version: 22.9.0.rc8
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 22.9.0.rc6
180
+ version: 22.9.0.rc8
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: isomorfeus
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 22.9.0.rc6
187
+ version: 22.9.0.rc8
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 22.9.0.rc6
194
+ version: 22.9.0.rc8
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rake
197
197
  requirement: !ruby/object:Gem::Requirement