committee-rails 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -2
- data/README.md +22 -12
- data/committee-rails.gemspec +4 -4
- data/lib/committee/rails/test/methods.rb +1 -1
- data/lib/committee/rails/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 757dbfc155c802dc9a382e3915b704c4faf58851e442c9f9709ee7e090f446da
|
4
|
+
data.tar.gz: 0a9d598f0035e6c347a1c3ad29d420a044c5d1c170c52b9e2567cc2b0ce8123f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ead1a2556b2eb41c119bcff0f58fffecd3ebea59b0adb40d1a02e49d8e3bb190c315b043d8f147338a76597a7dbce81370f7b4577ddf8338ecbf05aa088e00
|
7
|
+
data.tar.gz: ffbe1a8c393cd699c5c31be067ebf8e3385b06efbaaef0da97b6879ac424feed661c259253038ede201fd821876a79736adb4ccb61f13cece0ed93f78ac98d34
|
data/.github/workflows/test.yml
CHANGED
@@ -18,18 +18,18 @@ jobs:
|
|
18
18
|
fail-fast: false
|
19
19
|
matrix:
|
20
20
|
ruby:
|
21
|
-
- '2.6'
|
22
21
|
- '2.7'
|
23
22
|
- '3.0'
|
24
23
|
- '3.1'
|
25
24
|
- '3.2'
|
25
|
+
- '3.3'
|
26
26
|
- 'head'
|
27
27
|
include:
|
28
28
|
- ruby: 'head'
|
29
29
|
allow_failures: 'true'
|
30
30
|
|
31
31
|
steps:
|
32
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v4
|
33
33
|
- uses: ruby/setup-ruby@v1
|
34
34
|
with:
|
35
35
|
ruby-version: ${{ matrix.ruby }}
|
data/README.md
CHANGED
@@ -3,7 +3,11 @@
|
|
3
3
|
[![Build Status](https://github.com/willnet/committee-rails/actions/workflows/test.yml/badge.svg)](https://github.com/willnet/committee-rails/actions/workflows/test.yml)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/committee-rails.svg)](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,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: committee-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- willnet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: committee
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: 5.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.
|
26
|
+
version: 5.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionpack
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '6.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '6.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: railties
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '6.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '6.0'
|
69
69
|
description: Committee for rails
|
70
70
|
email:
|
71
71
|
- netwillnet@gmail.com
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.5.3
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Committee for rails
|