chef-server-api 0.9.14.beta.1 → 0.9.14.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/application.rb +11 -6
- data/config/init.rb +1 -0
- data/config/router.rb +1 -1
- data/lib/chef-server-api/version.rb +1 -1
- metadata +4 -4
@@ -22,7 +22,7 @@
|
|
22
22
|
require "chef/mixin/checksum"
|
23
23
|
require "chef/cookbook_loader"
|
24
24
|
require "mixlib/authentication/signatureverification"
|
25
|
-
require
|
25
|
+
require 'chef/json_compat'
|
26
26
|
|
27
27
|
class Application < Merb::Controller
|
28
28
|
|
@@ -119,13 +119,18 @@ class Application < Merb::Controller
|
|
119
119
|
available_recipes
|
120
120
|
end
|
121
121
|
|
122
|
-
#
|
123
|
-
#
|
122
|
+
# Fix CHEF-1292/PL-538; cause Merb to pass the max nesting constant into
|
123
|
+
# obj.to_json, which it calls by default based on the original request's
|
124
|
+
# accept headers and the type passed into Merb::Controller.display
|
125
|
+
#--
|
126
|
+
# TODO: tim, 2010-11-24: would be nice to instead have Merb call
|
127
|
+
# Chef::JSONCompat.to_json, instead of obj.to_json, but changing that
|
128
|
+
# behavior is convoluted in Merb. This override is assuming that
|
129
|
+
# Merb is eventually calling obj.to_json, which takes the :max_nesting
|
130
|
+
# option.
|
124
131
|
override! :display
|
125
132
|
def display(obj)
|
126
|
-
super(obj, nil, {:max_nesting => Chef::
|
127
|
-
#super.display(Chef::JSON.to_json(obj))
|
128
|
-
#Chef::JSON.to_json(obj)
|
133
|
+
super(obj, nil, {:max_nesting => Chef::JSONCompat::JSON_MAX_NESTING})
|
129
134
|
end
|
130
135
|
|
131
136
|
end
|
data/config/init.rb
CHANGED
data/config/router.rb
CHANGED
@@ -122,7 +122,7 @@ Merb::Router.prepare do
|
|
122
122
|
begin
|
123
123
|
# Call Chef's JSON utility instead of the default in Merb,
|
124
124
|
# JSON.parse.
|
125
|
-
jobj = Chef::
|
125
|
+
jobj = Chef::JSONCompat.from_json(raw_post)
|
126
126
|
jobj = jobj.to_mash if jobj.is_a?(Hash)
|
127
127
|
rescue JSON::ParserError
|
128
128
|
jobj = Mash.new
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-server-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15424247
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 14
|
10
|
-
-
|
10
|
+
- rc
|
11
11
|
- 1
|
12
|
-
version: 0.9.14.
|
12
|
+
version: 0.9.14.rc.1
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Opscode
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-02-
|
20
|
+
date: 2011-02-25 00:00:00 -08:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|