forest_liana 9.3.0 → 9.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/forest_liana/ability/permission.rb +1 -1
- data/lib/forest_liana/version.rb +1 -1
- data/spec/requests/stats_spec.rb +28 -3
- 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: 6e664c793d4ef91240c0b05cb55f708326f7dd3199cb92de39706ce0e01bef24
|
4
|
+
data.tar.gz: 64d6339a42a13cbe56cee058407c10ad4fd34fa886cec15176684f4ca4622d40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5510da6372cdf5e96e6e96e61b7106bfec0ec79781513349325fcdb1c1e2b16565dcbc3ac57127bbaae2c832a58decbdaaaf9594d670b70c24eaf2e7b8abb2
|
7
|
+
data.tar.gz: 50ab4b2ed50028f210ee4a4bcb16822fca77d6765b5bfdb31372b9a15d931a79d5ff80c1d4e656aff348e9c579b08f4dc83fcbd557175404ea34dc3e7f7afb4c
|
@@ -97,7 +97,7 @@ module ForestLiana
|
|
97
97
|
Rails.cache.fetch('forest.stats', expires_in: TTL) do
|
98
98
|
stat_hash = []
|
99
99
|
get_permissions('/liana/v4/permissions/renderings/' + rendering_id)['stats'].each do |stat|
|
100
|
-
stat_hash << "#{stat['type']}:#{Digest::SHA1.hexdigest(stat.
|
100
|
+
stat_hash << "#{stat['type']}:#{Digest::SHA1.hexdigest(stat.deep_sort.to_s)}"
|
101
101
|
end
|
102
102
|
|
103
103
|
stat_hash
|
data/lib/forest_liana/version.rb
CHANGED
data/spec/requests/stats_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rails_helper'
|
|
2
2
|
require 'json'
|
3
3
|
|
4
4
|
describe "Stats", type: :request do
|
5
|
-
let(:rendering_id) { 13 }
|
5
|
+
let(:rendering_id) { '13' }
|
6
6
|
let(:scopes) { {'scopes' => {}, 'team' => {'id' => '1', 'name' => 'Operations'}} }
|
7
7
|
let(:schema) {
|
8
8
|
[
|
@@ -23,7 +23,7 @@ describe "Stats", type: :request do
|
|
23
23
|
team: 'Operations',
|
24
24
|
rendering_id: rendering_id,
|
25
25
|
exp: Time.now.to_i + 2.weeks.to_i,
|
26
|
-
permission_level: '
|
26
|
+
permission_level: 'user'
|
27
27
|
}, ForestLiana.auth_secret, 'HS256')
|
28
28
|
}
|
29
29
|
|
@@ -38,7 +38,7 @@ describe "Stats", type: :request do
|
|
38
38
|
before do
|
39
39
|
Rails.cache.write('forest.users', {'1' => { 'id' => 1, 'roleId' => 1, 'rendering_id' => '1' }})
|
40
40
|
Rails.cache.write('forest.has_permission', true)
|
41
|
-
allow_any_instance_of(ForestLiana::Ability::
|
41
|
+
allow_any_instance_of(ForestLiana::Ability::Permission)
|
42
42
|
.to receive(:get_permissions)
|
43
43
|
.and_return(
|
44
44
|
{
|
@@ -50,6 +50,31 @@ describe "Stats", type: :request do
|
|
50
50
|
"aggregateFieldName" => nil,
|
51
51
|
"sourceCollectionName" => "Owner"
|
52
52
|
},
|
53
|
+
{
|
54
|
+
"type" => "Objective",
|
55
|
+
"sourceCollectionName" => "Owner",
|
56
|
+
"aggregateFieldName" => nil,
|
57
|
+
"aggregator" => "Count",
|
58
|
+
"objective" => 200,
|
59
|
+
"filter" => nil,
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"type" => "Pie",
|
63
|
+
"sourceCollectionName" => "Owner",
|
64
|
+
"aggregateFieldName" => nil,
|
65
|
+
"groupByFieldName" => "id",
|
66
|
+
"aggregator" => "Count",
|
67
|
+
"filter" => nil,
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"type" => "Line",
|
71
|
+
"sourceCollectionName" => "Owner",
|
72
|
+
"aggregateFieldName" => nil,
|
73
|
+
"groupByFieldName" => "hired_at",
|
74
|
+
"aggregator" => "Count",
|
75
|
+
"timeRange" => "Week",
|
76
|
+
"filter" => nil,
|
77
|
+
},
|
53
78
|
{
|
54
79
|
"type" => "Value",
|
55
80
|
"query" => "SELECT COUNT(*) AS value FROM products;"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.3.
|
4
|
+
version: 9.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|