foreman_expire_hosts 2.2.0 → 3.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
  SHA1:
3
- metadata.gz: ffe7a9b12696e0e2f492abefc63a354e46533892
4
- data.tar.gz: 8315d516b2a6863b51df48c111093f144f6ac8ec
3
+ metadata.gz: 4a46f4ef05040228424339f7bb3e64d1f0fd4856
4
+ data.tar.gz: 224e1a6a8458ea48fe76246f91d524c644a1e395
5
5
  SHA512:
6
- metadata.gz: f4cf8b79e5763299dbb22939a3f4b1128a8ecf0f8ebdb99e0474b7fc1e467a36fbad0d32dd7bec6047f6aa07f3f21bdfe4d893f317ac128a7048257770bc5725
7
- data.tar.gz: 1a64601384e3fff010888920bc3994db9d5ab0552b198d552f36e9f31a4d5065f1adfadc6e07343725e6bcac9e158dfb22e7c712a5743c25941ee10c3086af22
6
+ metadata.gz: 06f65256c9e252b8e5177208a97051e8563dd4c0e4a0a0163290d8b7d5f1d36948fe4f599bdaf9caef3a129c130b1ea13e20831ca6e1a3b56adb2f8fad5b158f
7
+ data.tar.gz: 99313de528e91e2bf57d568616590d88fe0571534cb885c69767472c902507e4b4bdcb4c1130aeda31c019cf84d62dca37212f131e0274c87ec8395a0abee2ee
data/README.md CHANGED
@@ -14,6 +14,7 @@ This plugin will send two warning notifications before host expiry (see Settings
14
14
  | --------------- | -------------- |
15
15
  | >= 1.11 | ~> 2.0 |
16
16
  | >= 1.13 | ~> 2.1 |
17
+ | >= 1.15 | ~> 3.0 |
17
18
 
18
19
  # Screenshots
19
20
  ![Expiry date field in host form](https://raw.githubusercontent.com/ingenico-group/screenshots/master/foreman_host_expiry/expiry-date-field-in-host-form.png)
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  Foreman::Application.routes.draw do
2
- get 'expired_hosts/select_multiple_expiration' => 'hosts#select_multiple_expiration', as: 'select_multiple_expiration_hosts'
2
+ post 'expired_hosts/select_multiple_expiration' => 'hosts#select_multiple_expiration', as: 'select_multiple_expiration_hosts'
3
3
  post 'expired_hosts/update_multiple_expiration' => 'hosts#update_multiple_expiration', as: 'update_multiple_expiration_hosts'
4
4
  end
@@ -23,7 +23,7 @@ module ForemanExpireHosts
23
23
 
24
24
  initializer 'foreman_expire_hosts.register_plugin', :before => :finisher_hook do |app|
25
25
  Foreman::Plugin.register :foreman_expire_hosts do
26
- requires_foreman '>= 1.13'
26
+ requires_foreman '>= 1.15'
27
27
  register_custom_status HostStatus::ExpirationStatus
28
28
 
29
29
  # strong parameters
@@ -1,3 +1,3 @@
1
1
  module ForemanExpireHosts
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
@@ -58,6 +58,13 @@ class HostsControllerTest < ActionController::TestCase
58
58
  @request.env['HTTP_REFERER'] = hosts_path
59
59
  end
60
60
 
61
+ test 'show a host selection' do
62
+ host_ids = @hosts.map(&:id)
63
+ xhr :post, :select_multiple_expiration, {:host_ids => host_ids}, set_session_user
64
+ assert_response :success
65
+ assert response.body =~ /#{@hosts.first.name}.*#{@hosts.last.name}/m
66
+ end
67
+
61
68
  test 'should set expiration date' do
62
69
  expiration_date = Date.today + 14
63
70
  params = { :host_ids => @hosts.map(&:id),
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: 2.2.0
4
+ version: 3.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: 2017-02-22 00:00:00.000000000 Z
12
+ date: 2017-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deface
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.5.1
146
+ rubygems_version: 2.6.11
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Foreman plugin for limiting host lifetime