klastera 1.2.0 → 1.2.1

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: ae9963c78d2880fca43b1fd6bef6be6c7ebcdd957289dd1117d81b815fdef707
4
- data.tar.gz: 3ae1a3a37239c56675aaa9b9c82cfd65f6262777746bf6e720465c62e66af069
3
+ metadata.gz: 3d1ff69c5abf0d989e26c1bfa2be9da2f8c9f5e8100bd4670f1c70d05c91cb13
4
+ data.tar.gz: 3bda3826a8d07270008bd4789ecc0eee72706984d9e3065f64bcc7475b844296
5
5
  SHA512:
6
- metadata.gz: ed36fabfe91b44b8d8209a1484081021be21cb0309bfd8731cd1380aa6dcf210464f0e1e6cd5dbba218691cbae023223160ee287d6b698ce99756bc452e4c563
7
- data.tar.gz: 62ce187ce73ebf4bf07e045835a1f3c79a0c2a911c0f45c54d980938851afdf38dfe8f632641f0b6da40b5c62e82d03cf7d0286b321fed90c3873c267cce2574
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Klastera
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
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.0
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-05-30 00:00:00.000000000 Z
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.1.2
131
+ rubygems_version: 3.0.8
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Clusterization Engine