foreman_virt_who_configure 0.1.6 → 0.1.7

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: 2b47a2020307dc453ed4b12012eb386bb82b4053
4
- data.tar.gz: fa463aa1e278c5af50b1429bda158e25e0fbd7bf
3
+ metadata.gz: 8fd59a812bf0019dff9d7551c222fbb3109d098b
4
+ data.tar.gz: 63e8f5c2dee9bdec7b07042a32073468aa1c0a69
5
5
  SHA512:
6
- metadata.gz: e366d45ad3a8f7cc2102787e23d013a1f27fd165dcc69c3fd15bea4f8bb83978b125b331808aeb670795ef3f360aaddb2c2782a85d8ccf3c3f01991de8dcdee6
7
- data.tar.gz: 5ae7f7599c8273cd49eb3f41e3e2bd29c8aa66dedfe15ef3ef9554b19d83b29588514321ef9542410b7c74e20212d818b38b829de6e57300414a2fbb020cccfa
6
+ metadata.gz: b0da3911fb54a2072a92832cea8e6dfa7af1b452baeea6a706d6d6e5df105609f10ffcf3e8fc24101c2571c61c12abf7f77c690ab563e9ba98f4078b22484e63
7
+ data.tar.gz: 21c41d7e0e1ac7a97c3391f2a702c96199b50f2e7b2942c173c63d8ae008fc24b0797409b2b7723e474babeac722ebd1929ca54015dd14ed269f70a26ca9a423
@@ -137,7 +137,7 @@ module ForemanVirtWhoConfigure
137
137
 
138
138
  def destroy_service_user
139
139
  # skip validation that prevents hidden user deletion
140
- user = service_user.user
140
+ user = User.unscoped.find_by_id(service_user.user_id)
141
141
  service_user.destroy
142
142
  user.delete
143
143
  end
@@ -15,7 +15,9 @@ module ForemanVirtWhoConfigure
15
15
  end
16
16
 
17
17
  def username
18
- self.user.login if self.user
18
+ User.as_anonymous_admin do
19
+ self.user.login if self.user
20
+ end
19
21
  end
20
22
  end
21
23
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
@@ -111,13 +111,13 @@ module ForemanVirtWhoConfigure
111
111
 
112
112
  describe 'output format' do
113
113
  test 'it returns the inline content of script if no format is specified' do
114
- assert_not_includes output, '#!/usr/bin/bash'
114
+ assert_not_includes output, '#!/bin/bash'
115
115
  assert_not_includes output, 'exit $result_code'
116
116
  assert_includes output, 'step 1 "Installing virt-who"'
117
117
  end
118
118
 
119
119
  test 'it returns the bash script with shebang and exit code for :bash_script format' do
120
- assert_includes bash_script_output, "#!/usr/bin/bash\n"
120
+ assert_includes bash_script_output, "#!/bin/bash\n"
121
121
  assert_includes bash_script_output, 'exit $result_code'
122
122
  assert_includes bash_script_output, 'step 1 "Installing virt-who"'
123
123
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_virt_who_configure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman virt-who-configure team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello