satops 1.5.2 → 1.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/satops/operator.rb +9 -5
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5978d7440280bde5f08241d5ca965dafb1f404ba
4
- data.tar.gz: b2ed96ea26051aa23623538f8a16a8a3dbfe7524
3
+ metadata.gz: 17285bbc5eeaf0f510667b9e7b00861b1fe1f4e7
4
+ data.tar.gz: 6092b9ed2a44eda88bb6636df7cc77a2b45db577
5
5
  SHA512:
6
- metadata.gz: 80c73d053ef54cf1cf7bfe5a310e82779600d77ec1ee9897b1ca103a39346e8314cb26375f6d72e34d8cb72ec72cae6fa33227a8b8fa02eddb23e26ed8e82e80
7
- data.tar.gz: 10fd8a79296984c9c0da6fd2a1909bb388bf2e060d62dde91e6a2487a318c04f7d020feacda994bc1efe59db447de4ffc73f7b794ac5904b2ec5c944715d2e83
6
+ metadata.gz: a9b7d58b643029dea9bb8a5c446d1a72c882397995f68335c9ed7202dc35b3d89ebe58961fdd64790e05b49611e5d477eebfde3cf62f798eb05b60a453dac632
7
+ data.tar.gz: 06634295fef298b2385031c89328ed45cc8ff5bfdcd813771684574f11a780ad346fdabb298a4a451590ee2eb6bdf3aa9a90e9370911cecd7d15c25495531783
@@ -1178,11 +1178,12 @@ class User
1178
1178
  password=Users.password
1179
1179
  sat.user.create(@login, password, @first_name, @last_name, @email, 0)
1180
1180
  end
1181
+ sat.user.setDetails(@login, {'prefix' => @prefix}) unless @prefix.empty?
1181
1182
  common_update(sat)
1182
1183
  end
1183
1184
 
1184
1185
  def update(sat)
1185
- @prefix='' unless @prefix
1186
+ @prefix='' unless !@prefix.empty!
1186
1187
  # We ignore password update - Ain't any API for it!
1187
1188
  sat.user.setDetails(@login, {'first_name' => @first_name, 'last_name' => @last_name, 'email' => @email, 'prefix' => @prefix})
1188
1189
  sat.user.listRoles(login).each do |role|
@@ -1194,14 +1195,17 @@ end
1194
1195
 
1195
1196
  class UsersSet < OperationSet
1196
1197
  def delete(list)
1197
- Users.exclude.each do |exclude|
1198
- list.delete_if { |u| u == exclude }
1199
- end
1200
1198
  list.each do |user|
1201
- @sat.user.delete(user.login)
1199
+ case user.class
1200
+ when Hash
1201
+ @sat.user.delete(user['login']) unless Users.exclude.include?(user['login'])
1202
+ when User
1203
+ @sat.user.delete(user.login) unless Users.exclude.include?(user.login)
1204
+ end
1202
1205
  end
1203
1206
  end
1204
1207
 
1208
+
1205
1209
  def delete_all
1206
1210
  delete(Helpers.filter(@sat.user.listUsers, 'login'))
1207
1211
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilles Dubreuil
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-11 00:00:00.000000000 Z
12
+ date: 2015-02-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Tool to export/import all Red Hat Satellite objects
15
15
  email:
@@ -20,11 +20,11 @@ executables:
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
+ - bin/satops
23
24
  - lib/satops.rb
24
25
  - lib/satops/helpers.rb
25
- - lib/satops/rhsat.rb
26
26
  - lib/satops/operator.rb
27
- - bin/satops
27
+ - lib/satops/rhsat.rb
28
28
  homepage: https://github.com/SatOps/SatOps
29
29
  licenses:
30
30
  - GNU GPLv3
@@ -35,17 +35,17 @@ require_paths:
35
35
  - lib
36
36
  required_ruby_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - '>='
43
+ - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubyforge_project:
48
- rubygems_version: 2.0.12
48
+ rubygems_version: 2.2.2
49
49
  signing_key:
50
50
  specification_version: 4
51
51
  summary: Manipulate Red Hat Network Satellite content via its XML/RPC API