grape 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grape might be problematic. Click here for more details.

Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +2 -2
  3. data/CHANGELOG.md +237 -215
  4. data/CONTRIBUTING.md +4 -4
  5. data/README.md +133 -10
  6. data/RELEASING.md +14 -6
  7. data/Rakefile +1 -1
  8. data/UPGRADING.md +23 -23
  9. data/grape.gemspec +1 -3
  10. data/lib/grape/api.rb +24 -4
  11. data/lib/grape/dsl/callbacks.rb +20 -0
  12. data/lib/grape/dsl/configuration.rb +54 -0
  13. data/lib/grape/dsl/inside_route.rb +33 -1
  14. data/lib/grape/dsl/parameters.rb +80 -0
  15. data/lib/grape/dsl/routing.rb +14 -0
  16. data/lib/grape/dsl/settings.rb +36 -1
  17. data/lib/grape/dsl/validations.rb +7 -5
  18. data/lib/grape/endpoint.rb +42 -32
  19. data/lib/grape/exceptions/unknown_parameter.rb +10 -0
  20. data/lib/grape/exceptions/validation_errors.rb +4 -3
  21. data/lib/grape/http/headers.rb +0 -1
  22. data/lib/grape/http/request.rb +12 -4
  23. data/lib/grape/locale/en.yml +1 -0
  24. data/lib/grape/middleware/base.rb +1 -0
  25. data/lib/grape/middleware/formatter.rb +39 -23
  26. data/lib/grape/namespace.rb +13 -2
  27. data/lib/grape/path.rb +1 -0
  28. data/lib/grape/route.rb +5 -0
  29. data/lib/grape/util/file_response.rb +21 -0
  30. data/lib/grape/util/inheritable_setting.rb +23 -2
  31. data/lib/grape/util/inheritable_values.rb +1 -1
  32. data/lib/grape/util/parameter_types.rb +58 -0
  33. data/lib/grape/util/stackable_values.rb +5 -2
  34. data/lib/grape/validations/params_scope.rb +83 -9
  35. data/lib/grape/validations/validators/coerce.rb +11 -2
  36. data/lib/grape/validations.rb +5 -0
  37. data/lib/grape/version.rb +2 -1
  38. data/lib/grape.rb +7 -8
  39. data/spec/grape/api_spec.rb +63 -0
  40. data/spec/grape/dsl/inside_route_spec.rb +37 -2
  41. data/spec/grape/dsl/validations_spec.rb +18 -0
  42. data/spec/grape/endpoint_spec.rb +83 -0
  43. data/spec/grape/exceptions/validation_errors_spec.rb +28 -0
  44. data/spec/grape/middleware/base_spec.rb +33 -11
  45. data/spec/grape/middleware/formatter_spec.rb +0 -5
  46. data/spec/grape/util/inheritable_values_spec.rb +14 -0
  47. data/spec/grape/util/parameter_types_spec.rb +54 -0
  48. data/spec/grape/util/stackable_values_spec.rb +10 -0
  49. data/spec/grape/validations/params_scope_spec.rb +84 -0
  50. data/spec/grape/validations/validators/coerce_spec.rb +29 -8
  51. data/spec/grape/validations/validators/values_spec.rb +12 -0
  52. metadata +9 -6
  53. data/lib/backports/active_support/deep_dup.rb +0 -49
  54. data/lib/backports/active_support/duplicable.rb +0 -88
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 219bc6e20332454502d7e7955db53424e5828880
4
- data.tar.gz: 69cdeb3133100f91ebb0fd32e2ee1e52a130defc
3
+ metadata.gz: d107e00ab83d74d77a9860e54a64c918c1825b4a
4
+ data.tar.gz: 3c98df9a1d4a2cca9db63c73215d5def5420e4e0
5
5
  SHA512:
6
- metadata.gz: 591cb91662a9b1a5f93889103eca65ed73c2979490d36c01f47f7cfabf926b5988693bfc4502defb394236003669fe60d2cb42b3005778f9be4c2c737975afce
7
- data.tar.gz: ca855e03121beca28d6f0888e843c93e118f38acce88870732f9ec5e3073382d76bde1eb831236f64f6fe04fa7681022a4a677553a89abecc3d54a36ae05153a
6
+ metadata.gz: 1da0c2dea94229bf87671394b43d2d6c903024d5c8ab41a27eb93ef1c304dd5e253c2bc4b48374c87292335ede93ba91e034ee039f1ede1abd0b068d21f796af
7
+ data.tar.gz: a0ae9bba790064e8a98df12e6575efa130494b7c50b7a40ae3f32cfd95db14fb7f7049d07bf3afbf4f090f20c1a069989c4dada45f41aa1d99d09b7b6e47ab65
data/.rubocop_todo.yml CHANGED
@@ -16,7 +16,7 @@ Metrics/BlockNesting:
16
16
  # Offense count: 4
17
17
  # Configuration parameters: CountComments.
18
18
  Metrics/ClassLength:
19
- Max: 246
19
+ Max: 252
20
20
 
21
21
  # Offense count: 23
22
22
  Metrics/CyclomaticComplexity:
@@ -35,7 +35,7 @@ Metrics/MethodLength:
35
35
  # Offense count: 8
36
36
  # Configuration parameters: CountComments.
37
37
  Metrics/ModuleLength:
38
- Max: 243
38
+ Max: 271
39
39
 
40
40
  # Offense count: 17
41
41
  Metrics/PerceivedComplexity: