foreman_git_templates 1.0.5 → 1.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 030b1cb7373a31b3b7a72326668906b00d523c5c92a0a62e41d2467570aa9d8e
|
4
|
+
data.tar.gz: 0b27bc9ebb34b8b288234b366a6d1ac431eb0413d883e08ba605a9d419f2660a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1fcc6b0035e91332f0600389db9445ca00c201c534ec19c26e2b55e0f2e33f23df73d0904b0256bdd81b7cf8b77903a3c17480aeb47174931c70efe11065b3e
|
7
|
+
data.tar.gz: 6ef071e866eeca0076167ab6f04a780cd3b4c46b88bec95cb241a8fb91cc193e64e01aafd65c79d5c813ed59480f742a836675be62a50eb0621318db026e773d
|
@@ -4,7 +4,6 @@ module ForemanGitTemplates
|
|
4
4
|
module Renderer
|
5
5
|
REPOSITORY_SOURCE_CLASS = ForemanGitTemplates::Renderer::Source::Repository
|
6
6
|
|
7
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
8
7
|
def get_source(klass: nil, template:, **args)
|
9
8
|
return super if klass && klass != REPOSITORY_SOURCE_CLASS
|
10
9
|
|
@@ -17,7 +16,6 @@ module ForemanGitTemplates
|
|
17
16
|
super
|
18
17
|
end
|
19
18
|
end
|
20
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
21
19
|
|
22
20
|
private
|
23
21
|
|
@@ -20,7 +20,7 @@ module ForemanGitTemplates
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def validate_tftp
|
23
|
-
return super unless
|
23
|
+
return super unless feasible_for_git_template_rendering?
|
24
24
|
return unless tftp? || tftp6?
|
25
25
|
return unless host.operatingsystem
|
26
26
|
|
@@ -29,6 +29,13 @@ module ForemanGitTemplates
|
|
29
29
|
|
30
30
|
failure _('No %{kind} template was found for host %{host}. Repository url: %{url}') % { kind: pxe_kind, host: host.name, url: host.params['template_url'] }
|
31
31
|
end
|
32
|
+
|
33
|
+
def feasible_for_git_template_rendering?
|
34
|
+
return false unless host.is_a?(Host::Managed)
|
35
|
+
return false unless host.params['template_url']
|
36
|
+
|
37
|
+
true
|
38
|
+
end
|
32
39
|
end
|
33
40
|
|
34
41
|
included do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_git_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dmTECH GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: down
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.89.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.89.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|