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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eba2b32a298365358878cd5e38acc5dca357f3f5165de150fe2a49ce0a1c3eb8
4
- data.tar.gz: f776085436cc19d14ab160f7dee169dc0f0b4671d8c11fdf0d563b76e9ced752
3
+ metadata.gz: '08e4492f3309857e8222d812fd88ecc9c8f80283021f61cb00957c87628758be'
4
+ data.tar.gz: c5e1b4e360a41686dfcacb8ac39e2b17521c4316bd5034aae4805eeaf22c5738
5
5
  SHA512:
6
- metadata.gz: 991303fda26deab88ac2483ff9186f15955dbb1006fb1094685d6487b99170c0981d9f127e1933b9b3c121a2a80d2a19ff5e71fc395c5332d2ae2c13036a7988
7
- data.tar.gz: 7ba5f676dbb4fecd7510e1b40c44a3a1da6536cd9625d00f1ab5d2c7598b028ebe00752a56c62248e6a0d32d08c42547d0808e7dc1138d7ae781e6f4d7b79ee3
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- validate_specific_value (0.3.0)
4
+ validate_specific_value (0.3.1)
5
5
  activerecord (>= 4.2, < 6.0)
6
6
 
7
7
  GEM
@@ -33,7 +33,6 @@ PLATFORMS
33
33
  ruby
34
34
 
35
35
  DEPENDENCIES
36
- activerecord
37
36
  bundler
38
37
  minitest
39
38
  rake
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
@@ -1,2 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
- task :default => :spec
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task default: :test
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activerecord", "~> 4.2.10"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activerecord", "~> 5.1.5"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activerecord", "~> 5.2.1"
4
+
5
+ gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  module ValidateSpecificValue
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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.0
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-20 00:00:00.000000000 Z
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