chef-zero 3.1.2 → 3.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ba30ee9950ff65e5d772c7e2092063f4916067a
|
4
|
+
data.tar.gz: 2361f6ad62e82e24969f4a70fbf475b9be6ae873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68d6b4736a6eeb9ba697baf1296eb5cf9f456f0ed292bb7b6cc21e23288ea9f99a40d9548091f1a96a892f998dcdb351b3910c150dd5adbf71d58a8f0bf80e09
|
7
|
+
data.tar.gz: 72e592a0a6b2f4eda33b02f5b8d08080ec536c9d80aac5992d826804614390d6d498399b05d4a55381becde2124c3ef9e12dd1f043c4458ab33c378b2bbe5f60
|
@@ -38,7 +38,16 @@ module ChefZero
|
|
38
38
|
def get(path, request=nil)
|
39
39
|
raise DataNotFoundError.new(path) if skip_organizations?(path)
|
40
40
|
fix_exceptions do
|
41
|
-
|
41
|
+
# Make it so build_uri will include /organizations/ORG inside the V1 data store
|
42
|
+
if request && request.rest_base_prefix.size == 0
|
43
|
+
old_base_uri = request.base_uri
|
44
|
+
request.base_uri = File.join(request.base_uri, 'organizations', single_org)
|
45
|
+
end
|
46
|
+
begin
|
47
|
+
real_store.get(path[2..-1], request)
|
48
|
+
ensure
|
49
|
+
request.base_uri = old_base_uri if request && request.rest_base_prefix.size == 0
|
50
|
+
end
|
42
51
|
end
|
43
52
|
end
|
44
53
|
|
@@ -8,12 +8,16 @@ module ChefZero
|
|
8
8
|
end
|
9
9
|
|
10
10
|
attr_reader :env
|
11
|
-
|
11
|
+
attr_accessor :rest_base_prefix
|
12
12
|
|
13
13
|
def base_uri
|
14
14
|
@base_uri ||= "#{env['rack.url_scheme']}://#{env['HTTP_HOST']}#{env['SCRIPT_NAME']}"
|
15
15
|
end
|
16
16
|
|
17
|
+
def base_uri=(value)
|
18
|
+
@base_uri = value
|
19
|
+
end
|
20
|
+
|
17
21
|
def requestor
|
18
22
|
@env['HTTP_X_OPS_USERID']
|
19
23
|
end
|
data/lib/chef_zero/server.rb
CHANGED
data/lib/chef_zero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|