deco_lite 1.5.3 → 1.5.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c26b97b5df895f19c475e9938b9e039a263ef83f582b57a378d57fb5c2d26a7f
4
- data.tar.gz: cb1a17c08179e046e2fd18df1f099e4517a08f34b0adbfce6e020a416d2bc277
3
+ metadata.gz: 59023b5cc113d4dbeea485aa65b2435ccd6e7e3e3d831f5140cf2ea5a18522c8
4
+ data.tar.gz: 5f1b3c059301f2485c7eb253e6356cd58e9664092e180472ce688e9e5c4af662
5
5
  SHA512:
6
- metadata.gz: 5e57bff0adf35ede242683dff40b2c3dcd0158ee61474fe974eabcee330bb7467437aa43c1b06842ce2c0a87a22992557b7c512f6f1d87cc789fbc980096dd9a
7
- data.tar.gz: 539400e71d0ecfefedf2f02c13d1d88026527c6cb0a334a76acc3521c4c0a573b52fcbca34c98d79c88e96459733bac60a3d0b8b5b1af828b011662034e8e617
6
+ metadata.gz: 4a7c63990cb650f2528c169a8f423b55ece7c056bc09d076389ad1b02c472bd37ed7c204f0395a609197898f14d5452f81db22f7cc997fc142b8de90b3fd639f
7
+ data.tar.gz: e8b6dccdecda3a22b70b4a12f2575c01b829816dfdaff56151d2d2d4f7e13fab30818312829778647ce60418a4c17304e23743c7cc05ab5974cfcd20b1e4ece7
@@ -0,0 +1,16 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler"
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ groups:
13
+ production-dependencies:
14
+ dependency-type: "production"
15
+ development-dependencies:
16
+ dependency-type: "development"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### 1.5.5
2
+
3
+ * Changes
4
+ * Update ruby gems
5
+ * Fix rubocop violations
6
+
7
+ ### 1.5.4
8
+
9
+ * Changes
10
+ * Update ruby gems
11
+
1
12
  ### 1.5.3
2
13
  * Bugs
3
14
  * Fix bug that raised an exception when using `validates_with <Custom Validator>` because `#attributes` is not found on custom validators.
data/Gemfile.lock CHANGED
@@ -1,55 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deco_lite (1.5.3)
4
+ deco_lite (1.5.5)
5
5
  activemodel (~> 7.0, >= 7.0.3.1)
6
6
  activesupport (~> 7.0, >= 7.0.3.1)
7
- immutable_struct_ex (~> 0.2.0)
8
- mad_flatter (~> 2.0)
7
+ immutable_struct_ex (~> 1.0, >= 1.0.1)
8
+ mad_flatter (~> 3.0)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (7.0.4.3)
14
- activesupport (= 7.0.4.3)
15
- activesupport (7.0.4.3)
13
+ activemodel (7.0.7.2)
14
+ activesupport (= 7.0.7.2)
15
+ activesupport (7.0.7.2)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
20
  ast (2.4.2)
21
+ base64 (0.1.1)
21
22
  byebug (11.1.3)
22
23
  coderay (1.1.3)
23
24
  concurrent-ruby (1.2.2)
24
25
  diff-lcs (1.5.0)
25
26
  docile (1.4.0)
26
- i18n (1.13.0)
27
+ i18n (1.14.1)
27
28
  concurrent-ruby (~> 1.0)
28
- immutable_struct_ex (0.2.3)
29
+ immutable_struct_ex (1.0.1)
29
30
  json (2.6.3)
30
31
  kwalify (0.7.2)
31
- mad_flatter (2.0.0)
32
+ language_server-protocol (3.17.0.3)
33
+ mad_flatter (3.0.0)
32
34
  activesupport (~> 7.0, >= 7.0.3.1)
33
- immutable_struct_ex (~> 0.2.0)
35
+ immutable_struct_ex (~> 1.0)
34
36
  method_source (1.0.0)
35
- minitest (5.18.0)
37
+ minitest (5.19.0)
36
38
  parallel (1.23.0)
37
- parser (3.2.2.1)
39
+ parser (3.2.2.3)
38
40
  ast (~> 2.4.1)
41
+ racc
39
42
  pry (0.14.2)
40
43
  coderay (~> 1.1)
41
44
  method_source (~> 1.0)
42
45
  pry-byebug (3.10.1)
43
46
  byebug (~> 11.0)
44
47
  pry (>= 0.13, < 0.15)
48
+ racc (1.7.1)
45
49
  rainbow (3.1.1)
46
50
  rake (13.0.6)
47
51
  reek (6.1.4)
48
52
  kwalify (~> 0.7.0)
49
53
  parser (~> 3.2.0)
