apipie-rails 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +75 -0
  3. data/.rubocop_todo.yml +780 -201
  4. data/CHANGELOG.md +8 -0
  5. data/app/controllers/apipie/apipies_controller.rb +5 -6
  6. data/lib/apipie/apipie_module.rb +2 -2
  7. data/lib/apipie/application.rb +6 -6
  8. data/lib/apipie/configuration.rb +11 -11
  9. data/lib/apipie/dsl_definition.rb +11 -10
  10. data/lib/apipie/error_description.rb +2 -2
  11. data/lib/apipie/extractor/writer.rb +11 -11
  12. data/lib/apipie/generator/swagger/context.rb +27 -0
  13. data/lib/apipie/generator/swagger/operation_id.rb +51 -0
  14. data/lib/apipie/generator/swagger/param_description/builder.rb +105 -0
  15. data/lib/apipie/generator/swagger/param_description/composite.rb +111 -0
  16. data/lib/apipie/generator/swagger/param_description/description.rb +15 -0
  17. data/lib/apipie/generator/swagger/param_description/in.rb +37 -0
  18. data/lib/apipie/generator/swagger/param_description/name.rb +18 -0
  19. data/lib/apipie/generator/swagger/param_description/type.rb +108 -0
  20. data/lib/apipie/generator/swagger/param_description.rb +18 -0
  21. data/lib/apipie/generator/swagger/type_extractor.rb +2 -2
  22. data/lib/apipie/method_description.rb +4 -5
  23. data/lib/apipie/param_description.rb +7 -7
  24. data/lib/apipie/resource_description.rb +3 -3
  25. data/lib/apipie/response_description.rb +2 -2
  26. data/lib/apipie/response_description_adapter.rb +7 -5
  27. data/lib/apipie/swagger_generator.rb +54 -202
  28. data/lib/apipie/validator.rb +3 -3
  29. data/lib/apipie/version.rb +1 -1
  30. data/lib/apipie-rails.rb +9 -0
  31. data/lib/tasks/apipie.rake +5 -6
  32. data/spec/controllers/users_controller_spec.rb +3 -2
  33. data/spec/lib/generator/swagger/context_spec.rb +35 -0
  34. data/spec/lib/generator/swagger/operation_id_spec.rb +63 -0
  35. data/spec/lib/generator/swagger/param_description/builder_spec.rb +163 -0
  36. data/spec/lib/generator/swagger/param_description/composite_spec.rb +95 -0
  37. data/spec/lib/generator/swagger/param_description/description_spec.rb +79 -0
  38. data/spec/lib/generator/swagger/param_description/in_spec.rb +86 -0
  39. data/spec/lib/generator/swagger/param_description/name_spec.rb +81 -0
  40. data/spec/lib/generator/swagger/param_description/type_spec.rb +178 -0
  41. data/spec/lib/generator/swagger/param_description_spec.rb +28 -0
  42. data/spec/lib/generator/swagger/type_extractor_spec.rb +38 -18
  43. data/spec/lib/param_group_spec.rb +5 -5
  44. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68c72bdd4204b9dcb285d9f663c4c64dce315af16f9463d9e8ee9b8f28bfc14b
4
- data.tar.gz: 25c735365fb4b4733d9eab9b7f5b9439b1d8200113b550ab56c94c9d33253c10
3
+ metadata.gz: c9e2fec6d89bb6cb249c499252c4121de7401c8d7deb9dd2c0841c92f29e0422
4
+ data.tar.gz: 4e89b98b3f70011cb1a42f61ac84e3cd3ee427c07ba2e9562ce6b7eaa5794ecd
5
5
  SHA512:
6
- metadata.gz: dbbfcb973af34864e3e6793d483e32adb3ff8d7e37ee676ec1e485bd4cd094e62c774b41ebe86219cd6e8ffdc2930579125298a918b3d0fc5e48bfaa4fc2260b
7
- data.tar.gz: 132c1d5652fc466c42f8f888ce5b9015531ba7d54d1c4c0227d843ed5b3ae0761a0acb365a0ef08135bf10ef8312b30b6fe099f6fe075eec23fd54c079ad9f92
6
+ metadata.gz: 548fc9eccedd4fd277bb8b0b87ff63076465fd2030d43ede7e392a9db7aba43b408d151dcc12be8050e51f52c50e2b0cc9915461d6d99e52268f58252e6d7f8d
7
+ data.tar.gz: a550683bc7d8f9f90f379917e4dc50b0880c294e6de3466c24b4b084a3d49e62ee9e4fd80c74670229fd1fbab9cd6e76d971d723767d9494df254761d027b568
data/.rubocop.yml CHANGED
@@ -20,6 +20,7 @@ Layout/LineLength:
20
20
  - lib/apipie/response_description_adapter.rb
