datory 1.0.0.rc7 → 1.0.0.rc9
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 -20
- data/lib/datory/engine.rb +7 -0
- data/lib/datory/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581be089a2e76a9d744e511869da46033d47904a1103343ec447d3d508a41ab8
|
4
|
+
data.tar.gz: d9a70d1d761b4370fb7022401b8a830ab84fbe713c4fd33de4bb84daa73f4101
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59cccc7dd3abea33e60cc44be7ee1f9406dccff627ff560cdd76c1e5cff66ec6d255df87d666637745efe9e13630c5f668ff9b6454472deb6a16653740401ca2
|
7
|
+
data.tar.gz: dc3d890966553c776ea4b5a0269c75bc8690f9b591d0f18538d81bade8b8facd9670a750626d096edb359313964c66aa10b2318ebe1517d10e591a7c796ae691
|
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,21 +55,6 @@ module Datory
|
|
60
55
|
attribute(name, **options)
|
61
56
|
end
|
62
57
|
|
63
|
-
def date(name, **options)
|
64
|
-
options = options.merge(from: Date)
|
65
|
-
attribute(name, **options)
|
66
|
-
end
|
67
|
-
|
68
|
-
def time(name, **options)
|
69
|
-
options = options.merge(from: Time)
|
70
|
-
attribute(name, **options)
|
71
|
-
end
|
72
|
-
|
73
|
-
def datetime(name, **options)
|
74
|
-
options = options.merge(from: DateTime)
|
75
|
-
attribute(name, **options)
|
76
|
-
end
|
77
|
-
|
78
58
|
########################################################################
|
79
59
|
|
80
60
|
def collection_of_attributes
|
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.rc9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- lib/datory/context/callable.rb
|
208
208
|
- lib/datory/context/dsl.rb
|
209
209
|
- lib/datory/context/workspace.rb
|
210
|
+
- lib/datory/engine.rb
|
210
211
|
- lib/datory/result.rb
|
211
212
|
- lib/datory/service/base.rb
|
212
213
|
- lib/datory/service/builder.rb
|