accept_values_for 0.9.3 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +12 -1
- data/.github/workflows/gem-push.yml +45 -0
- data/CHANGELOG.md +24 -14
- data/Gemfile +1 -2
- data/README.md +1 -1
- data/accept_values_for.gemspec +4 -3
- 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 +9 -6
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,11 +5,22 @@ jobs:
|
|
5
5
|
strategy:
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
|
-
ruby: ['3.0', '3.1', '3.2']
|
8
|
+
ruby: ['3.0', '3.1', '3.2', '3.3']
|
9
9
|
gemfile:
|
10
10
|
- activemodel_6_1
|
11
11
|
- activemodel_7_0
|
12
12
|
- activemodel_7_1
|
13
|
+
- activemodel_7_2
|
14
|
+
- activemodel_8_0
|
15
|
+
exclude:
|
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'
|
13
24
|
name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
14
25
|
runs-on: ubuntu-latest
|
15
26
|
env:
|
@@ -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,61 +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
|
2
12
|
|
3
13
|
* Rails 7.1 support
|
4
14
|
* Support for Ruby 2.6 and 2.7, and Rails 5.2 and 6.0 has been dropped
|
5
15
|
|
6
|
-
|
16
|
+
## 0.9.1
|
7
17
|
|
8
18
|
* Rails 7.0 support
|
9
19
|
|
10
|
-
|
20
|
+
## 0.6.0
|
11
21
|
|
12
22
|
* [ENHANCEMENT] Deprecate Rubies 1.8.7 and 1.9.2
|
13
23
|
* [ENHANCEMENT] Remove `discover` matcher
|
14
24
|
* [BUGFIX] Open dependency requirements to allow installation alongside Rails 4
|
15
25
|
* [ENHANCEMENT] Replace Jeweler with Bundler
|
16
26
|
|
17
|
-
|
27
|
+
## 0.5.1 / 2013-10-20
|
18
28
|
|
19
29
|
* [ENHANCEMENT] Refactor matcher messaging
|
20
30
|
* [ENHANCEMENT] Deprecate `discover` matcher in favor of `include`
|
21
31
|
|
22
|
-
|
32
|
+
## 0.4.3 / 2011-03-29
|
23
33
|
|
24
34
|
* [BUGFIX] Revert values set during validation testing
|
25
35
|
|
26
|
-
|
36
|
+
## 0.4.2 / 2011-03-15
|
27
37
|
|
28
38
|
* [BUGFIX] Change error access from `#on` to `#[]`
|
29
39
|
|
30
|
-
|
40
|
+
## 0.4.1 / 2011-02-24
|
31
41
|
|
32
42
|
* [FEATURE] Add wider Active Model compatibility
|
33
43
|
|
34
|
-
|
44
|
+
## 0.3.1 / 2010-09-08
|
35
45
|
|
36
46
|
* [FEATURE] Add Rails 3 compatibility
|
37
47
|
|
38
|
-
|
48
|
+
## 0.3.0 / 2010-07-11
|
39
49
|
|
40
50
|
* [FEATURE] Add `discover` matcher
|
41
51
|
|
42
|
-
|
52
|
+
## 0.2.1 / 2010-06-28
|
43
53
|
|
44
54
|
* [FEATURE] Add support for negative matching
|
45
55
|
|
46
|
-
|
56
|
+
## 0.2.0 / 2010-05-13
|
47
57
|
|
48
58
|
* [FEATURE] Fail only if the validation in question fails
|
49
59
|
* [BUGFIX] Add `activerecord` and `rspec` runtime dependencies
|
50
60
|
|
51
|
-
|
61
|
+
## 0.1.1 / 2010-05-04
|
52
62
|
|
53
63
|
* [BUGFIX] Fix non-attribute validation testing
|
54
64
|
|
55
|
-
|
65
|
+
## 0.1.0 / 2010-05-04
|
56
66
|
|
57
67
|
* [FEATURE] Enable testing methods as well as attributes
|
58
68
|
|
59
|
-
|
69
|
+
## 0.0.1 / 2010-05-03
|
60
70
|
|
61
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"
|
@@ -20,11 +22,10 @@ Gem::Specification.new do |spec|
|
|
20
22
|
|
21
23
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
22
24
|
|
23
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
24
25
|
spec.metadata["homepage_uri"] = spec.homepage
|
25
26
|
spec.metadata["source_code_uri"] = spec.homepage
|
26
27
|
|
27
|
-
spec.add_dependency "activemodel", ">= 6.1", "< 8.
|
28
|
+
spec.add_dependency "activemodel", ">= 6.1", "< 8.1"
|
28
29
|
spec.add_dependency "rspec", ">= 3.10", "< 4.0"
|
29
30
|
|
30
31
|
spec.add_development_dependency "bundler", "~> 2.2"
|
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
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '6.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '8.
|
22
|
+
version: '8.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '6.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '8.
|
32
|
+
version: '8.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
@@ -97,16 +98,18 @@ files:
|
|
97
98
|
- gemfiles/activemodel_6_1.gemfile
|
98
99
|
- gemfiles/activemodel_7_0.gemfile
|
99
100
|
- gemfiles/activemodel_7_1.gemfile
|
101
|
+
- gemfiles/activemodel_7_2.gemfile
|
102
|
+
- gemfiles/activemodel_8_0.gemfile
|
100
103
|
- lib/accept_values_for.rb
|
101
104
|
- lib/accept_values_for/helpers.rb
|
102
105
|
- lib/accept_values_for/matcher.rb
|
106
|
+
- lib/accept_values_for/version.rb
|
103
107
|
- spec/accept_values_for_spec.rb
|
104
108
|
- spec/spec_helper.rb
|
105
109
|
homepage: https://github.com/bogdan/accept_values_for
|
106
110
|
licenses:
|
107
111
|
- MIT
|
108
112
|
metadata:
|
109
|
-
allowed_push_host: https://rubygems.org
|
110
113
|
homepage_uri: https://github.com/bogdan/accept_values_for
|
111
114
|
source_code_uri: https://github.com/bogdan/accept_values_for
|
112
115
|
post_install_message:
|
@@ -124,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
127
|
- !ruby/object:Gem::Version
|
125
128
|
version: '0'
|
126
129
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
130
|
+
rubygems_version: 3.5.11
|
128
131
|
signing_key:
|
129
132
|
specification_version: 4
|
130
133
|
summary: Test complex Active Record validations with RSpec
|