active_model_serializers 0.9.0.alpha1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +132 -15
  3. data/lib/action_controller/serialization.rb +5 -0
  4. data/lib/action_controller/serialization_test_case.rb +79 -0
  5. data/lib/active_model/array_serializer.rb +15 -8
  6. data/lib/active_model/default_serializer.rb +12 -2
  7. data/lib/active_model/serializable.rb +21 -6
  8. data/lib/active_model/serializer.rb +84 -9
  9. data/lib/active_model/serializer/associations.rb +38 -11
  10. data/lib/active_model/serializer/generators/serializer/serializer_generator.rb +1 -1
  11. data/lib/active_model/serializer/version.rb +1 -1
  12. data/lib/active_model_serializers.rb +6 -2
  13. data/test/fixtures/poro.rb +11 -0
  14. data/test/integration/action_controller/serialization_test.rb +53 -0
  15. data/test/integration/action_controller/serialization_test_case_test.rb +61 -0
  16. data/test/integration/active_record/active_record_test.rb +1 -1
  17. data/test/integration/generators/scaffold_controller_generator_test.rb +0 -3
  18. data/test/test_helper.rb +4 -1
  19. data/test/unit/active_model/array_serializer/except_test.rb +18 -0
  20. data/test/unit/active_model/array_serializer/key_format_test.rb +18 -0
  21. data/test/unit/active_model/array_serializer/meta_test.rb +1 -1
  22. data/test/unit/active_model/array_serializer/only_test.rb +18 -0
  23. data/test/unit/active_model/array_serializer/root_test.rb +2 -2
  24. data/test/unit/active_model/array_serializer/scope_test.rb +1 -1
  25. data/test/unit/active_model/array_serializer/serialization_test.rb +120 -4
  26. data/test/unit/active_model/default_serializer_test.rb +1 -1
  27. data/test/unit/active_model/serializer/associations/build_serializer_test.rb +1 -1
  28. data/test/unit/active_model/serializer/associations_test.rb +1 -1
  29. data/test/unit/active_model/serializer/attributes_test.rb +1 -1
  30. data/test/unit/active_model/serializer/config_test.rb +7 -5
  31. data/test/unit/active_model/serializer/filter_test.rb +22 -2
  32. data/test/unit/active_model/serializer/has_many_test.rb +61 -4
  33. data/test/unit/active_model/serializer/has_one_test.rb +59 -3
  34. data/test/unit/active_model/serializer/key_format_test.rb +25 -0
  35. data/test/unit/active_model/serializer/meta_test.rb +1 -1
  36. data/test/unit/active_model/serializer/options_test.rb +15 -0
  37. data/test/unit/active_model/serializer/root_test.rb +2 -2
  38. data/test/unit/active_model/serializer/scope_test.rb +3 -3
  39. metadata +36 -27
  40. data/test/coverage_setup.rb +0 -15
  41. data/test/tmp/app/serializers/account_serializer.rb +0 -3
@@ -1,15 +0,0 @@
1
- begin
2
- require 'simplecov'
3
- require 'coveralls'
4
-
5
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6
- SimpleCov::Formatter::HTMLFormatter,
7
- Coveralls::SimpleCov::Formatter
8
- ]
9
-
10
- SimpleCov.start do
11
- add_group "lib", "lib"
12
- add_group "test", "test"
13
- end
14
- rescue LoadError
15
- end
@@ -1,3 +0,0 @@
1
- class AccountSerializer < MySerializer
2
- attributes :id
3
- end