validate_specific_value 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +48 -0
- data/Gemfile.lock +1 -2
- data/README.md +3 -0
- data/Rakefile +9 -1
- data/gemfiles/ar_4.2.gemfile +5 -0
- data/gemfiles/ar_5.1.gemfile +5 -0
- data/gemfiles/ar_5.2.gemfile +5 -0
- data/lib/validate_specific_value/version.rb +1 -1
- data/validate_specific_value.gemspec +0 -1
- metadata +6 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08e4492f3309857e8222d812fd88ecc9c8f80283021f61cb00957c87628758be'
|
4
|
+
data.tar.gz: c5e1b4e360a41686dfcacb8ac39e2b17521c4316bd5034aae4805eeaf22c5738
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4b7479de339e8a154d96c8b5076d5c7351d0467aabec2f6f2fb8207e92e81a5425ac83149ed393c49a23bebe4702ef1df771cc0e11e62b3edf5a3b2b8de3d81
|
7
|
+
data.tar.gz: 15d0d6963fa5c31789f825b4130fbc58edfad8e72bd2f0613b42af4f9bd4934504c25682d961f8577c0b930b6c7fa9512ba08f8e9eafa11a5bc5c251eb5ecef5
|
data/.travis.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
|
4
|
+
# For ruby compatibility, we test the highest and lowest minor versions only.
|
5
|
+
# For example, if our gemspec says `required_ruby_version = ">= 2.3.0"`, and
|
6
|
+
# ruby 2.5.0 has just been released, then we test 2.3 and 2.5, but not 2.4.
|
7
|
+
rvm:
|
8
|
+
- 2.3.8
|
9
|
+
- 2.4.5
|
10
|
+
- 2.5.3
|
11
|
+
|
12
|
+
env:
|
13
|
+
global:
|
14
|
+
- TRAVIS=true
|
15
|
+
matrix:
|
16
|
+
- DB=mysql
|
17
|
+
- DB=postgres
|
18
|
+
- DB=sqlite
|
19
|
+
|
20
|
+
# We want to use `sudo: false` because the container infrastructure is supposed
|
21
|
+
# to be faster, but Travis is having issues with containers lately ..
|
22
|
+
#
|
23
|
+
# > No output has been received in the last 10m0s
|
24
|
+
#
|
25
|
+
# .. and they recommend we use the VM infrastructure (`sudo: required`) in
|
26
|
+
# the meantime.
|
27
|
+
sudo: required
|
28
|
+
|
29
|
+
before_install:
|
30
|
+
- gem update bundler
|
31
|
+
|
32
|
+
gemfile:
|
33
|
+
- gemfiles/ar_4.2.gemfile
|
34
|
+
- gemfiles/ar_5.1.gemfile
|
35
|
+
- gemfiles/ar_5.2.gemfile
|
36
|
+
matrix:
|
37
|
+
exclude:
|
38
|
+
# optimization: don't test intermediate rubies (see above)
|
39
|
+
- rvm: 2.4.5
|
40
|
+
gemfile: gemfiles/ar_4.2.gemfile
|
41
|
+
- rvm: 2.4.5
|
42
|
+
gemfile: gemfiles/ar_5.1.gemfile
|
43
|
+
- rvm: 2.4.5
|
44
|
+
gemfile: gemfiles/ar_5.2.gemfile
|
45
|
+
fast_finish: true
|
46
|
+
|
47
|
+
addons:
|
48
|
+
postgresql: "9.4"
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# validate_specific_value
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/ts-3156/validate_specific_value.svg?branch=master)](https://travis-ci.org/ts-3156/validate_specific_value)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/validate_specific_value.svg)](https://badge.fury.io/rb/validate_specific_value)
|
5
|
+
|
3
6
|
This is a way to validate single attribute in Rails. :tada:
|
4
7
|
|
5
8
|
Sometimes there are validations that are quite expensive (e.g. validations that need to perform database queries). In that case you need to avoid using valid? because it simply does a lot more than you need. [link](https://stackoverflow.com/questions/4804591/rails-activerecord-validate-single-attribute)
|
data/Rakefile
CHANGED
@@ -36,6 +36,5 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency "bundler"
|
37
37
|
spec.add_development_dependency "rake"
|
38
38
|
spec.add_development_dependency "minitest"
|
39
|
-
spec.add_development_dependency "activerecord"
|
40
39
|
spec.add_development_dependency "sqlite3"
|
41
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validate_specific_value
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ts-3156
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -72,20 +72,6 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: activerecord
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: sqlite3
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +94,7 @@ extensions: []
|
|
108
94
|
extra_rdoc_files: []
|
109
95
|
files:
|
110
96
|
- ".gitignore"
|
97
|
+
- ".travis.yml"
|
111
98
|
- Gemfile
|
112
99
|
- Gemfile.lock
|
113
100
|
- LICENSE.txt
|
@@ -115,6 +102,9 @@ files:
|
|
115
102
|
- Rakefile
|
116
103
|
- bin/console
|
117
104
|
- bin/setup
|
105
|
+
- gemfiles/ar_4.2.gemfile
|
106
|
+
- gemfiles/ar_5.1.gemfile
|
107
|
+
- gemfiles/ar_5.2.gemfile
|
118
108
|
- lib/validate_specific_value.rb
|
119
109
|
- lib/validate_specific_value/model.rb
|
120
110
|
- lib/validate_specific_value/version.rb
|