foreman_expire_hosts 5.1.0 → 6.0.0

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
  SHA256:
3
- metadata.gz: 7a87b2c303a78750274b73d20e3d7113d0431353a699f80b6e86ef7e07ab179f
4
- data.tar.gz: 3a93c88e92b00b7348c326546beab99e9d5655b859d72fbed82f250b6ad74f5a
3
+ metadata.gz: 8d016e02f798e790c84d0ff29badd0fbfbaf122b941787842dce237f19fcb0d9
4
+ data.tar.gz: 361195ee1b65ac38de1bad8e9ff7ecd6172202f52d524c3729bfbff022fe0a85
5
5
  SHA512:
6
- metadata.gz: 74d7b446ffaac6353b3b82c29dc3f6474d161e00d2ecbd4231e15257b9589e6f7159a7badc141f97d05f0f035ee7236685faf0ef6c03603c771032edf6c99597
7
- data.tar.gz: b6e522f9a6311a5d2abb3547b08625e1666479ed538f3757dd2a2fd50658a86d42914cda9f0d47d53773d3ab8058f80fc84cd8a5aeaf7f67f9bc2842bb920864
6
+ metadata.gz: 55d8ac2d1ddb0b96effb841ce5b897ef3c583b3b5bd619b337015c35a0f4744f7db57e70919ec8c946ad0a2d3a424263d1fad0e01ded37e540ca220d258158c7
7
+ data.tar.gz: 94c8f531186c1c55b70297e8c3905f17fb823326e3cf06c94c221aa7daa675deefc9f017161d8b0070d48164b58c8a6f8031eebf951d839990da24beeb656676
data/README.md CHANGED
@@ -17,6 +17,7 @@ This plugin will send two warning notifications before host expiry (see Settings
17
17
  | >= 1.15 | ~> 3.0 |
18
18
  | >= 1.16 | ~> 4.0 |
19
19
  | >= 1.17 | ~> 5.0 |
20
+ | >= 1.18 | ~> 6.0 |
20
21
 
21
22
  # Screenshots
22
23
  ![Expiry date field in host form](https://raw.githubusercontent.com/ingenico-group/screenshots/master/foreman_host_expiry/expiry-date-field-in-host-form.png)
@@ -33,9 +33,9 @@ module ForemanExpireHosts
33
33
 
34
34
  if failed_hosts.empty?
35
35
  if expiration_date.present?
36
- notice _('The expiration date of the selected hosts was set to %s.') % l(expiration_date)
36
+ success _('The expiration date of the selected hosts was set to %s.') % l(expiration_date)
37
37
  else
38
- notice _('The expiration date of the selected hosts was cleared.')
38
+ success _('The expiration date of the selected hosts was cleared.')
39
39
  end
40
40
  else
41
41
  error n_('The expiration date could not be set for host: %s.',
@@ -9,11 +9,11 @@ module ForemanExpireHosts
9
9
 
10
10
  def destroy!
11
11
  # If Katello is installed, we can't just destroy the host
12
- # but have to ask ForemanTasks to do this for us.
12
+ # but have to delete it the Katello way.
13
13
  # See https://community.theforeman.org/t/how-to-properly-destroy-a-content-host/8621
14
14
  # for reasoning.
15
- if with_katello?
16
- ForemanTasks.sync_task(::Actions::Katello::Host::Destroy, subject)
15
+ if subject.is_a?(Host::Base) && with_katello?
16
+ Katello::RegistrationManager.unregister_host(host)
17
17
  else
18
18
  subject.destroy!
19
19
  end
@@ -24,7 +24,7 @@ module ForemanExpireHosts
24
24
 
25
25
  initializer 'foreman_expire_hosts.register_plugin', :before => :finisher_hook do |_app|
26
26
  Foreman::Plugin.register :foreman_expire_hosts do
27
- requires_foreman '>= 1.17'
27
+ requires_foreman '>= 1.18'
28
28
  register_custom_status HostStatus::ExpirationStatus
29
29
 
30
30
  # strong parameters
@@ -60,21 +60,5 @@ module ForemanExpireHosts
60
60
  ForemanExpireHosts::Engine.load_seed
61
61
  end
62
62
  end
63
-
64
- # Precompile any JS or CSS files under app/assets/
65
- # If requiring files from each other, list them explicitly here to avoid precompiling the same
66
- # content twice.
67
- assets_to_precompile =
68
- Dir.chdir(root) do
69
- Dir['app/assets/javascripts/**/*', 'app/assets/stylesheets/**/*'].map do |f|
70
- f.split(File::SEPARATOR, 4).last
71
- end
72
- end
73
- initializer 'foreman_expire_hosts.assets.precompile' do |app|
74
- app.config.assets.precompile += assets_to_precompile
75
- end
76
- initializer 'foreman_expire_hosts.configure_assets', group: :assets do
77
- SETTINGS[:foreman_expire_hosts] = { assets: { precompile: assets_to_precompile } }
78
- end
79
63
  end
80
64
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanExpireHosts
2
- VERSION = '5.1.0'.freeze
2
+ VERSION = '6.0.0'.freeze
3
3
  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: 5.1.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nagarjuna Rachaneni
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-26 00:00:00.000000000 Z
12
+ date: 2019-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap-datepicker-rails