datory 1.0.0.rc15 → 1.0.0.rc16

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 +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cf1723be06fbf81937c9e8e9b20cf1e37f3d70765dbfde943fc0e3640ab3c13
4
- data.tar.gz: 90f48cba076d54721d8c03858016326a87c4b6c3dea2bcbabdff17ac7c69677e
3
+ metadata.gz: 201a53f5b4ca79442fa45bbd224c13028cc9d0d23fe1c9648d0e5c847af9bc12
4
+ data.tar.gz: 5e89ad33bbbe3a5de586c4c1387782309f104fd01a1ee9a6bba97f55492e786b
5
5
  SHA512:
6
- metadata.gz: '0794e8bf0e3bbf898c595199207ecb6f833ab84b43450a493339c7a27f87577c3a4fdb43d48e2ab21f8a93c7cf49fdd55ca0e4182d18c89ad0a66bb613a2d0a5'
7
- data.tar.gz: 8571cd2fbff8d5afb5b81fc68a8ae37c5d8ecb3f387037afdaddd61b0bad8974d0198d3c85750f028b9fd7a57e7b66d9a92bc3e0fd19849fc7bd6ab547c45237
6
+ metadata.gz: 8271c50fce2d564962ae13dc97c4cea02a089c77317767065cfef7b912aa56732e967206f8e56d103d21b2395ffc6477a99587a8a23aee09f23be07c797c31fc
7
+ data.tar.gz: 986822851f48f25085bfe2c5828b85bea56490e0874b699fbeb1808c15b7bedcb04b819c15ae355e1b2de10a1e3aaeeb0fedd3ff4e0538fa6628df929a4b2817
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 = "rc16"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.rc16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
@@ -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.0
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.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: terminal-table
63
63
  requirement: !ruby/object:Gem::Requirement