klastera 1.4.4.1 → 1.4.4.5

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: ef0519c775285f8e1684e2b7710f6a2729d89335f4742a04f4267a156870746d
4
- data.tar.gz: 87adbf443e12d8dc8eb93a6d40dd7518d138dea65c404fc8ac19e9a69ea7a742
3
+ metadata.gz: 565747ef3918ef0e604b3f971f0b6b8bd559b9f8a168257f3611a977fe90e6ae
4
+ data.tar.gz: d375f60db78e73711b21b75f796985f416a7a388375518e733afd1686afe49af
5
5
  SHA512:
6
- metadata.gz: 252b2cc54c25a5d1338d7064610ff2806c4e246f44f1101809fe97b5d0167e9d75de71994f1820e67f0e9c26e164be36ea2fd6ee0922eea9c8152c4ebbce83bb
7
- data.tar.gz: 573ef0536c76d2fb6b199ac188cc90ec8f04b780f4d2562a6772b3f73051e77f62d4897ecc633fd3b869ae5d4c5f97a536bb31ebcf13a1c8c58904a37d326d4c
6
+ metadata.gz: 6754f229308b5f2f268f8239c0057ee869a2fbfee0940f8cff422610c07820f0942e5b12c8c95119f4814e1c64ee7a9ffd2f5fcaf91f9be6f0a1a799f98a1583
7
+ data.tar.gz: 11af42520852996474e3e5b3c37715de7ac5e5454ce68569b9114cbc298bca233948dff90d4fa53ac7561f0b4378f55353accf5283148560f78e07894c9594e6
@@ -1,6 +1,6 @@
1
1
  <tr class="nested-fields">
2
2
  <td class="field">
3
- <%= f.select :cluster_id, @clusters_session.map{|c|[c.name,c.id]}, { include_blank: true }, { class: 'form-control' } %>
3
+ <%= f.select :cluster_id, @clusters_session.order(:order,:name).map{|c|[c.name,c.id]}, { include_blank: true }, { class: 'form-control' } %>
4
4
  </td>
5
5
  <td class="action vertical-align-middle text-center" width="44">
6
6
  <%= link_to_remove_association f, class: 'btn btn-danger btn-xs text-danger' do %>
@@ -7,7 +7,7 @@
7
7
  <%=yield(f) if block_given? %>
8
8
 
9
9
  <% if cluster_organization.is_in_cluster_mode? %>
10
- <% cluster_collection = cluster_list.map{|c|[c.name,(c.id||c.nid)]} %>
10
+ <% cluster_collection = cluster_list.order(:order, :name).map{|c|[c.name,(c.id||c.nid)]} %>
11
11
  <% if cluster_collection.size > 1 %>
12
12
  <div class="inline-label-control-block">
13
13
  <%= f.input :cluster_id, collection: cluster_collection, prompt: t('klastera.clusters.all'), label: false, wrapper: false %>
@@ -1,6 +1,6 @@
1
1
  <tr class="nested-fields">
2
2
  <td class="field">
3
- <%= f.select :cluster_id, @user.organization.clusters.map{|c|[c.name,c.id]}, { include_blank: true }, { class: 'form-control' } %>
3
+ <%= f.select :cluster_id, @user.organization.clusters.order(:order, :name).map{|c|[c.name,c.id]}, { include_blank: true }, { class: 'form-control' } %>
4
4
  </td>
5
5
  <td class="action vertical-align-middle text-center" width="44">
6
6
  <%= link_to_remove_association f, class: 'btn btn-danger btn-xs text-danger' do %>
@@ -0,0 +1,5 @@
1
+ class AddUniqueIndexToClusterEntities < ActiveRecord::Migration
2
+ def change
3
+ add_index :cluster_entities, %i[cluster_id entity_id entity_type], unique: true, name: :index_on_cluster_id_and_entity_id_and_entity_type
4
+ end
5
+ end
data/lib/klastera.rb CHANGED
@@ -54,7 +54,7 @@ module Klastera
54
54
  end
55
55
  _cluster_entities.map do |ce|
56
56
  ce.cluster.try(attribute)
