knife-ec-backup 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/ec_base.rb +2 -1
- data/lib/knife_ec_backup/version.rb +1 -1
- data/spec/chef/knife/ec_base_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9bb8bf0b0970f56877b16c760ca52bbe2f269a2
|
4
|
+
data.tar.gz: 1ba9f4c918a5d5ba9986ad5f23288d3e8fa8c2f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d8edd393349d5b6d5216dfcceec083ef06ce8105a1aca3592197b14d24f3cdf37735dfaca95165579a13e0a14c9db7d721f1bda118eca9b175a175f74cc603f
|
7
|
+
data.tar.gz: 7fac688c2e45cb6247a632c5033e49265913691bc15bd9b2183a8d9f8635081facb72264d98357e357e9a44b677a9ccda1c52f841d755dbed5fa9f3a0c2d7493
|
data/lib/chef/knife/ec_base.rb
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'chef/knife'
|
20
|
+
require 'chef/server_api'
|
20
21
|
|
21
22
|
class Chef
|
22
23
|
class Knife
|
@@ -88,7 +89,7 @@ class Chef
|
|
88
89
|
end
|
89
90
|
|
90
91
|
def org_admin
|
91
|
-
rest = Chef::
|
92
|
+
rest = Chef::ServerAPI.new(Chef::Config.chef_server_url, {:api_version => "0"})
|
92
93
|
admin_users = rest.get('groups/admins')['users']
|
93
94
|
org_members = rest.get('users').map { |user| user['user']['username'] }
|
94
95
|
admin_users.delete_if { |user| !org_members.include?(user) || user == 'pivotal' }
|
@@ -14,7 +14,7 @@ describe Chef::Knife::EcBase do
|
|
14
14
|
@rest = double('rest')
|
15
15
|
@stderr = StringIO.new
|
16
16
|
allow(o.ui).to receive(:stderr).and_return(@stderr)
|
17
|
-
allow(Chef::
|
17
|
+
allow(Chef::ServerAPI).to receive(:new).and_return(@rest)
|
18
18
|
end
|
19
19
|
|
20
20
|
context "org_admin" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-ec-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|