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.
- checksums.yaml +4 -4
- data/README.md +132 -15
- data/lib/action_controller/serialization.rb +5 -0
- data/lib/action_controller/serialization_test_case.rb +79 -0
- data/lib/active_model/array_serializer.rb +15 -8
- data/lib/active_model/default_serializer.rb +12 -2
- data/lib/active_model/serializable.rb +21 -6
- data/lib/active_model/serializer.rb +84 -9
- data/lib/active_model/serializer/associations.rb +38 -11
- data/lib/active_model/serializer/generators/serializer/serializer_generator.rb +1 -1
- data/lib/active_model/serializer/version.rb +1 -1
- data/lib/active_model_serializers.rb +6 -2
- data/test/fixtures/poro.rb +11 -0
- data/test/integration/action_controller/serialization_test.rb +53 -0
- data/test/integration/action_controller/serialization_test_case_test.rb +61 -0
- data/test/integration/active_record/active_record_test.rb +1 -1
- data/test/integration/generators/scaffold_controller_generator_test.rb +0 -3
- data/test/test_helper.rb +4 -1
- data/test/unit/active_model/array_serializer/except_test.rb +18 -0
- data/test/unit/active_model/array_serializer/key_format_test.rb +18 -0
- data/test/unit/active_model/array_serializer/meta_test.rb +1 -1
- data/test/unit/active_model/array_serializer/only_test.rb +18 -0
- data/test/unit/active_model/array_serializer/root_test.rb +2 -2
- data/test/unit/active_model/array_serializer/scope_test.rb +1 -1
- data/test/unit/active_model/array_serializer/serialization_test.rb +120 -4
- data/test/unit/active_model/default_serializer_test.rb +1 -1
- data/test/unit/active_model/serializer/associations/build_serializer_test.rb +1 -1
- data/test/unit/active_model/serializer/associations_test.rb +1 -1
- data/test/unit/active_model/serializer/attributes_test.rb +1 -1
- data/test/unit/active_model/serializer/config_test.rb +7 -5
- data/test/unit/active_model/serializer/filter_test.rb +22 -2
- data/test/unit/active_model/serializer/has_many_test.rb +61 -4
- data/test/unit/active_model/serializer/has_one_test.rb +59 -3
- data/test/unit/active_model/serializer/key_format_test.rb +25 -0
- data/test/unit/active_model/serializer/meta_test.rb +1 -1
- data/test/unit/active_model/serializer/options_test.rb +15 -0
- data/test/unit/active_model/serializer/root_test.rb +2 -2
- data/test/unit/active_model/serializer/scope_test.rb +3 -3
- metadata +36 -27
- data/test/coverage_setup.rb +0 -15
- data/test/tmp/app/serializers/account_serializer.rb +0 -3
data/test/coverage_setup.rb
DELETED
@@ -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
|