active_model_serializers 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +61 -0
- data/DESIGN.textile +2 -2
- data/Gemfile +3 -1
- data/README.md +44 -21
- data/Rakefile +5 -0
- data/active_model_serializers.gemspec +2 -1
- data/bench/perf.rb +43 -0
- data/lib/action_controller/serialization.rb +8 -25
- data/lib/active_model/array_serializer.rb +58 -20
- data/lib/active_model/serializer.rb +132 -16
- data/lib/active_model/serializer/associations.rb +17 -10
- data/lib/active_model/serializers/version.rb +1 -1
- data/lib/active_model_serializers.rb +20 -8
- data/lib/active_record/serializer_override.rb +16 -0
- data/lib/generators/serializer/serializer_generator.rb +3 -2
- data/lib/generators/serializer/templates/serializer.rb +11 -0
- data/test/array_serializer_test.rb +0 -1
- data/test/association_test.rb +103 -0
- data/test/caching_test.rb +96 -0
- data/test/generators_test.rb +16 -2
- data/test/no_serialization_scope_test.rb +1 -1
- data/test/serialization_scope_name_test.rb +67 -0
- data/test/serialization_test.rb +1 -1
- data/test/serializer_support_test.rb +10 -0
- data/test/serializer_test.rb +142 -3
- data/test/test_fakes.rb +12 -0
- data/test/test_helper.rb +8 -7
- metadata +25 -4
- data/RELEASE_NOTES.md +0 -15
data/test/test_helper.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
require "rubygems"
|
2
2
|
require "bundler/setup"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
add_group "spec", "spec"
|
9
|
-
end
|
4
|
+
require 'simplecov'
|
5
|
+
SimpleCov.start do
|
6
|
+
add_group "lib", "lib"
|
7
|
+
add_group "spec", "spec"
|
10
8
|
end
|
11
9
|
|
10
|
+
require 'coveralls'
|
11
|
+
Coveralls.wear!
|
12
|
+
|
12
13
|
require "pry"
|
13
14
|
|
14
15
|
require "active_model_serializers"
|
@@ -37,4 +38,4 @@ end
|
|
37
38
|
|
38
39
|
class Object
|
39
40
|
undef_method :id if respond_to?(:id)
|
40
|
-
end
|
41
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_serializers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -67,6 +67,20 @@ dependencies:
|
|
67
67
|
- - '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: coveralls
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
70
84
|
description: Making it easy to serialize models for client-side use
|
71
85
|
email:
|
72
86
|
- jose.valim@gmail.com
|
@@ -77,14 +91,15 @@ extra_rdoc_files: []
|
|
77
91
|
files:
|
78
92
|
- .gitignore
|
79
93
|
- .travis.yml
|
94
|
+
- CHANGELOG.md
|
80
95
|
- DESIGN.textile
|
81
96
|
- Gemfile
|
82
97
|
- Gemfile.edge
|
83
98
|
- MIT-LICENSE.txt
|
84
99
|
- README.md
|
85
|
-
- RELEASE_NOTES.md
|
86
100
|
- Rakefile
|
87
101
|
- active_model_serializers.gemspec
|
102
|
+
- bench/perf.rb
|
88
103
|
- cruft.md
|
89
104
|
- lib/action_controller/serialization.rb
|
90
105
|
- lib/active_model/array_serializer.rb
|
@@ -92,20 +107,23 @@ files:
|
|
92
107
|
- lib/active_model/serializer/associations.rb
|
93
108
|
- lib/active_model/serializers/version.rb
|
94
109
|
- lib/active_model_serializers.rb
|
110
|
+
- lib/active_record/serializer_override.rb
|
95
111
|
- lib/generators/resource_override.rb
|
96
112
|
- lib/generators/serializer/USAGE
|
97
113
|
- lib/generators/serializer/serializer_generator.rb
|
98
114
|
- lib/generators/serializer/templates/serializer.rb
|
99
115
|
- test/array_serializer_test.rb
|
100
116
|
- test/association_test.rb
|
117
|
+
- test/caching_test.rb
|
101
118
|
- test/generators_test.rb
|
102
119
|
- test/no_serialization_scope_test.rb
|
120
|
+
- test/serialization_scope_name_test.rb
|
103
121
|
- test/serialization_test.rb
|
104
122
|
- test/serializer_support_test.rb
|
105
123
|
- test/serializer_test.rb
|
106
124
|
- test/test_fakes.rb
|
107
125
|
- test/test_helper.rb
|
108
|
-
homepage: https://github.com/
|
126
|
+
homepage: https://github.com/rails-api/active_model_serializers
|
109
127
|
licenses: []
|
110
128
|
metadata: {}
|
111
129
|
post_install_message:
|
@@ -132,10 +150,13 @@ summary: Bringing consistency and object orientation to model serialization. Wor
|
|
132
150
|
test_files:
|
133
151
|
- test/array_serializer_test.rb
|
134
152
|
- test/association_test.rb
|
153
|
+
- test/caching_test.rb
|
135
154
|
- test/generators_test.rb
|
136
155
|
- test/no_serialization_scope_test.rb
|
156
|
+
- test/serialization_scope_name_test.rb
|
137
157
|
- test/serialization_test.rb
|
138
158
|
- test/serializer_support_test.rb
|
139
159
|
- test/serializer_test.rb
|
140
160
|
- test/test_fakes.rb
|
141
161
|
- test/test_helper.rb
|
162
|
+
has_rdoc:
|
data/RELEASE_NOTES.md
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# VERSION 0.6 (to be released)
|
2
|
-
|
3
|
-
* Serialize sets properly
|
4
|
-
* Add root option to ArraySerializer
|
5
|
-
* Support polymorphic associations
|
6
|
-
* Support :each_serializer in ArraySerializer
|
7
|
-
* Add `scope` method to easily access the scope in the serializer
|
8
|
-
* Fix regression with Rails 3.2.6; add Rails 4 support
|
9
|
-
* Allow serialization_scope to be disabled with serialization_scope nil
|
10
|
-
* Array serializer should support pure ruby objects besides serializers
|
11
|
-
|
12
|
-
# VERSION 0.5 (May 16, 2012)
|
13
|
-
|
14
|
-
* First tagged version
|
15
|
-
* Changes generators to always generate an ApplicationSerializer
|