zencoder 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zencoder/serializer.rb +10 -2
- data/lib/zencoder/version.rb +1 -1
- metadata +5 -6
data/lib/zencoder/serializer.rb
CHANGED
@@ -11,13 +11,21 @@ module Zencoder
|
|
11
11
|
if content.is_a?(String) || content.nil?
|
12
12
|
content
|
13
13
|
else
|
14
|
-
MultiJson.
|
14
|
+
if MultiJson.respond_to?(:dump)
|
15
|
+
MultiJson.dump(content)
|
16
|
+
else
|
17
|
+
MultiJson.encode(content)
|
18
|
+
end
|
15
19
|
end
|
16
20
|
end
|
17
21
|
|
18
22
|
def decode(content)
|
19
23
|
if content.is_a?(String)
|
20
|
-
MultiJson.
|
24
|
+
if MultiJson.respond_to?(:load)
|
25
|
+
MultiJson.load(content)
|
26
|
+
else
|
27
|
+
MultiJson.decode(content)
|
28
|
+
end
|
21
29
|
else
|
22
30
|
content
|
23
31
|
end
|
data/lib/zencoder/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zencoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 2.4.
|
9
|
+
- 1
|
10
|
+
version: 2.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathan Sutton
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-05-04 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: multi_json
|
@@ -132,10 +132,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements: []
|
133
133
|
|
134
134
|
rubyforge_project: zencoder
|
135
|
-
rubygems_version: 1.8.
|
135
|
+
rubygems_version: 1.8.17
|
136
136
|
signing_key:
|
137
137
|
specification_version: 3
|
138
138
|
summary: Zencoder <http://zencoder.com> integration library.
|
139
139
|
test_files: []
|
140
140
|
|
141
|
-
has_rdoc:
|