foreman_expire_hosts 9.0.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 278bb558393256952a91c75901f1776bdab5314e43d9b10218ed06f1ac765fc9
4
- data.tar.gz: b80fd1acc8b31a12b8be1f2464dd67633364db992a1dd414d06e0d792ede6f57
3
+ metadata.gz: 839f503c394a7967c2a50c93f13197c83b4b9a7a304fbff46721f9416936c8f7
4
+ data.tar.gz: 916041f719b68174a64b3337cfcecbbfd2c0552ae60a5c235cff3701c977331f
5
5
  SHA512:
6
- metadata.gz: 10c0283b3ecc5974c9faed866002002eef7c2ace0caf6549f0c311161e869bae7bb76f2d99fd8b068a6c8093186981e529feade1ffe3218028faf949b10bc950
7
- data.tar.gz: 5251612576cb29e79686379c33029b9594521d89d0fa513912fa9c41361a619d5095c1a08bbdda4adc56104b7731f68d29833109154f72860d626b6fe576cf98
6
+ metadata.gz: cc344d2888bdc7df2471cbdaba3b9236c40e74ae24b2f96cfa38d49188d574beff34ec25d1028b60607083159d99463c2a7916b3dbc212a5f40b962ccf3ff75b
7
+ data.tar.gz: ff4a9af4cba0aaee10361997aa5b714240e83da4d1bb6b17bc2a421867615d1562821c6e6508a0212bdf2abb4673c4f430598375cd0252d74ef97170b0c5031a
@@ -39,6 +39,7 @@ module HostStatus
39
39
  end
40
40
 
41
41
  def to_label(_options = {})
42
+ return N_('Does not expire') unless host.expires?
42
43
  case to_status
43
44
  when OK
44
45
  N_('Expires on %s') % I18n.l(host.expired_on.to_date)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Deface::Override.new(
4
4
  :virtual_path => 'hosts/show',
5
- :name => 'host_expiry_waring_in_show',
5
+ :name => 'host_expiry_warning_in_show',
6
6
  :insert_before => '#host-show',
7
- :partial => 'hosts/expired_message.html.erb'
7
+ :partial => 'hosts/expired_message'
8
8
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanExpireHosts
4
- VERSION = '9.0.0'
4
+ VERSION = '9.0.1'
5
5
  end
@@ -18,6 +18,9 @@ class ExpirationStatusTest < ActiveSupport::TestCase
18
18
 
19
19
  @host.expired_on = Date.today
20
20
  assert_equal 'Expires today', @status.to_label
21
+
22
+ @host.expired_on = nil
23
+ assert_equal 'Does not expire', @status.to_label
21
24
  end
22
25
 
23
26
  test '#relevant? is only for expiring hosts' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_expire_hosts
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nagarjuna Rachaneni
8
8
  - Timo Goebel
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-17 00:00:00.000000000 Z
11
+ date: 2025-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface