eac_rails_utils 0.9.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper.rb +5 -1
  3. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder.rb +10 -2
  4. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/association_select_field.rb +1 -1
  5. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/common_text_fields.rb +1 -1
  6. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/currency_field.rb +1 -1
  7. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/date_field.rb +1 -1
  8. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/fields_for.rb +1 -1
  9. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/file_field.rb +1 -1
  10. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/radio_select_field.rb +1 -1
  11. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/searchable_association_field.rb +1 -1
  12. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/select_field.rb +3 -2
  13. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/time_field.rb +1 -1
  14. data/{lib/eac → app/helpers/eac_rails_utils}/common_form_helper/form_builder/year_month_field.rb +1 -1
  15. data/app/helpers/eac_rails_utils/data_table_helper.rb +13 -0
  16. data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/column.rb +1 -1
  17. data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/data_table.rb +2 -2
  18. data/{lib/eac → app/helpers/eac_rails_utils}/data_table_helper/setup.rb +2 -2
  19. data/app/helpers/eac_rails_utils/links_helper.rb +8 -1
  20. data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper.rb +5 -1
  21. data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/bootstrap_gui_builder.rb +1 -1
  22. data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/data_builder.rb +1 -1
  23. data/{lib/eac → app/helpers/eac_rails_utils}/menus_helper/gui_builder.rb +1 -1
  24. data/{lib/eac → app/validators/eac_rails_utils}/cpf_validator.rb +1 -1
  25. data/{lib/eac → app/validators/eac_rails_utils}/no_presence_validator.rb +1 -1
  26. data/lib/assets/javascripts/jMenu.jquery.min.js +12 -12
  27. data/lib/eac_rails_utils.rb +2 -39
  28. data/lib/eac_rails_utils/engine.rb +2 -0
  29. data/lib/{eac → eac_rails_utils}/htmlbeautifier.rb +1 -1
  30. data/lib/eac_rails_utils/models.rb +9 -0
  31. data/lib/eac_rails_utils/models/attribute_required.rb +43 -0
  32. data/lib/eac_rails_utils/models/fetch_errors.rb +92 -0
  33. data/lib/eac_rails_utils/models/inequality_queries.rb +39 -0
  34. data/lib/eac_rails_utils/models/tableless.rb +97 -0
  35. data/lib/eac_rails_utils/models/test_utils.rb +65 -0
  36. data/lib/eac_rails_utils/patches.rb +9 -0
  37. data/lib/eac_rails_utils/patches/action_controller_base.rb +2 -0
  38. data/lib/eac_rails_utils/version.rb +1 -1
  39. data/test/dummy/app/models/user.rb +4 -0
  40. data/test/{lib/eac → helpers/eac_rails_utils}/common_form_helper_test.rb +2 -2
  41. data/test/{lib/eac → helpers/eac_rails_utils}/data_table_test_helper_test.rb +2 -2
  42. data/test/{app/helpers → helpers}/eac_rails_utils/formatter_helper_test.rb +0 -0
  43. data/test/lib/eac_rails_utils/{patches/model_attribute_required_test.rb → models/attribute_required_test.rb} +1 -0
  44. data/test/lib/eac_rails_utils/models/fetch_errors_test.rb +80 -0
  45. data/test/lib/eac_rails_utils/models/tableless_test.rb +25 -0
  46. data/test/{lib/eac → validators}/cpf_validator_test.rb +2 -2
  47. metadata +68 -89
  48. data/lib/eac/data_table_helper.rb +0 -13
  49. data/lib/eac/inequality_queries.rb +0 -37
  50. data/lib/eac/model.rb +0 -90
  51. data/lib/eac/test_utils.rb +0 -61
  52. data/lib/eac_rails_utils/patches/model_attribute_required.rb +0 -34
  53. data/lib/eac_rails_utils/patches/ofx_parser.rb +0 -43
  54. data/lib/eac_rails_utils/tableless_model.rb +0 -92
  55. data/test/lib/eac/model_test.rb +0 -78
  56. data/test/lib/eac/source_target_fixtures_test_files/a.source.html +0 -1
  57. data/test/lib/eac/source_target_fixtures_test_files/a.target.yaml +0 -1
  58. data/test/lib/eac/source_target_fixtures_test_files/b.source.html +0 -1
  59. data/test/lib/eac/source_target_fixtures_test_files/c.target.yaml +0 -1
  60. 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
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+
5
+ module EacRailsUtils
6
+ module Patches
7
+ ::EacRubyUtils.require_sub __FILE__
8
+ end
9
+ end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'action_controller/base'
4
+
3
5
  module EacRailsUtils