21
21
  - lib/apipie/swagger_generator.rb
22
22
  - lib/apipie/errors.rb
23
+ - lib/apipie/generator/swagger/warning.rb
23
24
  - lib/apipie/rspec/response_validation_helper.rb
24
25
  - spec/controllers/users_controller_spec.rb
25
26
  - spec/dummy/app/controllers/twitter_example_controller.rb
@@ -29,9 +30,83 @@ Layout/LineLength:
29
30
  - spec/lib/swagger/response_validation_spec.rb
30
31
  - spec/spec_helper.rb
31
32
 
33
+ Metrics/ClassLength:
34
+ Max: 180
35
+ Exclude:
36
+ - lib/apipie/extractor/writer.rb
37
+ - lib/apipie/application.rb
38
+ - lib/apipie/param_description.rb
39
+ - lib/apipie/swagger_generator.rb
40
+ - spec/dummy/app/controllers/pets_controller.rb
41
+ - spec/dummy/app/controllers/twitter_example_controller.rb
42
+ - spec/dummy/app/controllers/users_controller.rb
43
+
44
+ Metrics/BlockLength:
45
+ Max: 25 # default
46
+ Exclude:
47
+ - app/controllers/apipie/apipies_controller.rb
48
+ - lib/apipie/generator/swagger/param_description/composite.rb
49
+ - lib/tasks/apipie.rake
50
+ - lib/apipie/swagger_generator.rb
51
+
32
52
  Naming/PredicateName:
33
53
  AllowedMethods:
34
54
  - have_field?
35
55
 
36
56
  Style/NumericPredicate:
37
57
  Enabled: false
58
+
59
+ Style/HashSyntax:
60
+ EnforcedStyle: no_mixed_keys
61
+ EnforcedShorthandSyntax: never # consistent
62
+
63
+ Style/Documentation:
64
+ Exclude:
65
+ - 'app/controllers/apipie/apipies_controller.rb'
66
+ - 'app/helpers/apipie_helper.rb'
67
+ - 'lib/apipie/apipie_module.rb'
68
+ - 'lib/apipie/application.rb'
69
+ - 'lib/apipie/configuration.rb'
70
+ - 'lib/apipie/core_ext/route.rb'
71
+ - 'lib/apipie/dsl_definition.rb'
72
+ - 'lib/apipie/error_description.rb'
73
+ - 'lib/apipie/errors.rb'
74
+ - 'lib/apipie/extractor.rb'
75
+ - 'lib/apipie/extractor/collector.rb'
76
+ - 'lib/apipie/extractor/recorder.rb'
77
+ - 'lib/apipie/extractor/writer.rb'
78
+ - 'lib/apipie/generator/generator.rb'
79
+ - 'lib/apipie/generator/swagger/context.rb'
80
+ - 'lib/apipie/generator/swagger/operation_id.rb'
81
+ - 'lib/apipie/generator/swagger/param_description.rb'
82
+ - 'lib/apipie/generator/swagger/param_description/builder.rb'
83
+ - 'lib/apipie/generator/swagger/param_description/composite.rb'
84
+ - 'lib/apipie/generator/swagger/param_description/description.rb'
85
+ - 'lib/apipie/generator/swagger/param_description/in.rb'
86
+ - 'lib/apipie/generator/swagger/param_description/name.rb'
87
+ - 'lib/apipie/generator/swagger/param_description/type.rb'
88
+ - 'lib/apipie/generator/swagger/swagger.rb'
89
+ - 'lib/apipie/generator/swagger/type.rb'
90
+ - 'lib/apipie/generator/swagger/type_extractor.rb'
91
+ - 'lib/apipie/generator/swagger/warning.rb'
92
+ - 'lib/apipie/generator/swagger/warning_writer.rb'
93
+ - 'lib/apipie/helpers.rb'
94
+ - 'lib/apipie/markup.rb'
95
+ - 'lib/apipie/method_description.rb'
96
+ - 'lib/apipie/method_description/api.rb'
97
+ - 'lib/apipie/middleware/checksum_in_headers.rb'
98
+ - 'lib/apipie/railtie.rb'
99
+ - 'lib/apipie/response_description.rb'
100
+ - 'lib/apipie/response_description_adapter.rb'
101
+ - 'lib/apipie/routes_formatter.rb'
102
+ - 'lib/apipie/routing.rb'
103
+ - 'lib/apipie/rspec/response_validation_helper.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'
110
+ - spec/support/custom_bool_validator.rb
111
+ - spec/lib/validators/array_validator_spec.rb
112
+ - spec/dummy/**/*.rb