foreman_expire_hosts 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +28 -2
- data/.rubocop_todo.yml +10 -47
- data/README.md +1 -0
- data/app/controllers/concerns/foreman_expire_hosts/host_controller_extensions.rb +11 -13
- data/app/helpers/concerns/foreman_expire_hosts/audits_helper_extensions.rb +2 -2
- data/app/helpers/concerns/foreman_expire_hosts/hosts_helper_extensions.rb +8 -11
- data/app/mailers/expire_hosts_mailer.rb +72 -20
- data/app/models/concerns/foreman_expire_hosts/host_ext.rb +3 -3
- data/app/models/host_status/expiration_status.rb +1 -1
- data/app/models/setting/expire_hosts.rb +2 -2
- data/app/services/foreman_expire_hosts/action/base.rb +57 -0
- data/app/services/foreman_expire_hosts/action/delete_expired_hosts.rb +23 -0
- data/app/services/foreman_expire_hosts/action/stop_expired_hosts.rb +37 -0
- data/app/services/foreman_expire_hosts/expiry_edit_authorizer.rb +21 -0
- data/app/services/foreman_expire_hosts/notification/base.rb +71 -0
- data/app/services/foreman_expire_hosts/notification/deleted_hosts.rb +15 -0
- data/app/services/foreman_expire_hosts/notification/expiry_warning.rb +26 -0
- data/app/services/foreman_expire_hosts/notification/failed_deleted_hosts.rb +15 -0
- data/app/services/foreman_expire_hosts/notification/failed_stopped_hosts.rb +15 -0
- data/app/services/foreman_expire_hosts/notification/stopped_hosts.rb +26 -0
- data/app/services/foreman_expire_hosts/safe_destroy.rb +23 -0
- data/app/services/foreman_expire_hosts/ui_notifications/hosts/base.rb +68 -0
- data/app/services/foreman_expire_hosts/ui_notifications/hosts/expiry_warning.rb +28 -0
- data/app/services/foreman_expire_hosts/ui_notifications/hosts/stopped_host.rb +11 -0
- data/app/views/expire_hosts_mailer/expiry_warning_notification.html.erb +4 -1
- data/app/views/expire_hosts_mailer/stopped_hosts_notification.html.erb +4 -1
- data/db/seeds.d/80_expire_hosts_ui_notification.rb +30 -0
- data/foreman_expire_hosts.gemspec +2 -2
- data/lib/expire_hosts_notifications.rb +7 -104
- data/lib/foreman_expire_hosts/engine.rb +14 -8
- data/lib/foreman_expire_hosts/version.rb +1 -1
- data/lib/tasks/expired_hosts.rake +7 -5
- data/test/factories/foreman_expire_hosts_factories.rb +1 -1
- data/test/functional/concerns/hosts_controller_extensions_test.rb +8 -6
- data/test/lib/expire_hosts_notifications_test.rb +128 -32
- data/test/test_plugin_helper.rb +8 -3
- data/test/unit/concerns/host_extensions_test.rb +17 -17
- data/test/unit/expire_hosts_mailer_test.rb +47 -27
- data/test/unit/expiry_edit_authorizer_test.rb +55 -0
- data/test/unit/host_status/expiration_status_test.rb +1 -1
- data/test/unit/safe_destroy_test.rb +26 -0
- metadata +30 -11
data/test/test_plugin_helper.rb
CHANGED
@@ -2,9 +2,14 @@
|
|
2
2
|
require 'test_helper'
|
3
3
|
require 'database_cleaner'
|
4
4
|
|
5
|
-
# Add plugin to
|
6
|
-
|
7
|
-
|
5
|
+
# Add plugin to FactoryBot's paths
|
6
|
+
FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
7
|
+
FactoryBot.reload
|
8
|
+
|
9
|
+
# load notification seeds.
|
10
|
+
require File.join(
|
11
|
+
File.dirname(__FILE__), '..', 'db', 'seeds.d', '80_expire_hosts_ui_notification'
|
12
|
+
)
|
8
13
|
|
9
14
|
# Foreman's setup doesn't handle cleaning up for Minitest::Spec
|
10
15
|
DatabaseCleaner.strategy = :transaction
|
@@ -4,7 +4,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
4
4
|
EXPIRATION_SCOPES = ['expiring', 'expired', 'expiring_today', 'expired_past_grace_period'].freeze
|
5
5
|
|
6
6
|
setup do
|
7
|
-
User.current =
|
7
|
+
User.current = FactoryBot.build(:user, :admin)
|
8
8
|
setup_settings
|
9
9
|
end
|
10
10
|
|
@@ -14,7 +14,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
test 'should not require expired on' do
|
17
|
-
host =
|
17
|
+
host = FactoryBot.build(:host)
|
18
18
|
assert host.valid?, "Should be valid without expiration date: : #{host.errors.messages}"
|
19
19
|
end
|
20
20
|
end
|
@@ -25,7 +25,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
test 'should require expired on' do
|
28
|
-
host =
|
28
|
+
host = FactoryBot.build(:host)
|
29
29
|
refute host.valid?, "Can not be valid without expiration date: #{host.errors.messages}"
|
30
30
|
assert_includes host.errors.messages.keys, :expired_on
|
31
31
|
end
|
@@ -33,8 +33,8 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
33
33
|
|
34
34
|
context 'changing expiration date for user owned host' do
|
35
35
|
setup do
|
36
|
-
@user =
|
37
|
-
@host =
|
36
|
+
@user = FactoryBot.create(:user)
|
37
|
+
@host = FactoryBot.create(:host, :expired, :owner => @user)
|
38
38
|
end
|
39
39
|
|
40
40
|
test 'admin should be able to change expiration date' do
|
@@ -43,7 +43,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
test 'user should not be able to change expiration date' do
|
46
|
-
as_user
|
46
|
+
as_user FactoryBot.build(:user) do
|
47
47
|
@host.expired_on = Date.today + 5
|
48
48
|
refute_valid @host
|
49
49
|
end
|
@@ -67,13 +67,13 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
67
67
|
end
|
68
68
|
|
69
69
|
context 'changing expiration date for user' do
|
70
|
-
let(:host) {
|
70
|
+
let(:host) { FactoryBot.create(:host, :managed) }
|
71
71
|
|
72
72
|
context 'with edit_host_expiry permission' do
|
73
|
-
let(:permission) { Permission.
|
74
|
-
let(:filter) {
|
75
|
-
let(:role) {
|
76
|
-
let(:user) {
|
73
|
+
let(:permission) { Permission.find_by(name: 'edit_host_expiry') }
|
74
|
+
let(:filter) { FactoryBot.create(:filter, :permissions => [permission]) }
|
75
|
+
let(:role) { FactoryBot.create(:role, :filters => [filter]) }
|
76
|
+
let(:user) { FactoryBot.create(:user, :organizations => [host.organization], :locations => [host.location], :roles => [role]) }
|
77
77
|
|
78
78
|
test 'user can change expiry date' do
|
79
79
|
as_user user do
|
@@ -83,7 +83,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
83
83
|
end
|
84
84
|
|
85
85
|
context 'without edit_host_expiry permission' do
|
86
|
-
let(:user) {
|
86
|
+
let(:user) { FactoryBot.build(:user, :organizations => [host.organization], :locations => [host.location]) }
|
87
87
|
|
88
88
|
test 'user can not change expiry date' do
|
89
89
|
as_user user do
|
@@ -95,7 +95,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
95
95
|
|
96
96
|
context 'a host without expiration' do
|
97
97
|
setup do
|
98
|
-
@host =
|
98
|
+
@host = FactoryBot.build(:host)
|
99
99
|
end
|
100
100
|
|
101
101
|
test 'should not expire' do
|
@@ -125,7 +125,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
125
125
|
|
126
126
|
context 'a expired host' do
|
127
127
|
setup do
|
128
|
-
@host =
|
128
|
+
@host = FactoryBot.build(:host, :expired)
|
129
129
|
end
|
130
130
|
|
131
131
|
test 'should expire' do
|
@@ -155,7 +155,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
155
155
|
|
156
156
|
context 'a host expiring today' do
|
157
157
|
setup do
|
158
|
-
@host =
|
158
|
+
@host = FactoryBot.build(:host, :expires_today)
|
159
159
|
end
|
160
160
|
|
161
161
|
test 'should expire' do
|
@@ -186,7 +186,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
186
186
|
|
187
187
|
context 'a host expiring in a year' do
|
188
188
|
setup do
|
189
|
-
@host =
|
189
|
+
@host = FactoryBot.build(:host, :expires_in_a_year)
|
190
190
|
end
|
191
191
|
|
192
192
|
test 'should expire' do
|
@@ -217,7 +217,7 @@ class ForemanExpireHostsHostExtTest < ActiveSupport::TestCase
|
|
217
217
|
|
218
218
|
context 'a host in grace period' do
|
219
219
|
setup do
|
220
|
-
@host =
|
220
|
+
@host = FactoryBot.build(:host, :expired_grace)
|
221
221
|
end
|
222
222
|
|
223
223
|
test 'should expire' do
|
@@ -3,62 +3,82 @@ require 'test_plugin_helper'
|
|
3
3
|
class ExpireHostMailerTest < ActionMailer::TestCase
|
4
4
|
setup do
|
5
5
|
setup_settings
|
6
|
-
@emails = ['test@example.com']
|
7
|
-
@hosts = FactoryGirl.create_list(:host, 2, :managed)
|
8
6
|
end
|
9
7
|
|
8
|
+
let(:recipient) { FactoryBot.create(:user, :with_mail) }
|
9
|
+
let(:hosts) { FactoryBot.create_list(:host, 2, :managed) }
|
10
|
+
|
10
11
|
context 'deleted hosts notification' do
|
11
|
-
|
12
|
-
@mail = ExpireHostsMailer.deleted_hosts_notification(@emails, @hosts).deliver_now
|
13
|
-
end
|
12
|
+
let(:mail) { ExpireHostsMailer.deleted_hosts_notification(recipient, hosts).deliver_now }
|
14
13
|
|
15
14
|
test 'subject should be set' do
|
16
|
-
|
17
|
-
|
15
|
+
assert_includes mail.subject, 'Deleted expired hosts in Foreman'
|
16
|
+
end
|
17
|
+
|
18
|
+
test 'recipient should be user mail address' do
|
19
|
+
assert_equal [recipient.mail], mail.to
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
23
|
context 'failed to delete hosts notification' do
|
22
|
-
|
23
|
-
@mail = ExpireHostsMailer.failed_to_delete_hosts_notification(@emails, @hosts).deliver_now
|
24
|
-
end
|
24
|
+
let(:mail) { ExpireHostsMailer.failed_to_delete_hosts_notification(recipient, hosts).deliver_now }
|
25
25
|
|
26
26
|
test 'subject should be set' do
|
27
|
-
|
28
|
-
assert_includes @mail.subject, 'Failed to delete expired hosts in Foreman'
|
27
|
+
assert_includes mail.subject, 'Failed to delete expired hosts in Foreman'
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
32
31
|
context 'stopped hosts notification' do
|
33
|
-
|
34
|
-
@mail = ExpireHostsMailer.stopped_hosts_notification(@emails, Date.today, @hosts).deliver_now
|
35
|
-
end
|
32
|
+
let(:mail) { ExpireHostsMailer.stopped_hosts_notification(recipient, Date.today, hosts).deliver_now }
|
36
33
|
|
37
34
|
test 'subject should be set' do
|
38
|
-
|
39
|
-
|
35
|
+
assert_includes mail.subject, 'Stopped expired hosts in Foreman'
|
36
|
+
end
|
37
|
+
|
38
|
+
test 'should show mitigation text if authorized' do
|
39
|
+
ForemanExpireHosts::ExpiryEditAuthorizer.any_instance.stubs(:authorized?).returns(true)
|
40
|
+
assert_includes mail.body.to_s, 'Please change their expiry date'
|
41
|
+
end
|
42
|
+
|
43
|
+
test 'should not show mitigation text if not authorized' do
|
44
|
+
ForemanExpireHosts::ExpiryEditAuthorizer.any_instance.stubs(:authorized?).returns(false)
|
45
|
+
assert_not_includes mail.body.to_s, 'Please change their expiry date'
|
40
46
|
end
|
41
47
|
end
|
42
48
|
|
43
49
|
context 'failed to stop hosts notification' do
|
44
|
-
|
45
|
-
@mail = ExpireHostsMailer.failed_to_stop_hosts_notification(@emails, @hosts).deliver_now
|
46
|
-
end
|
50
|
+
let(:mail) { ExpireHostsMailer.failed_to_stop_hosts_notification(recipient, hosts).deliver_now }
|
47
51
|
|
48
52
|
test 'subject should be set' do
|
49
|
-
|
50
|
-
assert_includes @mail.subject, 'Failed to stop expired hosts in Foreman'
|
53
|
+
assert_includes mail.subject, 'Failed to stop expired hosts in Foreman'
|
51
54
|
end
|
52
55
|
end
|
53
56
|
|
54
57
|
context 'expiry warning notification' do
|
55
|
-
|
56
|
-
@mail = ExpireHostsMailer.expiry_warning_notification(@emails, Date.today, @hosts).deliver_now
|
57
|
-
end
|
58
|
+
let(:mail) { ExpireHostsMailer.expiry_warning_notification(recipient, Date.today, hosts).deliver_now }
|
58
59
|
|
59
60
|
test 'subject should be set' do
|
60
|
-
|
61
|
-
|
61
|
+
assert_includes mail.subject, 'Expiring hosts in foreman'
|
62
|
+
end
|
63
|
+
|
64
|
+
test 'should show mitigation text if authorized' do
|
65
|
+
ForemanExpireHosts::ExpiryEditAuthorizer.any_instance.stubs(:authorized?).returns(true)
|
66
|
+
assert_includes mail.body.to_s, 'Please change their expiry date'
|
67
|
+
end
|
68
|
+
|
69
|
+
test 'should not show mitigation text if not authorized' do
|
70
|
+
ForemanExpireHosts::ExpiryEditAuthorizer.any_instance.stubs(:authorized?).returns(false)
|
71
|
+
assert_not_includes mail.body.to_s, 'Please change their expiry date'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'user without mail address' do
|
76
|
+
let(:recipient) { FactoryBot.create(:user) }
|
77
|
+
let(:mail) { ExpireHostsMailer.expiry_warning_notification(recipient, Date.today, hosts).deliver_now }
|
78
|
+
|
79
|
+
test 'mail is delivered to admin address' do
|
80
|
+
assert_nil recipient.mail
|
81
|
+
assert_equal ['root@some.host.fqdn'], mail.to
|
62
82
|
end
|
63
83
|
end
|
64
84
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
module ForemanExpireHosts
|
4
|
+
class ExpiryEditAuthorizerTest < ActiveSupport::TestCase
|
5
|
+
let(:hosts) { FactoryBot.create_list(:host, 2) }
|
6
|
+
let(:authorizer) { ExpiryEditAuthorizer.new(hosts: hosts, user: user) }
|
7
|
+
|
8
|
+
context 'with admin user' do
|
9
|
+
let(:user) { FactoryBot.create(:user, :admin) }
|
10
|
+
test 'should be authorized' do
|
11
|
+
assert_equal true, authorizer.authorized?
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'with limited permissions' do
|
16
|
+
let(:user_role) { FactoryBot.create(:user_user_role) }
|
17
|
+
let(:user) { user_role.owner }
|
18
|
+
let(:role) { user_role.role }
|
19
|
+
let(:edit_expiry_permission) { Permission.find_by(name: 'edit_host_expiry') }
|
20
|
+
let(:edit_permission) { Permission.find_by(name: 'edit_hosts') }
|
21
|
+
|
22
|
+
context 'with edit_hosts and edit_host_expiry permission' do
|
23
|
+
test 'should be authorized' do
|
24
|
+
FactoryBot.create(:filter, :role => role, :permissions => [edit_permission, edit_expiry_permission])
|
25
|
+
assert_equal true, authorizer.authorized?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'with edit_hosts and owner permission' do
|
30
|
+
setup do
|
31
|
+
setup_settings
|
32
|
+
FactoryBot.create(:filter, :role => role, :permissions => [edit_permission])
|
33
|
+
end
|
34
|
+
let(:hosts) { FactoryBot.create_list(:host, 2, :owner => user) }
|
35
|
+
|
36
|
+
test 'should be authorized if setting allows owner' do
|
37
|
+
Setting[:can_owner_modify_host_expiry_date] = true
|
38
|
+
assert_equal true, authorizer.authorized?
|
39
|
+
end
|
40
|
+
|
41
|
+
test 'should not be authorized if setting does not allow owner' do
|
42
|
+
Setting[:can_owner_modify_host_expiry_date] = false
|
43
|
+
assert_equal false, authorizer.authorized?
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'with unauthorized user' do
|
49
|
+
let(:user) { FactoryBot.create(:user) }
|
50
|
+
test 'should not be authorized' do
|
51
|
+
assert_equal false, authorizer.authorized?
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
module ForemanExpireHosts
|
4
|
+
class SafeDestroyTest < ActiveSupport::TestCase
|
5
|
+
class HostWithFailingCallbacks < ActiveRecord::Base
|
6
|
+
self.table_name = 'hosts'
|
7
|
+
self.inheritance_column = nil
|
8
|
+
|
9
|
+
before_destroy :cancel
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def cancel
|
14
|
+
false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe 'model with failing callbacks' do
|
19
|
+
test 'return false on record delete' do
|
20
|
+
h = HostWithFailingCallbacks.create!(:name => 'test')
|
21
|
+
assert_equal false, SafeDestroy.new(h).destroy!
|
22
|
+
assert_equal 1, HostWithFailingCallbacks.all.count
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_expire_hosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nagarjuna Rachaneni
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: bootstrap-datepicker-rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: deface
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: rdoc
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,19 +54,19 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: rubocop
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 0.51.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 0.51.0
|
70
70
|
description: This Plugin will add new column expired_on to hosts to limit the lifetime
|
71
71
|
of a host.
|
72
72
|
email:
|
@@ -99,6 +99,20 @@ files:
|
|
99
99
|
- app/overrides/add_expired_on_field_to_host_show.rb
|
100
100
|
- app/overrides/add_js_to_host_index.rb
|
101
101
|
- app/overrides/deleted_expired_host_comment_in_audits.rb
|
102
|
+
- app/services/foreman_expire_hosts/action/base.rb
|
103
|
+
- app/services/foreman_expire_hosts/action/delete_expired_hosts.rb
|
104
|
+
- app/services/foreman_expire_hosts/action/stop_expired_hosts.rb
|
105
|
+
- app/services/foreman_expire_hosts/expiry_edit_authorizer.rb
|
106
|
+
- app/services/foreman_expire_hosts/notification/base.rb
|
107
|
+
- app/services/foreman_expire_hosts/notification/deleted_hosts.rb
|
108
|
+
- app/services/foreman_expire_hosts/notification/expiry_warning.rb
|
109
|
+
- app/services/foreman_expire_hosts/notification/failed_deleted_hosts.rb
|
110
|
+
- app/services/foreman_expire_hosts/notification/failed_stopped_hosts.rb
|
111
|
+
- app/services/foreman_expire_hosts/notification/stopped_hosts.rb
|
112
|
+
- app/services/foreman_expire_hosts/safe_destroy.rb
|
113
|
+
- app/services/foreman_expire_hosts/ui_notifications/hosts/base.rb
|
114
|
+
- app/services/foreman_expire_hosts/ui_notifications/hosts/expiry_warning.rb
|
115
|
+
- app/services/foreman_expire_hosts/ui_notifications/hosts/stopped_host.rb
|
102
116
|
- app/views/expire_hosts_mailer/_hosts_table.html.erb
|
103
117
|
- app/views/expire_hosts_mailer/deleted_hosts_notification.html.erb
|
104
118
|
- app/views/expire_hosts_mailer/expiry_warning_notification.html.erb
|
@@ -110,6 +124,7 @@ files:
|
|
110
124
|
- app/views/hosts/select_multiple_expiration.html.erb
|
111
125
|
- config/routes.rb
|
112
126
|
- db/migrate/20150427101516_add_expiry_on_to_hosts.rb
|
127
|
+
- db/seeds.d/80_expire_hosts_ui_notification.rb
|
113
128
|
- foreman_expire_hosts.gemspec
|
114
129
|
- lib/expire_hosts_notifications.rb
|
115
130
|
- lib/foreman_expire_hosts.rb
|
@@ -122,7 +137,9 @@ files:
|
|
122
137
|
- test/test_plugin_helper.rb
|
123
138
|
- test/unit/concerns/host_extensions_test.rb
|
124
139
|
- test/unit/expire_hosts_mailer_test.rb
|
140
|
+
- test/unit/expiry_edit_authorizer_test.rb
|
125
141
|
- test/unit/host_status/expiration_status_test.rb
|
142
|
+
- test/unit/safe_destroy_test.rb
|
126
143
|
homepage: https://github.com/theforeman/foreman_expire_hosts
|
127
144
|
licenses:
|
128
145
|
- GPL-3.0
|
@@ -143,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
160
|
version: '0'
|
144
161
|
requirements: []
|
145
162
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.6.
|
163
|
+
rubygems_version: 2.6.12
|
147
164
|
signing_key:
|
148
165
|
specification_version: 4
|
149
166
|
summary: Foreman plugin for limiting host lifetime
|
@@ -154,4 +171,6 @@ test_files:
|
|
154
171
|
- test/test_plugin_helper.rb
|
155
172
|
- test/unit/concerns/host_extensions_test.rb
|
156
173
|
- test/unit/expire_hosts_mailer_test.rb
|
174
|
+
- test/unit/expiry_edit_authorizer_test.rb
|
157
175
|
- test/unit/host_status/expiration_status_test.rb
|
176
|
+
- test/unit/safe_destroy_test.rb
|