enum_attributes_validation 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42d2adee0b850e2f791721d188b738c2f5fc76a9
4
- data.tar.gz: 403c062de6b05496ab0418541c65b61cf20aebd4
3
+ metadata.gz: 510ef25a74eb533365d17b767e23896707116d3c
4
+ data.tar.gz: bc493480fa727015e8264969f7ffa123227ad786
5
5
  SHA512:
6
- metadata.gz: 62a8457498e1446b5c10fa9e22f6e501ea6a55d0ec4cc89c39cbb2d8f5208744dcd33b5694af7ffc712d75b99b290f7b27afff33a11e7ddf3860b26b237a1280
7
- data.tar.gz: b4e2b43b301d286fc0e44646fdea8f89a601922bfbcc700d11740f2ac2b7f1fbcc7d0a5cef240810d75d24ab2286ae541ad3325e5669e3c1949c14640b268b36
6
+ metadata.gz: 87f2c81c7d543a217a845a95cd054e54a96c11fddcf07862d9b85d2b8be63317735c21156c0d61c382699f574c79cc25a20fcd54029580042d072bbb63294beb
7
+ data.tar.gz: 21ce08372540b5cba1765d46de42ab7e1a4b1d5b0a959dc0fac940985dfa6f248d582f3e2e0bccba9c61bf5b065cf31f34a436cc8688174d82238689b9bdce50
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 cristi_razvi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # EnumAttributesValidation
2
+
3
+ Enum Attributes Validation provides validation functionality for enum attributes in models.
4
+
5
+ ## Installation
6
+
7
+ Add to Gemfile:
8
+
9
+ ```ruby
10
+ gem 'enum_attributes_validation'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install enum_attributes_validation
20
+
21
+ ## Usage
22
+
23
+ Use built in method to specify which enum attributes you want to validate with inclusion.
24
+
25
+ ```ruby
26
+ class Comment < ApplicationRecord
27
+ enum gender { male: 0, female: 1 }
28
+
29
+ validate_enum_attributes :gender
30
+ end
31
+ ```
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/enum_attributes_validation.
36
+
37
+ ## License
38
+
39
+ MIT License.
@@ -0,0 +1,3 @@
1
+ module EnumAttributesValidation
2
+ VERSION = "0.1.2"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_attributes_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristi Stefan
@@ -46,9 +46,12 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - LICENSE
50
+ - README.md
49
51
  - bin/console
50
52
  - bin/setup
51
53
  - lib/enum_attributes_validation.rb
54
+ - lib/enum_attributes_validation/version.rb
52
55
  homepage: https://github.com/CristiRazvi/enum_attributes_validation
53
56
  licenses:
54
57
  - MIT