multi_json 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -6,3 +6,4 @@ rvm:
6
6
  - jruby
7
7
  - rbx
8
8
  - ree
9
+ - ruby-head
@@ -12,7 +12,7 @@ module MultiJson
12
12
  end
13
13
 
14
14
  def self.encode(object) #:nodoc:
15
- ::OkJson.encode(stringify_keys(object))
15
+ ::OkJson.valenc(stringify_keys(object))
16
16
  end
17
17
 
18
18
  def self.symbolize_keys(object) #:nodoc:
@@ -1,3 +1,3 @@
1
1
  module MultiJson
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -73,6 +73,11 @@ describe "MultiJson" do
73
73
  encoded_json = MultiJson.encode({ :foo => { :bar => 'baz' } })
74
74
  MultiJson.decode(encoded_json).should == { 'foo' => { 'bar' => 'baz' } }
75
75
  end
76
+
77
+ it 'encodes rootless JSON' do
78
+ MultiJson.encode("random rootless string").should == "\"random rootless string\""
79
+ MultiJson.encode(123).should == "123"
80
+ end
76
81
  end
77
82
 
78
83
  describe '.decode' do
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_json
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
5
+ version: 1.0.2
11
6
  platform: ruby
12
7
  authors:
13
8
  - Michael Bleigh
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-05-04 00:00:00 +02:00
13
+ date: 2011-05-12 00:00:00 +02:00
19
14
  default_executable:
20
15
  dependencies: []
21
16
 
@@ -63,25 +58,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
58
  requirements:
64
59
  - - ">="
65
60
  - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
61
  version: "0"
70
62
  required_rubygems_version: !ruby/object:Gem::Requirement
71
63
  none: false
72
64
  requirements:
73
65
  - - ">="
74
66
  - !ruby/object:Gem::Version
75
- hash: 23
76
- segments:
77
- - 1
78
- - 3
79
- - 6
80
67
  version: 1.3.6
81
68
  requirements: []
82
69
 
83
70
  rubyforge_project:
84
- rubygems_version: 1.5.2
71
+ rubygems_version: 1.6.2
85
72
  signing_key:
86
73
  specification_version: 3
87
74
  summary: A gem to provide swappable JSON backends.