cruj_cruj_cruj_visagio 1.0.2 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/cruj_cruj_cruj_controller.rb +52 -34
- data/app/views/cruj_cruj_cruj/_filters.html.erb +1 -1
- data/config/locales/en.yml +99 -0
- data/config/locales/pt-BR.yml +6 -0
- data/lib/cruj_cruj_cruj/services/import_rules.rb +47 -27
- data/lib/cruj_cruj_cruj/version.rb +1 -1
- data/lib/cruj_cruj_cruj_visagio.rb +1 -1
- metadata +38 -38
- data/app/helpers/search_helper.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 897d93cc6090fdcf792337edfc8b4093554513608250d85bd862c6a5f441b8ad
|
4
|
+
data.tar.gz: 108e146fcfea55ddc1de41fdd057baba1950ca71c78107942882137c9bc3f4cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f0c69d085fdd6d10e541307f0849629ac140e74e06d97a6a0cabf7224aeb96620ca63dbccc0529811b03e563f990392543cd04a7194004f8f585565118bd120
|
7
|
+
data.tar.gz: e3caac92c7a2c21182f6cc0cc6211d296dc3b503cf97a08e237b031e18246c96a177957191279c593f2648aba3e3f069d9be206f063ff727811c78842feabca1
|
@@ -1,16 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class CrujCrujCrujController < ApplicationController
|
2
4
|
include ActionView::Helpers::NumberHelper
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
before_action :before_index, only: [:index]
|
7
|
+
before_action :before_new, only: [:new]
|
8
|
+
before_action :before_create, only: [:create]
|
9
|
+
before_action :before_edit, only: [:edit]
|
10
|
+
before_action :before_update, only: [:update]
|
11
|
+
before_action :before_destroy, only: [:destroy]
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
before_action :find_all_resources, only: [:index]
|
14
|
+
before_action :build_resource, only: %i[new create]
|
15
|
+
before_action :find_resource, only: %i[edit update destroy]
|
14
16
|
|
15
17
|
helper_method :namespace_url, :namespaces, :model_class, :snake_case_model_name,
|
16
18
|
:resource_url,
|
@@ -20,6 +22,7 @@ class CrujCrujCrujController < ApplicationController
|
|
20
22
|
:filter_for
|
21
23
|
|
22
24
|
def index; end
|
25
|
+
|
23
26
|
def new; end
|
24
27
|
|
25
28
|
def create
|
@@ -52,12 +55,13 @@ class CrujCrujCrujController < ApplicationController
|
|
52
55
|
@q.sorts = default_sort if @q.sorts.blank?
|
53
56
|
|
54
57
|
filename = CrujCrujCruj::Services::ImportRules.export_template(form_fields, @q.result)
|
55
|
-
send_file(filename,
|
58
|
+
send_file(filename, type: 'application/vnd.ms-excel')
|
56
59
|
end
|
57
60
|
|
58
61
|
def import
|
59
62
|
if params[:file].blank?
|
60
|
-
redirect_to url_for(action: :index, controller: params[:controller]),
|
63
|
+
redirect_to url_for(action: :index, controller: params[:controller]),
|
64
|
+
{ flash: { error: l(:no_file_to_import_error_message) } }
|
61
65
|
return
|
62
66
|
end
|
63
67
|
|
@@ -67,16 +71,24 @@ class CrujCrujCrujController < ApplicationController
|
|
67
71
|
redirect_to url_for(action: :index, controller: params[:controller]), notice: l(:import_success_message)
|
68
72
|
return
|
69
73
|
end
|
70
|
-
redirect_to url_for(action: :index, controller: params[:controller]),
|
74
|
+
redirect_to url_for(action: :index, controller: params[:controller]),
|
75
|
+
flash: { import_errors: errors.join('<br />') }
|
71
76
|
end
|
72
77
|
|
73
78
|
protected
|
74
79
|
|
75
|
-
def before_index
|
80
|
+
def before_index
|
81
|
+
params['q'] && params['q'].permit!
|
82
|
+
end
|
83
|
+
|
76
84
|
def before_new; end
|
85
|
+
|
77
86
|
def before_create; end
|
87
|
+
|
78
88
|
def before_edit; end
|
89
|
+
|
79
90
|
def before_update; end
|
91
|
+
|
80
92
|
def before_destroy; end
|
81
93
|
|
82
94
|
def find_all_resources
|
@@ -137,7 +149,7 @@ class CrujCrujCrujController < ApplicationController
|
|
137
149
|
|
138
150
|
def resource_url(resource)
|
139
151
|
if Rails::VERSION::MAJOR >= 4
|
140
|
-
namespace_url + [resource] + [
|
152
|
+
namespace_url + [resource] + [resource.respond_to?(:type) ? { 'type' => resource.type } : {}]
|
141
153
|
else
|
142
154
|
namespace_url + [resource]
|
143
155
|
end
|
@@ -148,7 +160,7 @@ class CrujCrujCrujController < ApplicationController
|
|
148
160
|
end
|
149
161
|
|
150
162
|
def exclude_index_attributes
|
151
|
-
%w
|
163
|
+
%w[^id$ _id created_at updated_at]
|
152
164
|
end
|
153
165
|
|
154
166
|
def index_filter_attributes
|
@@ -156,7 +168,9 @@ class CrujCrujCrujController < ApplicationController
|
|
156
168
|
end
|
157
169
|
|
158
170
|
def default_sort
|
159
|
-
index_filter_attributes.map
|
171
|
+
index_filter_attributes.map do |ifa|
|
172
|
+
ifa.is_a?(Array) ? "#{ifa[0].split('_')[0..-2].join('_')} asc" : "#{ifa.split('_')[0..-2].join('_')} asc"
|
173
|
+
end
|
160
174
|
end
|
161
175
|
|
162
176
|
def exclude_index_filter_attributes
|
@@ -173,11 +187,11 @@ class CrujCrujCrujController < ApplicationController
|
|
173
187
|
else
|
174
188
|
possible_values[send("format_field_#{field.class.name.downcase}", field)]
|
175
189
|
end
|
176
|
-
rescue
|
190
|
+
rescue StandardError
|
177
191
|
field.name
|
178
192
|
end
|
179
193
|
|
180
|
-
def format_field_nilclass(
|
194
|
+
def format_field_nilclass(_field)
|
181
195
|
''
|
182
196
|
end
|
183
197
|
|
@@ -185,18 +199,18 @@ class CrujCrujCrujController < ApplicationController
|
|
185
199
|
field
|
186
200
|
end
|
187
201
|
|
188
|
-
def format_field_trueclass(
|
202
|
+
def format_field_trueclass(_field)
|
189
203
|
t(:true_field)
|
190
204
|
end
|
191
205
|
|
192
|
-
def format_field_falseclass(
|
206
|
+
def format_field_falseclass(_field)
|
193
207
|
t(:false_field)
|
194
208
|
end
|
195
209
|
|
196
210
|
def format_field_fixnum(field)
|
197
211
|
number_with_delimiter(field)
|
198
212
|
end
|
199
|
-
|
213
|
+
|
200
214
|
def format_field_integer(field)
|
201
215
|
number_with_delimiter(field)
|
202
216
|
end
|
@@ -207,62 +221,66 @@ class CrujCrujCrujController < ApplicationController
|
|
207
221
|
|
208
222
|
def filter_for(attribute)
|
209
223
|
if attribute.is_a? Array
|
210
|
-
send(
|
224
|
+
send('filter_for_enum', attribute[0], attribute[1])
|
211
225
|
elsif column = model_class.columns_hash[attribute.to_s]
|
212
226
|
send("filter_for_#{column.type}", attribute)
|
213
227
|
else
|
214
228
|
send("filter_for_#{attribute}")
|
215
229
|
end
|
216
|
-
rescue
|
230
|
+
rescue StandardError
|
217
231
|
"#{attribute}_cont"
|
218
232
|
end
|
219
233
|
|
234
|
+
def filter_for_integer(attribute)
|
235
|
+
"#{attribute}_eq"
|
236
|
+
end
|
237
|
+
|
220
238
|
def filter_for_boolean(attribute)
|
221
239
|
"#{attribute}_true"
|
222
240
|
end
|
223
241
|
|
224
242
|
def filter_for_project
|
225
|
-
|
243
|
+
'project_name_cont'
|
226
244
|
end
|
227
245
|
|
228
246
|
def filter_for_tracker
|
229
|
-
|
247
|
+
'tracker_name_cont'
|
230
248
|
end
|
231
249
|
|
232
250
|
def filter_for_group
|
233
|
-
|
251
|
+
'group_lastname_cont'
|
234
252
|
end
|
235
253
|
|
236
254
|
def filter_for_status
|
237
|
-
|
255
|
+
'status_name_cont'
|
238
256
|
end
|
239
257
|
|
240
258
|
def filter_for_issue_status
|
241
|
-
|
259
|
+
'issue_status_name_cont'
|
242
260
|
end
|
243
261
|
|
244
262
|
def filter_for_status_to
|
245
|
-
|
263
|
+
'status_to_name_cont'
|
246
264
|
end
|
247
265
|
|
248
266
|
def filter_for_status_from
|
249
|
-
|
267
|
+
'status_from_name_cont'
|
250
268
|
end
|
251
269
|
|
252
270
|
def filter_for_custom_field
|
253
|
-
|
271
|
+
'custom_field_name_cont'
|
254
272
|
end
|
255
273
|
|
256
274
|
def filter_for_author
|
257
|
-
|
275
|
+
'author_firstname_or_author_lastname_cont'
|
258
276
|
end
|
259
277
|
|
260
278
|
def filter_for_principal
|
261
|
-
|
279
|
+
'principal_firstname_or_principal_lastname_cont'
|
262
280
|
end
|
263
281
|
|
264
282
|
def filter_for_role
|
265
|
-
|
283
|
+
'role_name_cont'
|
266
284
|
end
|
267
285
|
|
268
286
|
def filter_for_enum(attribute, values)
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<%= f.select attribute_name, attribute_values.map { |k,v| [v,k] }, { include_blank: t(:all_field), selected: params[:q] ? params[:q][attribute_name] : '' } %>
|
16
16
|
<% elsif attribute_name =~ /true/ %>
|
17
17
|
<%= f.select attribute_name, [[t(:true_field), 1], [t(:false_field), 0]], { include_blank: t(:all_field), selected: params[:q] ? params[:q][attribute_name] : '' } %>
|
18
|
-
<% elsif attribute_name =~ /cont/ %>
|
18
|
+
<% elsif attribute_name =~ /cont|eq/ %>
|
19
19
|
<%= f.search_field attribute_name %>
|
20
20
|
<% else %>
|
21
21
|
<%= render "#{attribute_name}_filter" %>
|
@@ -0,0 +1,99 @@
|
|
1
|
+
en:
|
2
|
+
true_field: 'Yes'
|
3
|
+
false_field: 'No'
|
4
|
+
all_field: All
|
5
|
+
label_principal: Assigned To
|
6
|
+
label_issue_status: 'Status'
|
7
|
+
label_status_from: Status From
|
8
|
+
label_status_to: Status To
|
9
|
+
label_name: Name
|
10
|
+
label_type: Type
|
11
|
+
|
12
|
+
no_file_to_import_error_message: No file was uploaded. Please try again after uploading a file.
|
13
|
+
column_invalid_rows: "The column %{column} was invalid in the following rows: %{rows}"
|
14
|
+
|
15
|
+
project_name_cont: Project Name contains
|
16
|
+
tracker_name_cont: Tracker Name contains
|
17
|
+
custom_field_name_cont: Custom Field Name contains
|
18
|
+
group_lastname_cont: Group Name contains
|
19
|
+
issue_status_name_cont: Status Name contains
|
20
|
+
status_from_name_cont: Status From Name contains
|
21
|
+
status_to_name_cont: Status To Name contains
|
22
|
+
custom_field_value_cont: Custom Field Value contains
|
23
|
+
principal_firstname_or_principal_lastname_cont: Assigned To contains
|
24
|
+
type_cont: Type contains
|
25
|
+
|
26
|
+
export_template_label: Export Template
|
27
|
+
import_template_label: Import Template
|
28
|
+
|
29
|
+
entry_delete_confirmation_message: Are you sure you want to delete this record?
|
30
|
+
|
31
|
+
ransack:
|
32
|
+
search: search
|
33
|
+
predicate: predicate
|
34
|
+
and: and
|
35
|
+
or: or
|
36
|
+
any: any
|
37
|
+
all: all
|
38
|
+
combinator: combinator
|
39
|
+
attribute: attribute
|
40
|
+
value: value
|
41
|
+
condition: condition
|
42
|
+
sort: sort
|
43
|
+
asc: ascendent
|
44
|
+
desc: descendent
|
45
|
+
predicates:
|
46
|
+
eq: equal
|
47
|
+
eq_any: equal to any
|
48
|
+
eq_all: equal to all
|
49
|
+
not_eq: not equal
|
50
|
+
not_eq_any: not equal to any
|
51
|
+
not_eq_all: not equal to all
|
52
|
+
matches: matches
|
53
|
+
matches_any: matches any
|
54
|
+
matches_all: matches all
|
55
|
+
does_not_match: does not match
|
56
|
+
does_not_match_any: does not match any
|
57
|
+
does_not_match_all: does not match all
|
58
|
+
lt: less than
|
59
|
+
lt_any: less than any
|
60
|
+
lt_all: less than all
|
61
|
+
lteq: less than or equal
|
62
|
+
lteq_any: less than or equal to any
|
63
|
+
lteq_all: less than or equal to all
|
64
|
+
gt: greater than
|
65
|
+
gt_any: greater than any
|
66
|
+
gt_all: greater than all
|
67
|
+
gteq: greater than or equal
|
68
|
+
gteq_any: greater than or equal to any
|
69
|
+
gteq_all: greater than or equal to all
|
70
|
+
in: in
|
71
|
+
in_any: in any
|
72
|
+
in_all: in all
|
73
|
+
not_in: not in
|
74
|
+
not_in_any: not in any
|
75
|
+
not_in_all: not in all
|
76
|
+
cont: contains
|
77
|
+
cont_any: contains any
|
78
|
+
cont_all: contains all
|
79
|
+
not_cont: not contains
|
80
|
+
not_cont_any: not contains any
|
81
|
+
not_cont_all: not contains all
|
82
|
+
start: starts with
|
83
|
+
start_any: starts with any
|
84
|
+
start_all: starts with all
|
85
|
+
not_start: not starts with
|
86
|
+
not_start_any: not starts with any
|
87
|
+
not_start_all: not starts with all
|
88
|
+
end: ends with
|
89
|
+
end_any: ends with any
|
90
|
+
end_all: ends with all
|
91
|
+
not_end: not ends with
|
92
|
+
not_end_any: not ends with any
|
93
|
+
not_end_all: not ends with all
|
94
|
+
'true': 'true'
|
95
|
+
'false': 'false'
|
96
|
+
present: present
|
97
|
+
blank: blank
|
98
|
+
'null': 'null'
|
99
|
+
not_null: 'not null'
|
data/config/locales/pt-BR.yml
CHANGED
@@ -4,8 +4,14 @@ pt-BR:
|
|
4
4
|
all_field: Todos
|
5
5
|
label_principal: 'Atribuído para'
|
6
6
|
label_issue_status: 'Status'
|
7
|
+
label_status_from: Status De
|
8
|
+
label_status_to: Status Para
|
9
|
+
label_name: Nome
|
7
10
|
label_type: Tipo
|
8
11
|
|
12
|
+
no_file_to_import_error_message: Nenhum arquivo foi submetido. Tente novamente depois de escolher um arquivo.
|
13
|
+
column_invalid_rows: "A coluna %{column} está inválida nas seguintes fileiras: %{rows}"
|
14
|
+
|
9
15
|
project_name_cont: Nome do projeto contém
|
10
16
|
tracker_name_cont: Nome do tipo da tarefa contém
|
11
17
|
custom_field_name_cont: Nome do campo customizado contém
|
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module CrujCrujCruj
|
3
4
|
module Services
|
4
5
|
class ImportRules
|
5
|
-
|
6
6
|
def self.export_template(fields, data)
|
7
7
|
package = Axlsx::Package.new
|
8
8
|
workbook = package.workbook
|
@@ -10,7 +10,8 @@ module CrujCrujCruj
|
|
10
10
|
parameters_sheet_name = 'PARAMETERS'
|
11
11
|
|
12
12
|
workbook.add_worksheet(name: 'TEMPLATE') do |sheet|
|
13
|
-
title = sheet.styles.add_style(bg_color: 'FF007E7A', fg_color: 'FFFFFFFF', sz: 12,
|
13
|
+
title = sheet.styles.add_style(bg_color: 'FF007E7A', fg_color: 'FFFFFFFF', sz: 12, b: true,
|
14
|
+
border: { style: :thin, color: 'FF000000' })
|
14
15
|
|
15
16
|
fields.each_with_index do |field, idx|
|
16
17
|
validation = field[:data_validation][:validation]
|
@@ -18,10 +19,16 @@ module CrujCrujCruj
|
|
18
19
|
add_data_validation(sheet, idx + 1, validation, allow_blank, parameters_sheet_name) if validation
|
19
20
|
end
|
20
21
|
|
21
|
-
sheet.add_row (([:id] |fields.map
|
22
|
+
sheet.add_row (([:id] | fields.map do |field|
|
23
|
+
field[:field_name]
|
24
|
+
end).map { |t| I18n.t("#{t}_label") }), style: title
|
22
25
|
|
23
|
-
data.map
|
24
|
-
|
26
|
+
data.map do |resource|
|
27
|
+
[resource.id].concat(fields.map do |field|
|
28
|
+
resource_field_value(resource, field)
|
29
|
+
end)
|
30
|
+
end.each do |row|
|
31
|
+
sheet.add_row row, types: row.map { |_| :string }
|
25
32
|
end
|
26
33
|
end
|
27
34
|
|
@@ -36,37 +43,45 @@ module CrujCrujCruj
|
|
36
43
|
spreadsheet = Roo::Spreadsheet.open(file.path, extension: :xlsx)
|
37
44
|
|
38
45
|
errors = []
|
39
|
-
|
40
|
-
if Rails::VERSION::MAJOR < 4
|
41
|
-
|
42
|
-
|
43
|
-
|
46
|
+
|
47
|
+
invalid_rows = if Rails::VERSION::MAJOR < 4
|
48
|
+
validate_id_array(spreadsheet, clazz)
|
49
|
+
else
|
50
|
+
validate_id(spreadsheet, clazz)
|
51
|
+
end
|
52
|
+
unless invalid_rows.blank?
|
53
|
+
errors << I18n.t(:column_invalid_rows, column: :id,
|
54
|
+
rows: invalid_rows.first(25).join(', '))
|
44
55
|
end
|
45
|
-
errors << I18n.t(:column_invalid_rows, column: :id, rows: invalid_rows.first(25).join(', ')) unless invalid_rows.blank?
|
46
56
|
|
47
57
|
fields.each_with_index do |field, idx|
|
48
58
|
col = idx + 1
|
49
59
|
unless field[:data_validation][:allow_blank]
|
50
60
|
invalid_rows = validate_not_blank(col, spreadsheet)
|
51
|
-
|
61
|
+
unless invalid_rows.blank?
|
62
|
+
errors << I18n.t(:column_invalid_rows, column: field[:field_name],
|
63
|
+
rows: invalid_rows.first(25).join(', '))
|
64
|
+
end
|
52
65
|
end
|
53
66
|
|
54
|
-
|
55
|
-
|
56
|
-
|
67
|
+
next unless field[:data_validation][:validation]
|
68
|
+
|
69
|
+
invalid_rows = validate_in_array(col, field_validation_values(field), spreadsheet)
|
70
|
+
unless invalid_rows.blank?
|
71
|
+
errors << I18n.t(:column_invalid_rows, column: field[:field_name],
|
72
|
+
rows: invalid_rows.first(25).join(', '))
|
57
73
|
end
|
58
74
|
end
|
59
75
|
|
60
76
|
return errors unless errors.blank?
|
61
77
|
|
62
|
-
|
63
78
|
(2..spreadsheet.last_row).each do |i|
|
64
79
|
row = spreadsheet.row(i)
|
65
80
|
id = row[0]
|
66
81
|
resource = id ? clazz.find(id) : clazz.new
|
67
82
|
|
68
83
|
fields.each_with_index do |field, idx|
|
69
|
-
resource.send("#{field[:field_name]}=", row_value(row, idx+1, field, spreadsheet))
|
84
|
+
resource.send("#{field[:field_name]}=", row_value(row, idx + 1, field, spreadsheet))
|
70
85
|
resource.save!
|
71
86
|
end
|
72
87
|
end
|
@@ -74,13 +89,11 @@ module CrujCrujCruj
|
|
74
89
|
{}
|
75
90
|
end
|
76
91
|
|
77
|
-
protected
|
78
|
-
|
79
|
-
|
80
92
|
def self.add_data_validation(sheet, column_number, validation, allowBlank, parameters_sheet_name)
|
81
93
|
column_letter = number2column(column_number)
|
82
94
|
values_size = validation.is_a?(Array) ? validation.size : validation[:clazz].all.count
|
83
|
-
sheet.add_data_validation("#{column_letter}2:#{column_letter}1048576", type: :list, allowBlank: allowBlank,
|
95
|
+
sheet.add_data_validation("#{column_letter}2:#{column_letter}1048576", type: :list, allowBlank: allowBlank,
|
96
|
+
formula1: "#{parameters_sheet_name}!$#{column_letter}$2:$#{column_letter}$#{values_size + 1}")
|
84
97
|
end
|
85
98
|
|
86
99
|
def self.create_validations(fields, workbook, parameters_sheet_name)
|
@@ -91,7 +104,7 @@ module CrujCrujCruj
|
|
91
104
|
|
92
105
|
cols_values.map { |values| values.size }.max.times do |i|
|
93
106
|
row = cols_values.map { |v| v[i] }
|
94
|
-
sheet.add_row row, types: row.map{ |_| :string }
|
107
|
+
sheet.add_row row, types: row.map { |_| :string }
|
95
108
|
end
|
96
109
|
end
|
97
110
|
end
|
@@ -120,7 +133,7 @@ module CrujCrujCruj
|
|
120
133
|
end
|
121
134
|
|
122
135
|
def self.number2column(number)
|
123
|
-
Hash.new {|hash,key| hash[key] = hash[key - 1].next }.merge({0 =>
|
136
|
+
Hash.new { |hash, key| hash[key] = hash[key - 1].next }.merge({ 0 => 'A' })[number]
|
124
137
|
end
|
125
138
|
|
126
139
|
def self.validate_id(spreadsheet, clazz)
|
@@ -133,7 +146,7 @@ module CrujCrujCruj
|
|
133
146
|
|
134
147
|
def self.validate_not_blank(col, spreadsheet)
|
135
148
|
(2..spreadsheet.last_row)
|
136
|
-
.map { |i| {i => !spreadsheet.row(i)[col].blank? } }
|
149
|
+
.map { |i| { i => !spreadsheet.row(i)[col].blank? } }
|
137
150
|
.select { |e| !e.values.first }
|
138
151
|
.map { |e| e.keys.first }
|
139
152
|
end
|
@@ -146,12 +159,19 @@ module CrujCrujCruj
|
|
146
159
|
end
|
147
160
|
|
148
161
|
def self.fetch(row, col, spreadsheet)
|
149
|
-
spreadsheet.celltype(row,
|
162
|
+
if spreadsheet.celltype(row,
|
163
|
+
col + 1) == :float
|
164
|
+
spreadsheet.send(:cell_to_csv, row, col + 1,
|
165
|
+
spreadsheet.default_sheet)
|
166
|
+
else
|
167
|
+
row[col]
|
168
|
+
end
|
150
169
|
end
|
151
170
|
|
152
171
|
def self.row_value(row, col, field, spreadsheet)
|
153
172
|
if field[:data_validation][:validation] && !field[:data_validation][:validation].is_a?(Array)
|
154
|
-
field[:data_validation][:validation][:clazz].send("find_by_#{field[:data_validation][:validation][:field]}",
|
173
|
+
field[:data_validation][:validation][:clazz].send("find_by_#{field[:data_validation][:validation][:field]}",
|
174
|
+
fetch(row, col, spreadsheet))
|
155
175
|
else
|
156
176
|
fetch(row, col, spreadsheet)
|
157
177
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cruj_cruj_cruj_visagio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Visagio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5'
|
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: '
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ransack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +67,19 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: caxlsx
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,13 +107,13 @@ files:
|
|
107
107
|
- app/assets/javascripts/cruj_cruj_cruj/application.js
|
108
108
|
- app/assets/stylesheets/cruj_cruj_cruj/application.css
|
109
109
|
- app/controllers/cruj_cruj_cruj_controller.rb
|
110
|
-
- app/helpers/search_helper.rb
|
111
110
|
- app/views/cruj_cruj_cruj/_filters.html.erb
|
112
111
|
- app/views/cruj_cruj_cruj/_import_export_template.html.erb
|
113
112
|
- app/views/cruj_cruj_cruj/_list_table.html.erb
|
114
113
|
- app/views/cruj_cruj_cruj/edit.html.erb
|
115
114
|
- app/views/cruj_cruj_cruj/new.html.erb
|
116
115
|
- app/views/layouts/cruj_cruj_cruj/application.html.erb
|
116
|
+
- config/locales/en.yml
|
117
117
|
- config/locales/pt-BR.yml
|
118
118
|
- config/routes.rb
|
119
119
|
- lib/cruj_cruj_cruj/engine.rb
|
@@ -182,40 +182,40 @@ signing_key:
|
|
182
182
|
specification_version: 4
|
183
183
|
summary: Crud Generator for Redmine
|
184
184
|
test_files:
|
185
|
-
- test/
|
186
|
-
- test/dummy/README.rdoc
|
187
|
-
- test/dummy/config/environment.rb
|
188
|
-
- test/dummy/config/routes.rb
|
189
|
-
- test/dummy/config/database.yml
|
190
|
-
- test/dummy/config/secrets.yml
|
191
|
-
- test/dummy/config/application.rb
|
192
|
-
- test/dummy/config/initializers/mime_types.rb
|
193
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
194
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
195
|
-
- test/dummy/config/initializers/assets.rb
|
196
|
-
- test/dummy/config/initializers/inflections.rb
|
197
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
198
|
-
- test/dummy/config/initializers/session_store.rb
|
199
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
200
|
-
- test/dummy/config/boot.rb
|
201
|
-
- test/dummy/config/environments/test.rb
|
202
|
-
- test/dummy/config/environments/production.rb
|
203
|
-
- test/dummy/config/environments/development.rb
|
204
|
-
- test/dummy/config/locales/en.yml
|
205
|
-
- test/dummy/app/views/layouts/application.html.erb
|
185
|
+
- test/cruj_cruj_cruj_test.rb
|
206
186
|
- test/dummy/app/assets/javascripts/application.js
|
207
187
|
- test/dummy/app/assets/stylesheets/application.css
|
208
|
-
- test/dummy/app/helpers/application_helper.rb
|
209
188
|
- test/dummy/app/controllers/application_controller.rb
|
210
|
-
- test/dummy/
|
211
|
-
- test/dummy/
|
212
|
-
- test/dummy/bin/rails
|
189
|
+
- test/dummy/app/helpers/application_helper.rb
|
190
|
+
- test/dummy/app/views/layouts/application.html.erb
|
213
191
|
- test/dummy/bin/bundle
|
192
|
+
- test/dummy/bin/rails
|
214
193
|
- test/dummy/bin/rake
|
215
|
-
- test/dummy/
|
216
|
-
- test/dummy/
|
194
|
+
- test/dummy/bin/setup
|
195
|
+
- test/dummy/config/application.rb
|
196
|
+
- test/dummy/config/boot.rb
|
197
|
+
- test/dummy/config/database.yml
|
198
|
+
- test/dummy/config/environment.rb
|
199
|
+
- test/dummy/config/environments/development.rb
|
200
|
+
- test/dummy/config/environments/production.rb
|
201
|
+
- test/dummy/config/environments/test.rb
|
202
|
+
- test/dummy/config/initializers/assets.rb
|
203
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
204
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
205
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
206
|
+
- test/dummy/config/initializers/inflections.rb
|
207
|
+
- test/dummy/config/initializers/mime_types.rb
|
208
|
+
- test/dummy/config/initializers/session_store.rb
|
209
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
210
|
+
- test/dummy/config/locales/en.yml
|
211
|
+
- test/dummy/config/routes.rb
|
212
|
+
- test/dummy/config/secrets.yml
|
213
|
+
- test/dummy/config.ru
|
217
214
|
- test/dummy/public/404.html
|
218
215
|
- test/dummy/public/422.html
|
216
|
+
- test/dummy/public/500.html
|
217
|
+
- test/dummy/public/favicon.ico
|
218
|
+
- test/dummy/Rakefile
|
219
|
+
- test/dummy/README.rdoc
|
219
220
|
- test/integration/navigation_test.rb
|
220
|
-
- test/cruj_cruj_cruj_test.rb
|
221
221
|
- test/test_helper.rb
|
File without changes
|