klastera 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/klastera.rb +3 -0
- data/lib/klastera/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d1ff69c5abf0d989e26c1bfa2be9da2f8c9f5e8100bd4670f1c70d05c91cb13
|
4
|
+
data.tar.gz: 3bda3826a8d07270008bd4789ecc0eee72706984d9e3065f64bcc7475b844296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39e4ec148db926bd2881d1e88e45b4c6071eccbd9aee45964e5c8d547d83f7513e6b1fc9882dfd6c1b06fe2bd146f0153aa935f4869809e09c554736ca8288e3
|
7
|
+
data.tar.gz: '09cbc4eb782c613ddfa68c4704dc6511ba77c49137539b2fc7d52c084e25a5ecfc28e52b38231081ddbea920468eac23aadca10449009196bd25a7d7c36e46d0'
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
17
|
+
#APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
19
|
|
20
20
|
|
data/lib/klastera.rb
CHANGED
@@ -75,6 +75,7 @@ module Klastera
|
|
75
75
|
scope_klass = scope_class(scope).where(organization_id: organization)
|
76
76
|
session_clusters(user,organization) do |clusters|
|
77
77
|
if organization.is_in_cluster_mode?
|
78
|
+
scope_klass = scope_klass.select("DISTINCT ON (#{scope.table_name}.id) #{scope.table_name}.id, #{scope.table_name}.*")
|
78
79
|
scope_klass = scope_klass.includes(includes) if includes.present?
|
79
80
|
cluster_ids = clusters.map(&:id)
|
80
81
|
if organization.required_suborganization_mode?
|
@@ -87,6 +88,8 @@ module Klastera
|
|
87
88
|
AND entity_type = '#{scope}'
|
88
89
|
")
|
89
90
|
end
|
91
|
+
# Provisional fix to avoid SQL clashes due to DISTINCT ON clause
|
92
|
+
scope_klass = scope_class(scope).where(organization_id: organization).where(id: scope_klass.map(&:id))
|
90
93
|
end
|
91
94
|
end
|
92
95
|
scope_klass
|
data/lib/klastera/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klastera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gino Barahona
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.0.8
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Clusterization Engine
|