workarea-core 3.4.38 → 3.4.39
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6526862e8c543160a1df0f1ee154cf6de027b87fa2222910e86f13b826e6a5
|
4
|
+
data.tar.gz: fe422c3b67acfc7befdccba7de26c314cd23e40e93e51f3968a2f1a59922e0f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f096e09ee3909187463dec66d4b023afe2b2396ecfad07e005069b4fb1ae3ca43e2ab5b3b42bff01ee1f96cc794665ad359900d0cb82f0b1cac7df9ea7acf3
|
7
|
+
data.tar.gz: f04a5d34dcb94969890639267860780c5620ffc2190f0ec0427ae65115e20c675ead70895dd9961aa31f0ea99bc18a612e2aa7d16c18b40f9f75c3823a43264e
|
@@ -50,7 +50,8 @@ module Workarea
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def current_impersonation
|
53
|
-
@current_impersonation
|
53
|
+
return @current_impersonation if defined?(@current_impersonation)
|
54
|
+
@current_impersonation = User.find(cookies.signed[:user_id]) rescue nil
|
54
55
|
end
|
55
56
|
|
56
57
|
def touch_impersonation
|
data/lib/workarea/version.rb
CHANGED
@@ -81,6 +81,16 @@ module Workarea
|
|
81
81
|
assert_equal(results.reverse, search.results)
|
82
82
|
end
|
83
83
|
|
84
|
+
def test_default_sort_by_score
|
85
|
+
# Unlike other admin searches (primarily indexes), we want searching to
|
86
|
+
# default sort by score. Testing scores directly is unreliable so just
|
87
|
+
# do a simple check here.
|
88
|
+
assert_equal(
|
89
|
+
[{ _score: :desc }, { updated_at: :desc }],
|
90
|
+
AdminSearch.new.default_admin_sort
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
84
94
|
def test_selected_sorting
|
85
95
|
results = [
|
86
96
|
create_product(name: 'A', variants: []),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|