57
- end.compact.join(separator)
57
+ end.compact.sort.join(separator)
58
58
  end
59
59
 
60
60
  ##
@@ -1,3 +1,3 @@
1
1
  module Klastera
2
- VERSION = "1.4.4.1"
2
+ VERSION = "1.4.4.5"
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.4.4.1
4
+ version: 1.4.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gino Barahona
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2021-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,14 +94,12 @@ files:
94
94
  - db/migrate/20200330221601_add_order_field_to_clusters.rb
95
95
  - db/migrate/20200518142609_create_klastera_cluster_entities.rb
96
96
  - db/migrate/20200908180057_add_cluster_config_to_organization.rb
97
+ - db/migrate/20210318185053_add_unique_index_to_cluster_entities.rb
97
98
  - lib/klastera.rb
98
99
  - lib/klastera/engine.rb
99
100
  - lib/klastera/version.rb
100
101
  - lib/tasks/klastera_tasks.rake
101
102
  - test/controllers/klastera/clusters_controller_test.rb
102
- - test/dummy/log/development.log
103
- - test/dummy/log/test.log
104
- - test/dummy/tmp/pids/server.pid
105
103
  - test/fixtures/klastera/cluster_users.yml
106
104
  - test/fixtures/klastera/clusters.yml
107
105
  - test/integration/navigation_test.rb
@@ -113,7 +111,7 @@ homepage: https://github.com/ginosx/klastera
113
111
  licenses:
114
112
  - MIT
115
113
  metadata: {}
116
- post_install_message:
114
+ post_install_message:
117
115
  rdoc_options: []
118
116
  require_paths:
119
117
  - lib
@@ -128,14 +126,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
126
  - !ruby/object:Gem::Version
129
127
  version: '0'
130
128
  requirements: []
131
- rubygems_version: 3.1.2
132
- signing_key:
129
+ rubygems_version: 3.0.6
130
+ signing_key:
133
131
  specification_version: 4
134
132
  summary: Clusterization Engine
135
133
  test_files:
136
- - test/dummy/log/test.log
137
- - test/dummy/log/development.log
138
- - test/dummy/tmp/pids/server.pid
139
134
  - test/integration/navigation_test.rb
140
135
  - test/models/klastera/cluster_user_test.rb
141
136
  - test/models/klastera/cluster_test.rb
