active_model_version_serializers 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -5,6 +5,11 @@ require 'active_support/core_ext/hash/slice'
|
|
5
5
|
|
6
6
|
module ActiveModel
|
7
7
|
class VersionSerializer
|
8
|
+
# make sure we move serialization to the version
|
9
|
+
[:as_json, :to_json, :serializable_hash].each do |method|
|
10
|
+
undef_method method if instance_methods.include?(method)
|
11
|
+
end
|
12
|
+
|
8
13
|
class_attribute :_versions, :_default, :_root, :_name
|
9
14
|
self._versions, self._default = {}, :v1
|
10
15
|
attr_reader :object, :options, :version, :vklass
|
@@ -88,7 +93,6 @@ module ActiveModel
|
|
88
93
|
self._versions = self._versions.merge({version => vklass})
|
89
94
|
end
|
90
95
|
|
91
|
-
private
|
92
96
|
def method_missing(method, *args)
|
93
97
|
if @vinstance.respond_to?(method)
|
94
98
|
@vinstance.send(method, *args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_version_serializers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 3.2.8
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rake
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
110
126
|
description: Active Model Serializer with versioning
|
111
127
|
email:
|
112
128
|
- hookercookerman@gmail.com
|