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
@@ -1,5 +1,4 @@
1
1
  rvm:
2
2
  - 1.9.3
3
- - ree
4
- - jruby
5
- - rbx
3
+ - jruby-19mode
4
+ - rbx-19mode
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env rake
2
+
1
3
  require "bundler/gem_tasks"
2
4
  Bundler::GemHelper.install_tasks
3
5
 
@@ -24,4 +24,5 @@ Gem::Specification.new do |gem|
24
24
  gem.add_development_dependency "factory_girl", "~> 4.0.0"
25
25
  gem.add_development_dependency "fuubar", "~> 1.0.0"
26
26
  gem.add_development_dependency "activemodel", "~> 3.2.8"
27
+ gem.add_development_dependency 'rake'
27
28
  end
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  class VersionSerializer
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
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.2
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