klastera 1.1.6.2 → 1.2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/klastera/clusters.css.scss +11 -0
- data/app/models/klastera/cluster_entity.rb +5 -0
- data/app/models/klastera/concerns/cluster_entity.rb +12 -0
- data/app/models/klastera/concerns/cluster_user.rb +3 -3
- data/app/models/klastera/concerns/clusterizable.rb +24 -4
- data/app/models/klastera/concerns/user.rb +13 -8
- data/app/views/layouts/klastera/_cluster_entity_fields.html.erb +10 -0
- data/app/views/layouts/klastera/_cluster_filter.html.erb +1 -1
- data/app/views/layouts/klastera/_cluster_user_fields.html.erb +2 -2
- data/app/views/layouts/klastera/_nested_cluster_entity.html.erb +41 -0
- data/app/views/layouts/klastera/_nested_cluster_user.html.erb +18 -16
- data/config/locales/es.yml +2 -0
- data/db/migrate/20200518142609_create_klastera_cluster_entities.rb +8 -0
- data/lib/klastera.rb +109 -26
- data/lib/klastera/version.rb +2 -2
- data/lib/tasks/klastera_tasks.rake +23 -0
- metadata +9 -76
- data/app/assets/stylesheets/klastera/application.css +0 -15
- data/app/assets/stylesheets/klastera/clusters.css +0 -4
- data/app/assets/stylesheets/scaffold.css +0 -56
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -1
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
data/lib/klastera/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Klastera
|
2
|
-
VERSION = "1.
|
3
|
-
end
|
2
|
+
VERSION = "1.2.3.2"
|
3
|
+
end
|
@@ -2,3 +2,26 @@
|
|
2
2
|
# task :klastera do
|
3
3
|
# # Task goes here
|
4
4
|
# end
|
5
|
+
|
6
|
+
|
7
|
+
namespace :klastera do
|
8
|
+
namespace :seed do
|
9
|
+
|
10
|
+
desc "Move cluster_id to cluster_entities"
|
11
|
+
task :cluster_entities, [:entity] => :environment do |task,args|
|
12
|
+
begin
|
13
|
+
klass = args.entity.constantize
|
14
|
+
ActiveRecord::Base.transaction do
|
15
|
+
klass.where.not(cluster_id: nil).each do |entity|
|
16
|
+
Klastera::ClusterEntity.create(entity: entity, cluster: entity.cluster)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
rescue NameError => ne
|
20
|
+
puts "NameError Exception: #{ne}"
|
21
|
+
rescue ActiveRecord::StatementInvalid => asi
|
22
|
+
puts "ActiveRecord::StatementInvalid Exception #{asi}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
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
|
+
version: 1.2.3.2
|
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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -50,17 +50,17 @@ 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/
|
54
|
-
- app/assets/stylesheets/klastera/clusters.css
|
55
|
-
- app/assets/stylesheets/scaffold.css
|
53
|
+
- app/assets/stylesheets/klastera/clusters.css.scss
|
56
54
|
- app/controllers/klastera/application_controller.rb
|
57
55
|
- app/controllers/klastera/clusters_controller.rb
|
58
56
|
- app/helpers/klastera/application_helper.rb
|
59
57
|
- app/helpers/klastera/clusters_helper.rb
|
60
58
|
- app/models/klastera/cluster.rb
|
59
|
+
- app/models/klastera/cluster_entity.rb
|
61
60
|
- app/models/klastera/cluster_filter.rb
|
62
61
|
- app/models/klastera/cluster_user.rb
|
63
62
|
- app/models/klastera/concerns/cluster.rb
|
63
|
+
- app/models/klastera/concerns/cluster_entity.rb
|
64
64
|
- app/models/klastera/concerns/cluster_filter.rb
|
65
65
|
- app/models/klastera/concerns/cluster_user.rb
|
66
66
|
- app/models/klastera/concerns/clusterizable.rb
|
@@ -79,10 +79,12 @@ files:
|
|
79
79
|
- app/views/klastera/clusters/new.html.erb
|
80
80
|
- app/views/klastera/clusters/transfer.html.erb
|
81
81
|
- app/views/klastera/clusters/update.js.erb
|
82
|
+
- app/views/layouts/klastera/_cluster_entity_fields.html.erb
|
82
83
|
- app/views/layouts/klastera/_cluster_filter.html.erb
|
83
84
|
- app/views/layouts/klastera/_cluster_role.html.erb
|
84
85
|
- app/views/layouts/klastera/_cluster_selector.html.erb
|
85
86
|
- app/views/layouts/klastera/_cluster_user_fields.html.erb
|
87
|
+
- app/views/layouts/klastera/_nested_cluster_entity.html.erb
|
86
88
|
- app/views/layouts/klastera/_nested_cluster_user.html.erb
|
87
89
|
- app/views/layouts/klastera/_options.html.erb
|
88
90
|
- config/locales/es.yml
|
@@ -91,48 +93,14 @@ files:
|
|
91
93
|
- db/migrate/20200326111219_add_cluster_options_to_organizations.rb
|
92
94
|
- db/migrate/20200330010551_create_klastera_cluster_users.rb
|
93
95
|
- db/migrate/20200330221601_add_order_field_to_clusters.rb
|
96
|
+
- db/migrate/20200518142609_create_klastera_cluster_entities.rb
|
94
97
|
- lib/klastera.rb
|
95
98
|
- lib/klastera/engine.rb
|
96
99
|
- lib/klastera/version.rb
|
97
100
|
- lib/tasks/klastera_tasks.rake
|
98
101
|
- test/controllers/klastera/clusters_controller_test.rb
|
99
|
-
- test/dummy/README.rdoc
|
100
|
-
- test/dummy/Rakefile
|
101
|
-
- test/dummy/app/assets/javascripts/application.js
|
102
|
-
- test/dummy/app/assets/stylesheets/application.css
|
103
|
-
- test/dummy/app/controllers/application_controller.rb
|
104
|
-
- test/dummy/app/helpers/application_helper.rb
|
105
|
-
- test/dummy/app/views/layouts/application.html.erb
|
106
|
-
- test/dummy/bin/bundle
|
107
|
-
- test/dummy/bin/rails
|
108
|
-
- test/dummy/bin/rake
|
109
|
-
- test/dummy/bin/setup
|
110
|
-
- test/dummy/config.ru
|
111
|
-
- test/dummy/config/application.rb
|
112
|
-
- test/dummy/config/boot.rb
|
113
|
-
- test/dummy/config/database.yml
|
114
|
-
- test/dummy/config/environment.rb
|
115
|
-
- test/dummy/config/environments/development.rb
|
116
|
-
- test/dummy/config/environments/production.rb
|
117
|
-
- test/dummy/config/environments/test.rb
|
118
|
-
- test/dummy/config/initializers/assets.rb
|
119
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
120
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
121
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
122
|
-
- test/dummy/config/initializers/inflections.rb
|
123
|
-
- test/dummy/config/initializers/mime_types.rb
|
124
|
-
- test/dummy/config/initializers/session_store.rb
|
125
|
-
- test/dummy/config/initializers/to_time_preserves_timezone.rb
|
126
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
127
|
-
- test/dummy/config/locales/en.yml
|
128
|
-
- test/dummy/config/routes.rb
|
129
|
-
- test/dummy/config/secrets.yml
|
130
102
|
- test/dummy/log/development.log
|
131
103
|
- test/dummy/log/test.log
|
132
|
-
- test/dummy/public/404.html
|
133
|
-
- test/dummy/public/422.html
|
134
|
-
- test/dummy/public/500.html
|
135
|
-
- test/dummy/public/favicon.ico
|
136
104
|
- test/dummy/tmp/pids/server.pid
|
137
105
|
- test/fixtures/klastera/cluster_users.yml
|
138
106
|
- test/fixtures/klastera/clusters.yml
|
@@ -160,49 +128,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
128
|
- !ruby/object:Gem::Version
|
161
129
|
version: '0'
|
162
130
|
requirements: []
|
163
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.1.2
|
164
132
|
signing_key:
|
165
133
|
specification_version: 4
|
166
134
|
summary: Clusterization Engine
|
167
135
|
test_files:
|
168
|
-
- test/dummy/app/controllers/application_controller.rb
|
169
|
-
- test/dummy/app/views/layouts/application.html.erb
|
170
|
-
- test/dummy/app/assets/javascripts/application.js
|
171
|
-
- test/dummy/app/assets/stylesheets/application.css
|
172
|
-
- test/dummy/app/helpers/application_helper.rb
|
173
|
-
- test/dummy/bin/rake
|
174
|
-
- test/dummy/bin/setup
|
175
|
-
- test/dummy/bin/bundle
|
176
|
-
- test/dummy/bin/rails
|
177
|
-
- test/dummy/config/secrets.yml
|
178
|
-
- test/dummy/config/routes.rb
|
179
|
-
- test/dummy/config/locales/en.yml
|
180
|
-
- test/dummy/config/environments/production.rb
|
181
|
-
- test/dummy/config/environments/development.rb
|
182
|
-
- test/dummy/config/environments/test.rb
|
183
|
-
- test/dummy/config/environment.rb
|
184
|
-
- test/dummy/config/application.rb
|
185
|
-
- test/dummy/config/database.yml
|
186
|
-
- test/dummy/config/boot.rb
|
187
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
188
|
-
- test/dummy/config/initializers/mime_types.rb
|
189
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
190
|
-
- test/dummy/config/initializers/session_store.rb
|
191
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
192
|
-
- test/dummy/config/initializers/assets.rb
|
193
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
194
|
-
- test/dummy/config/initializers/to_time_preserves_timezone.rb
|
195
|
-
- test/dummy/config/initializers/inflections.rb
|
196
|
-
- test/dummy/config.ru
|
197
|
-
- test/dummy/Rakefile
|
198
|
-
- test/dummy/public/favicon.ico
|
199
|
-
- test/dummy/public/422.html
|
200
|
-
- test/dummy/public/500.html
|
201
|
-
- test/dummy/public/404.html
|
202
136
|
- test/dummy/log/test.log
|
203
137
|
- test/dummy/log/development.log
|
204
138
|
- test/dummy/tmp/pids/server.pid
|
205
|
-
- test/dummy/README.rdoc
|
206
139
|
- test/integration/navigation_test.rb
|
207
140
|
- test/models/klastera/cluster_user_test.rb
|
208
141
|
- test/models/klastera/cluster_test.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,56 +0,0 @@
|
|
1
|
-
body { background-color: #fff; color: #333; }
|
2
|
-
|
3
|
-
body, p, ol, ul, td {
|
4
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
-
font-size: 13px;
|
6
|
-
line-height: 18px;
|
7
|
-
}
|
8
|
-
|
9
|
-
pre {
|
10
|
-
background-color: #eee;
|
11
|
-
padding: 10px;
|
12
|
-
font-size: 11px;
|
13
|
-
}
|
14
|
-
|
15
|
-
a { color: #000; }
|
16
|
-
a:visited { color: #666; }
|
17
|
-
a:hover { color: #fff; background-color:#000; }
|
18
|
-
|
19
|
-
div.field, div.actions {
|
20
|
-
margin-bottom: 10px;
|
21
|
-
}
|
22
|
-
|
23
|
-
#notice {
|
24
|
-
color: green;
|
25
|
-
}
|
26
|
-
|
27
|
-
.field_with_errors {
|
28
|
-
padding: 2px;
|
29
|
-
background-color: red;
|
30
|
-
display: table;
|
31
|
-
}
|
32
|
-
|
33
|
-
#error_explanation {
|
34
|
-
width: 450px;
|
35
|
-
border: 2px solid red;
|
36
|
-
padding: 7px;
|
37
|
-
padding-bottom: 0;
|
38
|
-
margin-bottom: 20px;
|
39
|
-
background-color: #f0f0f0;
|
40
|
-
}
|
41
|
-
|
42
|
-
#error_explanation h2 {
|
43
|
-
text-align: left;
|
44
|
-
font-weight: bold;
|
45
|
-
padding: 5px 5px 5px 15px;
|
46
|
-
font-size: 12px;
|
47
|
-
margin: -7px;
|
48
|
-
margin-bottom: 0px;
|
49
|
-
background-color: #c00;
|
50
|
-
color: #fff;
|
51
|
-
}
|
52
|
-
|
53
|
-
#error_explanation ul li {
|
54
|
-
font-size: 12px;
|
55
|
-
list-style: square;
|
56
|
-
}
|
data/test/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
data/test/dummy/bin/setup
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
-
|
7
|
-
Dir.chdir APP_ROOT do
|
8
|
-
# This script is a starting point to setup your application.
|
9
|
-
# Add necessary setup steps to this file:
|
10
|
-
|
11
|
-
puts "== Installing dependencies =="
|
12
|
-
system "gem install bundler --conservative"
|
13
|
-
system "bundle check || bundle install"
|
14
|
-
|
15
|
-
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?("config/database.yml")
|
17
|
-
# system "cp config/database.yml.sample config/database.yml"
|
18
|
-
# end
|
19
|
-
|
20
|
-
puts "\n== Preparing database =="
|
21
|
-
system "bin/rake db:setup"
|
22
|
-
|
23
|
-
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system "rm -f log/*"
|
25
|
-
system "rm -rf tmp/cache"
|
26
|
-
|
27
|
-
puts "\n== Restarting application server =="
|
28
|
-
system "touch tmp/restart.txt"
|
29
|
-
end
|
data/test/dummy/config.ru
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "klastera"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
11
|
-
# Application configuration should go into files in config/initializers
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
-
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
-
# config.i18n.default_locale = :de
|
21
|
-
|
22
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
-
config.active_record.raise_in_transactional_callbacks = true
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
data/test/dummy/config/boot.rb
DELETED