committee-rails 0.6.1 → 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/dependabot.yml +6 -0
- data/.github/workflows/test.yml +12 -29
- data/README.md +27 -13
- data/committee-rails.gemspec +4 -4
- data/lib/committee/rails/test/methods.rb +1 -1
- data/lib/committee/rails/version.rb +1 -1
- metadata +12 -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
@@ -14,43 +14,26 @@ jobs:
|
|
14
14
|
test:
|
15
15
|
runs-on: ubuntu-latest
|
16
16
|
|
17
|
-
container: ${{ matrix.ruby }}
|
18
|
-
|
19
17
|
strategy:
|
20
18
|
fail-fast: false
|
21
|
-
|
22
19
|
matrix:
|
23
20
|
ruby:
|
24
|
-
-
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
- rubylang/ruby:master-nightly-bionic
|
21
|
+
- '2.7'
|
22
|
+
- '3.0'
|
23
|
+
- '3.1'
|
24
|
+
- '3.2'
|
25
|
+
- '3.3'
|
26
|
+
- 'head'
|
31
27
|
include:
|
32
|
-
- ruby:
|
33
|
-
allow_failures:
|
28
|
+
- ruby: 'head'
|
29
|
+
allow_failures: 'true'
|
34
30
|
|
35
31
|
steps:
|
36
|
-
- uses: actions/checkout@
|
37
|
-
|
38
|
-
- name: Cache vendor/bundle
|
39
|
-
uses: actions/cache@v1
|
40
|
-
id: cache_gem
|
32
|
+
- uses: actions/checkout@v4
|
33
|
+
- uses: ruby/setup-ruby@v1
|
41
34
|
with:
|
42
|
-
|
43
|
-
|
44
|
-
restore-keys: |
|
45
|
-
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
|
46
|
-
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
47
|
-
|
48
|
-
- name: bundle update
|
49
|
-
run: |
|
50
|
-
set -xe
|
51
|
-
bundle config path vendor/bundle
|
52
|
-
bundle update --jobs $(nproc) --retry 3
|
53
|
-
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
35
|
+
ruby-version: ${{ matrix.ruby }}
|
36
|
+
bundler-cache: true
|
54
37
|
|
55
38
|
- name: Run test
|
56
39
|
run: |
|
data/README.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# Committee::Rails
|
2
2
|
|
3
|
-
[![Build Status](https://
|
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,14 @@ 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
|
+
|
28
|
+
If you use committee prior to 5.0.0, you have to use committee-rails 0.6.x. Please see below.
|
29
|
+
|
30
|
+
[0.6 (0-6-stable) documentation](https://github.com/willnet/committee-rails/tree/0-6-stable)
|
31
|
+
|
20
32
|
If you use committee prior to 4.4.0, you have to use committee-rails 0.5.x. Please see below.
|
21
33
|
|
22
34
|
[0.5 (0-5-stable) documentation](https://github.com/willnet/committee-rails/tree/0-5-stable)
|
@@ -42,15 +54,21 @@ describe 'request spec' do
|
|
42
54
|
include Committee::Rails::Test::Methods
|
43
55
|
|
44
56
|
def committee_options
|
45
|
-
@committee_options ||= {
|
46
|
-
schema_path: Rails.root.join('schema', 'schema.json').to_s,
|
47
|
-
query_hash_key: 'rack.request.query_hash',
|
48
|
-
parse_response_by_content_type: false,
|
49
|
-
}
|
57
|
+
@committee_options ||= { schema_path: Rails.root.join('schema', 'schema.json').to_s }
|
50
58
|
end
|
51
59
|
|
52
60
|
describe 'GET /' do
|
53
|
-
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
|
54
72
|
get '/'
|
55
73
|
assert_response_schema_confirm(200)
|
56
74
|
end
|
@@ -64,11 +82,7 @@ If you use rspec, you can use very simple.
|
|
64
82
|
```ruby
|
65
83
|
RSpec.configure do |config|
|
66
84
|
config.add_setting :committee_options
|
67
|
-
config.committee_options = {
|
68
|
-
schema_path: Rails.root.join('schema', 'schema.json').to_s,
|
69
|
-
query_hash_key: 'rack.request.query_hash',
|
70
|
-
parse_response_by_content_type: false,
|
71
|
-
}
|
85
|
+
config.committee_options = { schema_path: Rails.root.join('schema', 'schema.json').to_s }
|
72
86
|
end
|
73
87
|
```
|
74
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', '>=
|
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:
|
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:
|
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
|
@@ -73,6 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- ".github/dependabot.yml"
|
76
77
|
- ".github/workflows/test.yml"
|
77
78
|
- ".gitignore"
|
78
79
|
- CODE_OF_CONDUCT.md
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
- !ruby/object:Gem::Version
|
107
108
|
version: '0'
|
108
109
|
requirements: []
|
109
|
-
rubygems_version: 3.3
|
110
|
+
rubygems_version: 3.5.3
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: Committee for rails
|