attribeauty 0.4.4 → 0.4.5

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: cea80fa1b1b1eedce5673a87e9a4a34e65e897d4f1f1756d044a8ee37c4d961e
4
- data.tar.gz: 798d5bab20443753941eebb76810a667700e09e70b9c82019e2a20ec2a64a2d5
3
+ metadata.gz: 374ded7327851e372722c4b501033f42dff9d55d9c0f2c2c1f76b897a12684dd
4
+ data.tar.gz: 7f3ad264240f23741939149d3d6583ddcf2087fa5c6482665b0e31992177b108
5
5
  SHA512:
6
- metadata.gz: 232c14b463c2f6fcffc213079b0df03c61078f6b3f4c680784a4613c4025fb36249d87f17c5fc144749863cb0baa3af8ff1fa08d04d3ec399286f4c3c5e31175
7
- data.tar.gz: e2e7426248fdd68bc46c5efb5b3aea9d4841e6012c92ed105e1b1c7d7db7965025acf0622945dc109dc20f257564593663bb67588ade867274200c0bd09901ac
6
+ metadata.gz: 5905f649b65f1b9056459a9da1c499130c2aac5e4f5aa62185d1c3d6b610832ed89317930b0036b2f243f653ce867d9823b382e9880124e526012e1271087e73
7
+ data.tar.gz: 6d42d7c5cd9cfec6313d832892289ddc87b75dbb07f2d636addb5b7a2a64e3579ede93ba7080b07f5dbdacbccc489dd31e66df4a5c186cfcb8c00aa8302b960b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.5] - 2024-06-27
4
+
5
+ - using `root` instead of `container`, this is what serializers use
6
+
3
7
  ## [0.4.4] - 2024-06-26
4
8
 
5
9
  - get `default:` working. Not expecting to use them since db will handle that, but nice to have?
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- attribeauty (0.4.4)
4
+ attribeauty (0.4.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -133,12 +133,12 @@ class MyController
133
133
  Attribeauty::Params.with(request.params)
134
134
  end
135
135
 
136
- # using container will exclude the value and yield:
136
+ # using root will exclude the value and yield:
137
137
  # { title: "woo", email: { address: "hmm@yep.com" } }
138
138
  #
139
139
  def update_params
140
140
  params_filter.accept do
141
- container :user do
141
+ root :user do
142
142
  attribute :title, :string, required: true
143
143
  attribute :email do
144
144
  attribute :address, :string, exclude_if: [:empty?, :nil?]
@@ -177,7 +177,7 @@ class MyController
177
177
  #
178
178
  def update_params
179
179
  params_filter.accept! do
180
- container :user do
180
+ root :user do
181
181
  attribute :title, :string, exclude_if: :nil?, required: true
182
182
  attribute :email do
183
183
  attribute :address, :string
@@ -215,7 +215,7 @@ class MyController
215
215
  #
216
216
  def update_params
217
217
  params_filter.accept exclude_if: :nil?, required: true do
218
- container :user do
218
+ root :user do
219
219
  attribute :title, :string,
220
220
  attribute :email do
221
221
  attribute :address, :string
@@ -43,7 +43,7 @@ module Attribeauty
43
43
  to_h[key] = value
44
44
  end
45
45
 
46
- def container(name)
46
+ def root(name)
47
47
  @request_params = request_params[name]
48
48
 
49
49
  yield
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Attribeauty
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attribeauty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-26 00:00:00.000000000 Z
11
+ date: 2024-06-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: There are so many of these, I just needed this one.
14
14
  email: