options_model 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -9
- data/lib/options_model/version.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59d10f339948881cc65723b200408cc41afda4e2f20a8a57e41d202d1a5577a7
|
4
|
+
data.tar.gz: 3d6efd95aad8412bea1030ae9409567e93405c683528ef5e8a3cfc75855319ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e513c7a36b7c2d4805ee61fe63a0a736fa201b205b1f1554806ad6c3a2097d97422188b9a94b564f587b909752d34cc31e2563a66718d933a6e7510687375306
|
7
|
+
data.tar.gz: 247f472c517adba88c39ae3a1e336d818237c145aff57a04a3b23df4b49542574f167bf99db88c714fc0d87a3e668219c8034ef3b467baa559a64ac15b49343c
|
data/README.md
CHANGED
@@ -13,21 +13,21 @@ support attribute:
|
|
13
13
|
|
14
14
|
```ruby
|
15
15
|
class Person < OptionsModel::Base
|
16
|
-
|
17
|
-
|
16
|
+
attribute :name, :string
|
17
|
+
attribute :age, :integer
|
18
18
|
|
19
|
-
|
19
|
+
validates :name, presence: true
|
20
20
|
end
|
21
21
|
|
22
22
|
class Book < OptionsModel::Base
|
23
|
-
|
23
|
+
embeds_one :author, class_name: 'Person'
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
attribute :title, :string
|
26
|
+
attribute :tags, :string, array: true
|
27
|
+
attribute :price, :decimal, default: 0
|
28
|
+
attribute :bought_at, :datetime, default: -> { Time.new }
|
29
29
|
|
30
|
-
|
30
|
+
validates :title, presence: true
|
31
31
|
end
|
32
32
|
```
|
33
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: options_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jasl
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -50,6 +50,20 @@ dependencies:
|
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '7'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: psych
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.2'
|
60
|
+
type: :runtime
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3.2'
|
53
67
|
description: An ActiveModel implementation that make easier to handle model which
|
54
68
|
will be serialized in a real model.
|
55
69
|
email:
|
@@ -73,7 +87,7 @@ homepage: https://github.com/jasl-lab/options_model
|
|
73
87
|
licenses:
|
74
88
|
- MIT
|
75
89
|
metadata: {}
|
76
|
-
post_install_message:
|
90
|
+
post_install_message:
|
77
91
|
rdoc_options: []
|
78
92
|
require_paths:
|
79
93
|
- lib
|
@@ -88,8 +102,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
104
|
requirements: []
|
91
|
-
rubygems_version: 3.
|
92
|
-
signing_key:
|
105
|
+
rubygems_version: 3.1.4
|
106
|
+
signing_key:
|
93
107
|
specification_version: 4
|
94
108
|
summary: Make easier to handle model which will be serialized in a real model.
|
95
109
|
test_files: []
|