committee-rails 0.7.0 → 0.9.0
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/test.yml +43 -11
- data/README.md +22 -12
- data/committee-rails.gemspec +4 -4
- data/gemfiles/rails_6_0.gemfile +10 -0
- data/gemfiles/rails_6_1.gemfile +10 -0
- data/gemfiles/rails_7_0.gemfile +9 -0
- data/gemfiles/rails_7_1.gemfile +9 -0
- data/gemfiles/rails_7_2.gemfile +9 -0
- data/gemfiles/rails_8_0.gemfile +9 -0
- data/gemfiles/rails_8_1.gemfile +9 -0
- data/lib/committee/rails/test/methods.rb +1 -1
- data/lib/committee/rails/version.rb +1 -1
- metadata +18 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4063d2a66d7e8c1790604574cfd971fd8d598f1206743f49aaa6464631593d2d
|
|
4
|
+
data.tar.gz: f5efe8141f4f913590f7ede2d387390ae3dcec5aee2d295ac2e24b215b14a70e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59d4e358b0c90c5c95c6f1feb24f5dc9d92b52ab35954d68142f6057bf1aff56a8d0d00b88b8ceeda65cefc3a1b13267acecd2a7e04b5afe1f8bb180909c4899
|
|
7
|
+
data.tar.gz: 5a1abf8ddc59540c56227954c4e65b37c3a5b0ed31a600160f7e5c2ffeb57bba473b6d90aed8ba65aac747fd6c3607c443b3e3286e8b14e0ac2afb02f26b635e
|
data/.github/workflows/test.yml
CHANGED
|
@@ -17,19 +17,52 @@ jobs:
|
|
|
17
17
|
strategy:
|
|
18
18
|
fail-fast: false
|
|
19
19
|
matrix:
|
|
20
|
-
ruby:
|
|
21
|
-
- '2.6'
|
|
22
|
-
- '2.7'
|
|
23
|
-
- '3.0'
|
|
24
|
-
- '3.1'
|
|
25
|
-
- '3.2'
|
|
26
|
-
- 'head'
|
|
27
20
|
include:
|
|
28
|
-
- ruby: '
|
|
29
|
-
|
|
21
|
+
- ruby: '2.7'
|
|
22
|
+
gemfile: 'rails_6_0'
|
|
23
|
+
- ruby: '2.7'
|
|
24
|
+
gemfile: 'rails_6_1'
|
|
25
|
+
- ruby: '3.0'
|
|
26
|
+
gemfile: 'rails_6_1'
|
|
27
|
+
- ruby: '3.0'
|
|
28
|
+
gemfile: 'rails_7_0'
|
|
29
|
+
- ruby: '3.1'
|
|
30
|
+
gemfile: 'rails_7_0'
|
|
31
|
+
- ruby: '3.2'
|
|
32
|
+
gemfile: 'rails_7_0'
|
|
33
|
+
- ruby: '3.3'
|
|
34
|
+
gemfile: 'rails_7_0'
|
|
35
|
+
- ruby: '2.7'
|
|
36
|
+
gemfile: 'rails_7_1'
|
|
37
|
+
- ruby: '3.0'
|
|
38
|
+
gemfile: 'rails_7_1'
|
|
39
|
+
- ruby: '3.1'
|
|
40
|
+
gemfile: 'rails_7_1'
|
|
41
|
+
- ruby: '3.2'
|
|
42
|
+
gemfile: 'rails_7_1'
|
|
43
|
+
- ruby: '3.2'
|
|
44
|
+
gemfile: 'rails_7_2'
|
|
45
|
+
- ruby: '3.3'
|
|
46
|
+
gemfile: 'rails_7_2'
|
|
47
|
+
- ruby: '3.4'
|
|
48
|
+
gemfile: 'rails_7_2'
|
|
49
|
+
- ruby: '3.2'
|
|
50
|
+
gemfile: 'rails_8_0'
|
|
51
|
+
- ruby: '3.3'
|
|
52
|
+
gemfile: 'rails_8_0'
|
|
53
|
+
- ruby: '3.4'
|
|
54
|
+
gemfile: 'rails_8_0'
|
|
55
|
+
- ruby: '3.2'
|
|
56
|
+
gemfile: 'rails_8_1'
|
|
57
|
+
- ruby: '3.3'
|
|
58
|
+
gemfile: 'rails_8_1'
|
|
59
|
+
- ruby: '3.4'
|
|
60
|
+
gemfile: 'rails_8_1'
|
|
61
|
+
env:
|
|
62
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
30
63
|
|
|
31
64
|
steps:
|
|
32
|
-
- uses: actions/checkout@
|
|
65
|
+
- uses: actions/checkout@v5
|
|
33
66
|
- uses: ruby/setup-ruby@v1
|
|
34
67
|
with:
|
|
35
68
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -39,4 +72,3 @@ jobs:
|
|
|
39
72
|
run: |
|
|
40
73
|
set -xe
|
|
41
74
|
bundle exec rake
|
|
42
|
-
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
data/README.md
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
[](https://github.com/willnet/committee-rails/actions/workflows/test.yml)
|
|
4
4
|
[](https://badge.fury.io/rb/committee-rails)
|
|
5
5
|
|
|
6
|
-
You can use `assert_response_schema_confirm` in rails.
|
|
6
|
+
You can use `assert_request_schema_confirm`, `assert_response_schema_confirm` or `assert_schema_conform` in rails.
|
|
7
|
+
|
|
8
|
+
## Looking for maintainers!
|
|
9
|
+
|
|
10
|
+
If interested, please contact @willnet
|
|
7
11
|
|
|
8
12
|
## Installation
|
|
9
13
|
|
|
@@ -17,6 +21,10 @@ And then execute:
|
|
|
17
21
|
|
|
18
22
|
$ bundle
|
|
19
23
|
|
|
24
|
+
If you use committee prior to 5.1.0, you have to use committee-rails 0.7.x. Please see below.
|
|
25
|
+
|
|
26
|
+
[0.7 (0-7-stable) documentation](https://github.com/willnet/committee-rails/tree/0-7-stable)
|
|
27
|
+
|
|
20
28
|
If you use committee prior to 5.0.0, you have to use committee-rails 0.6.x. Please see below.
|
|
21
29
|
|
|
22
30
|
[0.6 (0-6-stable) documentation](https://github.com/willnet/committee-rails/tree/0-6-stable)
|
|
@@ -46,15 +54,21 @@ describe 'request spec' do
|
|
|
46
54
|
include Committee::Rails::Test::Methods
|
|
47
55
|
|
|
48
56
|
def committee_options
|
|
49
|
-
@committee_options ||= {
|
|
50
|
-
schema_path: Rails.root.join('schema', 'schema.json').to_s,
|
|
51
|
-
query_hash_key: 'rack.request.query_hash',
|
|
52
|
-
parse_response_by_content_type: false,
|
|
53
|
-
}
|
|
57
|
+
@committee_options ||= { schema_path: Rails.root.join('schema', 'schema.json').to_s }
|
|
54
58
|
end
|
|
55
59
|
|
|
56
60
|
describe 'GET /' do
|
|
57
|
-
it '
|
|
61
|
+
it 'conforms to schema with 200 response code' do
|
|
62
|
+
get '/'
|
|
63
|
+
assert_schema_conform(200)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it 'conforms to request schema' do
|
|
67
|
+
get '/'
|
|
68
|
+
assert_request_schema_confirm
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'conforms to response schema with 200 response code' do
|
|
58
72
|
get '/'
|
|
59
73
|
assert_response_schema_confirm(200)
|
|
60
74
|
end
|
|
@@ -68,11 +82,7 @@ If you use rspec, you can use very simple.
|
|
|
68
82
|
```ruby
|
|
69
83
|
RSpec.configure do |config|
|
|
70
84
|
config.add_setting :committee_options
|
|
71
|
-
config.committee_options = {
|
|
72
|
-
schema_path: Rails.root.join('schema', 'schema.json').to_s,
|
|
73
|
-
query_hash_key: 'rack.request.query_hash',
|
|
74
|
-
parse_response_by_content_type: false,
|
|
75
|
-
}
|
|
85
|
+
config.committee_options = { schema_path: Rails.root.join('schema', 'schema.json').to_s }
|
|
76
86
|
end
|
|
77
87
|
```
|
|
78
88
|
|
data/committee-rails.gemspec
CHANGED
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.bindir = 'exe'
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
20
20
|
spec.require_paths = ['lib']
|
|
21
|
-
spec.add_dependency 'committee', '>= 5.
|
|
22
|
-
spec.add_dependency 'activesupport'
|
|
23
|
-
spec.add_dependency 'actionpack'
|
|
24
|
-
spec.add_dependency 'railties'
|
|
21
|
+
spec.add_dependency 'committee', '>= 5.1.0'
|
|
22
|
+
spec.add_dependency 'activesupport', '>= 6.0'
|
|
23
|
+
spec.add_dependency 'actionpack', '>= 6.0'
|
|
24
|
+
spec.add_dependency 'railties', '>= 6.0'
|
|
25
25
|
end
|
|
@@ -10,7 +10,7 @@ module Committee::Rails
|
|
|
10
10
|
if defined?(RSpec) && (options = RSpec.try(:configuration).try(:committee_options))
|
|
11
11
|
options
|
|
12
12
|
else
|
|
13
|
-
{ schema_path: default_schema,
|
|
13
|
+
{ schema_path: default_schema, strict_reference_validation: false }
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: committee-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- willnet
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: committee
|
|
@@ -16,56 +15,56 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 5.
|
|
18
|
+
version: 5.1.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 5.
|
|
25
|
+
version: 5.1.0
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: activesupport
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
32
|
+
version: '6.0'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
39
|
+
version: '6.0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: actionpack
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
46
|
+
version: '6.0'
|
|
48
47
|
type: :runtime
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
51
|
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
53
|
+
version: '6.0'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
55
|
name: railties
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - ">="
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
60
|
+
version: '6.0'
|
|
62
61
|
type: :runtime
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - ">="
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
67
|
+
version: '6.0'
|
|
69
68
|
description: Committee for rails
|
|
70
69
|
email:
|
|
71
70
|
- netwillnet@gmail.com
|
|
@@ -84,6 +83,13 @@ files:
|
|
|
84
83
|
- bin/console
|
|
85
84
|
- bin/setup
|
|
86
85
|
- committee-rails.gemspec
|
|
86
|
+
- gemfiles/rails_6_0.gemfile
|
|
87
|
+
- gemfiles/rails_6_1.gemfile
|
|
88
|
+
- gemfiles/rails_7_0.gemfile
|
|
89
|
+
- gemfiles/rails_7_1.gemfile
|
|
90
|
+
- gemfiles/rails_7_2.gemfile
|
|
91
|
+
- gemfiles/rails_8_0.gemfile
|
|
92
|
+
- gemfiles/rails_8_1.gemfile
|
|
87
93
|
- lib/committee/rails.rb
|
|
88
94
|
- lib/committee/rails/request_object.rb
|
|
89
95
|
- lib/committee/rails/test/methods.rb
|
|
@@ -92,7 +98,6 @@ homepage: https://github.com/willnet/committee-rails
|
|
|
92
98
|
licenses:
|
|
93
99
|
- MIT
|
|
94
100
|
metadata: {}
|
|
95
|
-
post_install_message:
|
|
96
101
|
rdoc_options: []
|
|
97
102
|
require_paths:
|
|
98
103
|
- lib
|
|
@@ -107,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
112
|
- !ruby/object:Gem::Version
|
|
108
113
|
version: '0'
|
|
109
114
|
requirements: []
|
|
110
|
-
rubygems_version: 3.
|
|
111
|
-
signing_key:
|
|
115
|
+
rubygems_version: 3.6.9
|
|
112
116
|
specification_version: 4
|
|
113
117
|
summary: Committee for rails
|
|
114
118
|
test_files: []
|