4
6
  module Patches
5
7
  module ActionControllerBasePatch
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsUtils
4
- VERSION = '0.9.0'
4
+ VERSION = '0.11.1'
5
5
  end
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_rails_utils/models/attribute_required'
4
+
3
5
  class User < ActiveRecord::Base
6
+ include ::EacRailsUtils::Models::AttributeRequired
7
+
4
8
  belongs_to :job
5
9
 
6
10
  validates :job, presence: true
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'test_helper'
4
4
 
5
- module Eac
5
+ module EacRailsUtils
6
6
  class CommonFormHelperTest < ActionView::TestCase
7
- include Eac::CommonFormHelper
7
+ include ::EacRailsUtils::CommonFormHelper
8
8
 
9
9
  setup do
10
10
  reset_test_database
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'test_helper'
4
4
 
5
- module Eac
5
+ module EacRailsUtils
6
6
  class DataTableTestHelperTest < ActionView::TestCase
7
- include ::Eac::DataTableHelper
7
+ include ::EacRailsUtils::DataTableHelper
8
8
 
9
9
  class Person
10
10
  attr_reader :name, :age, :job
@@ -32,6 +32,7 @@ module EacRailsUtils
32
32
 
33
33
  class ActiveModelStub
34
34
  include ActiveModel::Model
35
+ include ::EacRailsUtils::Models::AttributeRequired
35
36
 
36
37
  attr_accessor :name, :age
37
38
  validates :name, presence: true
@@ -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 Eac
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, 'eac/cpf' => true, allow_nil: true
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.9.0
4
+ version: 0.11.1
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-03-01 00:00:00.000000000 Z
11
+ date: 2020-06-07 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.1.2
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.1.2
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bootstrap-sass
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,53 +39,53 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.3.6
41
41
  - !ruby/object:Gem::Dependency
42
- name: htmlbeautifier
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: 1.1.1
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: 1.1.1
60
+ version: 0.33.1
55
61
  - !ruby/object:Gem::Dependency
56
- name: ofx-parser
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.0
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.0
74
+ version: 1.1.1
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rails
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '4.2'
76
79
  - - ">="
77
80
  - !ruby/object:Gem::Version
78
- version: 4.2.1
81
+ version: 4.2.11.1
79
82
  type: :runtime
80
83
  prerelease: false
81
84
  version_requirements: !ruby/object:Gem::Requirement
82
85
  requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '4.2'
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: 4.2.1
88
+ version: 4.2.11.1
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: virtus
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -115,33 +115,19 @@ dependencies:
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
- name: rubocop
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: 0.80.0
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: 0.80.0
131
- - !ruby/object:Gem::Dependency
132
- name: rubocop-rails
118
+ name: eac_ruby_gem_support
133
119
  requirement: !ruby/object:Gem::Requirement
134
120
  requirements:
135
121
  - - "~>"
136
122
  - !ruby/object:Gem::Version
137
- version: 2.4.2
123
+ version: '0.1'
138
124
  type: :development
139
125
  prerelease: false
140
126
  version_requirements: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - "~>"
143
129
  - !ruby/object:Gem::Version
144
- version: 2.4.2
130
+ version: '0.1'
145
131
  - !ruby/object:Gem::Dependency
146
132
  name: sqlite3
147
133
  requirement: !ruby/object:Gem::Requirement
@@ -163,9 +149,32 @@ extensions: []
163
149
  extra_rdoc_files: []
164
150
  files:
165
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
166
169
  - app/helpers/eac_rails_utils/formatter_helper.rb
167
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
168
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
169
178
  - lib/assets/javascripts/currency_field.js
170
179
  - lib/assets/javascripts/eac_rails_utils.js
171
180
  - lib/assets/javascripts/input_searchable.js
@@ -177,41 +186,18 @@ files:
177
186
  - lib/assets/stylesheets/eac_rails_utils.scss
178
187
  - lib/assets/stylesheets/jmenu.scss
179
188
  - lib/assets/stylesheets/jquery.dataTables.min.css
