lotus-validations 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +10 -4
- data/lib/lotus/validations/version.rb +1 -1
- data/lotus-validations.gemspec +3 -3
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5d9ec74237f0617a38373fdabc7495a93426129
|
4
|
+
data.tar.gz: 2bc50b35391c302a6796615abd188b1d83af98b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16393d2d7241b5123673685f49317182f45fd01f2b98bfaf4d61c1fe2a9dc3db4768ab89bf630d59733dfc397670257695d4ef29a3e83da89c88730ac7a1241d
|
7
|
+
data.tar.gz: 141f632e5c63452f617563a786ff7284c906ec8e49b5f3397d04cc07f6bd7bcb925a051164c963860386644f856c87245d55c36dee4e33ba29ff4699ab015214
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# Lotus::Validations
|
2
2
|
Validations mixin for Ruby objects
|
3
3
|
|
4
|
+
## v0.3.3 - 2015-09-30
|
5
|
+
### Added
|
6
|
+
- [Luca Guidi] Official support for JRuby 9k+
|
7
|
+
|
4
8
|
## v0.3.2 - 2015-05-22
|
5
|
-
### Added
|
9
|
+
### Added
|
10
|
+
- [deepj] Introduced `Lotus::Validations#invalid?`
|
6
11
|
|
7
12
|
## v0.3.1 - 2015-05-15
|
8
13
|
### Fixed
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Validations mixins for objects
|
|
22
22
|
|
23
23
|
## Rubies
|
24
24
|
|
25
|
-
__Lotus::Validations__ supports Ruby (MRI) 2+, JRuby
|
25
|
+
__Lotus::Validations__ supports Ruby (MRI) 2+, JRuby 9k+ & Rubinius 2.3+
|
26
26
|
|
27
27
|
## Installation
|
28
28
|
|
@@ -174,7 +174,7 @@ validations.
|
|
174
174
|
|
175
175
|
#### Acceptance
|
176
176
|
|
177
|
-
An attribute is valid if
|
177
|
+
An attribute is valid if its value is _truthy_.
|
178
178
|
|
179
179
|
```ruby
|
180
180
|
require 'lotus/validations'
|
@@ -188,13 +188,19 @@ end
|
|
188
188
|
signup = Signup.new(terms_of_service: '1')
|
189
189
|
signup.valid? # => true
|
190
190
|
|
191
|
+
signup = Signup.new(terms_of_service: 'true')
|
192
|
+
signup.valid? # => true
|
193
|
+
|
191
194
|
signup = Signup.new(terms_of_service: '')
|
192
195
|
signup.valid? # => false
|
196
|
+
|
197
|
+
signup = Signup.new(terms_of_service: '0')
|
198
|
+
signup.valid? # => false
|
193
199
|
```
|
194
200
|
|
195
201
|
#### Confirmation
|
196
202
|
|
197
|
-
An attribute is valid if
|
203
|
+
An attribute is valid if its value and the value of a corresponding attribute
|
198
204
|
is valid.
|
199
205
|
|
200
206
|
By convention, if you have a `password` attribute, the validation looks for `password_confirmation`.
|
@@ -332,7 +338,7 @@ signup.valid? # => false
|
|
332
338
|
|
333
339
|
#### Size
|
334
340
|
|
335
|
-
An attribute is valid if
|
341
|
+
An attribute is valid if its `#size` falls within the described value.
|
336
342
|
|
337
343
|
```ruby
|
338
344
|
require 'lotus/validations'
|
data/lotus-validations.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'lotus/validations/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'lotus-validations'
|
8
8
|
spec.version = Lotus::Validations::VERSION
|
9
|
-
spec.authors = ['Luca Guidi', 'Trung Lê']
|
10
|
-
spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com']
|
9
|
+
spec.authors = ['Luca Guidi', 'Trung Lê', 'Alfonso Uceda']
|
10
|
+
spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com', 'uceda73@gmail.com']
|
11
11
|
spec.summary = %q{Validations mixin for Ruby objects}
|
12
12
|
spec.description = %q{Validations mixin for Ruby objects and support for Lotus}
|
13
13
|
spec.homepage = 'http://lotusrb.org'
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
spec.required_ruby_version = '>= 2.0.0'
|
21
21
|
|
22
|
-
spec.add_dependency 'lotus-utils', '~> 0.
|
22
|
+
spec.add_dependency 'lotus-utils', '~> 0.5'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
25
25
|
spec.add_development_dependency 'minitest', '~> 5'
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lotus-validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
- Trung Lê
|
9
|
+
- Alfonso Uceda
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2015-
|
13
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: lotus-utils
|
@@ -17,14 +18,14 @@ dependencies:
|
|
17
18
|
requirements:
|
18
19
|
- - "~>"
|
19
20
|
- !ruby/object:Gem::Version
|
20
|
-
version: '0.
|
21
|
+
version: '0.5'
|
21
22
|
type: :runtime
|
22
23
|
prerelease: false
|
23
24
|
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
requirements:
|
25
26
|
- - "~>"
|
26
27
|
- !ruby/object:Gem::Version
|
27
|
-
version: '0.
|
28
|
+
version: '0.5'
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
30
|
name: bundler
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,6 +72,7 @@ description: Validations mixin for Ruby objects and support for Lotus
|
|
71
72
|
email:
|
72
73
|
- me@lucaguidi.com
|
73
74
|
- trung.le@ruby-journal.com
|
75
|
+
- uceda73@gmail.com
|
74
76
|
executables: []
|
75
77
|
extensions: []
|
76
78
|
extra_rdoc_files: []
|
@@ -111,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
113
|
version: '0'
|
112
114
|
requirements: []
|
113
115
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.4.5
|
116
|
+
rubygems_version: 2.4.5.1
|
115
117
|
signing_key:
|
116
118
|
specification_version: 4
|
117
119
|
summary: Validations mixin for Ruby objects
|