rocket_pants 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d1f01a44d3ae65fb9d9072cc7fdc6321be69f1b
4
- data.tar.gz: 3e9c808b8176cd7557924d6767d077f2e94070a7
3
+ metadata.gz: 1437dd0365794b5cc7676ed82fc9fa7521a75254
4
+ data.tar.gz: bb89a7f927c2ae4a06bc6e4a461a6bc83fdee696
5
5
  SHA512:
6
- metadata.gz: ea959bdced5f4595db2f7ef6c0c22be495e35cfbb5bef432cd2835db92c5c49561affe437301bce569a36d99c8818928b3603cf50cfb7fa8a232e152a9827976
7
- data.tar.gz: 9b73de6abef240a59990d51a394fc3c80d803f09ade3ba420fe106e18d3c72fe17b60375544de4de2dcf6514273f211e3877a3b2c87aef20fc00738b97974ae4
6
+ metadata.gz: a51e6090e9e712c5d2e5e639ca0618e1891ad13f08720a036ad21da41d35c855d67da5160dea20ab4578cb77e4b6a6a3548f1cf243be17ab32e49ef4b9b3eb58
7
+ data.tar.gz: 772f09b18a7a57be684961cb08cbc2f2ae9ed745b4c66de7470f08c8c1096d58ca03d38ccfc77c2e65438131f45a87fc1ddd3cec3247008c27b093dd68d3fe88
@@ -95,6 +95,10 @@ module RocketPants
95
95
  }
96
96
  end
97
97
 
98
+ def encode_to_json(object)
99
+ ActiveSupport::JSON.encode object
100
+ end
101
+
98
102
  # Given a json object or encoded json, will encode it
99
103
  # and set it to be the output of the given page.
100
104
  def render_json(json, options = {})
@@ -103,7 +107,7 @@ module RocketPants
103
107
  self.content_type = options[:content_type] if options[:content_type]
104
108
  options = options.slice(*RENDERING_OPTIONS)
105
109
  # Don't convert raw strings to JSON.
106
- json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str)
110
+ json = encode_to_json(json) unless json.respond_to?(:to_str)
107
111
  # Encode the object to json.
108
112
  self.status ||= :ok
109
113
  self.content_type ||= Mime::JSON
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_pants
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darcy Laycock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-14 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack