msgpack_rails 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +2 -0
- data/lib/msgpack_rails/activemodel/serializers/message_pack.rb +1 -0
- data/lib/msgpack_rails/version.rb +1 -1
- data/lib/msgpack_rails.rb +18 -6
- data/msgpack_rails.gemspec +5 -2
- data/test/msgpack_rails/serializer_test.rb +1 -0
- metadata +2 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b078762cbf3e227bbe359f99ded73b89a6e95714
|
4
|
+
data.tar.gz: c4dece2e60cccddd342f3e53c9679e95bceee535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4d74c030797947bc5f6f9c9527c93012e5107d883ec8055be6a7f51e2003f53332827b05c2d6f49bf2aaf7fcb61b677c2d1a4937263e8488ee811e5da691310
|
7
|
+
data.tar.gz: ea3a4dd1dc26da2366ad28e87d407ab4765a200b8372e5ac92063a18cef55f6f6fbe59990594a4bdd5b3a6992803a76bdfbddb92d1f194b72ac24ea360692144
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/lib/msgpack_rails.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require "active_support"
|
2
|
-
require "active_model"
|
3
2
|
require "msgpack_rails/version"
|
4
3
|
require "msgpack_rails/activesupport/message_pack"
|
5
|
-
require "msgpack_rails/activemodel/serializers/message_pack"
|
6
4
|
|
7
5
|
module ActiveSupport
|
8
6
|
eager_autoload do
|
@@ -10,10 +8,24 @@ module ActiveSupport
|
|
10
8
|
end
|
11
9
|
end
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
if defined?(ActiveModel)
|
12
|
+
require "msgpack_rails/activemodel/serializers/message_pack"
|
13
|
+
|
14
|
+
module ActiveModel
|
15
|
+
module Serializers
|
16
|
+
eager_autoload do
|
17
|
+
autoload :MessagePack
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
if defined?(::Rails)
|
24
|
+
module MsgpackRails
|
25
|
+
class Rails < ::Rails::Engine
|
26
|
+
initializer "msgpack_rails" do
|
27
|
+
::ActiveRecord::Base.send(:include, ActiveModel::Serializers::MessagePack)
|
28
|
+
end
|
17
29
|
end
|
18
30
|
end
|
19
31
|
end
|
data/msgpack_rails.gemspec
CHANGED
@@ -19,6 +19,9 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "activesupport", ">= 3.0"
|
22
|
-
|
23
|
-
|
22
|
+
if RUBY_ENGINE == "jruby"
|
23
|
+
spec.add_runtime_dependency "msgpack-jruby"
|
24
|
+
else
|
25
|
+
spec.add_runtime_dependency "msgpack"
|
26
|
+
end
|
24
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jingwen Owen Ou
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activemodel
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '3.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '3.0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: msgpack
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,6 +46,7 @@ extensions: []
|
|
60
46
|
extra_rdoc_files: []
|
61
47
|
files:
|
62
48
|
- .gitignore
|
49
|
+
- .travis.yml
|
63
50
|
- Gemfile
|
64
51
|
- LICENSE.txt
|
65
52
|
- README.md
|