eac_rails_utils 0.10.1 → 0.11.0
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 +4 -4
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper.rb +5 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder.rb +10 -2
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/association_select_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/common_text_fields.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/currency_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/date_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/fields_for.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/file_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/radio_select_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/searchable_association_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/select_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/time_field.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/year_month_field.rb +1 -1
- data/app/helpers/eac_rails_utils/data_table_helper.rb +13 -0
- data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/column.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/data_table.rb +2 -2
- data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/setup.rb +2 -2
- data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper.rb +5 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/bootstrap_gui_builder.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/data_builder.rb +1 -1
- data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/gui_builder.rb +1 -1
- data/{lib/eac → app/validators/eac_rails_utils}/cpf_validator.rb +1 -1
- data/{lib/eac → app/validators/eac_rails_utils}/no_presence_validator.rb +1 -1
- data/lib/eac_rails_utils.rb +2 -39
- data/lib/eac_rails_utils/engine.rb +2 -0
- data/lib/{eac → eac_rails_utils}/htmlbeautifier.rb +1 -1
- data/lib/eac_rails_utils/models.rb +9 -0
- data/lib/eac_rails_utils/models/attribute_required.rb +43 -0
- data/lib/eac_rails_utils/models/fetch_errors.rb +92 -0
- data/lib/eac_rails_utils/models/inequality_queries.rb +39 -0
- data/lib/eac_rails_utils/models/tableless.rb +97 -0
- data/lib/eac_rails_utils/models/test_utils.rb +65 -0
- data/lib/eac_rails_utils/patches.rb +9 -0
- data/lib/eac_rails_utils/patches/action_controller_base.rb +2 -0
- data/lib/eac_rails_utils/version.rb +1 -1
- data/test/dummy/app/models/user.rb +4 -0
- data/test/{lib/eac → helpers/eac_rails_utils}/common_form_helper_test.rb +2 -2
- data/test/{lib/eac → helpers/eac_rails_utils}/data_table_test_helper_test.rb +2 -2
- data/test/{app/helpers → helpers}/eac_rails_utils/formatter_helper_test.rb +0 -0
- data/test/lib/eac_rails_utils/{patches/model_attribute_required_test.rb → models/attribute_required_test.rb} +1 -0
- data/test/lib/eac_rails_utils/models/fetch_errors_test.rb +80 -0
- data/test/lib/eac_rails_utils/models/tableless_test.rb +25 -0
- data/test/{lib/eac → validators}/cpf_validator_test.rb +2 -2
- metadata +63 -64
- data/lib/eac/data_table_helper.rb +0 -13
- data/lib/eac/inequality_queries.rb +0 -37
- data/lib/eac/model.rb +0 -90
- data/lib/eac/test_utils.rb +0 -61
- data/lib/eac_rails_utils/patches/model_attribute_required.rb +0 -34
- data/lib/eac_rails_utils/patches/ofx_parser.rb +0 -43
- data/lib/eac_rails_utils/tableless_model.rb +0 -92
- data/test/lib/eac/model_test.rb +0 -78
- data/test/lib/eac/source_target_fixtures_test_files/a.source.html +0 -1
- data/test/lib/eac/source_target_fixtures_test_files/a.target.yaml +0 -1
- data/test/lib/eac/source_target_fixtures_test_files/b.source.html +0 -1
- data/test/lib/eac/source_target_fixtures_test_files/c.target.yaml +0 -1
- data/test/lib/eac_rails_utils/tableless_model_test.rb +0 -23
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacRailsUtils
|
4
|
+
module Models
|
5
|
+
# == Example:
|
6
|
+
#
|
7
|
+
# Note: model Product has a attribute "foo" Date, Time or Number:
|
8
|
+
#
|
9
|
+
# class Product
|
10
|
+
# include ::EacRailsUtils::Models::InequalityQueries
|
11
|
+
#
|
12
|
+
# add_inequality_queries(:foo)
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# This add the following scopes:
|
16
|
+
#
|
17
|
+
# Product.by_foo_gt(value) # Equivalent to Product.where("foo > ?", value)
|
18
|
+
# Product.by_foo_gteq(value) # Equivalent to Product.where("foo >= ?", value)
|
19
|
+
# Product.by_foo_lt(value) # Equivalent to Product.where("foo < ?", value)
|
20
|
+
# Product.by_foo_lteq(value) # Equivalent to Product.where("foo <= ?", value)
|
21
|
+
module InequalityQueries
|
22
|
+
class << self
|
23
|
+
def included(base)
|
24
|
+
base.extend(ClassMethods)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module ClassMethods
|
29
|
+
def add_inequality_queries(attribute)
|
30
|
+
%w[gt gteq lt lteq].each do |ineq|
|
31
|
+
scope "by_#{attribute}_#{ineq}", lambda { |v|
|
32
|
+
where(arel_table[attribute].send(ineq, v))
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'activemodel/associations'
|
4
|
+
require 'virtus'
|
5
|
+
|
6
|
+
module EacRailsUtils
|
7
|
+
module Models
|
8
|
+
class Tableless
|
9
|
+
include ActiveModel::Model
|
10
|
+
include Virtus.model
|
11
|
+
include ActiveModel::Associations
|
12
|
+
|
13
|
+
def initialize(values = {})
|
14
|
+
super(build_attributes(values))
|
15
|
+
end
|
16
|
+
|
17
|
+
def attributes=(values)
|
18
|
+
super(build_attributes(values))
|
19
|
+
end
|
20
|
+
|
21
|
+
# need hash like accessor, used internal Rails
|
22
|
+
def [](attr)
|
23
|
+
send(attr)
|
24
|
+
end
|
25
|
+
|
26
|
+
# need hash like accessor, used internal Rails
|
27
|
+
def []=(attr, value)
|
28
|
+
send("#{attr}=", value)
|
29
|
+
end
|
30
|
+
|
31
|
+
def save!
|
32
|
+
save || raise("#{self.class}.save failed: #{errors.messages}")
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def build_attributes(values)
|
38
|
+
AttributesBuilder.new(self.class, values).to_attributes
|
39
|
+
end
|
40
|
+
|
41
|
+
class AttributesBuilder
|
42
|
+
DATE_TIME_FIELDS = %i[year month day hour min sec].freeze
|
43
|
+
|
44
|
+
def initialize(model_class, values)
|
45
|
+
@model_class = model_class
|
46
|
+
@values = {}
|
47
|
+
values.each { |k, v| add(k, v) }
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_attributes
|
51
|
+
@values
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def add(key, value)
|
57
|
+
array_attr = parse_array_attr_key(key)
|
58
|
+
if array_attr
|
59
|
+
array_value_set(array_attr, value)
|
60
|
+
else
|
61
|
+
@values[key] = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def parse_array_attr_key(key)
|
66
|
+
m = /\A(.+)\(([0-9]+)(.)\)\z/.match(key)
|
67
|
+
return unless m
|
68
|
+
|
69
|
+
::OpenStruct.new(key: m[1], index: m[2].to_i - 1, converter: array_value_converter(m[3]))
|
70
|
+
end
|
71
|
+
|
72
|
+
def array_value_set(array_attr, value)
|
73
|
+
@values[array_attr.key] ||= {}
|
74
|
+
@values[array_attr.key].merge!(
|
75
|
+
DATE_TIME_FIELDS[array_attr.index] => value.send(array_attr.converter)
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
def array_value_converter(str_type)
|
80
|
+
case str_type
|
81
|
+
when 'i'
|
82
|
+
'to_i'
|
83
|
+
else
|
84
|
+
raise "Unknown array type: \"#{str_type}\""
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def date_time_attribute?(key)
|
89
|
+
attr = @model_class.attributes[key]
|
90
|
+
return false unless attr
|
91
|
+
|
92
|
+
raise attr.to_s
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacRailsUtils
|
4
|
+
module Models
|
5
|
+
module TestUtils
|
6
|
+
# Add more helper methods to be used by all tests here...
|
7
|
+
def valid_invalid_column_values_test(record, column, valid_values, invalid_values)
|
8
|
+
valid_values.each do |v|
|
9
|
+
record.send("#{column}=", v)
|
10
|
+
assert record.valid?,
|
11
|
+
"#{record.errors.messages}, #{column} = #{v.inspect} should be valid"
|
12
|
+
end
|
13
|
+
invalid_values.each do |v|
|
14
|
+
record.send("#{column}=", v)
|
15
|
+
assert_not record.valid?, "#{column} = #{v.inspect} should be invalid"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# Verifica falhas em campos específicos de um record
|
20
|
+
def assert_record_errors(record, fields_without_error, fields_with_error)
|
21
|
+
fields_without_error.each do |c|
|
22
|
+
assert record.errors[c].empty?,
|
23
|
+
"Column: #{c} should not have errors (#{record.errors[c]})"
|
24
|
+
end
|
25
|
+
fields_with_error. each do |c|
|
26
|
+
assert_not record.errors[c].empty?, "Column: #{c} should have errors"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Verifica, campo por campo, se invalida o registro.
|
31
|
+
def assert_column_changes(ppp, expected_valid_result, changes)
|
32
|
+
changes.each do |k, v|
|
33
|
+
ppp.send("#{k}=", v)
|
34
|
+
assert_equal expected_valid_result, ppp.valid?,
|
35
|
+
"\"#{k}\" change should be " + (expected_valid_result ? 'valid' : 'invalid')
|
36
|
+
assert_not ppp.errors[k].empty? unless expected_valid_result
|
37
|
+
ppp.restore_attributes
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Ex.: attrs = {a: 1, b: 2} resulta em
|
42
|
+
# [{a: nil, b: nil}, {a: 1, b: nil}, {a: nil, b: 2}, {a: 1, b: 2}].
|
43
|
+
def all_combinations(attrs)
|
44
|
+
combs = [{}]
|
45
|
+
attrs.each do |attr_name, value|
|
46
|
+
combs = all_combinations_new_combination(attr_name, value, combs)
|
47
|
+
end
|
48
|
+
combs
|
49
|
+
end
|
50
|
+
|
51
|
+
def all_combinations_new_combination(attr_name, value, combs)
|
52
|
+
new_comb = []
|
53
|
+
assert_not value.nil?, "#{attr_name}=#{value}"
|
54
|
+
[nil, value].each do |vv|
|
55
|
+
combs.each do |c|
|
56
|
+
cc = c.dup
|
57
|
+
cc[attr_name] = vv
|
58
|
+
new_comb << cc
|
59
|
+
end
|
60
|
+
end
|
61
|
+
new_comb
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
File without changes
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
module EacRailsUtils
|
6
|
+
module Models
|
7
|
+
class FetchErrorsTest < ActiveSupport::TestCase
|
8
|
+
class M1
|
9
|
+
include ActiveModel::Model
|
10
|
+
include EacRailsUtils::Models::FetchErrors
|
11
|
+
attr_accessor :name, :age, :account, :country_id, :other
|
12
|
+
end
|
13
|
+
|
14
|
+
class M2
|
15
|
+
include ActiveModel::Model
|
16
|
+
attr_accessor :name, :myage, :account_id, :country
|
17
|
+
|
18
|
+
validate :my_validate
|
19
|
+
|
20
|
+
def my_validate
|
21
|
+
errors.add(:name, 'NAME_ERROR')
|
22
|
+
errors.add(:myage, 'MYAGE_ERROR')
|
23
|
+
errors.add(:account_id, 'ACCOUNT_ID_ERROR')
|
24
|
+
errors.add(:country, 'COUNTRY_ERROR')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def setup
|
29
|
+
reset_m1
|
30
|
+
reset_m2
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_fetch_column_errors
|
34
|
+
@m1.fetch_column_errors(@m2, :myage, :age)
|
35
|
+
assert_equal @m2.errors[:myage], @m1.errors[:age]
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_fetch_record_errors
|
39
|
+
@m1.fetch_record_errors(@m2)
|
40
|
+
{ name: :name, account_id: :account, country: :country_id }.each do |c2, c1|
|
41
|
+
assert_equal @m2.errors[c2], @m1.errors[c1], "c2: #{c2}, c1: #{c1}"
|
42
|
+
end
|
43
|
+
assert @m1.errors[:age].empty?
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_fetch_record_errors_with_default_column
|
47
|
+
@m1.fetch_record_errors(@m2, default_column: :other)
|
48
|
+
assert_equal @m2.errors[:name], @m1.errors[:name]
|
49
|
+
assert @m1.errors[:age].empty?
|
50
|
+
assert_equal ['Myage: MYAGE_ERROR'], @m1.errors[:other]
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_fetch_record_errors_with_skip_option
|
54
|
+
@m1.fetch_record_errors(@m2, skip: [:name])
|
55
|
+
assert @m1.errors[:name].empty?
|
56
|
+
assert @m1.errors[:age].empty?
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_fetch_record_errors_by_mapping
|
60
|
+
@m1.fetch_record_errors_by_mapping(@m2, name: :name, myage: :age)
|
61
|
+
assert_equal @m2.errors[:name], @m1.errors[:name]
|
62
|
+
assert_equal @m2.errors[:myage], @m1.errors[:age]
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def reset_m1
|
68
|
+
@m1 = M1.new
|
69
|
+
assert @m1.errors.empty?
|
70
|
+
end
|
71
|
+
|
72
|
+
def reset_m2
|
73
|
+
@m2 = M2.new
|
74
|
+
assert_not @m2.valid?
|
75
|
+
assert_not @m2.errors[:name].empty?
|
76
|
+
assert_not @m2.errors[:myage].empty?
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
module EacRailsUtils
|
6
|
+
module Models
|
7
|
+
class TablelessTest < ActiveSupport::TestCase
|
8
|
+
class Stub < ::EacRailsUtils::Models::Tableless
|
9
|
+
attribute :tempo, DateTime
|
10
|
+
end
|
11
|
+
|
12
|
+
test 'date time array values' do
|
13
|
+
stub = Stub.new('tempo(1i)' => '9', 'tempo(2i)' => '10', 'tempo(3i)' => '11',
|
14
|
+
'tempo(4i)' => '12', 'tempo(5i)' => '13', 'tempo(6i)' => '14')
|
15
|
+
assert stub.tempo.is_a?(DateTime), "Class: |#{stub.tempo.class}|, Value: |#{stub.tempo}|"
|
16
|
+
assert_equal 9, stub.tempo.year, 'Year'
|
17
|
+
assert_equal 10, stub.tempo.month, 'Month'
|
18
|
+
assert_equal 11, stub.tempo.day, 'Day'
|
19
|
+
assert_equal 12, stub.tempo.hour, 'Hour'
|
20
|
+
assert_equal 13, stub.tempo.minute, 'Minute'
|
21
|
+
assert_equal 14, stub.tempo.second, 'Second'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
require 'test_helper'
|
4
4
|
|
5
|
-
module
|
5
|
+
module EacRailsUtils
|
6
6
|
class CpfValidatorTest < ActiveSupport::TestCase
|
7
7
|
class M1
|
8
8
|
include ActiveModel::Model
|
9
9
|
|
10
10
|
attr_accessor :cpf
|
11
11
|
|
12
|
-
validates :cpf, '
|
12
|
+
validates :cpf, 'eac_rails_utils/cpf' => true, allow_nil: true
|
13
13
|
end
|
14
14
|
|
15
15
|
def setup
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_rails_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- E.A.C.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel-associations
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.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: 0.
|
26
|
+
version: '0.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bootstrap-sass
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,33 +39,39 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.3.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: eac_ruby_utils
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.33'
|
45
48
|
- - ">="
|
46
49
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
50
|
+
version: 0.33.1
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0.33'
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 0.33.1
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: htmlbeautifier
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.1.
|
67
|
+
version: 1.1.1
|
62
68
|
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.1.
|
74
|
+
version: 1.1.1
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rails
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,9 +149,32 @@ extensions: []
|
|
143
149
|
extra_rdoc_files: []
|
144
150
|
files:
|
145
151
|
- Rakefile
|
152
|
+
- app/helpers/eac_rails_utils/common_form_helper.rb
|
153
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder.rb
|
154
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/association_select_field.rb
|
155
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/common_text_fields.rb
|
156
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/currency_field.rb
|
157
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/date_field.rb
|
158
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/fields_for.rb
|
159
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/file_field.rb
|
160
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/radio_select_field.rb
|
161
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb
|
162
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/select_field.rb
|
163
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
|
164
|
+
- app/helpers/eac_rails_utils/common_form_helper/form_builder/year_month_field.rb
|
165
|
+
- app/helpers/eac_rails_utils/data_table_helper.rb
|
166
|
+
- app/helpers/eac_rails_utils/data_table_helper/column.rb
|
167
|
+
- app/helpers/eac_rails_utils/data_table_helper/data_table.rb
|
168
|
+
- app/helpers/eac_rails_utils/data_table_helper/setup.rb
|
146
169
|
- app/helpers/eac_rails_utils/formatter_helper.rb
|
147
170
|
- app/helpers/eac_rails_utils/links_helper.rb
|
171
|
+
- app/helpers/eac_rails_utils/menus_helper.rb
|
172
|
+
- app/helpers/eac_rails_utils/menus_helper/bootstrap_gui_builder.rb
|
173
|
+
- app/helpers/eac_rails_utils/menus_helper/data_builder.rb
|
174
|
+
- app/helpers/eac_rails_utils/menus_helper/gui_builder.rb
|
148
175
|
- app/helpers/eac_rails_utils/open_graph_protocol_helper.rb
|
176
|
+
- app/validators/eac_rails_utils/cpf_validator.rb
|
177
|
+
- app/validators/eac_rails_utils/no_presence_validator.rb
|
149
178
|
- lib/assets/javascripts/currency_field.js
|
150
179
|
- lib/assets/javascripts/eac_rails_utils.js
|
151
180
|
- lib/assets/javascripts/input_searchable.js
|
@@ -157,41 +186,18 @@ files:
|
|
157
186
|
- lib/assets/stylesheets/eac_rails_utils.scss
|
158
187
|
- lib/assets/stylesheets/jmenu.scss
|
159
188
|
- lib/assets/stylesheets/jquery.dataTables.min.css
|
160
|
-
- lib/eac/common_form_helper.rb
|
161
|
-
- lib/eac/common_form_helper/form_builder.rb
|
162
|
-
- lib/eac/common_form_helper/form_builder/association_select_field.rb
|
163
|
-
- lib/eac/common_form_helper/form_builder/common_text_fields.rb
|
164
|
-
- lib/eac/common_form_helper/form_builder/currency_field.rb
|
165
|
-
- lib/eac/common_form_helper/form_builder/date_field.rb
|
166
|
-
- lib/eac/common_form_helper/form_builder/fields_for.rb
|
167
|
-
- lib/eac/common_form_helper/form_builder/file_field.rb
|
168
|
-
- lib/eac/common_form_helper/form_builder/radio_select_field.rb
|
169
|
-
- lib/eac/common_form_helper/form_builder/searchable_association_field.rb
|
170
|
-
- lib/eac/common_form_helper/form_builder/select_field.rb
|
171
|
-
- lib/eac/common_form_helper/form_builder/time_field.rb
|
172
|
-
- lib/eac/common_form_helper/form_builder/year_month_field.rb
|
173
|
-
- lib/eac/cpf_validator.rb
|
174
|
-
- lib/eac/data_table_helper.rb
|
175
|
-
- lib/eac/data_table_helper/column.rb
|
176
|
-
- lib/eac/data_table_helper/data_table.rb
|
177
|
-
- lib/eac/data_table_helper/setup.rb
|
178
|
-
- lib/eac/htmlbeautifier.rb
|
179
|
-
- lib/eac/inequality_queries.rb
|
180
|
-
- lib/eac/menus_helper.rb
|
181
|
-
- lib/eac/menus_helper/bootstrap_gui_builder.rb
|
182
|
-
- lib/eac/menus_helper/data_builder.rb
|
183
|
-
- lib/eac/menus_helper/gui_builder.rb
|
184
|
-
- lib/eac/model.rb
|
185
|
-
- lib/eac/no_presence_validator.rb
|
186
|
-
- lib/eac/test_utils.rb
|
187
189
|
- lib/eac_rails_utils.rb
|
188
190
|
- lib/eac_rails_utils/engine.rb
|
191
|
+
- lib/eac_rails_utils/htmlbeautifier.rb
|
192
|
+
- lib/eac_rails_utils/models.rb
|
193
|
+
- lib/eac_rails_utils/models/attribute_required.rb
|
194
|
+
- lib/eac_rails_utils/models/fetch_errors.rb
|
195
|
+
- lib/eac_rails_utils/models/inequality_queries.rb
|
196
|
+
- lib/eac_rails_utils/models/tableless.rb
|
197
|
+
- lib/eac_rails_utils/models/test_utils.rb
|
198
|
+
- lib/eac_rails_utils/patches.rb
|
189
199
|
- lib/eac_rails_utils/patches/action_controller_base.rb
|
190
|
-
- lib/eac_rails_utils/patches/model_attribute_required.rb
|
191
|
-
- lib/eac_rails_utils/patches/ofx_parser.rb
|
192
|
-
- lib/eac_rails_utils/tableless_model.rb
|
193
200
|
- lib/eac_rails_utils/version.rb
|
194
|
-
- test/app/helpers/eac_rails_utils/formatter_helper_test.rb
|
195
201
|
- test/dummy/Rakefile
|
196
202
|
- test/dummy/app/models/job.rb
|
197
203
|
- test/dummy/app/models/user.rb
|
@@ -208,17 +214,14 @@ files:
|
|
208
214
|
- test/dummy/db/migrate/20160415143123_create_jobs.rb
|
209
215
|
- test/dummy/db/migrate/20160415143229_add_job_to_users.rb
|
210
216
|
- test/dummy/db/schema.rb
|
211
|
-
- test/
|
212
|
-
- test/
|
213
|
-
- test/
|
214
|
-
- test/lib/
|
215
|
-
- test/lib/
|
216
|
-
- test/lib/
|
217
|
-
- test/lib/eac/source_target_fixtures_test_files/b.source.html
|
218
|
-
- test/lib/eac/source_target_fixtures_test_files/c.target.yaml
|
219
|
-
- test/lib/eac_rails_utils/patches/model_attribute_required_test.rb
|
220
|
-
- test/lib/eac_rails_utils/tableless_model_test.rb
|
217
|
+
- test/helpers/eac_rails_utils/common_form_helper_test.rb
|
218
|
+
- test/helpers/eac_rails_utils/data_table_test_helper_test.rb
|
219
|
+
- test/helpers/eac_rails_utils/formatter_helper_test.rb
|
220
|
+
- test/lib/eac_rails_utils/models/attribute_required_test.rb
|
221
|
+
- test/lib/eac_rails_utils/models/fetch_errors_test.rb
|
222
|
+
- test/lib/eac_rails_utils/models/tableless_test.rb
|
221
223
|
- test/test_helper.rb
|
224
|
+
- test/validators/cpf_validator_test.rb
|
222
225
|
homepage:
|
223
226
|
licenses: []
|
224
227
|
metadata: {}
|
@@ -260,14 +263,10 @@ test_files:
|
|
260
263
|
- test/dummy/app/models/job.rb
|
261
264
|
- test/dummy/app/models/user.rb
|
262
265
|
- test/test_helper.rb
|
263
|
-
- test/
|
264
|
-
- test/
|
265
|
-
- test/
|
266
|
-
- test/
|
267
|
-
- test/lib/
|
268
|
-
- test/lib/
|
269
|
-
- test/lib/
|
270
|
-
- test/lib/eac/source_target_fixtures_test_files/b.source.html
|
271
|
-
- test/lib/eac/source_target_fixtures_test_files/a.target.yaml
|
272
|
-
- test/lib/eac/source_target_fixtures_test_files/a.source.html
|
273
|
-
- test/lib/eac/model_test.rb
|
266
|
+
- test/validators/cpf_validator_test.rb
|
267
|
+
- test/helpers/eac_rails_utils/common_form_helper_test.rb
|
268
|
+
- test/helpers/eac_rails_utils/data_table_test_helper_test.rb
|
269
|
+
- test/helpers/eac_rails_utils/formatter_helper_test.rb
|
270
|
+
- test/lib/eac_rails_utils/models/attribute_required_test.rb
|
271
|
+
- test/lib/eac_rails_utils/models/tableless_test.rb
|
272
|
+
- test/lib/eac_rails_utils/models/fetch_errors_test.rb
|