deco_lite 1.2.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5e504d4b1c9442022ff1d9dc1727f1116b3be5bef76cce7c3f0b4373e1d5531
4
- data.tar.gz: c92ec939a0264e410d01d847521ecbd6432fd67e949858c8cc5183354e4aabd2
3
+ metadata.gz: 63fefad457246dd3e27db2e0451dca5cfa22af5977aff9b22c110ad02ddc0ff7
4
+ data.tar.gz: 631d132b3fe591498016f8468288215fc430d24ba7f84568c2f7412e602237f7
5
5
  SHA512:
6
- metadata.gz: d2e87a67fce2ce3177231eb78ba340bef28b415a67263098ec7c9ee1a99e8b9e670bcbf04f9393c9db98e4f3186c5e34eb90e9db5140ecb88df5de9088304d3f
7
- data.tar.gz: cc3c507551e330c3b6fe052384106a0deed623a3d842ade9f0d119ee5f0886def3cce4de96737dbeec246c816941e5d62c19f7f62c6260900403d2fac9a15d11
6
+ metadata.gz: 3f70967d27a654fad95c5c3137b717ecf3bd8cdd3f077ea2c65b90a65baafd46cf2d6ed3cdba0ffdbe2bede18efdb7569db72fad8c146c518f489cef0d8aad18
7
+ data.tar.gz: d77aeb0ae8a03cec4efebe84b257a6f9d11ec2fa81e5d8cbe03218f5c801acdb944d331650edd70782d68b5602b77ace417b036e4f6fd5d11494146de2409e87
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ require:
3
3
  - rubocop-rspec
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 3.0.1
6
+ TargetRubyVersion: 3.1.2
7
7
  NewCops: enable
8
8
  Exclude:
9
9
  - '.git/**/*'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.1.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 1.4.0
2
+ * Changes
3
+ * Required ruby version is now '~> 3.0'
4
+ * Prohibit SimpleCov from starting 2x in spec_helper.rb.
5
+
6
+ ### 1.3.0
7
+ * Changes
8
+ * Update gem description in .gemspec.
9
+
1
10
  ### 1.2.1
2
11
  * Bugs
3
12
  * Fix bug that did not recognize loaded field values if `attr_accessors` were previously created for the loaded fields due to model validations being present. If `ActiveModel` validators are present on the model, DecoLite will automatically create `attr_accessors` for the fields associated with the validations. The presence of these fields being automatically loaded prohibited any fields subsequently loaded having the same field names to not be recognized as having been loaded, causing validation to validate incorrectly (the model did not recognize the fields as having been loaded).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deco_lite (1.2.1)
4
+ deco_lite (1.4.0)
5
5
  activemodel (~> 7.0, >= 7.0.3.1)
6
6
  activesupport (~> 7.0, >= 7.0.3.1)
7
7
  immutable_struct_ex (~> 0.2.0)
@@ -63,17 +63,17 @@ GEM
63
63
  diff-lcs (>= 1.2.0, < 2.0)
64
64
  rspec-support (~> 3.11.0)
65
65
  rspec-support (3.11.1)
66
- rubocop (1.36.0)
66
+ rubocop (1.37.0)
67
67
  json (~> 2.3)
68
68
  parallel (~> 1.10)
69
69
  parser (>= 3.1.2.1)
70
70
  rainbow (>= 2.2.2, < 4.0)
71
71
  regexp_parser (>= 1.8, < 3.0)
72
72
  rexml (>= 3.2.5, < 4.0)
73
- rubocop-ast (>= 1.20.1, < 2.0)
73
+ rubocop-ast (>= 1.22.0, < 2.0)
74
74
  ruby-progressbar (~> 1.7)
75
75
  unicode-display_width (>= 1.4.0, < 3.0)
76
- rubocop-ast (1.21.0)
76
+ rubocop-ast (1.22.0)
77
77
  parser (>= 3.1.1.0)
78
78
  rubocop-performance (1.15.0)
79
79
  rubocop (>= 1.7.0, < 2.0)
data/deco_lite.gemspec CHANGED
@@ -11,7 +11,22 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['public.gma@gmail.com']
12
12
 
