foreman_expire_hosts 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rubocop.yml +54 -0
- data/.rubocop_todo.yml +74 -0
- data/Gemfile +3 -0
- data/LICENSE +674 -0
- data/README.md +124 -0
- data/app/assets/javascripts/foreman_expire_hosts/application.js +3 -0
- data/app/assets/javascripts/foreman_expire_hosts/datepicker_for_host_expired_on_field.js +27 -0
- data/app/assets/stylesheets/foreman_expire_hosts/application.scss +4 -0
- data/app/controllers/concerns/foreman_expire_hosts/host_controller_extensions.rb +73 -0
- data/app/helpers/concerns/foreman_expire_hosts/hosts_helper_extensions.rb +41 -0
- data/app/helpers/expire_hosts_mailer_helper.rb +15 -0
- data/app/mailers/expire_hosts_mailer.rb +37 -0
- data/app/models/concerns/foreman_expire_hosts/host_ext.rb +86 -0
- data/app/models/host_status/expiration_status.rb +57 -0
- data/app/models/setting/expire_hosts.rb +21 -0
- data/app/overrides/add_expired_on_field_to_host_form.rb +6 -0
- data/app/overrides/add_expired_on_field_to_host_show.rb +6 -0
- data/app/overrides/add_js_to_host_index.rb +6 -0
- data/app/overrides/deleted_expired_host_comment_in_audits.rb +13 -0
- data/app/views/expire_hosts_mailer/_hosts_table.html.erb +40 -0
- data/app/views/expire_hosts_mailer/deleted_hosts_notification.html.erb +3 -0
- data/app/views/expire_hosts_mailer/expiry_warning_notification.html.erb +4 -0
- data/app/views/expire_hosts_mailer/failed_to_delete_hosts_notification.html.erb +4 -0
- data/app/views/expire_hosts_mailer/failed_to_stop_hosts_notification.html.erb +4 -0
- data/app/views/expire_hosts_mailer/stopped_hosts_notification.html.erb +4 -0
- data/app/views/hosts/_expired_message.html.erb +4 -0
- data/app/views/hosts/_expired_on_field.html.erb +20 -0
- data/app/views/hosts/select_multiple_expiration.html.erb +23 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20150427101516_add_expiry_on_to_hosts.rb +5 -0
- data/foreman_expire_hosts.gemspec +26 -0
- data/lib/expire_hosts_notifications.rb +121 -0
- data/lib/foreman_expire_hosts/engine.rb +61 -0
- data/lib/foreman_expire_hosts/version.rb +3 -0
- data/lib/foreman_expire_hosts.rb +3 -0
- data/lib/tasks/expired_hosts.rake +46 -0
- data/test/factories/foreman_expire_hosts_factories.rb +15 -0
- data/test/functional/concerns/hosts_controller_extensions_test.rb +45 -0
- data/test/test_plugin_helper.rb +10 -0
- data/test/unit/concerns/host_extensions_test.rb +136 -0
- data/test/unit/host_status/expiration_status_test.rb +28 -0
- metadata +153 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a7e5fececc8a6357b994cfdf74ea38209c525017
|
4
|
+
data.tar.gz: aecb6afe763b2133c97d6857aebd17fb81cd6ef4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 44dadad8e98963b00b856b3e74fbe3cb14ba98c729fa54ad3007dd4c51fcdbcc5f63dfdb58b34693a43b613388d7e0396a7b1c2bce994a27e894bd4780d4b80c
|
7
|
+
data.tar.gz: e26f4b92ed9d29a45e72e6748b2141b82bb687482b15999474b95fbe1d9e244f74c6d6ba55b54c47751baf11b68bb0a52851a4b2928f290c7c4b5a1a8e471e89
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- .rubocop_todo.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
Exclude:
|
6
|
+
- 'doc/plugins/**'
|
7
|
+
|
8
|
+
Rails:
|
9
|
+
Enabled: true
|
10
|
+
|
11
|
+
Rails/Date:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
# Don't enforce documentation
|
15
|
+
Style/Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
# Force before_filter until upgrade to Rails 4
|
19
|
+
Rails/ActionFilter:
|
20
|
+
EnforcedStyle: filter
|
21
|
+
|
22
|
+
Metrics/MethodLength:
|
23
|
+
Max: 40
|
24
|
+
|
25
|
+
Style/AccessorMethodName:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/RedundantSelf:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Metrics/ClassLength:
|
32
|
+
Max: 500
|
33
|
+
|
34
|
+
Style/FileName:
|
35
|
+
Exclude:
|
36
|
+
- 'db/seeds.d/*'
|
37
|
+
|
38
|
+
Style/WordArray:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Style/BracesAroundHashParameters:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Style/RescueModifier:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Style/ClassAndModuleChildren:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Style/EachWithObject:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Metrics/ParameterLists:
|
54
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2016-06-07 15:24:39 +0200 using RuboCop version 0.39.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 4
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: IgnoreEmptyBlocks.
|
12
|
+
Lint/UnusedBlockArgument:
|
13
|
+
Exclude:
|
14
|
+
- 'lib/expire_hosts_notifications.rb'
|
15
|
+
- 'lib/foreman_expire_hosts/engine.rb'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Cop supports --auto-correct.
|
19
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
20
|
+
Lint/UnusedMethodArgument:
|
21
|
+
Exclude:
|
22
|
+
- 'app/models/host_status/expiration_status.rb'
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
Lint/UselessAssignment:
|
26
|
+
Exclude:
|
27
|
+
- 'app/models/concerns/foreman_expire_hosts/host_ext.rb'
|
28
|
+
|
29
|
+
# Offense count: 12
|
30
|
+
Metrics/AbcSize:
|
31
|
+
Max: 51
|
32
|
+
|
33
|
+
# Offense count: 3
|
34
|
+
Metrics/CyclomaticComplexity:
|
35
|
+
Max: 9
|
36
|
+
|
37
|
+
# Offense count: 69
|
38
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
39
|
+
# URISchemes: http, https
|
40
|
+
Metrics/LineLength:
|
41
|
+
Max: 362
|
42
|
+
|
43
|
+
# Offense count: 1
|
44
|
+
# Configuration parameters: CountComments.
|
45
|
+
Metrics/ModuleLength:
|
46
|
+
Max: 111
|
47
|
+
|
48
|
+
# Offense count: 3
|
49
|
+
Metrics/PerceivedComplexity:
|
50
|
+
Max: 9
|
51
|
+
|
52
|
+
# Offense count: 4
|
53
|
+
# Cop supports --auto-correct.
|
54
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
55
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
56
|
+
Style/EmptyLinesAroundClassBody:
|
57
|
+
Exclude:
|
58
|
+
- 'app/mailers/expire_hosts_mailer.rb'
|
59
|
+
- 'app/models/setting/expire_hosts.rb'
|
60
|
+
- 'lib/expire_hosts_notifications.rb'
|
61
|
+
|
62
|
+
# Offense count: 69
|
63
|
+
# Cop supports --auto-correct.
|
64
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
65
|
+
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
|
66
|
+
Style/HashSyntax:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
# Offense count: 8
|
70
|
+
# Cop supports --auto-correct.
|
71
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
72
|
+
# SupportedStyles: space, no_space
|
73
|
+
Style/SpaceInsideHashLiteralBraces:
|
74
|
+
Enabled: false
|
data/Gemfile
ADDED