@@ -1,108 +0,0 @@
1
-
2
-
3
- Started GET "/" for ::1 at 2020-03-24 17:46:51 -0300
4
-
5
- ActiveRecord::NoDatabaseError (FATAL: database "dummy_development" does not exist
6
- ):
7
- activerecord (4.2.11.1) lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `rescue in connect'
8
- activerecord (4.2.11.1) lib/active_record/connection_adapters/postgresql_adapter.rb:650:in `connect'
9
- activerecord (4.2.11.1) lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
10
- activerecord (4.2.11.1) lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
11
- activerecord (4.2.11.1) lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
12
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
13
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
14
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
15
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
16
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/monitor.rb:235:in `mon_synchronize'
17
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
18
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
19
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/monitor.rb:235:in `mon_synchronize'
20
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
21
- activerecord (4.2.11.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
22
- activerecord (4.2.11.1) lib/active_record/connection_handling.rb:113:in `retrieve_connection'
23
- activerecord (4.2.11.1) lib/active_record/connection_handling.rb:87:in `connection'
24
- activerecord (4.2.11.1) lib/active_record/migration.rb:383:in `connection'
25
- activerecord (4.2.11.1) lib/active_record/migration.rb:370:in `call'
26
- actionpack (4.2.11.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
27
- activesupport (4.2.11.1) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
28
- activesupport (4.2.11.1) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
29
- activesupport (4.2.11.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
30
- actionpack (4.2.11.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
31
- actionpack (4.2.11.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
32
- actionpack (4.2.11.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
33
- actionpack (4.2.11.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
34
- actionpack (4.2.11.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
35
- railties (4.2.11.1) lib/rails/rack/logger.rb:38:in `call_app'
36
- railties (4.2.11.1) lib/rails/rack/logger.rb:20:in `block in call'
37
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
38
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:26:in `tagged'
39
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in `tagged'
40
- railties (4.2.11.1) lib/rails/rack/logger.rb:20:in `call'
41
- actionpack (4.2.11.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
42
- rack (1.6.13) lib/rack/methodoverride.rb:22:in `call'
43
- rack (1.6.13) lib/rack/runtime.rb:18:in `call'
44
- activesupport (4.2.11.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
45
- rack (1.6.13) lib/rack/lock.rb:17:in `call'
46
- actionpack (4.2.11.1) lib/action_dispatch/middleware/static.rb:120:in `call'
47
- rack (1.6.13) lib/rack/sendfile.rb:113:in `call'
48
- railties (4.2.11.1) lib/rails/engine.rb:518:in `call'
49
- railties (4.2.11.1) lib/rails/application.rb:165:in `call'
50
- rack (1.6.13) lib/rack/lock.rb:17:in `call'
51
- rack (1.6.13) lib/rack/content_length.rb:15:in `call'
52
- rack (1.6.13) lib/rack/handler/webrick.rb:88:in `service'
53
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/httpserver.rb:140:in `service'
54
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/httpserver.rb:96:in `run'
55
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread'
56
-
57
-
58
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (5.9ms)
59
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.9ms)
60
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms)
61
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (182.3ms)
62
-
63
-
64
- Started GET "/" for ::1 at 2020-03-24 17:48:58 -0300
65
- Processing by Rails::WelcomeController#index as HTML
66
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/railties-4.2.11.1/lib/rails/templates/rails/welcome/index.html.erb (2.0ms)
67
- Completed 200 OK in 17ms (Views: 17.1ms | ActiveRecord: 0.0ms)
68
-
69
-
70
- Started GET "/clusters" for ::1 at 2020-03-24 17:51:49 -0300
71
-
72
- ActionController::RoutingError (No route matches [GET] "/clusters"):
73
- actionpack (4.2.11.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
74
- actionpack (4.2.11.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
75
- railties (4.2.11.1) lib/rails/rack/logger.rb:38:in `call_app'
76
- railties (4.2.11.1) lib/rails/rack/logger.rb:20:in `block in call'
77
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
78
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:26:in `tagged'
79
- activesupport (4.2.11.1) lib/active_support/tagged_logging.rb:68:in `tagged'
80
- railties (4.2.11.1) lib/rails/rack/logger.rb:20:in `call'
81
- actionpack (4.2.11.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
82
- rack (1.6.13) lib/rack/methodoverride.rb:22:in `call'
83
- rack (1.6.13) lib/rack/runtime.rb:18:in `call'
84
- activesupport (4.2.11.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
85
- rack (1.6.13) lib/rack/lock.rb:17:in `call'
86
- actionpack (4.2.11.1) lib/action_dispatch/middleware/static.rb:120:in `call'
87
- rack (1.6.13) lib/rack/sendfile.rb:113:in `call'
88
- railties (4.2.11.1) lib/rails/engine.rb:518:in `call'
89
- railties (4.2.11.1) lib/rails/application.rb:165:in `call'
90
- rack (1.6.13) lib/rack/lock.rb:17:in `call'
91
- rack (1.6.13) lib/rack/content_length.rb:15:in `call'
92
- rack (1.6.13) lib/rack/handler/webrick.rb:88:in `service'
93
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/httpserver.rb:140:in `service'
94
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/httpserver.rb:96:in `run'
95
- /Users/gino/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread'
96
-
97
-
98
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.7ms)
99
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (0.9ms)
100
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (0.5ms)
101
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (11.0ms)
102
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (9.0ms)
103
- Rendered /Users/gino/.rvm/gems/ruby-2.5.7@llegando/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (210.1ms)
104
- ActiveRecord::SchemaMigration Load (1.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
105
- Migrating to AddAuthorIdToBlorghArticles (20200325002402)
106
-  (0.3ms) BEGIN
107
-  (1.0ms) ALTER TABLE "blorgh_articles" ADD "super_cluster_id" integer
108
-  (0.2ms) ROLLBACK
File without changes
@@ -1 +0,0 @@
1
- 86448