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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d67c3b98fd875c40b57ac11aacb639f2f3266268e3547190fe17c035d80eebc
4
- data.tar.gz: 486732f8d3152b7a458a3303f3aabdbde3e84ebabd003b12a3f225c3b760c2d3
3
+ metadata.gz: 3b508c7c635a2c407ca9502daeccb96698ec5826668c868dc20733c1569e46bc
4
+ data.tar.gz: 51d0cf9c872af0b7f80457a9b94e8efa0720b3c2bad2a0b946befc79d15324af
5
5
  SHA512:
6
- metadata.gz: b5156f8032a194a8f57faac1677d9f9585274d6a54194a74ac05213b08a9baa97bbb7dfe4857dd58ea6d1fa29b1db0c10cdfb6f46732669ba5feb03616dbd59c
7
- data.tar.gz: d7ba7147aa741c90128a10eec3209608ccb0885d30026c6c6e28ed73e0ff1403598b527804894997de474dc9122c8581bd5749411be42dd4a12aa1df314ade95
6
+ metadata.gz: d94ed3a6b1044e4a97ac3ea4980910aa77b27299b5f18c130f3de0ad2ae2805245678af4737b59918791188d450907b99561c6cdd0b8f22dd88629c1b98bd2c7
7
+ data.tar.gz: 393070aa3d8d89b370850b2b73b4c720a503e52f8193b6d76f52824050f4a37c75c5b8e5e80e273444e11d198616d9f55007d65d149d63b6404282e72ee49da9
@@ -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
- # 0.9.3
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
- # 0.9.1
16
+ ## 0.9.1
7
17
 
8
18
  * Rails 7.0 support
9
19
 
10
- # 0.6.0
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
- # 0.5.1 / 2013-10-20
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
- # 0.4.3 / 2011-03-29
32
+ ## 0.4.3 / 2011-03-29
23
33
 
24
34
  * [BUGFIX] Revert values set during validation testing
25
35
 
26
- # 0.4.2 / 2011-03-15
36
+ ## 0.4.2 / 2011-03-15
27
37
 
28
38
  * [BUGFIX] Change error access from `#on` to `#[]`
29
39
 
30
- # 0.4.1 / 2011-02-24
40
+ ## 0.4.1 / 2011-02-24
31
41
 
32
42
  * [FEATURE] Add wider Active Model compatibility
33
43
 
34
- # 0.3.1 / 2010-09-08
44
+ ## 0.3.1 / 2010-09-08
35
45
 
36
46
  * [FEATURE] Add Rails 3 compatibility
37
47
 
38
- # 0.3.0 / 2010-07-11
48
+ ## 0.3.0 / 2010-07-11
39
49
 
40
50
  * [FEATURE] Add `discover` matcher
41
51
 
42
- # 0.2.1 / 2010-06-28
52
+ ## 0.2.1 / 2010-06-28
43
53
 
44
54
  * [FEATURE] Add support for negative matching
45
55
 
46
- # 0.2.0 / 2010-05-13
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
- # 0.1.1 / 2010-05-04
61
+ ## 0.1.1 / 2010-05-04
52
62
 
53
63
  * [BUGFIX] Fix non-attribute validation testing
54
64
 
55
- # 0.1.0 / 2010-05-04
65
+ ## 0.1.0 / 2010-05-04
56
66
 
57
67
  * [FEATURE] Enable testing methods as well as attributes
58
68
 
59
- # 0.0.1 / 2010-05-03
69
+ ## 0.0.1 / 2010-05-03
60
70
 
61
71
  * Initial release
data/Gemfile CHANGED
@@ -3,9 +3,8 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :test do
6
- gem "activerecord", "~> 7.1", require: "active_record"
6
+ gem "activemodel", "~> 8.0.0"
7
7
  gem "rspec", "~> 3.12"
8
- gem "sqlite3", "~> 1.6"
9
8
  gem "bump", "~> 0.10.0"
10
9
  end
11
10
 
data/README.md CHANGED
@@ -25,7 +25,7 @@ end
25
25
 
26
26
  ## Dependencies
27
27
 
28
- * Active Model (6, 7)
28
+ * Active Model (6, 7, 8)
29
29
  * RSpec (3)
30
30
 
31
31
  ## Installation
@@ -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 = "0.9.3"
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.0"
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"
@@ -0,0 +1,11 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: ".."
4
+
5
+ gem "activemodel", "~> 7.2.0"
6
+
7
+ group :test do
8
+ gem "activerecord", "~> 7.2.0", require: "active_record"
9
+ gem "rspec", "~> 3.13"
10
+ gem "sqlite3", "~> 1.6"
11
+ end
@@ -0,0 +1,11 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: ".."
4
+
5
+ gem "activemodel", "~> 8.0.0"
6
+
7
+ group :test do
8
+ gem "activerecord", "~> 8.0.0", require: "active_record"
9
+ gem "rspec", "~> 3.13"
10
+ gem "sqlite3", "~> 2.2"
11
+ end
@@ -0,0 +1,3 @@
1
+ module AcceptValuesFor
2
+ VERSION = "0.9.5"
3
+ end
@@ -1,5 +1,6 @@
1
1
  require "rspec"
2
2
 
3
+ require "accept_values_for/version"
3
4
  require "accept_values_for/helpers"
4
5
  require "accept_values_for/matcher"
5
6
 
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 < ActiveRecord::Base
30
- has_many :people
9
+ class ::Group
10
+ include ActiveModel::Model
11
+
12
+ attr_accessor :name
31
13
  end
32
14
 
33
- class ::Person < ActiveRecord::Base
34
- belongs_to :group
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.3
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: 2023-10-09 00:00:00.000000000 Z
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.0'
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.0'
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.4.15
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