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: ef1542116b039a0e33811e4eaa3c65b3c05da618735f47f9f30fe5dd9b243599
4
- data.tar.gz: fbbd7adb1894aac45862a92653cc2e84667a1ea14a19c2a1e17ab44d882e6358
3
+ metadata.gz: 030b1cb7373a31b3b7a72326668906b00d523c5c92a0a62e41d2467570aa9d8e
4
+ data.tar.gz: 0b27bc9ebb34b8b288234b366a6d1ac431eb0413d883e08ba605a9d419f2660a
5
5
  SHA512:
6
- metadata.gz: 3ba5ffceb6a9049d268589824b73bcf9c1d135d05db12242e08473abe3a2aa47fe4aa21129baf27e646e42d1ce7cddad8d7272b23d173c8a3bb82a75d64dec43
7
- data.tar.gz: 9539d07fd4eee73f05d467a5a5f3e2b83d3ff34337b155a96913c53cc69006b25840010d07df79b90ae2f0d219a986e341d094bc4c06b3b80b89525d28938fab
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 host.params['template_url']
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanGitTemplates
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.6'
5
5
  end
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.5
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-06-10 00:00:00.000000000 Z
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: '0'
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: '0'
68
+ version: 0.89.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-rails
71
71
  requirement: !ruby/object:Gem::Requirement