apipie-rails 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +12 -48
- data/.github/workflows/rubocop-challenger.yml +2 -2
- data/.github/workflows/rubocop.yml +2 -4
- data/.rubocop.yml +39 -38
- data/.rubocop_todo.yml +55 -65
- data/.vscode/settings.json +3 -0
- data/CHANGELOG.md +19 -2
- data/Gemfile +20 -0
- data/README.rst +12 -9
- data/app/controllers/apipie/apipies_controller.rb +3 -17
- data/gemfiles/Gemfile.tools +9 -0
- data/lib/apipie/application.rb +18 -7
- data/lib/apipie/dsl_definition.rb +6 -5
- data/lib/apipie/errors.rb +14 -0
- data/lib/apipie/extractor/collector.rb +1 -1
- data/lib/apipie/extractor/recorder.rb +1 -1
- data/lib/apipie/extractor.rb +6 -3
- data/lib/apipie/generator/swagger/config.rb +3 -1
- data/lib/apipie/generator/swagger/method_description/api_schema_service.rb +6 -3
- data/lib/apipie/generator/swagger/warning.rb +1 -1
- data/lib/apipie/resource_description.rb +28 -3
- data/lib/apipie/validator.rb +20 -6
- data/lib/apipie/version.rb +1 -1
- data/spec/controllers/api/v2/architectures_controller_spec.rb +10 -3
- data/spec/controllers/api/v2/empty_middle_controller_spec.rb +23 -0
- data/spec/controllers/api/v2/nested/resources_controller_spec.rb +16 -0
- data/spec/controllers/api/v2/sub/footguns_controller_spec.rb +19 -0
- data/spec/controllers/users_controller_spec.rb +10 -0
- data/spec/dummy/app/controllers/api/v2/base_controller.rb +6 -0
- data/spec/dummy/app/controllers/api/v2/empty_middle_controller.rb +14 -0
- data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +2 -2
- data/spec/dummy/app/controllers/api/v2/sub/footguns_controller.rb +30 -0
- data/spec/dummy/app/controllers/users_controller.rb +6 -0
- data/spec/dummy/config/routes.rb +1 -0
- data/spec/lib/apipie/apipies_controller_spec.rb +63 -19
- data/spec/lib/apipie/extractor/collector_spec.rb +57 -0
- data/spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb +13 -0
- data/spec/test_engine/memes_controller_spec.rb +1 -1
- metadata +11 -9
- data/gemfiles/Gemfile.rails50 +0 -10
- data/gemfiles/Gemfile.rails51 +0 -10
- data/gemfiles/Gemfile.rails52 +0 -10
- data/gemfiles/Gemfile.rails60 +0 -17
- data/gemfiles/Gemfile.rails61 +0 -17
- data/gemfiles/Gemfile.rails70 +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555b019a70732e777c4f42b25dd62362be62674c55f31dba9106434969ff7f9f
|
4
|
+
data.tar.gz: e63cd96de5768bc21b4a86b755b883440a36ca8c8914ec5af4c89dfe525d94ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6aca2dea2281738587924ee7e3388b1b36beb25d9bac7e46f05044080535f52fb77a3523d9262344410f3d76683c0d33a7d0188d99a51d957a9f9392ba7a3e
|
7
|
+
data.tar.gz: 7f74cc96e3694406b579649cbd44b8a9ab7d7c273b57d93a7530e1b67a2e32dca27efa408b27a10d87f342abc5badde819e7f02e363ff3d924d3988db33501f2
|
data/.github/workflows/build.yml
CHANGED
@@ -1,10 +1,3 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
1
|
name: build
|
9
2
|
|
10
3
|
on: [push, pull_request]
|
@@ -15,49 +8,20 @@ jobs:
|
|
15
8
|
strategy:
|
16
9
|
fail-fast: false
|
17
10
|
matrix:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
-
- Gemfile.rails52 # Min ruby 2.2.2
|
28
|
-
- Gemfile.rails60 # Min ruby 2.5.0
|
29
|
-
- Gemfile.rails61 # Min ruby 2.5.0
|
30
|
-
- Gemfile.rails70 # Min ruby 2.7.0
|
31
|
-
exclude:
|
32
|
-
- gemfile: Gemfile.rails50
|
33
|
-
ruby: 2.7
|
34
|
-
- gemfile: Gemfile.rails50
|
35
|
-
ruby: '3.0'
|
36
|
-
- gemfile: Gemfile.rails50
|
37
|
-
ruby: 3.1
|
38
|
-
- gemfile: Gemfile.rails50
|
39
|
-
ruby: 3.2
|
40
|
-
- gemfile: Gemfile.rails51
|
41
|
-
ruby: 2.7
|
42
|
-
- gemfile: Gemfile.rails51
|
43
|
-
ruby: '3.0'
|
44
|
-
- gemfile: Gemfile.rails51
|
45
|
-
ruby: 3.1
|
46
|
-
- gemfile: Gemfile.rails51
|
47
|
-
ruby: 3.2
|
48
|
-
- gemfile: Gemfile.rails52
|
49
|
-
ruby: 2.7
|
50
|
-
- gemfile: Gemfile.rails52
|
51
|
-
ruby: '3.0'
|
52
|
-
- gemfile: Gemfile.rails52
|
53
|
-
ruby: 3.1
|
54
|
-
- gemfile: Gemfile.rails52
|
55
|
-
ruby: 3.2
|
56
|
-
- gemfile: Gemfile.rails70
|
57
|
-
ruby: 2.6
|
11
|
+
rails: ["7.0", "6.1", "6.0"]
|
12
|
+
ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"]
|
13
|
+
include:
|
14
|
+
- rails: "5.2"
|
15
|
+
ruby: "2.7.8"
|
16
|
+
- rails: "5.1"
|
17
|
+
ruby: "2.6.10"
|
18
|
+
- rails: "5.0"
|
19
|
+
ruby: "2.6.10"
|
58
20
|
|
59
21
|
env:
|
60
|
-
|
22
|
+
RUBY_VERSION: ${{ matrix.ruby }}
|
23
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
24
|
+
|
61
25
|
steps:
|
62
26
|
- uses: actions/checkout@v2
|
63
27
|
- uses: ruby/setup-ruby@v1
|
@@ -12,10 +12,10 @@ jobs:
|
|
12
12
|
BUNDLE_GEMFILE: gemfiles/Gemfile.rails50
|
13
13
|
steps:
|
14
14
|
- uses: actions/checkout@v2
|
15
|
-
- name: Set up Ruby 2
|
15
|
+
- name: Set up Ruby 3.2
|
16
16
|
uses: ruby/setup-ruby@v1
|
17
17
|
with:
|
18
|
-
ruby-version: 2
|
18
|
+
ruby-version: 3.2
|
19
19
|
- name: Install bundler
|
20
20
|
run: gem install bundler
|
21
21
|
- name: Install gems
|
@@ -5,15 +5,13 @@ on: [push, pull_request]
|
|
5
5
|
jobs:
|
6
6
|
build:
|
7
7
|
runs-on: ubuntu-latest
|
8
|
-
env:
|
9
|
-
BUNDLE_GEMFILE: gemfiles/Gemfile.rails70
|
10
8
|
steps:
|
11
9
|
- uses: actions/checkout@v3
|
12
10
|
|
13
|
-
- name: Set up Ruby 3.2
|
11
|
+
- name: Set up Ruby 3.2
|
14
12
|
uses: ruby/setup-ruby@v1
|
15
13
|
with:
|
16
|
-
ruby-version: 3.2
|
14
|
+
ruby-version: 3.2
|
17
15
|
bundler-cache: true
|
18
16
|
|
19
17
|
- name: Run rubocop
|
data/.rubocop.yml
CHANGED
@@ -10,6 +10,7 @@ Rails:
|
|
10
10
|
|
11
11
|
AllCops:
|
12
12
|
NewCops: enable
|
13
|
+
TargetRubyVersion: 2.6
|
13
14
|
|
14
15
|
Layout/LineLength:
|
15
16
|
Max: 140
|
@@ -45,7 +46,7 @@ Metrics/ClassLength:
|
|
45
46
|
- spec/dummy/app/controllers/users_controller.rb
|
46
47
|
|
47
48
|
Metrics/BlockLength:
|
48
|
-
Max:
|
49
|
+
Max: 26 # default
|
49
50
|
Exclude:
|
50
51
|
- app/controllers/apipie/apipies_controller.rb
|
51
52
|
- lib/apipie/generator/swagger/param_description/composite.rb
|
@@ -69,43 +70,43 @@ Style/HashSyntax:
|
|
69
70
|
|
70
71
|
Metrics/ParameterLists:
|
71
72
|
Exclude:
|
72
|
-
-
|
73
|
+
- "lib/apipie/generator/swagger/context.rb"
|
73
74
|
|
74
75
|
Style/Documentation:
|
75
76
|
Exclude:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
77
|
+
- "app/controllers/apipie/apipies_controller.rb"
|
78
|
+
- "app/helpers/apipie_helper.rb"
|
79
|
+
- "lib/apipie/apipie_module.rb"
|
80
|
+
- "lib/apipie/application.rb"
|
81
|
+
- "lib/apipie/configuration.rb"
|
82
|
+
- "lib/apipie/core_ext/route.rb"
|
83
|
+
- "lib/apipie/dsl_definition.rb"
|
84
|
+
- "lib/apipie/error_description.rb"
|
85
|
+
- "lib/apipie/errors.rb"
|
86
|
+
- "lib/apipie/extractor.rb"
|
87
|
+
- "lib/apipie/extractor/collector.rb"
|
88
|
+
- "lib/apipie/extractor/recorder.rb"
|
89
|
+
- "lib/apipie/extractor/writer.rb"
|
90
|
+
- "lib/apipie/generator/generator.rb"
|
91
|
+
- "lib/apipie/generator/swagger/**/*"
|
92
|
+
- "lib/apipie/helpers.rb"
|
93
|
+
- "lib/apipie/markup.rb"
|
94
|
+
- "lib/apipie/method_description.rb"
|
95
|
+
- "lib/apipie/method_description/api.rb"
|
96
|
+
- "lib/apipie/middleware/checksum_in_headers.rb"
|
97
|
+
- "lib/apipie/railtie.rb"
|
98
|
+
- "lib/apipie/response_description.rb"
|
99
|
+
- "lib/apipie/response_description_adapter.rb"
|
100
|
+
- "lib/apipie/routes_formatter.rb"
|
101
|
+
- "lib/apipie/routing.rb"
|
102
|
+
- "lib/apipie/rspec/response_validation_helper.rb"
|
103
|
+
- "lib/apipie/swagger_generator.rb"
|
104
|
+
- "lib/apipie/see_description.rb"
|
105
|
+
- "lib/apipie/static_dispatcher.rb"
|
106
|
+
- "lib/apipie/tag_list_description.rb"
|
107
|
+
- "lib/apipie/validator.rb"
|
108
|
+
- "lib/generators/apipie/install/install_generator.rb"
|
109
|
+
- "lib/generators/apipie/views_generator.rb"
|
109
110
|
- spec/support/custom_bool_validator.rb
|
110
111
|
- spec/lib/validators/array_validator_spec.rb
|
111
112
|
- spec/dummy/**/*.rb
|
@@ -122,6 +123,6 @@ Naming/BlockForwarding:
|
|
122
123
|
|
123
124
|
Lint/MissingSuper:
|
124
125
|
Exclude:
|
125
|
-
-
|
126
|
-
-
|
127
|
-
-
|
126
|
+
- "lib/apipie/errors.rb"
|
127
|
+
- "lib/apipie/response_description_adapter.rb"
|
128
|
+
- "lib/apipie/validator.rb"
|