grape 0.19.2 → 1.0.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.
- checksums.yaml +4 -4
- data/Appraisals +8 -0
- data/CHANGELOG.md +40 -22
- data/Gemfile +1 -0
- data/Gemfile.lock +58 -59
- data/LICENSE +1 -1
- data/README.md +94 -49
- data/Rakefile +1 -0
- data/UPGRADING.md +89 -0
- data/benchmark/simple_with_type_coercer.rb +22 -0
- data/gemfiles/multi_json.gemfile +36 -0
- data/gemfiles/multi_xml.gemfile +36 -0
- data/gemfiles/rack_1.5.2.gemfile +1 -0
- data/gemfiles/rack_edge.gemfile +1 -0
- data/gemfiles/rails_3.gemfile +1 -0
- data/gemfiles/rails_4.gemfile +1 -0
- data/gemfiles/rails_5.gemfile +1 -0
- data/gemfiles/rails_edge.gemfile +1 -0
- data/grape.gemspec +0 -3
- data/lib/grape.rb +40 -17
- data/lib/grape/dsl/helpers.rb +32 -18
- data/lib/grape/dsl/inside_route.rb +2 -2
- data/lib/grape/dsl/parameters.rb +26 -0
- data/lib/grape/dsl/routing.rb +1 -1
- data/lib/grape/dsl/settings.rb +1 -1
- data/lib/grape/endpoint.rb +20 -16
- data/lib/grape/error_formatter/json.rb +1 -1
- data/lib/grape/error_formatter/txt.rb +1 -1
- data/lib/grape/extensions/active_support/hash_with_indifferent_access.rb +26 -0
- data/lib/grape/extensions/deep_hash_with_indifferent_access.rb +18 -0
- data/lib/grape/extensions/deep_mergeable_hash.rb +19 -0
- data/lib/grape/extensions/deep_symbolize_hash.rb +30 -0
- data/lib/grape/extensions/hash.rb +23 -0
- data/lib/grape/extensions/hashie/mash.rb +24 -0
- data/lib/grape/formatter/json.rb +1 -1
- data/lib/grape/formatter/serializable_hash.rb +2 -2
- data/lib/grape/locale/en.yml +1 -1
- data/lib/grape/middleware/globals.rb +1 -1
- data/lib/grape/parser/json.rb +2 -2
- data/lib/grape/parser/xml.rb +2 -2
- data/lib/grape/request.rb +11 -10
- data/lib/grape/util/json.rb +8 -0
- data/lib/grape/util/xml.rb +8 -0
- data/lib/grape/validations.rb +4 -0
- data/lib/grape/validations/params_scope.rb +77 -39
- data/lib/grape/validations/types/build_coercer.rb +27 -0
- data/lib/grape/validations/types/custom_type_coercer.rb +18 -4
- data/lib/grape/validations/types/file.rb +2 -3
- data/lib/grape/validations/validator_factory.rb +18 -0
- data/lib/grape/validations/validators/base.rb +4 -5
- data/lib/grape/validations/validators/coerce.rb +4 -0
- data/lib/grape/validations/validators/except_values.rb +20 -0
- data/lib/grape/validations/validators/values.rb +25 -5
- data/lib/grape/version.rb +1 -1
- data/spec/grape/api/invalid_format_spec.rb +3 -3
- data/spec/grape/api_spec.rb +28 -16
- data/spec/grape/dsl/helpers_spec.rb +25 -6
- data/spec/grape/endpoint_spec.rb +117 -13
- data/spec/grape/extensions/param_builders/hash_spec.rb +83 -0
- data/spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb +105 -0
- data/spec/grape/extensions/param_builders/hashie/mash_spec.rb +79 -0
- data/spec/grape/middleware/formatter_spec.rb +6 -2
- data/spec/grape/request_spec.rb +13 -3
- data/spec/grape/validations/instance_behaivour_spec.rb +44 -0
- data/spec/grape/validations/params_scope_spec.rb +23 -0
- data/spec/grape/validations/types_spec.rb +19 -0
- data/spec/grape/validations/validators/coerce_spec.rb +117 -8
- data/spec/grape/validations/validators/except_values_spec.rb +191 -0
- data/spec/grape/validations/validators/values_spec.rb +78 -0
- data/spec/integration/multi_json/json_spec.rb +7 -0
- data/spec/integration/multi_xml/xml_spec.rb +7 -0
- metadata +30 -46
- data/pkg/grape-0.18.0.gem +0 -0
data/pkg/grape-0.18.0.gem
DELETED
Binary file
|