apipie-rails 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +12 -48
  3. data/.github/workflows/rubocop-challenger.yml +2 -2
  4. data/.github/workflows/rubocop.yml +2 -4
  5. data/.rubocop.yml +38 -37
  6. data/.rubocop_todo.yml +45 -64
  7. data/.vscode/settings.json +3 -0
  8. data/CHANGELOG.md +11 -2
  9. data/Gemfile +20 -0
  10. data/README.rst +6 -6
  11. data/app/controllers/apipie/apipies_controller.rb +3 -17
  12. data/gemfiles/Gemfile.tools +9 -0
  13. data/lib/apipie/application.rb +18 -7
  14. data/lib/apipie/dsl_definition.rb +1 -1
  15. data/lib/apipie/extractor/collector.rb +1 -1
  16. data/lib/apipie/extractor/recorder.rb +1 -1
  17. data/lib/apipie/generator/swagger/warning.rb +1 -1
  18. data/lib/apipie/resource_description.rb +28 -3
  19. data/lib/apipie/version.rb +1 -1
  20. data/spec/controllers/api/v2/architectures_controller_spec.rb +10 -3
  21. data/spec/controllers/api/v2/empty_middle_controller_spec.rb +23 -0
  22. data/spec/controllers/api/v2/nested/resources_controller_spec.rb +16 -0
  23. data/spec/controllers/api/v2/sub/footguns_controller_spec.rb +19 -0
  24. data/spec/dummy/app/controllers/api/v2/base_controller.rb +6 -0
  25. data/spec/dummy/app/controllers/api/v2/empty_middle_controller.rb +14 -0
  26. data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +2 -2
  27. data/spec/dummy/app/controllers/api/v2/sub/footguns_controller.rb +30 -0
  28. data/spec/lib/apipie/apipies_controller_spec.rb +63 -19
  29. data/spec/lib/apipie/extractor/collector_spec.rb +57 -0
  30. metadata +11 -9
  31. data/gemfiles/Gemfile.rails50 +0 -10
  32. data/gemfiles/Gemfile.rails51 +0 -10
  33. data/gemfiles/Gemfile.rails52 +0 -10
  34. data/gemfiles/Gemfile.rails60 +0 -17
  35. data/gemfiles/Gemfile.rails61 +0 -17
  36. data/gemfiles/Gemfile.rails70 +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5beee9e3a891140602d1c9a962c9229cbeb60d7e289a95d62a48bfea39b396a9
4
- data.tar.gz: 6f096bb6648692ceaa7a05fa095051a26c4bd176e062bf2ad794a9f3b5438261
3
+ metadata.gz: 73f474f2a3ff7eda3acca1a76fb6199da314c0ad3c9a1241662bad03d3e762c9
4
+ data.tar.gz: 677da6befb97f5eb0c6c761758c0e159cabe8de3d2bf15b2acdb2bc03f3d069f
5
5
  SHA512:
6
- metadata.gz: 27f57c84d3b692d40b84ee01740b960d10c9951bdf0e45d936079cd7dc0fac899a0ac90ccd229db6a164549c7238de6bb515f8102b7624342c406a775ee7cbfa
7
- data.tar.gz: 4ee73961d9417cfa623d9d84b5dbf7a8afdfcd19afa86f43b72b807dce374a79b456c3c041d953cb5a31d3b5bb5ba4926ccfd6b2d751ee61e36e21fd0ec83776
6
+ metadata.gz: 2fc436669c44ca181d6a1fce639762bba9ae7f508d9527c52bbcf1e9846135bc94de36f7148e8b29273cf6f6e389aa6104cf0da7410d18c33856afa0a7f264e2
7
+ data.tar.gz: afaedf8cdb2c0d0e326dcc82d896e9dd524cbc91b5c914e44c0b62272076f4830f8318e14985e59dfdceb81b7d4d5b7865dd27b82ffb687f100943cba0d6ac6b
@@ -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
- ruby:
19
- - 2.6
20
- - 2.7
21
- - '3.0'
22
- - 3.1
23
- - 3.2
24
- gemfile:
25
- - Gemfile.rails50
26
- - Gemfile.rails51
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
- BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
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.7
15
+ - name: Set up Ruby 3.2
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
18
- ruby-version: 2.7.6
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.1
11
+ - name: Set up Ruby 3.2
14
12
  uses: ruby/setup-ruby@v1
15
13
  with:
16
- ruby-version: 3.2.1
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
@@ -69,43 +70,43 @@ Style/HashSyntax:
69
70
 
70
71
  Metrics/ParameterLists:
71
72
  Exclude:
72
- - 'lib/apipie/generator/swagger/context.rb'
73
+ - "lib/apipie/generator/swagger/context.rb"
73
74
 
74
75
  Style/Documentation:
75
76
  Exclude:
76
- - 'app/controllers/apipie/apipies_controller.rb'
77
- - 'app/helpers/apipie_helper.rb'
78
- - 'lib/apipie/apipie_module.rb'
79
- - 'lib/apipie/application.rb'
80
- - 'lib/apipie/configuration.rb'
81
- - 'lib/apipie/core_ext/route.rb'
82
- - 'lib/apipie/dsl_definition.rb'
83
- - 'lib/apipie/error_description.rb'
84
- - 'lib/apipie/errors.rb'
85
- - 'lib/apipie/extractor.rb'
86
- - 'lib/apipie/extractor/collector.rb'
87
- - 'lib/apipie/extractor/recorder.rb'
88
- - 'lib/apipie/extractor/writer.rb'
89
- - 'lib/apipie/generator/generator.rb'
90
- - 'lib/apipie/generator/swagger/**/*'
91
- - 'lib/apipie/helpers.rb'
92
- - 'lib/apipie/markup.rb'
93
- - 'lib/apipie/method_description.rb'
94
- - 'lib/apipie/method_description/api.rb'
95
- - 'lib/apipie/middleware/checksum_in_headers.rb'
96
- - 'lib/apipie/railtie.rb'
97
- - 'lib/apipie/response_description.rb'
98
- - 'lib/apipie/response_description_adapter.rb'
99
- - 'lib/apipie/routes_formatter.rb'
100
- - 'lib/apipie/routing.rb'
101
- - 'lib/apipie/rspec/response_validation_helper.rb'
102
- - 'lib/apipie/swagger_generator.rb'
103
- - 'lib/apipie/see_description.rb'
104
- - 'lib/apipie/static_dispatcher.rb'
105
- - 'lib/apipie/tag_list_description.rb'
106
- - 'lib/apipie/validator.rb'
107
- - 'lib/generators/apipie/install/install_generator.rb'
108
- - 'lib/generators/apipie/views_generator.rb'
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
- - 'lib/apipie/errors.rb'
126
- - 'lib/apipie/response_description_adapter.rb'
127
- - 'lib/apipie/validator.rb'
126
+ - "lib/apipie/errors.rb"
127
+ - "lib/apipie/response_description_adapter.rb"
128
+ - "lib/apipie/validator.rb"
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 180`
3
- # on 2023-04-14 04:21:53 UTC using RuboCop version 1.44.1.
3
+ # on 2023-06-02 23:32:14 UTC using RuboCop version 1.52.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -14,10 +14,9 @@ Gemspec/DeprecatedAttributeAssignment:
14
14
  Exclude:
15
15
  - 'apipie-rails.gemspec'
16
16
 
17
- # Offense count: 9
17
+ # Offense count: 11
18
18
  # Configuration parameters: EnforcedStyle, AllowedGems, Include.
19
19
  # SupportedStyles: Gemfile, gems.rb, gemspec
20
- # AllowedGems: bundler
21
20
  # Include: **/*.gemspec, **/Gemfile, **/gems.rb
22
21
  Gemspec/DevelopmentDependencies:
23
22
  Exclude:
@@ -108,7 +107,7 @@ Layout/DotPosition:
108
107
  - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb'
109
108
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
110
109
 
111
- # Offense count: 7
110
+ # Offense count: 8
112
111
  # This cop supports safe autocorrection (--autocorrect).
113
112
  Layout/ElseAlignment:
114
113
  Exclude:
@@ -119,7 +118,7 @@ Layout/ElseAlignment:
119
118
  - 'lib/apipie/param_description.rb'
120
119
  - 'lib/apipie/resource_description.rb'
121
120
 
122
- # Offense count: 60
121
+ # Offense count: 59
123
122
  # This cop supports safe autocorrection (--autocorrect).
124
123
  Layout/EmptyLineAfterGuardClause:
125
124
  Exclude:
@@ -155,7 +154,7 @@ Layout/EmptyLineBetweenDefs:
155
154
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
156
155
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
157
156
 
158
- # Offense count: 57
157
+ # Offense count: 56
159
158
  # This cop supports safe autocorrection (--autocorrect).
160
159
  Layout/EmptyLines:
161
160
  Exclude:
@@ -193,7 +192,7 @@ Layout/EmptyLinesAroundAttributeAccessor:
193
192
  Exclude:
194
193
  - 'lib/apipie/configuration.rb'
195
194
 
196
- # Offense count: 93
195
+ # Offense count: 92
197
196
  # This cop supports safe autocorrection (--autocorrect).
198
197
  # Configuration parameters: EnforcedStyle.
199
198
  # SupportedStyles: empty_lines, no_empty_lines
@@ -202,7 +201,6 @@ Layout/EmptyLinesAroundBlockBody:
202
201
  - 'app/controllers/apipie/apipies_controller.rb'
203
202
  - 'lib/tasks/apipie.rake'
204
203
  - 'spec/controllers/api/v1/architectures_controller_spec.rb'
205
- - 'spec/controllers/api/v2/architectures_controller_spec.rb'
206
204
  - 'spec/controllers/concerns_controller_spec.rb'
207
205
  - 'spec/controllers/extended_controller_spec.rb'
208
206
  - 'spec/controllers/included_param_group_controller_spec.rb'
@@ -288,7 +286,7 @@ Layout/EmptyLinesAroundModuleBody:
288
286
  - 'lib/apipie/tag_list_description.rb'
289
287
  - 'lib/apipie/validator.rb'
290
288
 
291
- # Offense count: 7
289
+ # Offense count: 8
292
290
  # This cop supports safe autocorrection (--autocorrect).
293
291
  # Configuration parameters: EnforcedStyleAlignWith, Severity.
294
292
  # SupportedStylesAlignWith: keyword, variable, start_of_line
@@ -374,9 +372,9 @@ Layout/IndentationConsistency:
374
372
  - 'lib/apipie/generator/swagger/param_description/name.rb'
375
373
  - 'spec/lib/apipie/param_group_spec.rb'
376
374
 
377
- # Offense count: 10
375
+ # Offense count: 14
378
376
  # This cop supports safe autocorrection (--autocorrect).
379
- # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns.
377
+ # Configuration parameters: Width, AllowedPatterns.
380
378
  Layout/IndentationWidth:
381
379
  Exclude:
382
380
  - 'app/controllers/apipie/apipies_controller.rb'
@@ -440,13 +438,12 @@ Layout/MultilineMethodCallIndentation:
440
438
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
441
439
  - 'lib/apipie/generator/swagger/param_description/type.rb'
442
440
 
443
- # Offense count: 5
441
+ # Offense count: 4
444
442
  # This cop supports safe autocorrection (--autocorrect).
445
443
  # Configuration parameters: EnforcedStyle, IndentationWidth.
446
444
  # SupportedStyles: aligned, indented
447
445
  Layout/MultilineOperationIndentation:
448
446
  Exclude:
449
- - 'lib/apipie/application.rb'
450
447
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
451
448
  - 'lib/apipie/param_description.rb'
452
449
  - 'lib/tasks/apipie.rake'
@@ -622,18 +619,17 @@ Layout/TrailingEmptyLines:
622
619
  - 'spec/lib/apipie/generator/swagger/param_description_spec.rb'
623
620
  - 'spec/lib/apipie/param_group_spec.rb'
624
621
 
625
- # Offense count: 16
622
+ # Offense count: 15
626
623
  # This cop supports safe autocorrection (--autocorrect).
627
624
  # Configuration parameters: AllowInHeredoc.
628
625
  Layout/TrailingWhitespace:
629
626
  Exclude:
630
627
  - 'lib/apipie/error_description.rb'
631
- - 'spec/dummy/app/controllers/api/v2/nested/resources_controller.rb'
632
628
  - 'spec/dummy/app/controllers/application_controller.rb'
633
629
  - 'spec/dummy/app/controllers/twitter_example_controller.rb'
634
630
 
635
631
  # Offense count: 10
636
- # This cop supports safe autocorrection (--autocorrect).
632
+ # This cop supports unsafe autocorrection (--autocorrect-all).
637
633
  # Configuration parameters: AllowSafeAssignment.
638
634
  Lint/AssignmentInCondition:
639
635
  Exclude:
@@ -749,12 +745,11 @@ Lint/UnusedBlockArgument:
749
745
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
750
746
  - 'spec/spec_helper.rb'
751
747
 
752
- # Offense count: 26
748
+ # Offense count: 24
753
749
  # This cop supports safe autocorrection (--autocorrect).
754
750
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
755
751
  Lint/UnusedMethodArgument:
756
752
  Exclude:
757
- - 'lib/apipie/application.rb'
758
753
  - 'lib/apipie/dsl_definition.rb'
759
754
  - 'lib/apipie/response_description_adapter.rb'
760
755
  - 'lib/apipie/validator.rb'
@@ -762,6 +757,7 @@ Lint/UnusedMethodArgument:
762
757
  - 'spec/support/custom_bool_validator.rb'
763
758
 
764
759
  # Offense count: 5
760
+ # This cop supports unsafe autocorrection (--autocorrect-all).
765
761
  Lint/UselessAssignment:
766
762
  Exclude:
767
763
  - 'lib/apipie/application.rb'
@@ -776,13 +772,14 @@ Lint/UselessMethodDefinition:
776
772
  - 'spec/dummy/app/controllers/overridden_concerns_controller.rb'
777
773
 
778
774
  # Offense count: 3
775
+ # This cop supports safe autocorrection (--autocorrect).
779
776
  # Configuration parameters: CheckForMethodsWithNoSideEffects.
780
777
  Lint/Void:
781
778
  Exclude:
782
779
  - 'spec/controllers/users_controller_spec.rb'
783
780
 
784
781
  # Offense count: 58
785
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
782
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
786
783
  Metrics/AbcSize:
787
784
  Max: 96
788
785
 
@@ -791,29 +788,24 @@ Metrics/AbcSize:
791
788
  Metrics/BlockNesting:
792
789
  Max: 4
793
790
 
794
- # Offense count: 25
795
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
791
+ # Offense count: 24
792
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
796
793
  Metrics/CyclomaticComplexity:
797
794
  Max: 24
798
795
 
799
- # Offense count: 77
800
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
796
+ # Offense count: 78
797
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
801
798
  Metrics/MethodLength:
802
799
  Max: 58
803
800
 
804
- # Offense count: 1
805
- # Configuration parameters: CountComments, CountAsOne.
806
- Metrics/ModuleLength:
807
- Max: 119
808
-
809
801
  # Offense count: 4
810
802
  # Configuration parameters: CountKeywordArgs.
811
803
  Metrics/ParameterLists:
812
804
  MaxOptionalParameters: 5
813
805
  Max: 6
814
806
 
815
- # Offense count: 21
816
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
807
+ # Offense count: 20
808
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
817
809
  Metrics/PerceivedComplexity:
818
810
  Max: 25
819
811
 
@@ -840,15 +832,16 @@ Naming/HeredocDelimiterCase:
840
832
  Exclude:
841
833
  - 'spec/dummy/app/controllers/users_controller.rb'
842
834
 
843
- # Offense count: 6
835
+ # Offense count: 7
844
836
  # Configuration parameters: ForbiddenDelimiters.
845
- # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
837
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
846
838
  Naming/HeredocDelimiterNaming:
847
839
  Exclude:
848
840
  - 'spec/dummy/app/controllers/twitter_example_controller.rb'
849
841
  - 'spec/dummy/app/controllers/users_controller.rb'
850
842
 
851
843
  # Offense count: 3
844
+ # This cop supports unsafe autocorrection (--autocorrect-all).
852
845
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
853
846
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
854
847
  Naming/MemoizedInstanceVariableName:
@@ -880,7 +873,7 @@ Naming/PredicateName:
880
873
  # Offense count: 1
881
874
  # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
882
875
  # SupportedStyles: snake_case, normalcase, non_integer
883
- # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
876
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
884
877
  Naming/VariableNumber:
885
878
  Exclude:
886
879
  - 'spec/dummy/app/controllers/users_controller.rb'
@@ -906,12 +899,6 @@ Performance/Detect:
906
899
  Exclude:
907
900
  - 'spec/lib/swagger/rake_swagger_spec.rb'
908
901
 
909
- # Offense count: 1
910
- # This cop supports unsafe autocorrection (--autocorrect-all).
911
- Performance/InefficientHashSearch:
912
- Exclude:
913
- - 'lib/apipie/generator/swagger/warning.rb'
914
-
915
902
  # Offense count: 1
916
903
  # This cop supports safe autocorrection (--autocorrect).
917
904
  Performance/RedundantBlockCall:
@@ -940,11 +927,10 @@ Performance/StringIdentifierArgument:
940
927
  - 'lib/apipie/extractor/writer.rb'
941
928
  - 'spec/controllers/users_controller_spec.rb'
942
929
 
943
- # Offense count: 6
930
+ # Offense count: 5
944
931
  # This cop supports safe autocorrection (--autocorrect).
945
932
  Performance/StringReplacement:
946
933
  Exclude:
947
- - 'app/controllers/apipie/apipies_controller.rb'
948
934
  - 'lib/apipie/application.rb'
949
935
  - 'lib/apipie/extractor/writer.rb'
950
936
  - 'lib/apipie/generator/swagger/operation_id.rb'
@@ -984,7 +970,7 @@ RSpec/BeforeAfterAll:
984
970
  Exclude:
985
971
  - 'spec/controllers/users_controller_spec.rb'
986
972
 
987
- # Offense count: 52
973
+ # Offense count: 53
988
974
  # Configuration parameters: Prefixes, AllowedPatterns.
989
975
  # Prefixes: when, with, without
990
976
  RSpec/ContextWording:
@@ -1012,14 +998,13 @@ RSpec/DescribeClass:
1012
998
  - 'spec/lib/swagger/rake_swagger_spec.rb'
1013
999
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
1014
1000
 
1015
- # Offense count: 76
1001
+ # Offense count: 75
1016
1002
  # This cop supports unsafe autocorrection (--autocorrect-all).
1017
1003
  # Configuration parameters: SkipBlocks, EnforcedStyle.
1018
1004
  # SupportedStyles: described_class, explicit
1019
1005
  RSpec/DescribedClass:
1020
1006
  Exclude:
1021
1007
  - 'spec/controllers/api/v1/architectures_controller_spec.rb'
1022
- - 'spec/controllers/api/v2/architectures_controller_spec.rb'
1023
1008
  - 'spec/controllers/api/v2/nested/resources_controller_spec.rb'
1024
1009
  - 'spec/controllers/included_param_group_controller_spec.rb'
1025
1010
  - 'spec/controllers/users_controller_spec.rb'
@@ -1063,14 +1048,13 @@ RSpec/EmptyLineAfterHook:
1063
1048
  RSpec/ExampleLength:
1064
1049
  Max: 85
1065
1050
 
1066
- # Offense count: 159
1051
+ # Offense count: 158
1067
1052
  # This cop supports safe autocorrection (--autocorrect).
1068
1053
  # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
1069
1054
  # DisallowedExamples: works
1070
1055
  RSpec/ExampleWording:
1071
1056
  Exclude:
1072
1057
  - 'spec/controllers/api/v1/architectures_controller_spec.rb'
1073
- - 'spec/controllers/api/v2/architectures_controller_spec.rb'
1074
1058
  - 'spec/controllers/api/v2/nested/resources_controller_spec.rb'
1075
1059
  - 'spec/controllers/concerns_controller_spec.rb'
1076
1060
  - 'spec/controllers/extended_controller_spec.rb'
@@ -1158,13 +1142,12 @@ RSpec/MultipleExpectations:
1158
1142
  RSpec/MultipleMemoizedHelpers:
1159
1143
  Max: 15
1160
1144
 
1161
- # Offense count: 83
1145
+ # Offense count: 82
1162
1146
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
1163
1147
  # SupportedStyles: always, named_only
1164
1148
  RSpec/NamedSubject:
1165
1149
  Exclude:
1166
1150
  - 'spec/controllers/api/v1/architectures_controller_spec.rb'
1167
- - 'spec/controllers/api/v2/architectures_controller_spec.rb'
1168
1151
  - 'spec/controllers/api/v2/nested/resources_controller_spec.rb'
1169
1152
  - 'spec/controllers/users_controller_spec.rb'
1170
1153
  - 'spec/lib/apipie/generator/swagger/param_description/builder_spec.rb'
@@ -1179,7 +1162,7 @@ RSpec/NamedSubject:
1179
1162
  - 'spec/lib/swagger/rake_swagger_spec.rb'
1180
1163
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
1181
1164
 
1182
- # Offense count: 89
1165
+ # Offense count: 93
1183
1166
  # Configuration parameters: AllowedGroups.
1184
1167
  RSpec/NestedGroups:
1185
1168
  Max: 6
@@ -1297,13 +1280,12 @@ Rails/HttpStatus:
1297
1280
  - 'spec/dummy/app/controllers/pets_controller.rb'
1298
1281
  - 'spec/dummy/app/controllers/users_controller.rb'
1299
1282
 
1300
- # Offense count: 4
1283
+ # Offense count: 3
1301
1284
  # This cop supports unsafe autocorrection (--autocorrect-all).
1302
1285
  Rails/NegateInclude:
1303
1286
  Exclude:
1304
1287
  - 'lib/apipie/extractor/collector.rb'
1305
1288
  - 'lib/apipie/extractor/writer.rb'
1306
- - 'lib/apipie/generator/swagger/warning.rb'
1307
1289
  - 'spec/spec_helper.rb'
1308
1290
 
1309
1291
  # Offense count: 7
@@ -1322,7 +1304,7 @@ Rails/OutputSafety:
1322
1304
  - 'lib/apipie/helpers.rb'
1323
1305
 
1324
1306
  # Offense count: 3
1325
- # This cop supports safe autocorrection (--autocorrect).
1307
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1326
1308
  Rails/Pluck:
1327
1309
  Exclude:
1328
1310
  - 'lib/apipie/extractor/writer.rb'
@@ -1386,7 +1368,7 @@ Style/AndOr:
1386
1368
 
1387
1369
  # Offense count: 17
1388
1370
  # This cop supports safe autocorrection (--autocorrect).
1389
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
1371
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
1390
1372
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
1391
1373
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
1392
1374
  # FunctionalMethods: let, let!, subject, watch
@@ -1463,7 +1445,7 @@ Style/ClassCheck:
1463
1445
 
1464
1446
  # Offense count: 2
1465
1447
  # This cop supports safe autocorrection (--autocorrect).
1466
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
1448
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
1467
1449
  # AllowedMethods: ==, equal?, eql?
1468
1450
  Style/ClassEqualityComparison:
1469
1451
  Exclude:
@@ -1497,13 +1479,12 @@ Style/CommentedKeyword:
1497
1479
  - 'lib/apipie/dsl_definition.rb'
1498
1480
  - 'lib/apipie/extractor/recorder.rb'
1499
1481
 
1500
- # Offense count: 9
1482
+ # Offense count: 8
1501
1483
  # This cop supports safe autocorrection (--autocorrect).
1502
1484
  # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
1503
1485
  # SupportedStyles: assign_to_condition, assign_inside_condition
1504
1486
  Style/ConditionalAssignment:
1505
1487
  Exclude:
1506
- - 'app/controllers/apipie/apipies_controller.rb'
1507
1488
  - 'lib/apipie/extractor/writer.rb'
1508
1489
  - 'lib/apipie/param_description.rb'
1509
1490
  - 'lib/apipie/response_description.rb'
@@ -1594,12 +1575,13 @@ Style/For:
1594
1575
 
1595
1576
  # Offense count: 7
1596
1577
  # This cop supports safe autocorrection (--autocorrect).
1597
- # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
1578
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
1598
1579
  # SupportedStyles: annotated, template, unannotated
1580
+ # AllowedMethods: redirect
1599
1581
  Style/FormatStringToken:
1600
1582
  EnforcedStyle: template
1601
1583
 
1602
- # Offense count: 33
1584
+ # Offense count: 31
1603
1585
  # This cop supports safe autocorrection (--autocorrect).
1604
1586
  # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
1605
1587
  Style/GuardClause:
@@ -1664,7 +1646,7 @@ Style/Lambda:
1664
1646
 
1665
1647
  # Offense count: 2
1666
1648
  # This cop supports safe autocorrection (--autocorrect).
1667
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
1649
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
1668
1650
  Style/MethodCallWithoutArgsParentheses:
1669
1651
  Exclude:
1670
1652
  - 'lib/apipie/extractor/recorder.rb'
@@ -1834,7 +1816,7 @@ Style/RedundantPercentQ:
1834
1816
  Exclude:
1835
1817
  - 'apipie-rails.gemspec'
1836
1818
 
1837
- # Offense count: 29
1819
+ # Offense count: 27
1838
1820
  # This cop supports safe autocorrection (--autocorrect).
1839
1821
  # Configuration parameters: AllowMultipleReturnValues.
1840
1822
  Style/RedundantReturn:
@@ -1895,12 +1877,11 @@ Style/Semicolon:
1895
1877
  Exclude:
1896
1878
  - 'lib/apipie/method_description.rb'
1897
1879
 
1898
- # Offense count: 2
1880
+ # Offense count: 1
1899
1881
  # This cop supports safe autocorrection (--autocorrect).
1900
1882
  # Configuration parameters: AllowIfMethodIsEmpty.
1901
1883
  Style/SingleLineMethods:
1902
1884
  Exclude:
1903
- - 'lib/apipie/resource_description.rb'
1904
1885
  - 'lib/apipie/tag_list_description.rb'
1905
1886
 
1906
1887
  # Offense count: 6
@@ -1936,7 +1917,7 @@ Style/StringConcatenation:
1936
1917
  - 'lib/apipie/application.rb'
1937
1918
  - 'lib/apipie/extractor/writer.rb'
1938
1919
 
1939
- # Offense count: 1196
1920
+ # Offense count: 1210
1940
1921
  # This cop supports safe autocorrection (--autocorrect).
1941
1922
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
1942
1923
  # SupportedStyles: single_quotes, double_quotes
@@ -2020,7 +2001,7 @@ Style/StringLiterals:
2020
2001
  - 'spec/support/rake.rb'
2021
2002
  - 'spec/test_engine/memes_controller_spec.rb'
2022
2003
 
2023
- # Offense count: 35
2004
+ # Offense count: 34
2024
2005
  # This cop supports safe autocorrection (--autocorrect).
2025
2006
  # Configuration parameters: MinSize.
2026
2007
  # SupportedStyles: percent, brackets
@@ -0,0 +1,3 @@
1
+ {
2
+ "rubyLsp.bundleGemfile": "gemfiles/Gemfile.tools"
3
+ }
data/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
1
  Changelog
2
2
  ===========
3
3
 
4
- Also deleted the `Gemfile` that was now a broken symlink.
5
- please use `export BUNDLE_GEMFILE='gemfiles/Gemfile.rails61'; bundle exec rspec` to run the test suite
4
+ ## [v1.2.0](https://github.com/Apipie/apipie-rails/tree/v1.2.0) (2023-06-03)
5
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v1.1.0...v1.2.0)
6
+ * Allow resource_name to be inherited ([#872](https://github.com/Apipie/apipie-rails/pull/872)) (Eric Hankins)
7
+ * Fix cache rendering with namespaced resources ([#874](https://github.com/Apipie/apipie-rails/pull/874)) (Eric Hankins)
8
+ * Fix deprecated content_type on Rails >= 6 ([#879](https://github.com/Apipie/apipie-rails/pull/879)) (Eric Hankins)
9
+ * Fix typo in Collector ([#877](https://github.com/Apipie/apipie-rails/pull/877)) (Eric Hankins)
10
+ * Fix error climbing controller hierarchy ([#875](https://github.com/Apipie/apipie-rails/pull/875)) (Eric Hankins)
11
+ * Add Gemfile.tools for IDE usage ([#876](https://github.com/Apipie/apipie-rails/pull/876)) (Eric Hankins)
12
+ * Fix rubocop ([#883](https://github.com/Apipie/apipie-rails/pull/883)) (Mathieu Jobin)
13
+ * Performance/InefficientHashSearch-20230602233137 ([#884](https://github.com/Apipie/apipie-rails/pull/884)) (RuboCop challenger)
14
+ * Redo Github action script to not need individual gemfiles ([#885](https://github.com/Apipie/apipie-rails/pull/885)) (Mathieu Jobin)
6
15
 
7
16
  ## [v1.1.0](https://github.com/Apipie/apipie-rails/tree/v1.1.0) (2023-05-16)
8
17
  [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v1.0.0...v1.1.0)