datory 1.0.0.rc6 → 1.0.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/lib/datory/attributes/dsl.rb +0 -25
- data/lib/datory/service/base.rb +2 -0
- data/lib/datory/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b052892a1fc08acc5ffb825f3dc14eaca5d28f715850e7f8e54b9c594a419d9
|
4
|
+
data.tar.gz: 6d87e60a4bd9ce2a4972091950010bb4908b921f7489ce2d728515c45666a98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675cd69f300045e6bcdd58ea9c24b402fd0c652a30c0fff78dbc73b45635d405f9c5598a45696bb967cc890c94c97a1f7e6e50bcaf8b7275a6bf518656ccfe63
|
7
|
+
data.tar.gz: b40b64a011b064e3222612d36d13c2309d975078dcfcdc20c903cb5e3d407b048b25ef54361e83bcd602ac5fdd5a67cc6353dae0bf36a5e542d70afec2b3b0fb
|
data/README.md
CHANGED
@@ -36,30 +36,34 @@ UserDto.deserialize(json)
|
|
36
36
|
```ruby
|
37
37
|
class UserDto < Datory::Base
|
38
38
|
uuid :id
|
39
|
+
|
39
40
|
string :firstname, to: :first_name
|
40
41
|
string :lastname, to: :last_name
|
42
|
+
|
41
43
|
string :email
|
44
|
+
string :phone
|
45
|
+
string :website
|
46
|
+
|
42
47
|
string :birthDate, to: :birth_date, as: Date
|
43
48
|
|
44
49
|
one :login, include: UserLoginDto
|
50
|
+
one :company, include: UserCompanyDto
|
45
51
|
|
46
52
|
many :addresses, include: UserAddressDto
|
47
|
-
|
48
|
-
string :phone
|
49
|
-
string :website
|
50
|
-
|
51
|
-
one :company, include: UserCompanyDto
|
52
53
|
end
|
53
54
|
```
|
54
55
|
|
55
56
|
```ruby
|
56
57
|
class UserLoginDto < Datory::Base
|
57
|
-
|
58
|
+
uuid :id
|
59
|
+
|
58
60
|
string :username
|
59
61
|
string :password
|
62
|
+
|
60
63
|
string :md5
|
61
64
|
string :sha1
|
62
|
-
|
65
|
+
|
66
|
+
string :registered_at, as: DateTime
|
63
67
|
end
|
64
68
|
```
|
65
69
|
|
@@ -40,11 +40,6 @@ module Datory
|
|
40
40
|
|
41
41
|
########################################################################
|
42
42
|
|
43
|
-
def symbol(name, **options)
|
44
|
-
options = options.merge(from: Symbol)
|
45
|
-
attribute(name, **options)
|
46
|
-
end
|
47
|
-
|
48
43
|
def string(name, **options)
|
49
44
|
options = options.merge(from: String)
|
50
45
|
attribute(name, **options)
|
@@ -60,26 +55,6 @@ module Datory
|
|
60
55
|
attribute(name, **options)
|
61
56
|
end
|
62
57
|
|
63
|
-
def duration(name, **options)
|
64
|
-
options = options.merge(from: ActiveSupport::Duration)
|
65
|
-
attribute(name, **options)
|
66
|
-
end
|
67
|
-
|
68
|
-
def date(name, **options)
|
69
|
-
options = options.merge(from: Date)
|
70
|
-
attribute(name, **options)
|
71
|
-
end
|
72
|
-
|
73
|
-
def time(name, **options)
|
74
|
-
options = options.merge(from: Time)
|
75
|
-
attribute(name, **options)
|
76
|
-
end
|
77
|
-
|
78
|
-
def datetime(name, **options)
|
79
|
-
options = options.merge(from: DateTime)
|
80
|
-
attribute(name, **options)
|
81
|
-
end
|
82
|
-
|
83
58
|
########################################################################
|
84
59
|
|
85
60
|
def collection_of_attributes
|
data/lib/datory/service/base.rb
CHANGED
data/lib/datory/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - '='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.5.0.
|
53
|
+
version: 2.5.0.rc6
|
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.
|
60
|
+
version: 2.5.0.rc6
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: zeitwerk
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|