180
- - lib/eac/common_form_helper.rb
181
- - lib/eac/common_form_helper/form_builder.rb
182
- - lib/eac/common_form_helper/form_builder/association_select_field.rb
183
- - lib/eac/common_form_helper/form_builder/common_text_fields.rb
184
- - lib/eac/common_form_helper/form_builder/currency_field.rb
185
- - lib/eac/common_form_helper/form_builder/date_field.rb
186
- - lib/eac/common_form_helper/form_builder/fields_for.rb
187
- - lib/eac/common_form_helper/form_builder/file_field.rb
188
- - lib/eac/common_form_helper/form_builder/radio_select_field.rb
189
- - lib/eac/common_form_helper/form_builder/searchable_association_field.rb
190
- - lib/eac/common_form_helper/form_builder/select_field.rb
191
- - lib/eac/common_form_helper/form_builder/time_field.rb
192
- - lib/eac/common_form_helper/form_builder/year_month_field.rb
193
- - lib/eac/cpf_validator.rb
194
- - lib/eac/data_table_helper.rb
195
- - lib/eac/data_table_helper/column.rb
196
- - lib/eac/data_table_helper/data_table.rb
197
- - lib/eac/data_table_helper/setup.rb
198
- - lib/eac/htmlbeautifier.rb
199
- - lib/eac/inequality_queries.rb
200
- - lib/eac/menus_helper.rb
201
- - lib/eac/menus_helper/bootstrap_gui_builder.rb
202
- - lib/eac/menus_helper/data_builder.rb
203
- - lib/eac/menus_helper/gui_builder.rb
204
- - lib/eac/model.rb
205
- - lib/eac/no_presence_validator.rb
206
- - lib/eac/test_utils.rb
207
189
  - lib/eac_rails_utils.rb
208
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
209
199
  - lib/eac_rails_utils/patches/action_controller_base.rb
210
- - lib/eac_rails_utils/patches/model_attribute_required.rb
211
- - lib/eac_rails_utils/patches/ofx_parser.rb
212
- - lib/eac_rails_utils/tableless_model.rb
213
200
  - lib/eac_rails_utils/version.rb
214
- - test/app/helpers/eac_rails_utils/formatter_helper_test.rb
215
201
  - test/dummy/Rakefile
216
202
  - test/dummy/app/models/job.rb
217
203
  - test/dummy/app/models/user.rb
@@ -228,17 +214,14 @@ files:
228
214
  - test/dummy/db/migrate/20160415143123_create_jobs.rb
229
215
  - test/dummy/db/migrate/20160415143229_add_job_to_users.rb
230
216
  - test/dummy/db/schema.rb
231
- - test/lib/eac/common_form_helper_test.rb
232
- - test/lib/eac/cpf_validator_test.rb
233
- - test/lib/eac/data_table_test_helper_test.rb
234
- - test/lib/eac/model_test.rb
235
- - test/lib/eac/source_target_fixtures_test_files/a.source.html
236
- - test/lib/eac/source_target_fixtures_test_files/a.target.yaml
237
- - test/lib/eac/source_target_fixtures_test_files/b.source.html
238
- - test/lib/eac/source_target_fixtures_test_files/c.target.yaml
239
- - test/lib/eac_rails_utils/patches/model_attribute_required_test.rb
240
- - 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
241
223
  - test/test_helper.rb
224
+ - test/validators/cpf_validator_test.rb
242
225
  homepage:
243
226
  licenses: []
244
227
  metadata: {}
@@ -280,14 +263,10 @@ test_files:
280
263
  - test/dummy/app/models/job.rb
281
264
  - test/dummy/app/models/user.rb
282
265
  - test/test_helper.rb
283
- - test/app/helpers/eac_rails_utils/formatter_helper_test.rb
284
- - test/lib/eac_rails_utils/patches/model_attribute_required_test.rb
285
- - test/lib/eac_rails_utils/tableless_model_test.rb
286
- - test/lib/eac/common_form_helper_test.rb
287
- - test/lib/eac/data_table_test_helper_test.rb
288
- - test/lib/eac/cpf_validator_test.rb
289
- - test/lib/eac/source_target_fixtures_test_files/c.target.yaml
290
- - test/lib/eac/source_target_fixtures_test_files/b.source.html
291
- - test/lib/eac/source_target_fixtures_test_files/a.target.yaml
292
- - test/lib/eac/source_target_fixtures_test_files/a.source.html
293
- - 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