accept_values_for 0.7.2 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +23 -0
- data/Gemfile +3 -3
- data/README.md +4 -4
- data/accept_values_for.gemspec +5 -5
- data/gemfiles/activemodel_5_2.gemfile +11 -0
- data/gemfiles/activemodel_6_0.gemfile +11 -0
- data/gemfiles/activemodel_6_1.gemfile +11 -0
- metadata +20 -22
- data/.travis.yml +0 -24
- data/gemfiles/activemodel_3_0.gemfile +0 -11
- data/gemfiles/activemodel_3_1.gemfile +0 -11
- data/gemfiles/activemodel_3_2.gemfile +0 -11
- data/gemfiles/activemodel_4_0.gemfile +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a96bb47515ba5ac6db626bb848cac7d217414b5dbd31cac7cfd0eeecdaaf348f
|
4
|
+
data.tar.gz: 7ecd292ab5b0ae2b4497aae049c3a1fcb13970dbd4035c688e9414a962433743
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ba77f38b528cab4d0517c3e88f72c2b3293281d45e8713c2a3bf0fc2bee624bcdfe22c09553dfdf1f9b79d1bf50eef6d14d342090be656bf2158f73f39727c
|
7
|
+
data.tar.gz: d26bfa8a4206bd6d7b3e80def3c5918d4f4de288ccfdcf0958fc5a0d84ebf2aea58a467421fcae18a71e02112e9adee03429824b8ee1ba53268f087fff53b48c
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
ruby: [2.5, 2.6, 2.7]
|
9
|
+
gemfile:
|
10
|
+
- activemodel_5_2
|
11
|
+
- activemodel_6_0
|
12
|
+
- activemodel_6_1
|
13
|
+
name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
env:
|
16
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
- run: bundle exec rake
|
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :test do
|
6
|
-
gem "activerecord", "~>
|
7
|
-
gem "rspec", "~> 3.
|
8
|
-
gem "sqlite3", "~> 1.
|
6
|
+
gem "activerecord", "~> 6.1", require: "active_record"
|
7
|
+
gem "rspec", "~> 3.10"
|
8
|
+
gem "sqlite3", "~> 1.4"
|
9
9
|
end
|
data/README.md
CHANGED
@@ -7,14 +7,14 @@ be accepted by your model and which should not.
|
|
7
7
|
Read the [original blog post](http://gusiev.com/2010/06/ultimate-rspec-matcher-to-test-validation/).
|
8
8
|
|
9
9
|
[![Gem Version](https://badge.fury.io/rb/accept_values_for.png)](http://badge.fury.io/rb/accept_values_for)
|
10
|
-
[![Build Status](https://
|
10
|
+
[![Build Status](https://github.com/bogdan/accept_values_for/workflows/CI/badge.svg?branch=master)](https://github.com/bogdan/accept_values_for/actions)
|
11
11
|
[![Code Climate](https://codeclimate.com/github/bogdan/accept_values_for.png)](https://codeclimate.com/github/bogdan/accept_values_for)
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
describe User do
|
17
|
-
describe "validation"
|
17
|
+
describe "validation" do
|
18
18
|
subject(:user) { User.new }
|
19
19
|
|
20
20
|
it { should accept_values_for(:email, "john@example.com", "jane@example.org") }
|
@@ -25,8 +25,8 @@ end
|
|
25
25
|
|
26
26
|
## Dependencies
|
27
27
|
|
28
|
-
* Active Model (
|
29
|
-
* RSpec (
|
28
|
+
* Active Model (5 or 6)
|
29
|
+
* RSpec (3)
|
30
30
|
|
31
31
|
## Installation
|
32
32
|
|
data/accept_values_for.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "accept_values_for"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.9.1"
|
6
6
|
|
7
7
|
spec.author = "Bogdan Gusiev"
|
8
8
|
spec.email = "agresso@gmail.com"
|
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0")
|
19
19
|
spec.test_files = spec.files.grep(/^spec/)
|
20
20
|
|
21
|
-
spec.add_dependency "activemodel", ">=
|
22
|
-
spec.add_dependency "rspec", ">=
|
21
|
+
spec.add_dependency "activemodel", ">= 5.0", "< 6.2"
|
22
|
+
spec.add_dependency "rspec", ">= 3.0", "< 4.0"
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~>
|
25
|
-
spec.add_development_dependency "rake", "~>
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.2"
|
25
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accept_values_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,27 +16,27 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '3.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '4.0'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '3.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '4.0'
|
@@ -56,28 +56,28 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
59
|
+
version: '2.2'
|
60
60
|
type: :development
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '2.2'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: rake
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
73
|
+
version: '12.3'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '12.3'
|
81
81
|
description: Writing specs for complex validations is annoying. AcceptValuesFor makes
|
82
82
|
iteasy to test your validations with real world values, asserting which valuesshould
|
83
83
|
be accepted by your model and which should not.
|
@@ -86,18 +86,17 @@ executables: []
|
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
|
+
- ".github/workflows/ci.yml"
|
89
90
|
- ".gitignore"
|
90
|
-
- ".travis.yml"
|
91
91
|
- CHANGELOG.md
|
92
92
|
- Gemfile
|
93
93
|
- LICENSE.txt
|
94
94
|
- README.md
|
95
95
|
- Rakefile
|
96
96
|
- accept_values_for.gemspec
|
97
|
-
- gemfiles/
|
98
|
-
- gemfiles/
|
99
|
-
- gemfiles/
|
100
|
-
- gemfiles/activemodel_4_0.gemfile
|
97
|
+
- gemfiles/activemodel_5_2.gemfile
|
98
|
+
- gemfiles/activemodel_6_0.gemfile
|
99
|
+
- gemfiles/activemodel_6_1.gemfile
|
101
100
|
- lib/accept_values_for.rb
|
102
101
|
- lib/accept_values_for/helpers.rb
|
103
102
|
- lib/accept_values_for/matcher.rb
|
@@ -107,7 +106,7 @@ homepage: https://github.com/bogdan/accept_values_for
|
|
107
106
|
licenses:
|
108
107
|
- MIT
|
109
108
|
metadata: {}
|
110
|
-
post_install_message:
|
109
|
+
post_install_message:
|
111
110
|
rdoc_options: []
|
112
111
|
require_paths:
|
113
112
|
- lib
|
@@ -122,9 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
121
|
- !ruby/object:Gem::Version
|
123
122
|
version: '0'
|
124
123
|
requirements: []
|
125
|
-
|
126
|
-
|
127
|
-
signing_key:
|
124
|
+
rubygems_version: 3.2.0
|
125
|
+
signing_key:
|
128
126
|
specification_version: 4
|
129
127
|
summary: Test complex Active Record validations with RSpec
|
130
128
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 1.8.7
|
4
|
-
- 1.9.2
|
5
|
-
- 1.9.3
|
6
|
-
- 2.0.0
|
7
|
-
- 2.1.0
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/activemodel_3_0.gemfile
|
10
|
-
- gemfiles/activemodel_3_1.gemfile
|
11
|
-
- gemfiles/activemodel_3_2.gemfile
|
12
|
-
- gemfiles/activemodel_4_0.gemfile
|
13
|
-
matrix:
|
14
|
-
exclude:
|
15
|
-
- gemfile: gemfiles/activemodel_4_0.gemfile
|
16
|
-
rvm: 1.8.7
|
17
|
-
- gemfile: gemfiles/activemodel_4_0.gemfile
|
18
|
-
rvm: 1.9.2
|
19
|
-
allow_failures:
|
20
|
-
- rvm: 1.8.7
|
21
|
-
- rvm: 1.9.2
|
22
|
-
branches:
|
23
|
-
only:
|
24
|
-
- master
|