50
54
  rainbow (>= 2.0, < 4.0)
51
- regexp_parser (2.8.0)
52
- rexml (3.2.5)
55
+ regexp_parser (2.8.1)
56
+ rexml (3.2.6)
53
57
  rspec (3.12.0)
54
58
  rspec-core (~> 3.12.0)
55
59
  rspec-expectations (~> 3.12.0)
@@ -59,32 +63,37 @@ GEM
59
63
  rspec-expectations (3.12.3)
60
64
  diff-lcs (>= 1.2.0, < 2.0)
61
65
  rspec-support (~> 3.12.0)
62
- rspec-mocks (3.12.5)
66
+ rspec-mocks (3.12.6)
63
67
  diff-lcs (>= 1.2.0, < 2.0)
64
68
  rspec-support (~> 3.12.0)
65
- rspec-support (3.12.0)
66
- rubocop (1.50.2)
69
+ rspec-support (3.12.1)
70
+ rubocop (1.56.2)
71
+ base64 (~> 0.1.1)
67
72
  json (~> 2.3)
73
+ language_server-protocol (>= 3.17.0)
68
74
  parallel (~> 1.10)
69
- parser (>= 3.2.0.0)
75
+ parser (>= 3.2.2.3)
70
76
  rainbow (>= 2.2.2, < 4.0)
71
77
  regexp_parser (>= 1.8, < 3.0)
72
78
  rexml (>= 3.2.5, < 4.0)
73
- rubocop-ast (>= 1.28.0, < 2.0)
79
+ rubocop-ast (>= 1.28.1, < 2.0)
74
80
  ruby-progressbar (~> 1.7)
75
81
  unicode-display_width (>= 2.4.0, < 3.0)
76
- rubocop-ast (1.28.1)
82
+ rubocop-ast (1.29.0)
77
83
  parser (>= 3.2.1.0)
78
84
  rubocop-capybara (2.18.0)
79
85
  rubocop (~> 1.41)
80
- rubocop-performance (1.17.1)
86
+ rubocop-factory_bot (2.23.1)
87
+ rubocop (~> 1.33)
88
+ rubocop-performance (1.19.0)
81
89
  rubocop (>= 1.7.0, < 2.0)
82
90
  rubocop-ast (>= 0.4.0)
83
- rubocop-rspec (2.20.0)
91
+ rubocop-rspec (2.23.2)
84
92
  rubocop (~> 1.33)
85
93
  rubocop-capybara (~> 2.17)
94
+ rubocop-factory_bot (~> 2.22)
86
95
  ruby-progressbar (1.13.0)
87
- simplecov (0.21.2)
96
+ simplecov (0.22.0)
88
97
  docile (~> 1.1)
89
98
  simplecov-html (~> 0.11)
90
99
  simplecov_json_formatter (~> 0.1)
@@ -96,6 +105,7 @@ GEM
96
105
 
97
106
  PLATFORMS
98
107
  x86_64-darwin-19
108
+ x86_64-darwin-21
99
109
 
100
110
  DEPENDENCIES
101
111
  bundler (~> 2.2, >= 2.2.17)
@@ -107,7 +117,7 @@ DEPENDENCIES
107
117
  rubocop (~> 1.35)
108
118
  rubocop-performance (~> 1.14, >= 1.14.3)
109
119
  rubocop-rspec (~> 2.12, >= 2.12.1)
110
- simplecov (~> 0.21.2)
120
+ simplecov (~> 0.22.0)
111
121
 
112
122
  BUNDLED WITH
113
123
  2.3.22
data/deco_lite.gemspec CHANGED
@@ -50,8 +50,8 @@ Gem::Specification.new do |spec|
50
50
 
51
51
  spec.add_runtime_dependency 'activemodel', '~> 7.0', '>= 7.0.3.1'
52
52
  spec.add_runtime_dependency 'activesupport', '~> 7.0', '>= 7.0.3.1'
53
- spec.add_runtime_dependency 'immutable_struct_ex', '~> 0.2.0'
54
- spec.add_runtime_dependency 'mad_flatter', '~> 2.0'
53
+ spec.add_runtime_dependency 'immutable_struct_ex', '~> 1.0', '>= 1.0.1'
54
+ spec.add_runtime_dependency 'mad_flatter', '~> 3.0'
55
55
  spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
56
56
  spec.add_development_dependency 'pry-byebug', '~> 3.9'
57
57
  spec.add_development_dependency 'reek', '~> 6.1', '>= 6.1.1'
@@ -59,6 +59,6 @@ Gem::Specification.new do |spec|
59
59
  spec.add_development_dependency 'rubocop', '~> 1.35'
60
60
  spec.add_development_dependency 'rubocop-performance', '~> 1.14', '>= 1.14.3'
61
61
  spec.add_development_dependency 'rubocop-rspec', '~> 2.12', '>= 2.12.1'
62
- spec.add_development_dependency 'simplecov', '~> 0.21.2'
62
+ spec.add_development_dependency 'simplecov', '~> 0.22.0'
63
63
  spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
64
64
  end
@@ -9,8 +9,8 @@ module DecoLite
9
9
 
10
10
  def set_field_values(hash:, field_info:, options:)
11
11
  field_info.each do |name, info|
12
- value = get_field_value(hash: hash, field_info: info)
13
- set_field_value(field_name: name, value: value, options: options)
12
+ value = get_field_value(hash:, field_info: info)
13
+ set_field_value(field_name: name, value:, options:)
14
14
  end
15
15
  end
16
16
 
@@ -11,9 +11,9 @@ module DecoLite
11
11
  include FieldsOptionable
12
12
 
13
13
  def validate_field_conflicts!(field_name:, options:)
14
- return unless field_conflict?(field_name: field_name, options: options)
14
+ return unless field_conflict?(field_name:, options:)
15
15
 
16
- field_name = field_name_or_field_name_with_namespace field_name: field_name, options: options
16
+ field_name = field_name_or_field_name_with_namespace(field_name:, options:)
17
17
 
18
18
  raise "Field :#{field_name} conflicts with existing method(s) " \
19
19
  ":#{field_name} and/or :#{field_name}=; " \
@@ -27,23 +27,23 @@ module DecoLite
27
27
  def field_conflict?(field_name:, options:)
28
28
  # If field_name was already added using Model#load, there is only a
29
29
  # conflict if options.strict? is true.
30
- return options.strict? if field_names_include?(field_name: field_name, options: options)
30
+ return options.strict? if field_names_include?(field_name:, options:)
31
31
 
32
32
  # If we get here, we know that :field_name does not exist as an
33
33
  # attribute on the model. If the attribute already exists on the
34
34
  # model, this is a conflict because we cannot override an attribute
35
35
  # that already exists on the model
36
- attr_accessor_exist?(field_name: field_name, options: options)
36
+ attr_accessor_exist?(field_name:, options:)
37
37
  end
38
38
 
39
39
  def field_names_include?(field_name:, options:)
40
- field_name = field_name_or_field_name_with_namespace field_name: field_name, options: options
40
+ field_name = field_name_or_field_name_with_namespace(field_name:, options:)
41
41
 
42
42
  field_names.include? field_name
43
43
  end
44
44
 
45
45
  def attr_accessor_exist?(field_name:, options:)
46
- field_name = field_name_or_field_name_with_namespace field_name: field_name, options: options
46
+ field_name = field_name_or_field_name_with_namespace(field_name:, options:)
47
47
 
48
48
  respond_to?(field_name) || respond_to?(:"#{field_name}=")
49
49
  end
@@ -13,19 +13,19 @@ module DecoLite
13
13
  return if field_names.blank?
14
14
 
15
15
  field_names.each do |field_name|
16
- create_field_accessor(field_name: field_name, options: options)
16
+ create_field_accessor(field_name:, options:)
17
17
  end
18
18
  end
19
19
 
20
20
  def create_field_accessor(field_name:, options:)
21
- validate_field_name!(field_name: field_name, options: options)
22
- validate_field_conflicts!(field_name: field_name, options: options)
21
+ validate_field_name!(field_name:, options:)
22
+ validate_field_conflicts!(field_name:, options:)
23
23
 
24
24
  # If we want to set a class-level attr_accessor
25
25
  # self.class.attr_accessor(field_name) if field_name.present?
26
26
 
27
- create_field_getter field_name: field_name, options: options
28
- create_field_setter field_name: field_name, options: options
27
+ create_field_getter(field_name:, options:)
28
+ create_field_setter field_name:, options:
29
29
  end
30
30
 
31
31
  private
@@ -7,7 +7,7 @@ module DecoLite
7
7
  def field_name_or_field_name_with_namespace(field_name:, options:)
8
8
  return field_name unless options.namespace?
9
9
 
10
- field_name_with_namespace(field_name: field_name, namespace: options.namespace)
10
+ field_name_with_namespace(field_name:, namespace: options.namespace)
11
11
  end
12
12
 
13
13
  def field_name_with_namespace(field_name:, namespace:)
@@ -17,13 +17,13 @@ module DecoLite
17
17
 
18
18
  return {} if hash.blank?
19
19
 
20
- load_service_options = merge_with_load_service_options deco_lite_options: deco_lite_options
21
- load_service.execute(hash: hash, options: load_service_options).tap do |service_hash|
20
+ load_service_options = merge_with_load_service_options(deco_lite_options:)
21
+ load_service.execute(hash:, options: load_service_options).tap do |service_hash|
22
22
  service_hash.each_pair do |field_name, value|
23
- create_field_accessor field_name: field_name, options: deco_lite_options
23
+ create_field_accessor field_name:, options: deco_lite_options
24
24
  yield field_name if block_given?
25
25
  field_names << field_name unless field_names.include? field_name
26
- set_field_value(field_name: field_name, value: value, options: deco_lite_options)
26
+ set_field_value(field_name:, value:, options: deco_lite_options)
27
27
  end
28
28
  end
29
29
  end
@@ -34,9 +34,9 @@ module DecoLite
34
34
 
35
35
  hash ||= {}
36
36
 
37
- load_hash!(hash: auto_attr_accessors, options: options, add_loaded_fields: false) if auto_attr_accessors?
37
+ load_hash!(hash: auto_attr_accessors, options:, add_loaded_fields: false) if auto_attr_accessors?
38
38
 
39
- load_hash!(hash: hash, options: options) if hash.present?
39
+ load_hash!(hash:, options:) if hash.present?
40
40
  end
41
41
 
42
42
  validate :validate_required_fields
@@ -52,7 +52,7 @@ module DecoLite
52
52
  end
53
53
 
54
54
  def load!(hash:, options: {})
55
- load_hash! hash: hash, options: options
55
+ load_hash! hash:, options:
56
56
  end
57
57
 
58
58
  private
@@ -70,7 +70,7 @@ module DecoLite
70
70
  # options while loading, but also provide option customization
71
71
  # of options when needed.
72
72
  options = Options.with_defaults(options, defaults: self.options)
73
- load_hash(hash: hash, deco_lite_options: options) do |loaded_field|
73
+ load_hash(hash:, deco_lite_options: options) do |loaded_field|
74
74
  loaded_fields << loaded_field if add_loaded_fields
75
75
  end
76
76
 
@@ -14,9 +14,9 @@ module DecoLite
14
14
  def validate_options!(options:)
15
15
  raise ArgumentError, 'options is not a Hash' unless options.is_a? Hash
16
16
 
17
- validate_options_present! options: options
17
+ validate_options_present!(options:)
18
18
 
19
- validate_option_keys! options: options
19
+ validate_option_keys!(options:)
20
20
  validate_option_fields! fields: options[OPTION_FIELDS]
21
21
  validate_option_namespace! namespace: options[OPTION_NAMESPACE]
22
22
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the version of this gem.
4
4
  module DecoLite
5
- VERSION = '1.5.3'
5
+ VERSION = '1.5.5'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deco_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -56,28 +56,34 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: 0.2.0
59
+ version: '1.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.0.1
60
63
  type: :runtime
61
64
  prerelease: false
62
65
  version_requirements: !ruby/object:Gem::Requirement
63
66
  requirements:
64
67
  - - "~>"
65
68
  - !ruby/object:Gem::Version
66
- version: 0.2.0
69
+ version: '1.0'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.0.1
67
73
  - !ruby/object:Gem::Dependency
68
74
  name: mad_flatter
69
75
  requirement: !ruby/object:Gem::Requirement
70
76
  requirements:
71
77
  - - "~>"
72
78
  - !ruby/object:Gem::Version
73
- version: '2.0'
79
+ version: '3.0'
74
80
  type: :runtime
75
81
  prerelease: false
76
82
  version_requirements: !ruby/object:Gem::Requirement
77
83
  requirements:
78
84
  - - "~>"
79
85
  - !ruby/object:Gem::Version
80
- version: '2.0'
86
+ version: '3.0'
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: bundler
83
89
  requirement: !ruby/object:Gem::Requirement
@@ -206,14 +212,14 @@ dependencies:
206
212
  requirements:
207
213
  - - "~>"
208
214
  - !ruby/object:Gem::Version
209
- version: 0.21.2
215
+ version: 0.22.0
210
216
  type: :development
211
217
  prerelease: false
212
218
  version_requirements: !ruby/object:Gem::Requirement
213
219
  requirements:
214
220
  - - "~>"
215
221
  - !ruby/object:Gem::Version
216
- version: 0.21.2
222
+ version: 0.22.0
217
223
  - !ruby/object:Gem::Dependency
218
224
  name: rake
219
225
  requirement: !ruby/object:Gem::Requirement
@@ -255,6 +261,7 @@ executables: []
255
261
  extensions: []
256
262
  extra_rdoc_files: []
257
263
  files:
264
+ - ".github/dependabot.yml"
258
265
  - ".gitignore"
259
266
  - ".reek.yml"
260
267
  - ".rspec"