13
13
  spec.summary = 'Dynamically creates an active model from a Hash.'
14
- spec.description = 'Dynamically creates an active model from a Hash.'
14
+ spec.description = <<-EOF
15
+ DecoLite is a little gem that allows you to use the provided DecoLite::Model
16
+ class to dynamically create Decorator class objects. Use the DecoLite::Model
17
+ class directly, or inherit from the DecoLite::Model class to create your own
18
+ unique subclasses with custom functionality. DecoLite::Model
19
+ includes ActiveModel::Model, so validation can be applied using ActiveModel
20
+ validation helpers (https://api.rubyonrails.org/v6.1.3/classes/ActiveModel/Validations/HelperMethods.html)
21
+ you're familiar with; or, you can roll your own - just like any other ActiveModel.
22
+
23
+ DecoLite::Model allows you to consume a Ruby Hash that you supply via the
24
+ initializer (DecoLite::Model#new) or via the DecoLite::Model#load! method. Any
25
+ number of Ruby Hashes can be consumed. Your supplied Ruby Hashes are used to
26
+ create attr_accessor attributes (or "fields") on the model. Each attribute
27
+ created is then assigned the value from the Hash that was loaded. Again, any
28
+ number of hashes can be consumed using the DecoLite::Model#load! method.
29
+ EOF
15
30
  spec.homepage = 'https://github.com/gangelo/deco_lite'
16
31
  spec.license = 'MIT'
17
32
 
@@ -31,7 +46,7 @@ Gem::Specification.new do |spec|
31
46
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
47
  spec.require_paths = ['lib']
33
48
 
34
- spec.required_ruby_version = '~> 3.0.1'
49
+ spec.required_ruby_version = Gem::Requirement.new("~> 3.0")
35
50
 
36
51
  spec.add_runtime_dependency 'activemodel', '~> 7.0', '>= 7.0.3.1'
37
52
  spec.add_runtime_dependency 'activesupport', '~> 7.0', '>= 7.0.3.1'
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the version of this gem.
4
4
  module DecoLite
5
- VERSION = '1.2.1'
5
+ VERSION = '1.4.0'
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.2.1
4
+ version: 1.4.0
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: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -234,7 +234,21 @@ dependencies:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: 13.0.6
237
- description: Dynamically creates an active model from a Hash.
237
+ description: |2
238
+ DecoLite is a little gem that allows you to use the provided DecoLite::Model
239
+ class to dynamically create Decorator class objects. Use the DecoLite::Model
240
+ class directly, or inherit from the DecoLite::Model class to create your own
241
+ unique subclasses with custom functionality. DecoLite::Model
242
+ includes ActiveModel::Model, so validation can be applied using ActiveModel
243
+ validation helpers (https://api.rubyonrails.org/v6.1.3/classes/ActiveModel/Validations/HelperMethods.html)
244
+ you're familiar with; or, you can roll your own - just like any other ActiveModel.
245
+
246
+ DecoLite::Model allows you to consume a Ruby Hash that you supply via the
247
+ initializer (DecoLite::Model#new) or via the DecoLite::Model#load! method. Any
248
+ number of Ruby Hashes can be consumed. Your supplied Ruby Hashes are used to
249
+ create attr_accessor attributes (or "fields") on the model. Each attribute
250
+ created is then assigned the value from the Hash that was loaded. Again, any
251
+ number of hashes can be consumed using the DecoLite::Model#load! method.
238
252
  email:
239
253
  - public.gma@gmail.com
240
254
  executables: []
@@ -289,14 +303,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
289
303
  requirements:
290
304
  - - "~>"
291
305
  - !ruby/object:Gem::Version
292
- version: 3.0.1
306
+ version: '3.0'
293
307
  required_rubygems_version: !ruby/object:Gem::Requirement
294
308
  requirements:
295
309
  - - ">="
296
310
  - !ruby/object:Gem::Version
297
311
  version: '0'
298
312
  requirements: []
299
- rubygems_version: 3.3.22
313
+ rubygems_version: 3.3.7
300
314
  signing_key:
301
315
  specification_version: 4
302
316
  summary: Dynamically creates an active model from a Hash.