datory 1.0.0.rc15 → 1.0.0.rc17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/lib/datory/version.rb +1 -1
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cf1723be06fbf81937c9e8e9b20cf1e37f3d70765dbfde943fc0e3640ab3c13
4
- data.tar.gz: 90f48cba076d54721d8c03858016326a87c4b6c3dea2bcbabdff17ac7c69677e
3
+ metadata.gz: ff1061ed5efc8ae9bb2b2869d8c745de7576adbb85758c1ed0655f6159e0e191
4
+ data.tar.gz: e0040ac246130dd097433a3f472b94dcf6022ce334ba8213af31336d87fdbcd7
5
5
  SHA512:
6
- metadata.gz: '0794e8bf0e3bbf898c595199207ecb6f833ab84b43450a493339c7a27f87577c3a4fdb43d48e2ab21f8a93c7cf49fdd55ca0e4182d18c89ad0a66bb613a2d0a5'
7
- data.tar.gz: 8571cd2fbff8d5afb5b81fc68a8ae37c5d8ecb3f387037afdaddd61b0bad8974d0198d3c85750f028b9fd7a57e7b66d9a92bc3e0fd19849fc7bd6ab547c45237
6
+ metadata.gz: b38dbd31412aa31012c51b6e9fda0efa2a5bbabb946904491670127c69965d20c8e6e962c8666259e64a25a47bf89e3464d457600dfa7bbff152bf6b237e5b18
7
+ data.tar.gz: 50310262dfe8d781cb869091fdcbadac1da85a8c3769b1988f8465786919861fe151ecc6299667b19ae7733cd269ab61d89831ef19c38dfe40fb2bbf141628b1
data/README.md CHANGED
@@ -25,24 +25,29 @@ user = User.find(...)
25
25
  UserDto.serialize(user) # => { ... }
26
26
  ```
27
27
 
28
+ #### Deserialize
29
+
30
+ ```ruby
31
+ UserDto.deserialize(json) # => Datory::Result
32
+ ```
33
+
34
+ #### Form
35
+
28
36
  For serialization, the `form` method is also available.
29
37
  This prepares a `Form` object, which has a set of additional methods such as `valid?` and `invalid?`.
30
38
 
31
39
  ```ruby
32
40
  form = UserDto.form(user)
33
41
 
42
+ form.target # => UserDto
43
+ form.model # => { ... }
44
+
34
45
  form.valid? # => true
35
46
  form.invalid? # => false
36
47
 
37
48
  form.serialize # => { ... }
38
49
  ```
39
50
 
40
- #### Deserialize
41
-
42
- ```ruby
43
- UserDto.deserialize(json) # => Datory::Result
44
- ```
45
-
46
51
  #### Examples
47
52
 
48
53
  ```ruby
@@ -5,7 +5,7 @@ module Datory
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc15"
8
+ PRE = "rc17"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc15
4
+ version: 1.0.0.rc17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-30 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -48,16 +48,16 @@ dependencies:
48
48
  name: servactory
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - '='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 2.5.0.rc7
53
+ version: 2.5.1
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - '='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 2.5.0.rc7
60
+ version: 2.5.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: terminal-table
63
63
  requirement: !ruby/object:Gem::Requirement