klastera 1.4.4.1 → 1.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: 8c2357a5d407117bdfc6e495f9708c4c0c48eac080959dcd60c47e2e56a21873
4
+ data.tar.gz: cb0d205dbe40fa7397fefbab63b74d6b7b2d6adbb0e864293434e91213adbac1
5
5
  SHA512:
6
- metadata.gz: 252b2cc54c25a5d1338d7064610ff2806c4e246f44f1101809fe97b5d0167e9d75de71994f1820e67f0e9c26e164be36ea2fd6ee0922eea9c8152c4ebbce83bb
7
- data.tar.gz: 573ef0536c76d2fb6b199ac188cc90ec8f04b780f4d2562a6772b3f73051e77f62d4897ecc633fd3b869ae5d4c5f97a536bb31ebcf13a1c8c58904a37d326d4c
6
+ metadata.gz: 74c41b45bdcb33141c81be648b55707a103767b40fdfd531c885bb85b1886f12f2d3501f3231a916bfdbee96107b4c67b18507016ab031a16b7ea87352839180
7
+ data.tar.gz: 19dab50f4a230df0ca7e7992d885d938d1cb633939cbee2781dd78b4dfae2ab3d161379b853999b3fd925ccf143fe10e9b8594f2d3f98382b6ac013decc6eec9
@@ -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 %>
data/lib/klastera.rb CHANGED
@@ -36,8 +36,8 @@ module Klastera
36
36
  active_record_collection = active_record_collection.order(order: :asc)
37
37
 
38
38
  if include_unclustered && organization.optional_suborganization_mode? # For show and use modes only
39
- active_record_collection.append(
40
- ::Cluster.new({nid: UNCLUSTERED_ENTITY, name: I18n.t("klastera.#{UNCLUSTERED_ENTITY}")}, order: UNCLUSTERED_POSITION )
39
+ active_record_collection.to_a.append(
40
+ ::Cluster.new({nid: UNCLUSTERED_ENTITY, name: I18n.t("klastera.#{UNCLUSTERED_ENTITY}"), order: UNCLUSTERED_POSITION })
41
41
  )
42
42
  end
43
43
  active_record_collection
@@ -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.5"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
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.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-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.11.1
19
+ version: 5.0.7.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.11.1
26
+ version: 5.0.7.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: A simple tool to Ruby on Rails models clusterization.
41
+ description: A simple tool to cluste RoR models.
42
42
  email:
43
43
  - gino.barahona@gmail.com
44
44
  executables: []
@@ -50,7 +50,7 @@ files:
50
50
  - Rakefile
51
51
  - app/assets/javascripts/klastera/application.js
52
52
  - app/assets/javascripts/klastera/clusters.js
53
- - app/assets/stylesheets/klastera/clusters.css.scss
53
+ - app/assets/stylesheets/klastera/clusters.scss
54
54
  - app/controllers/klastera/application_controller.rb
55
55
  - app/controllers/klastera/clusters_controller.rb
56
56
  - app/helpers/klastera/application_helper.rb
@@ -99,9 +99,6 @@ files:
99
99
  - lib/klastera/version.rb
100
100
  - lib/tasks/klastera_tasks.rake
101
101
  - 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
102
  - test/fixtures/klastera/cluster_users.yml
106
103
  - test/fixtures/klastera/clusters.yml
107
104
  - test/integration/navigation_test.rb
@@ -113,7 +110,7 @@ homepage: https://github.com/ginosx/klastera
113
110
  licenses:
114
111
  - MIT
115
112
  metadata: {}
116
- post_install_message:
113
+ post_install_message:
117
114
  rdoc_options: []
118
115
  require_paths:
119
116
  - lib
@@ -129,13 +126,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
126
  version: '0'
130
127
  requirements: []
131
128
  rubygems_version: 3.1.2
132
- signing_key:
129
+ signing_key:
133
130
  specification_version: 4
134
131
  summary: Clusterization Engine
135
132
  test_files:
136
- - test/dummy/log/test.log
137
- - test/dummy/log/development.log
138
- - test/dummy/tmp/pids/server.pid
139
133
  - test/integration/navigation_test.rb
140
134
  - test/models/klastera/cluster_user_test.rb
141
135
  - 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