accept_values_for 0.9.2 → 0.9.5
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/.github/workflows/ci.yml +13 -8
- data/.github/workflows/gem-push.yml +45 -0
- data/CHANGELOG.md +28 -13
- data/Gemfile +2 -3
- data/README.md +1 -1
- data/accept_values_for.gemspec +11 -4
- data/gemfiles/activemodel_7_1.gemfile +11 -0
- data/gemfiles/activemodel_7_2.gemfile +11 -0
- data/gemfiles/activemodel_8_0.gemfile +11 -0
- data/lib/accept_values_for/version.rb +3 -0
- data/lib/accept_values_for.rb +1 -0
- data/spec/spec_helper.rb +8 -25
- metadata +20 -15
- data/gemfiles/activemodel_5_2.gemfile +0 -11
- data/gemfiles/activemodel_6_0.gemfile +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b508c7c635a2c407ca9502daeccb96698ec5826668c868dc20733c1569e46bc
|
4
|
+
data.tar.gz: 51d0cf9c872af0b7f80457a9b94e8efa0720b3c2bad2a0b946befc79d15324af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d94ed3a6b1044e4a97ac3ea4980910aa77b27299b5f18c130f3de0ad2ae2805245678af4737b59918791188d450907b99561c6cdd0b8f22dd88629c1b98bd2c7
|
7
|
+
data.tar.gz: 393070aa3d8d89b370850b2b73b4c720a503e52f8193b6d76f52824050f4a37c75c5b8e5e80e273444e11d198616d9f55007d65d149d63b6404282e72ee49da9
|
data/.github/workflows/ci.yml
CHANGED
@@ -5,23 +5,28 @@ jobs:
|
|
5
5
|
strategy:
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
|
-
ruby: [
|
8
|
+
ruby: ['3.0', '3.1', '3.2', '3.3']
|
9
9
|
gemfile:
|
10
|
-
- activemodel_5_2
|
11
|
-
- activemodel_6_0
|
12
10
|
- activemodel_6_1
|
13
11
|
- activemodel_7_0
|
12
|
+
- activemodel_7_1
|
13
|
+
- activemodel_7_2
|
14
|
+
- activemodel_8_0
|
14
15
|
exclude:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
# Rails 7.2 requires Ruby >= 3.1.0
|
17
|
+
- ruby: '3.0'
|
18
|
+
gemfile: 'activemodel_7_2'
|
19
|
+
# Rails 8.0 requires Ruby >= 3.2.0
|
20
|
+
- ruby: '3.0'
|
21
|
+
gemfile: 'activemodel_8_0'
|
22
|
+
- ruby: '3.1'
|
23
|
+
gemfile: 'activemodel_8_0'
|
19
24
|
name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
20
25
|
runs-on: ubuntu-latest
|
21
26
|
env:
|
22
27
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
23
28
|
steps:
|
24
|
-
- uses: actions/checkout@
|
29
|
+
- uses: actions/checkout@v4
|
25
30
|
- uses: ruby/setup-ruby@v1
|
26
31
|
with:
|
27
32
|
ruby-version: ${{ matrix.ruby }}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
name: Build + Publish
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
permissions:
|
11
|
+
contents: read
|
12
|
+
packages: write
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v4
|
16
|
+
- name: Set up Ruby 3.2
|
17
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
18
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
19
|
+
# uses: ruby/setup-ruby@v1
|
20
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
21
|
+
with:
|
22
|
+
ruby-version: 3.2.2
|
23
|
+
|
24
|
+
- name: Publish to GPR
|
25
|
+
run: |
|
26
|
+
mkdir -p $HOME/.gem
|
27
|
+
touch $HOME/.gem/credentials
|
28
|
+
chmod 0600 $HOME/.gem/credentials
|
29
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
30
|
+
gem build *.gemspec
|
31
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
32
|
+
env:
|
33
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
34
|
+
OWNER: ${{ github.repository_owner }}
|
35
|
+
|
36
|
+
- name: Publish to RubyGems
|
37
|
+
run: |
|
38
|
+
mkdir -p $HOME/.gem
|
39
|
+
touch $HOME/.gem/credentials
|
40
|
+
chmod 0600 $HOME/.gem/credentials
|
41
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
42
|
+
gem build *.gemspec
|
43
|
+
gem push *.gem
|
44
|
+
env:
|
45
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/CHANGELOG.md
CHANGED
@@ -1,56 +1,71 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.9.5
|
4
|
+
|
5
|
+
* Rails 8.0 support
|
6
|
+
|
7
|
+
## 0.9.4
|
8
|
+
|
9
|
+
* Test release
|
10
|
+
|
11
|
+
## 0.9.3
|
12
|
+
|
13
|
+
* Rails 7.1 support
|
14
|
+
* Support for Ruby 2.6 and 2.7, and Rails 5.2 and 6.0 has been dropped
|
15
|
+
|
16
|
+
## 0.9.1
|
2
17
|
|
3
18
|
* Rails 7.0 support
|
4
19
|
|
5
|
-
|
20
|
+
## 0.6.0
|
6
21
|
|
7
22
|
* [ENHANCEMENT] Deprecate Rubies 1.8.7 and 1.9.2
|
8
23
|
* [ENHANCEMENT] Remove `discover` matcher
|
9
24
|
* [BUGFIX] Open dependency requirements to allow installation alongside Rails 4
|
10
25
|
* [ENHANCEMENT] Replace Jeweler with Bundler
|
11
26
|
|
12
|
-
|
27
|
+
## 0.5.1 / 2013-10-20
|
13
28
|
|
14
29
|
* [ENHANCEMENT] Refactor matcher messaging
|
15
30
|
* [ENHANCEMENT] Deprecate `discover` matcher in favor of `include`
|
16
31
|
|
17
|
-
|
32
|
+
## 0.4.3 / 2011-03-29
|
18
33
|
|
19
34
|
* [BUGFIX] Revert values set during validation testing
|
20
35
|
|
21
|
-
|
36
|
+
## 0.4.2 / 2011-03-15
|
22
37
|
|
23
38
|
* [BUGFIX] Change error access from `#on` to `#[]`
|
24
39
|
|
25
|
-
|
40
|
+
## 0.4.1 / 2011-02-24
|
26
41
|
|
27
42
|
* [FEATURE] Add wider Active Model compatibility
|
28
43
|
|
29
|
-
|
44
|
+
## 0.3.1 / 2010-09-08
|
30
45
|
|
31
46
|
* [FEATURE] Add Rails 3 compatibility
|
32
47
|
|
33
|
-
|
48
|
+
## 0.3.0 / 2010-07-11
|
34
49
|
|
35
50
|
* [FEATURE] Add `discover` matcher
|
36
51
|
|
37
|
-
|
52
|
+
## 0.2.1 / 2010-06-28
|
38
53
|
|
39
54
|
* [FEATURE] Add support for negative matching
|
40
55
|
|
41
|
-
|
56
|
+
## 0.2.0 / 2010-05-13
|
42
57
|
|
43
58
|
* [FEATURE] Fail only if the validation in question fails
|
44
59
|
* [BUGFIX] Add `activerecord` and `rspec` runtime dependencies
|
45
60
|
|
46
|
-
|
61
|
+
## 0.1.1 / 2010-05-04
|
47
62
|
|
48
63
|
* [BUGFIX] Fix non-attribute validation testing
|
49
64
|
|
50
|
-
|
65
|
+
## 0.1.0 / 2010-05-04
|
51
66
|
|
52
67
|
* [FEATURE] Enable testing methods as well as attributes
|
53
68
|
|
54
|
-
|
69
|
+
## 0.0.1 / 2010-05-03
|
55
70
|
|
56
71
|
* Initial release
|
data/Gemfile
CHANGED
data/README.md
CHANGED
data/accept_values_for.gemspec
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require_relative 'lib/accept_values_for/version'
|
4
|
+
|
3
5
|
Gem::Specification.new do |spec|
|
4
6
|
spec.name = "accept_values_for"
|
5
|
-
spec.version =
|
7
|
+
spec.version = AcceptValuesFor::VERSION
|
6
8
|
|
7
9
|
spec.author = "Bogdan Gusiev"
|
8
10
|
spec.email = "agresso@gmail.com"
|
@@ -18,9 +20,14 @@ Gem::Specification.new do |spec|
|
|
18
20
|
spec.files = `git ls-files -z`.split("\x0")
|
19
21
|
spec.test_files = spec.files.grep(/^spec/)
|
20
22
|
|
21
|
-
spec.
|
22
|
-
|
23
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
24
|
+
|
25
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
26
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
27
|
+
|
28
|
+
spec.add_dependency "activemodel", ">= 6.1", "< 8.1"
|
29
|
+
spec.add_dependency "rspec", ">= 3.10", "< 4.0"
|
23
30
|
|
24
31
|
spec.add_development_dependency "bundler", "~> 2.2"
|
25
|
-
spec.add_development_dependency "rake", "~>
|
32
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
26
33
|
end
|
data/lib/accept_values_for.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -5,34 +5,17 @@ Bundler.require(:test)
|
|
5
5
|
I18n.enforce_available_locales = false
|
6
6
|
|
7
7
|
RSpec.configure do |config|
|
8
|
-
config.before(:suite) do
|
9
|
-
ActiveRecord::Base.establish_connection(
|
10
|
-
:adapter => "sqlite3",
|
11
|
-
:database => ":memory:"
|
12
|
-
)
|
13
|
-
|
14
|
-
ActiveRecord::Schema.verbose = false
|
15
|
-
ActiveRecord::Schema.define(:version => 1) do
|
16
|
-
create_table :groups do |t|
|
17
|
-
t.string :name
|
18
|
-
end
|
19
|
-
|
20
|
-
create_table :people do |t|
|
21
|
-
t.integer :group_id
|
22
|
-
t.string :gender
|
23
|
-
t.string :name
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
8
|
config.before do
|
29
|
-
class ::Group
|
30
|
-
|
9
|
+
class ::Group
|
10
|
+
include ActiveModel::Model
|
11
|
+
|
12
|
+
attr_accessor :name
|
31
13
|
end
|
32
14
|
|
33
|
-
class ::Person
|
34
|
-
|
15
|
+
class ::Person
|
16
|
+
include ActiveModel::Model
|
35
17
|
|
18
|
+
attr_accessor :group, :gender
|
36
19
|
validates_presence_of :group
|
37
20
|
validates_inclusion_of :gender, :in => ["MALE", "FEMALE"]
|
38
21
|
end
|
@@ -42,7 +25,7 @@ RSpec.configure do |config|
|
|
42
25
|
Object.send(:remove_const, :Person)
|
43
26
|
Object.send(:remove_const, :Group)
|
44
27
|
end
|
45
|
-
|
28
|
+
|
46
29
|
config.expect_with(:rspec) do |c|
|
47
30
|
c.syntax = [:should, :expect]
|
48
31
|
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.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-15 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: '6.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.1'
|
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: '6.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.1'
|
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: '3.
|
39
|
+
version: '3.10'
|
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: '3.
|
49
|
+
version: '3.10'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '4.0'
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
73
|
+
version: '13.0'
|
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: '13.0'
|
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.
|
@@ -87,6 +87,7 @@ extensions: []
|
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
89
|
- ".github/workflows/ci.yml"
|
90
|
+
- ".github/workflows/gem-push.yml"
|
90
91
|
- ".gitignore"
|
91
92
|
- CHANGELOG.md
|
92
93
|
- Gemfile
|
@@ -94,19 +95,23 @@ files:
|
|
94
95
|
- README.md
|
95
96
|
- Rakefile
|
96
97
|
- accept_values_for.gemspec
|
97
|
-
- gemfiles/activemodel_5_2.gemfile
|
98
|
-
- gemfiles/activemodel_6_0.gemfile
|
99
98
|
- gemfiles/activemodel_6_1.gemfile
|
100
99
|
- gemfiles/activemodel_7_0.gemfile
|
100
|
+
- gemfiles/activemodel_7_1.gemfile
|
101
|
+
- gemfiles/activemodel_7_2.gemfile
|
102
|
+
- gemfiles/activemodel_8_0.gemfile
|
101
103
|
- lib/accept_values_for.rb
|
102
104
|
- lib/accept_values_for/helpers.rb
|
103
105
|
- lib/accept_values_for/matcher.rb
|
106
|
+
- lib/accept_values_for/version.rb
|
104
107
|
- spec/accept_values_for_spec.rb
|
105
108
|
- spec/spec_helper.rb
|
106
109
|
homepage: https://github.com/bogdan/accept_values_for
|
107
110
|
licenses:
|
108
111
|
- MIT
|
109
|
-
metadata:
|
112
|
+
metadata:
|
113
|
+
homepage_uri: https://github.com/bogdan/accept_values_for
|
114
|
+
source_code_uri: https://github.com/bogdan/accept_values_for
|
110
115
|
post_install_message:
|
111
116
|
rdoc_options: []
|
112
117
|
require_paths:
|
@@ -115,14 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
120
|
requirements:
|
116
121
|
- - ">="
|
117
122
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
123
|
+
version: 3.0.0
|
119
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
125
|
requirements:
|
121
126
|
- - ">="
|
122
127
|
- !ruby/object:Gem::Version
|
123
128
|
version: '0'
|
124
129
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
130
|
+
rubygems_version: 3.5.11
|
126
131
|
signing_key:
|
127
132
|
specification_version: 4
|
128
133
|
summary: Test complex Active Record validations with RSpec
|