foreman_discovery 1.4.0.rc3 → 1.4.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODU0YmFjMjdiMDU4NzI3YTdmNTcxYmFiYmY5NDRkM2E0MTY3NjIxMA==
5
- data.tar.gz: !binary |-
6
- N2IwODQ5YTBjMTBkNTQ0NzA3MDYzNGJjMzNhZjNiY2E2ODM2ZmE1OQ==
2
+ SHA1:
3
+ metadata.gz: 4106b050ad142a2bdf51a3d0502efa0842136b33
4
+ data.tar.gz: 931495a77ba85f9429b87560241687b11f307c96
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NzI3MDM5NDk4NTM3ZTdkMzBlZGYzNjM4ZTg3OGIyZDE2ZDYxYWFkODJhMDYy
10
- YWI2N2M1YzZkM2ZhMjdhZGIzOGVlMGVkYjg5Yzg4YjM5MGNiYjdjMzcxOTQy
11
- NzY0YjhkNDk0YmFhNjNlODc4M2VmNWNmYzI5NmNiYzk1ZDU1ZmU=
12
- data.tar.gz: !binary |-
13
- OTk1YmJmYmYxZTk3ZmU4YzA3NTdlMjA4NjUyY2ZhYjM3YTA2MmY4ZTY3ZmE5
14
- NGY0ODAxODAxNzg1NDk2ZjE0MDIxZWMwZGQzODg4MTdhNzJmMDE0MTQ3ZjMz
15
- YjQxMjRlODdlYmQ3OWVhYTdlMTEzZWU1OTMxOTQzNWVmNWY1YjE=
6
+ metadata.gz: d1e1efbdccbc1c6917f4f4cde2e3af3d543295b0a2002ef2ea6308aca499bcf684eece46fb587f103c385cd5b8d697046d49192c9800eb599eb4172a74dd35ad
7
+ data.tar.gz: c45046a056199bcda6188e14c09409ff69388ea2efa7e261537bc6ec860de9fb6a53d1535e756e54ad2a93865ddba02e2600bbdd07d9736e9fd028ed501f37eb
@@ -18,7 +18,9 @@ module PuppetFactParserExtensions
18
18
  # search for IP of interface with primary interface macaddress (ipaddress fact does not have to be interface used for boot)
19
19
  def ip_with_discovery_fact
20
20
  facts[:interfaces].split(',').each do |interface|
21
- return facts["ipaddress_#{interface}"] if facts["macaddress_#{interface}"] == facts[discovery_mac_fact_name]
21
+ if facts["macaddress_#{interface}"].try(:downcase) == facts[discovery_mac_fact_name].try(:downcase)
22
+ return facts["ipaddress_#{interface}"]
23
+ end
22
24
  end
23
25
  ip_without_discovery_fact # fallback if IP was not found
24
26
  end
@@ -73,9 +73,16 @@ module ForemanDiscovery
73
73
  end
74
74
  # Include extensions to models in this config.to_prepare block
75
75
  config.to_prepare do
76
+
77
+ begin
78
+ require_dependency 'puppet_fact_parser'
79
+ ::PuppetFactParser.send :include, PuppetFactParserExtensions
80
+ rescue LoadError
81
+ Rails.logger.warn 'PuppetFactParser not found, not loading Parser extensions'
82
+ end
83
+
76
84
  # Include host extensions
77
85
  ::Host::Managed.send :include, Host::ManagedExtensions
78
- ::PuppetFactParser.send :include, PuppetFactParserExtensions if defined? PuppetFactParser
79
86
  end
80
87
 
81
88
  rake_tasks do
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "1.4.0.rc3"
2
+ VERSION = "1.4.0.rc4"
3
3
  end
metadata CHANGED
@@ -1,44 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_discovery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.rc3
4
+ version: 1.4.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open4
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ftools
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: ! 'MaaS Discovery Plugin engine for Foreman '
41
+ description: 'MaaS Discovery Plugin engine for Foreman '
42
42
  email: gsutclif@redhat.com
43
43
  executables: []
44
44
  extensions: []
@@ -129,24 +129,25 @@ require_paths:
129
129
  - lib
130
130
  required_ruby_version: !ruby/object:Gem::Requirement
131
131
  requirements:
132
- - - ! '>='
132
+ - - ">="
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>'
137
+ - - ">"
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.3.1
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.2.1
142
+ rubygems_version: 2.2.0
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: MaaS Discovery Plugin for Foreman
146
146
  test_files:
147
- - test/test_plugin_helper.rb
148
147
  - test/functional/discovered_hosts_controller_test.rb
149
- - test/test_helper.rb
150
- - test/unit/facts.json
151
148
  - test/unit/setting_discovered_test.rb
149
+ - test/unit/facts.json
152
150
  - test/unit/host_discovered_test.rb
151
+ - test/test_plugin_helper.rb
152
+ - test/test_helper.rb
153
+ has_rdoc: