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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04304f65196eef419d1d4dcaebe502b2fbdc447e
4
- data.tar.gz: 8479d9bb56279a59c4b3928d9ab500937a2d53ca
3
+ metadata.gz: e9bb8bf0b0970f56877b16c760ca52bbe2f269a2
4
+ data.tar.gz: 1ba9f4c918a5d5ba9986ad5f23288d3e8fa8c2f8
5
5
  SHA512:
6
- metadata.gz: 1896a28f8524b4fc82fbf72b44127cda7efdd4d917e6451088b4ff17d9967bba559d86eba9b467c5e09f3fe6c8ffa78deb3aa5189e9bf23ca363e141ccb63460
7
- data.tar.gz: ab1a72efa1c3e0bd71c5a66cdd38b02230801ac92c2fa6b429a00e201a8fff8702e428ce47fe2b2f883855a5ec10fe1bf7c572a029463b5d8b6048ad13e48491
6
+ metadata.gz: 8d8edd393349d5b6d5216dfcceec083ef06ce8105a1aca3592197b14d24f3cdf37735dfaca95165579a13e0a14c9db7d721f1bda118eca9b175a175f74cc603f
7
+ data.tar.gz: 7fac688c2e45cb6247a632c5033e49265913691bc15bd9b2183a8d9f8635081facb72264d98357e357e9a44b677a9ccda1c52f841d755dbed5fa9f3a0c2d7493
@@ -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::REST.new(Chef::Config.chef_server_url)
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' }
@@ -1,3 +1,3 @@
1
1
  module KnifeECBackup
2
- VERSION = '2.0.3'
2
+ VERSION = '2.0.4'
3
3
  end
@@ -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::REST).to receive(:new).and_return(@rest)
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.3
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-06 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel