facter 4.0.9.pre → 4.0.10.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rtc.yml +11 -0
  3. data/.rubocop_todo.yml +10 -190
  4. data/VERSION +1 -1
  5. data/facter.gemspec +1 -0
  6. data/lib/custom_facts/core/aggregate.rb +4 -6
  7. data/lib/custom_facts/core/execution.rb +1 -1
  8. data/lib/custom_facts/core/execution/base.rb +15 -24
  9. data/lib/custom_facts/core/execution/posix.rb +2 -2
  10. data/lib/custom_facts/core/resolvable.rb +1 -1
  11. data/lib/custom_facts/core/suitable.rb +2 -1
  12. data/lib/custom_facts/util/fact.rb +3 -3
  13. data/lib/custom_facts/util/loader.rb +2 -2
  14. data/lib/custom_facts/util/parser.rb +7 -7
  15. data/lib/custom_facts/util/resolution.rb +1 -3
  16. data/lib/custom_facts/version.rb +1 -1
  17. data/lib/facter.rb +217 -41
  18. data/lib/facts/aix/augeas/version.rb +4 -1
  19. data/lib/facts/aix/filesystems.rb +14 -0
  20. data/lib/facts/aix/identity/user.rb +17 -0
  21. data/lib/facts/aix/puppet_version.rb +15 -0
  22. data/lib/facts/aix/system_uptime/days.rb +16 -0
  23. data/lib/facts/aix/system_uptime/hours.rb +16 -0
  24. data/lib/facts/aix/system_uptime/seconds.rb +16 -0
  25. data/lib/facts/aix/system_uptime/uptime.rb +16 -0
  26. data/lib/facts/aix/timezone.rb +14 -0
  27. data/lib/facts/debian/augeas/version.rb +19 -0
  28. data/lib/facts/debian/dmi/bios/release_date.rb +2 -1
  29. data/lib/facts/debian/dmi/bios/vendor.rb +2 -1
  30. data/lib/facts/debian/dmi/bios/version.rb +2 -1
  31. data/lib/facts/debian/dmi/board/manufacturer.rb +2 -1
  32. data/lib/facts/debian/dmi/board/product.rb +2 -1
  33. data/lib/facts/debian/dmi/board/serial_number.rb +2 -1
  34. data/lib/facts/debian/dmi/chassis/asset_tag.rb +2 -1
  35. data/lib/facts/debian/dmi/chassis/type.rb +2 -1
  36. data/lib/facts/debian/dmi/manufacturer.rb +2 -1
  37. data/lib/facts/debian/dmi/product/name.rb +2 -1
  38. data/lib/facts/debian/identity/user.rb +17 -0
  39. data/lib/facts/debian/interfaces.rb +16 -0
  40. data/lib/facts/debian/memory/swap/available.rb +2 -1
  41. data/lib/facts/debian/memory/swap/available_bytes.rb +4 -1
  42. data/lib/facts/debian/memory/swap/total.rb +2 -1
  43. data/lib/facts/debian/memory/swap/total_bytes.rb +3 -1
  44. data/lib/facts/debian/memory/system/available.rb +3 -1
  45. data/lib/facts/debian/memory/system/available_bytes.rb +4 -1
  46. data/lib/facts/debian/memory/system/total.rb +2 -1
  47. data/lib/facts/debian/memory/system/total_bytes.rb +3 -1
  48. data/lib/facts/debian/networking/mac.rb +18 -0
  49. data/lib/facts/debian/os/distro/codename.rb +21 -0
  50. data/lib/facts/debian/os/distro/description.rb +21 -0
  51. data/lib/facts/debian/os/distro/id.rb +21 -0
  52. data/lib/facts/debian/os/distro/release.rb +31 -0
  53. data/lib/facts/debian/os/distro/specification.rb +21 -0
  54. data/lib/facts/debian/os/hardware.rb +2 -1
  55. data/lib/facts/debian/os/selinux/config_mode.rb +21 -0
  56. data/lib/facts/debian/os/selinux/config_policy.rb +21 -0
  57. data/lib/facts/debian/os/selinux/current_mode.rb +21 -0
  58. data/lib/facts/debian/os/selinux/enabled.rb +21 -0
  59. data/lib/facts/debian/os/selinux/enforced.rb +21 -0
  60. data/lib/facts/debian/os/selinux/policy_version.rb +21 -0
  61. data/lib/facts/debian/processors/count.rb +2 -1
  62. data/lib/facts/debian/processors/isa.rb +3 -2
  63. data/lib/facts/debian/processors/physicalcount.rb +2 -1
  64. data/lib/facts/debian/puppet_version.rb +15 -0
  65. data/lib/facts/debian/ruby/platform.rb +2 -1
  66. data/lib/facts/debian/ruby/sitedir.rb +2 -1
  67. data/lib/facts/debian/system_uptime/days.rb +2 -1
  68. data/lib/facts/debian/system_uptime/hours.rb +2 -1
  69. data/lib/facts/debian/system_uptime/seconds.rb +18 -0
  70. data/lib/facts/debian/system_uptime/uptime.rb +2 -1
  71. data/lib/facts/el/augeas/version.rb +19 -0
  72. data/lib/facts/el/dmi/bios/release_date.rb +2 -1
  73. data/lib/facts/el/dmi/bios/vendor.rb +2 -1
  74. data/lib/facts/el/dmi/bios/version.rb +2 -1
  75. data/lib/facts/el/dmi/board/manufacturer.rb +2 -1
  76. data/lib/facts/el/dmi/board/product.rb +2 -1
  77. data/lib/facts/el/dmi/board/serial_number.rb +2 -1
  78. data/lib/facts/el/dmi/chassis/asset_tag.rb +2 -1
  79. data/lib/facts/el/dmi/chassis/type.rb +2 -1
  80. data/lib/facts/el/dmi/manufacturer.rb +2 -1
  81. data/lib/facts/el/dmi/product/name.rb +2 -1
  82. data/lib/facts/el/dmi/product/serial_number.rb +2 -1
  83. data/lib/facts/el/dmi/product/uuid.rb +2 -1
  84. data/lib/facts/el/identity/user.rb +17 -0
  85. data/lib/facts/el/interfaces.rb +16 -0
  86. data/lib/facts/el/memory/swap/available.rb +2 -1
  87. data/lib/facts/el/memory/swap/available_bytes.rb +3 -1
  88. data/lib/facts/el/memory/swap/total.rb +2 -1
  89. data/lib/facts/el/memory/swap/total_bytes.rb +3 -1
  90. data/lib/facts/el/memory/system/available.rb +2 -1
  91. data/lib/facts/el/memory/system/available_bytes.rb +3 -1
  92. data/lib/facts/el/memory/system/total.rb +2 -1
  93. data/lib/facts/el/memory/system/total_bytes.rb +3 -1
  94. data/lib/facts/el/networking/mac.rb +18 -0
  95. data/lib/facts/el/os/distro/codename.rb +21 -0
  96. data/lib/facts/el/os/distro/description.rb +21 -0
  97. data/lib/facts/el/os/distro/id.rb +21 -0
  98. data/lib/facts/el/os/distro/release.rb +31 -0
  99. data/lib/facts/el/os/distro/specification.rb +21 -0
  100. data/lib/facts/el/os/hardware.rb +2 -1
  101. data/lib/facts/el/os/selinux/config_mode.rb +21 -0
  102. data/lib/facts/el/os/selinux/config_policy.rb +21 -0
  103. data/lib/facts/el/os/selinux/current_mode.rb +21 -0
  104. data/lib/facts/el/os/selinux/enabled.rb +21 -0
  105. data/lib/facts/el/os/selinux/enforced.rb +21 -0
  106. data/lib/facts/el/os/selinux/policy_version.rb +21 -0
  107. data/lib/facts/el/processor.rb +19 -0
  108. data/lib/facts/el/processors/count.rb +2 -1
  109. data/lib/facts/el/processors/isa.rb +3 -1
  110. data/lib/facts/el/processors/physicalcount.rb +3 -1
  111. data/lib/facts/el/puppet_version.rb +15 -0
  112. data/lib/facts/el/ruby/platform.rb +3 -1
  113. data/lib/facts/el/ruby/sitedir.rb +3 -1
  114. data/lib/facts/el/ruby/version.rb +1 -0
  115. data/lib/facts/el/sshalgorithmkey.rb +16 -0
  116. data/lib/facts/el/sshfp_algorithm.rb +19 -0
  117. data/lib/facts/el/system_uptime/days.rb +3 -1
  118. data/lib/facts/el/system_uptime/hours.rb +3 -1
  119. data/lib/facts/el/system_uptime/seconds.rb +3 -1
  120. data/lib/facts/el/system_uptime/uptime.rb +3 -1
  121. data/lib/facts/macosx/augeas/version.rb +19 -0
  122. data/lib/facts/macosx/dmi/product/name.rb +2 -1
  123. data/lib/facts/macosx/identity/group.rb +2 -0
  124. data/lib/facts/macosx/identity/user.rb +2 -1
  125. data/lib/facts/macosx/interfaces.rb +15 -0
  126. data/lib/facts/macosx/memory/swap/available.rb +2 -1
  127. data/lib/facts/macosx/memory/swap/available_bytes.rb +3 -1
  128. data/lib/facts/macosx/memory/swap/encrypted.rb +2 -1
  129. data/lib/facts/macosx/memory/swap/total.rb +2 -1
  130. data/lib/facts/macosx/memory/swap/total_bytes.rb +3 -1
  131. data/lib/facts/macosx/memory/system/available.rb +2 -1
  132. data/lib/facts/macosx/memory/system/available_bytes.rb +3 -1
  133. data/lib/facts/macosx/memory/system/total.rb +2 -1
  134. data/lib/facts/macosx/memory/system/total_bytes.rb +3 -1
  135. data/lib/facts/macosx/networking/mac.rb +18 -0
  136. data/lib/facts/macosx/os/hardware.rb +2 -1
  137. data/lib/facts/macosx/os/macosx/build.rb +2 -2
  138. data/lib/facts/macosx/os/macosx/product.rb +2 -2
  139. data/lib/facts/macosx/os/macosx/version.rb +5 -1
  140. data/lib/facts/macosx/os/release.rb +11 -5
  141. data/lib/facts/macosx/processors/count.rb +2 -1
  142. data/lib/facts/macosx/processors/isa.rb +2 -1
  143. data/lib/facts/macosx/processors/models.rb +6 -1
  144. data/lib/facts/macosx/processors/physicalcount.rb +2 -1
  145. data/lib/facts/macosx/{augeas.rb → puppet_version.rb} +4 -3
  146. data/lib/facts/macosx/ruby/platform.rb +2 -2
  147. data/lib/facts/macosx/ruby/sitedir.rb +2 -2
  148. data/lib/facts/macosx/ssh.rb +26 -0
  149. data/lib/facts/macosx/sshalgorithmkey.rb +16 -0
  150. data/lib/facts/macosx/sshfp_algorithm.rb +19 -0
  151. data/lib/facts/macosx/system_profiler/boot_mode.rb +2 -1
  152. data/lib/facts/macosx/system_profiler/boot_rom_version.rb +2 -1
  153. data/lib/facts/macosx/system_profiler/boot_volume.rb +2 -1
  154. data/lib/facts/macosx/system_profiler/computer_name.rb +2 -1
  155. data/lib/facts/macosx/system_profiler/cores.rb +2 -1
  156. data/lib/facts/macosx/system_profiler/hardware_uuid.rb +2 -1
  157. data/lib/facts/macosx/system_profiler/kernel_version.rb +2 -1
  158. data/lib/facts/macosx/system_profiler/l2_cache_per_core.rb +2 -1
  159. data/lib/facts/macosx/system_profiler/l3_cache.rb +2 -1
  160. data/lib/facts/macosx/system_profiler/memory.rb +2 -1
  161. data/lib/facts/macosx/system_profiler/model_identifier.rb +2 -1
  162. data/lib/facts/macosx/system_profiler/model_name.rb +2 -1
  163. data/lib/facts/macosx/system_profiler/processor_name.rb +2 -1
  164. data/lib/facts/macosx/system_profiler/processor_speed.rb +2 -1
  165. data/lib/facts/macosx/system_profiler/processors.rb +2 -1
  166. data/lib/facts/macosx/system_profiler/secure_virtual_memory.rb +2 -1
  167. data/lib/facts/macosx/system_profiler/serial_number.rb +2 -1
  168. data/lib/facts/macosx/system_profiler/smc_version.rb +2 -1
  169. data/lib/facts/macosx/system_profiler/system_version.rb +2 -1
  170. data/lib/facts/macosx/system_profiler/uptime.rb +2 -1
  171. data/lib/facts/macosx/system_profiler/username.rb +2 -1
  172. data/lib/facts/macosx/system_uptime/days.rb +2 -1
  173. data/lib/facts/macosx/system_uptime/hours.rb +2 -1
  174. data/lib/facts/macosx/system_uptime/seconds.rb +2 -1
  175. data/lib/facts/macosx/system_uptime/uptime.rb +2 -1
  176. data/lib/facts/sles/augeas/version.rb +19 -0
  177. data/lib/facts/sles/disks.rb +15 -0
  178. data/lib/facts/sles/dmi/bios/release_date.rb +19 -0
  179. data/lib/facts/sles/dmi/bios/vendor.rb +19 -0
  180. data/lib/facts/sles/dmi/bios/version.rb +19 -0
  181. data/lib/facts/sles/dmi/board/manufacturer.rb +19 -0
  182. data/lib/facts/sles/dmi/board/product.rb +19 -0
  183. data/lib/facts/sles/dmi/board/serial_number.rb +19 -0
  184. data/lib/facts/sles/dmi/chassis/asset_tag.rb +19 -0
  185. data/lib/facts/sles/dmi/chassis/type.rb +19 -0
  186. data/lib/facts/sles/dmi/manufacturer.rb +17 -0
  187. data/lib/facts/sles/dmi/product/name.rb +19 -0
  188. data/lib/facts/sles/dmi/product/serial_number.rb +19 -0
  189. data/lib/facts/sles/dmi/product/uuid.rb +19 -0
  190. data/lib/facts/sles/filesystems.rb +14 -0
  191. data/lib/facts/sles/fips_enabled.rb +14 -0
  192. data/lib/facts/sles/identity/user.rb +17 -0
  193. data/lib/facts/sles/interfaces.rb +16 -0
  194. data/lib/facts/sles/load_averages.rb +14 -0
  195. data/lib/facts/sles/memory/swap/available.rb +2 -1
  196. data/lib/facts/sles/memory/swap/available_bytes.rb +3 -1
  197. data/lib/facts/sles/memory/swap/total.rb +2 -1
  198. data/lib/facts/sles/memory/swap/total_bytes.rb +3 -1
  199. data/lib/facts/sles/memory/swap/used.rb +1 -1
  200. data/lib/facts/sles/memory/swap/used_bytes.rb +1 -1
  201. data/lib/facts/sles/memory/system/available.rb +2 -1
  202. data/lib/facts/sles/memory/system/available_bytes.rb +3 -1
  203. data/lib/facts/sles/memory/system/total.rb +2 -1
  204. data/lib/facts/sles/memory/system/total_bytes.rb +3 -1
  205. data/lib/facts/sles/mountpoints.rb +21 -0
  206. data/lib/facts/sles/networking/mac.rb +18 -0
  207. data/lib/facts/sles/os/distro/codename.rb +21 -0
  208. data/lib/facts/sles/os/distro/description.rb +21 -0
  209. data/lib/facts/sles/os/distro/id.rb +21 -0
  210. data/lib/facts/sles/os/distro/release.rb +31 -0
  211. data/lib/facts/sles/os/distro/specification.rb +21 -0
  212. data/lib/facts/sles/os/family.rb +1 -1
  213. data/lib/facts/sles/os/hardware.rb +2 -1
  214. data/lib/facts/sles/os/release.rb +3 -3
  215. data/lib/facts/sles/os/selinux/config_mode.rb +21 -0
  216. data/lib/facts/sles/os/selinux/config_policy.rb +21 -0
  217. data/lib/facts/sles/os/selinux/current_mode.rb +21 -0
  218. data/lib/facts/sles/os/selinux/enabled.rb +21 -0
  219. data/lib/facts/sles/os/selinux/enforced.rb +21 -0
  220. data/lib/facts/sles/os/selinux/policy_version.rb +21 -0
  221. data/lib/facts/sles/puppet_version.rb +15 -0
  222. data/lib/facts/sles/ruby/platform.rb +3 -1
  223. data/lib/facts/sles/ruby/sitedir.rb +3 -1
  224. data/lib/facts/sles/ruby/version.rb +1 -0
  225. data/lib/facts/sles/sshalgorithmkey.rb +16 -0
  226. data/lib/facts/sles/sshfp_algorithm.rb +19 -0
  227. data/lib/facts/sles/system_uptime/days.rb +18 -0
  228. data/lib/facts/sles/system_uptime/hours.rb +18 -0
  229. data/lib/facts/sles/system_uptime/seconds.rb +18 -0
  230. data/lib/facts/sles/system_uptime/uptime.rb +18 -0
  231. data/lib/facts/solaris/augeas/version.rb +19 -0
  232. data/lib/facts/solaris/filesystems.rb +14 -0
  233. data/lib/facts/solaris/identity/user.rb +17 -0
  234. data/lib/facts/solaris/os/hardware.rb +3 -1
  235. data/lib/facts/solaris/puppet_version.rb +15 -0
  236. data/lib/facts/solaris/ruby/platform.rb +3 -1
  237. data/lib/facts/solaris/ruby/sitedir.rb +2 -1
  238. data/lib/facts/solaris/solaris_zones/current.rb +3 -1
  239. data/lib/facts/solaris/solaris_zones/zone.rb +39 -6
  240. data/lib/facts/solaris/ssh.rb +26 -0
  241. data/lib/facts/solaris/system_uptime/days.rb +17 -0
  242. data/lib/facts/solaris/system_uptime/hours.rb +17 -0
  243. data/lib/facts/{debian/system_uptime/minutes.rb → solaris/system_uptime/seconds.rb} +4 -4
  244. data/lib/facts/solaris/system_uptime/uptime.rb +17 -0
  245. data/lib/facts/solaris/timezone.rb +14 -0
  246. data/lib/facts/windows/augeas/version.rb +19 -0
  247. data/lib/facts/windows/puppet_version.rb +15 -0
  248. data/lib/facts_utils/bytes_converter.rb +15 -0
  249. data/lib/framework/config/block_list.rb +1 -1
  250. data/lib/framework/config/config_reader.rb +1 -1
  251. data/lib/framework/core/fact/external/external_fact_manager.rb +1 -1
  252. data/lib/framework/core/fact_loaders/external_fact_loader.rb +1 -1
  253. data/lib/framework/core/fact_manager.rb +5 -0
  254. data/lib/framework/logging/logger.rb +10 -1
  255. data/lib/models/fact_collection.rb +15 -1
  256. data/lib/models/resolved_fact.rb +5 -1
  257. data/lib/resolvers/aix/filesystem_resolver.rb +33 -0
  258. data/lib/resolvers/disk_resolver.rb +11 -3
  259. data/lib/resolvers/dmi_resolver.rb +1 -1
  260. data/lib/resolvers/filesystems_resolver.rb +2 -0
  261. data/lib/resolvers/fips_enabled_resolver.rb +2 -1
  262. data/lib/resolvers/hostname_resolver.rb +1 -1
  263. data/lib/resolvers/load_averages_resolver.rb +2 -0
  264. data/lib/resolvers/lsb_release_resolver.rb +23 -5
  265. data/lib/resolvers/macosx/ipaddress_resolver.rb +14 -1
  266. data/lib/resolvers/memory_resolver.rb +2 -0
  267. data/lib/resolvers/mountpoints_resolver.rb +2 -0
  268. data/lib/resolvers/networking_linux_resolver.rb +7 -1
  269. data/lib/resolvers/os_release_resolver.rb +1 -1
  270. data/lib/resolvers/processors_resolver.rb +2 -0
  271. data/lib/resolvers/puppet_version_resolver.rb +27 -0
  272. data/lib/resolvers/selinux_resolver.rb +36 -4
  273. data/lib/resolvers/solaris/filesystems_resolver.rb +32 -0
  274. data/lib/resolvers/solaris/zone_resolver.rb +4 -4
  275. data/lib/resolvers/ssh_resolver.rb +1 -1
  276. metadata +123 -8
  277. data/lib/facts/debian/os/distro.rb +0 -31
  278. data/lib/facts/debian/os/selinux.rb +0 -23
  279. data/lib/facts/el/os/selinux.rb +0 -23
  280. data/lib/facts/sles/os/selinux.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bcb47b3d2864a886a00c54df529a748c9ec915e918f519f959ccca282f71fd9
4
- data.tar.gz: 22e86bb46282e704dc18a6f38cc9985d3ad52586090dd7e824a0d3f15295a15a
3
+ metadata.gz: e7baf6d5b1b24f41a21f9ef4854a86a894ad3fb46d47b3eeac21a1d1fe785493
4
+ data.tar.gz: 3d925266d7ad956951a7157de64c3cee79a42098821cfc63c5b868397a5c0e2e
5
5
  SHA512:
6
- metadata.gz: 6ec6ac1b3a3f3baeaa5082e02b33fc3fb4733c3c269621edb2ada6cb5d46316e52f24a9d73840ac6af781eae91fb0f202b2ed3b17f394f23ad03057c75b37627
7
- data.tar.gz: 0e88c62fb9f0d503ad8cb255465b6fa4ba8fdc6ba104251cd0cc858b2e32788a52780125e8813ac24a23bcdad054401242937a899bacfc546a10511042aba4f4
6
+ metadata.gz: b785aebebb84571e18b779e1bed3c7ea6f79fda7fe01476595b1c12a6c79a817243c65cdfe44eaac11ef58f591f99ab94c5200a4646b5bd893c51dd3d6c187dc
7
+ data.tar.gz: a813e1da2e65bdbbe816b5bccd25cb90f2c2c0bca737329b964a4eecb6743a6f385c9399ce11f755a8686e2b8ce5279df7fb9a1aa8e79b45a2c66b03c25eea10
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: RuboCop TODO checker
3
+
4
+ on: [pull_request]
5
+
6
+ jobs:
7
+ rtc:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v1
11
+ - uses: gimmyxd/rtc-action@0.0.5
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 1000`
3
- # on 2020-03-05 10:38:09 +0200 using RuboCop version 0.74.0.
3
+ # on 2020-03-16 18:39:58 +0200 using RuboCop version 0.74.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -29,7 +29,7 @@ RSpec/AnyInstance:
29
29
  - 'spec/framework/core/options/options_validator_spec.rb'
30
30
  - 'spec/mocks/util.rb'
31
31
 
32
- # Offense count: 72
32
+ # Offense count: 70
33
33
  # Configuration parameters: Prefixes.
34
34
  # Prefixes: when, with, without
35
35
  RSpec/ContextWording:
@@ -41,7 +41,6 @@ RSpec/ContextWording:
41
41
  - 'spec/facter/fact_filter_spec.rb'
42
42
  - 'spec/facter/facter_spec.rb'
43
43
  - 'spec/facter/facts/macosx/is_virtual_spec.rb'
44
- - 'spec/facter/resolvers/linux/networking_linux_resolver_spec.rb'
45
44
  - 'spec/facter/resolvers/solaris/current_zone_resolver_spec.rb'
46
45
  - 'spec/facter/resolvers/solaris/solaris_release_resolver_spec.rb'
47
46
  - 'spec/facter/resolvers/solaris/zfs_resolver_spec.rb'
@@ -55,38 +54,13 @@ RSpec/ContextWording:
55
54
  - 'spec/framework/core/options_spec.rb'
56
55
  - 'spec/framework/formatters/legacy_fact_formatter_spec.rb'
57
56
 
58
- # Offense count: 82
57
+ # Offense count: 31
59
58
  RSpec/ExpectInHook:
60
59
  Exclude:
61
60
  - 'spec/custom_facts/core/execution/fact_manager_spec.rb'
62
61
  - 'spec/facter/facts/aix/load_averages_spec.rb'
63
62
  - 'spec/facter/facts/macosx/filesystems_spec.rb'
64
- - 'spec/facter/facts/macosx/identity/gid_spec.rb'
65
- - 'spec/facter/facts/macosx/identity/group_spec.rb'
66
63
  - 'spec/facter/facts/macosx/identity/privileged_spec.rb'
67
- - 'spec/facter/facts/macosx/identity/uid_spec.rb'
68
- - 'spec/facter/facts/macosx/identity/user_spec.rb'
69
- - 'spec/facter/facts/macosx/system_profiler/boot_mode_spec.rb'
70
- - 'spec/facter/facts/macosx/system_profiler/boot_rom_version_spec.rb'
71
- - 'spec/facter/facts/macosx/system_profiler/boot_volume_spec.rb'
72
- - 'spec/facter/facts/macosx/system_profiler/computer_name_spec.rb'
73
- - 'spec/facter/facts/macosx/system_profiler/cores_spec.rb'
74
- - 'spec/facter/facts/macosx/system_profiler/hardware_uuid_spec.rb'
75
- - 'spec/facter/facts/macosx/system_profiler/kernel_version_spec.rb'
76
- - 'spec/facter/facts/macosx/system_profiler/l2_cache_per_core_spec.rb'
77
- - 'spec/facter/facts/macosx/system_profiler/l3_cache_spec.rb'
78
- - 'spec/facter/facts/macosx/system_profiler/memory_spec.rb'
79
- - 'spec/facter/facts/macosx/system_profiler/model_identifier_spec.rb'
80
- - 'spec/facter/facts/macosx/system_profiler/model_name_spec.rb'
81
- - 'spec/facter/facts/macosx/system_profiler/processor_name_spec.rb'
82
- - 'spec/facter/facts/macosx/system_profiler/processor_speed_spec.rb'
83
- - 'spec/facter/facts/macosx/system_profiler/processors_spec.rb'
84
- - 'spec/facter/facts/macosx/system_profiler/secure_virtual_memory_spec.rb'
85
- - 'spec/facter/facts/macosx/system_profiler/serial_number_spec.rb'
86
- - 'spec/facter/facts/macosx/system_profiler/smc_version_spec.rb'
87
- - 'spec/facter/facts/macosx/system_profiler/system_version_spec.rb'
88
- - 'spec/facter/facts/macosx/system_profiler/uptime_spec.rb'
89
- - 'spec/facter/facts/macosx/system_profiler/username_spec.rb'
90
64
  - 'spec/facter/resolvers/aix/ffi_helper_spec.rb'
91
65
  - 'spec/facter/resolvers/lpar_resolver_spec.rb'
92
66
  - 'spec/facter/resolvers/solaris/current_zone_resolver_spec.rb'
@@ -97,7 +71,7 @@ RSpec/ExpectInHook:
97
71
  - 'spec/facter/resolvers/wpar_resolver_spec.rb'
98
72
  - 'spec/framework/config/config_reader_spec.rb'
99
73
 
100
- # Offense count: 80
74
+ # Offense count: 79
101
75
  # Configuration parameters: CustomTransform, IgnoreMethods.
102
76
  RSpec/FilePath:
103
77
  Exclude:
@@ -133,7 +107,6 @@ RSpec/FilePath:
133
107
  - 'spec/facter/resolvers/filesystems_resolver_spec.rb'
134
108
  - 'spec/facter/resolvers/fips_enabled_resolver_spec.rb'
135
109
  - 'spec/facter/resolvers/identity_resolver_spec.rb'
136
- - 'spec/facter/resolvers/linux/networking_linux_resolver_spec.rb'
137
110
  - 'spec/facter/resolvers/load_averages_resolver_spec.rb'
138
111
  - 'spec/facter/resolvers/macosx/dmi_resolver_spec.rb'
139
112
  - 'spec/facter/resolvers/memory_resolver_spec.rb'
@@ -206,7 +179,7 @@ RSpec/LeakyConstantDeclaration:
206
179
  - 'spec/facter/resolvers/macosx/mountpoints_resolver_spec.rb'
207
180
  - 'spec/facter/resolvers/utils/windows/network_utils_spec.rb'
208
181
 
209
- # Offense count: 409
182
+ # Offense count: 326
210
183
  # Configuration parameters: EnforcedStyle.
211
184
  # SupportedStyles: have_received, receive
212
185
  RSpec/MessageSpies:
@@ -244,40 +217,18 @@ RSpec/MessageSpies:
244
217
  - 'spec/facter/facts/debian/networking/interfaces_spec.rb'
245
218
  - 'spec/facter/facts/debian/networking/ip_spec.rb'
246
219
  - 'spec/facter/facts/debian/networking/primary_spec.rb'
247
- - 'spec/facter/facts/debian/os/architecture_spec.rb'
248
220
  - 'spec/facter/facts/debian/os/family_spec.rb'
249
- - 'spec/facter/facts/debian/os/name_spec.rb'
250
- - 'spec/facter/facts/debian/os/release_spec.rb'
251
221
  - 'spec/facter/facts/debian/ruby/version_spec.rb'
252
- - 'spec/facter/facts/el/disks_spec.rb'
253
- - 'spec/facter/facts/el/memory/swap/available_spec.rb'
254
- - 'spec/facter/facts/el/memory/swap/total_spec.rb'
255
- - 'spec/facter/facts/el/memory/swap/used_spec.rb'
256
- - 'spec/facter/facts/el/memory/system/available_spec.rb'
257
- - 'spec/facter/facts/el/memory/system/total_spec.rb'
258
- - 'spec/facter/facts/el/memory/system/used_spec.rb'
259
222
  - 'spec/facter/facts/el/networking/domain_spec.rb'
260
223
  - 'spec/facter/facts/el/networking/fqdn_spec.rb'
261
224
  - 'spec/facter/facts/el/networking/hostname_spec.rb'
262
225
  - 'spec/facter/facts/el/networking/interfaces_spec.rb'
263
226
  - 'spec/facter/facts/el/networking/ip_spec.rb'
264
227
  - 'spec/facter/facts/el/networking/primary_spec.rb'
265
- - 'spec/facter/facts/el/os/architecture_spec.rb'
266
- - 'spec/facter/facts/el/os/name_spec.rb'
267
- - 'spec/facter/facts/el/os/release_spec.rb'
268
- - 'spec/facter/facts/el/ruby/version_spec.rb'
269
228
  - 'spec/facter/facts/macosx/filesystems_spec.rb'
270
- - 'spec/facter/facts/macosx/identity/gid_spec.rb'
271
- - 'spec/facter/facts/macosx/identity/group_spec.rb'
272
229
  - 'spec/facter/facts/macosx/identity/privileged_spec.rb'
273
- - 'spec/facter/facts/macosx/identity/uid_spec.rb'
274
- - 'spec/facter/facts/macosx/identity/user_spec.rb'
275
230
  - 'spec/facter/facts/macosx/is_virtual_spec.rb'
276
- - 'spec/facter/facts/macosx/memory/swap/available_spec.rb'
277
- - 'spec/facter/facts/macosx/memory/swap/total_spec.rb'
278
231
  - 'spec/facter/facts/macosx/memory/swap/used_spec.rb'
279
- - 'spec/facter/facts/macosx/memory/system/available_spec.rb'
280
- - 'spec/facter/facts/macosx/memory/system/total_spec.rb'
281
232
  - 'spec/facter/facts/macosx/memory/system/used_spec.rb'
282
233
  - 'spec/facter/facts/macosx/mountpoints_spec.rb'
283
234
  - 'spec/facter/facts/macosx/networking/domain_spec.rb'
@@ -287,27 +238,6 @@ RSpec/MessageSpies:
287
238
  - 'spec/facter/facts/macosx/os/family_spec.rb'
288
239
  - 'spec/facter/facts/macosx/os/name_spec.rb'
289
240
  - 'spec/facter/facts/macosx/ruby/version_spec.rb'
290
- - 'spec/facter/facts/macosx/system_profiler/boot_mode_spec.rb'
291
- - 'spec/facter/facts/macosx/system_profiler/boot_rom_version_spec.rb'
292
- - 'spec/facter/facts/macosx/system_profiler/boot_volume_spec.rb'
293
- - 'spec/facter/facts/macosx/system_profiler/computer_name_spec.rb'
294
- - 'spec/facter/facts/macosx/system_profiler/cores_spec.rb'
295
- - 'spec/facter/facts/macosx/system_profiler/hardware_uuid_spec.rb'
296
- - 'spec/facter/facts/macosx/system_profiler/kernel_version_spec.rb'
297
- - 'spec/facter/facts/macosx/system_profiler/l2_cache_per_core_spec.rb'
298
- - 'spec/facter/facts/macosx/system_profiler/l3_cache_spec.rb'
299
- - 'spec/facter/facts/macosx/system_profiler/memory_spec.rb'
300
- - 'spec/facter/facts/macosx/system_profiler/model_identifier_spec.rb'
301
- - 'spec/facter/facts/macosx/system_profiler/model_name_spec.rb'
302
- - 'spec/facter/facts/macosx/system_profiler/processor_name_spec.rb'
303
- - 'spec/facter/facts/macosx/system_profiler/processor_speed_spec.rb'
304
- - 'spec/facter/facts/macosx/system_profiler/processors_spec.rb'
305
- - 'spec/facter/facts/macosx/system_profiler/secure_virtual_memory_spec.rb'
306
- - 'spec/facter/facts/macosx/system_profiler/serial_number_spec.rb'
307
- - 'spec/facter/facts/macosx/system_profiler/smc_version_spec.rb'
308
- - 'spec/facter/facts/macosx/system_profiler/system_version_spec.rb'
309
- - 'spec/facter/facts/macosx/system_profiler/uptime_spec.rb'
310
- - 'spec/facter/facts/macosx/system_profiler/username_spec.rb'
311
241
  - 'spec/facter/facts/sles/facterversion_spec.rb'
312
242
  - 'spec/facter/facts/sles/networking/domain_spec.rb'
313
243
  - 'spec/facter/facts/sles/networking/fqdn_spec.rb'
@@ -318,7 +248,6 @@ RSpec/MessageSpies:
318
248
  - 'spec/facter/facts/sles/os/architecture_spec.rb'
319
249
  - 'spec/facter/facts/sles/os/name_spec.rb'
320
250
  - 'spec/facter/facts/sles/os/release_spec.rb'
321
- - 'spec/facter/facts/sles/ruby/version_spec.rb'
322
251
  - 'spec/facter/facts/solaris/facterversion_spec.rb'
323
252
  - 'spec/facter/facts/solaris/networking/domain_spec.rb'
324
253
  - 'spec/facter/facts/solaris/networking/fqdn_spec.rb'
@@ -335,7 +264,6 @@ RSpec/MessageSpies:
335
264
  - 'spec/facter/facts/windows/dmi/product/uuid_spec.rb'
336
265
  - 'spec/facter/facts/windows/fips_enabled_spec.rb'
337
266
  - 'spec/facter/facts/windows/identity/user_spec.rb'
338
- - 'spec/facter/facts/windows/interfaces_spec.rb'
339
267
  - 'spec/facter/facts/windows/ipaddress6_interfaces_spec.rb'
340
268
  - 'spec/facter/facts/windows/ipaddress_interfaces_spec.rb'
341
269
  - 'spec/facter/facts/windows/macaddress_interfaces_spec.rb'
@@ -368,7 +296,6 @@ RSpec/MessageSpies:
368
296
  - 'spec/facter/facts/windows/os/windows/product_name_spec.rb'
369
297
  - 'spec/facter/facts/windows/os/windows/release_id_spec.rb'
370
298
  - 'spec/facter/facts/windows/os/windows/system32_spec.rb'
371
- - 'spec/facter/facts/windows/processor_spec.rb'
372
299
  - 'spec/facter/facts/windows/processors/count_spec.rb'
373
300
  - 'spec/facter/facts/windows/processors/isa_spec.rb'
374
301
  - 'spec/facter/facts/windows/processors/physicalcount_spec.rb'
@@ -391,35 +318,31 @@ RSpec/MessageSpies:
391
318
  - 'spec/framework/core/fact_loaders/external_fact_loader_spec.rb'
392
319
  - 'spec/framework/detector/os_detector_spec.rb'
393
320
 
394
- # Offense count: 142
321
+ # Offense count: 122
395
322
  # Configuration parameters: AggregateFailuresByDefault.
396
323
  RSpec/MultipleExpectations:
397
324
  Max: 9
398
325
 
399
- # Offense count: 250
326
+ # Offense count: 177
400
327
  # Configuration parameters: IgnoreSharedExamples.
401
328
  RSpec/NamedSubject:
402
329
  Exclude:
403
- - 'spec/custom_facts/core/aggregate_spec.rb'
404
330
  - 'spec/custom_facts/core/execution/fact_manager_spec.rb'
405
331
  - 'spec/custom_facts/core/execution/posix_spec.rb'
406
332
  - 'spec/custom_facts/core/execution/windows_spec.rb'
407
333
  - 'spec/custom_facts/core/execution_spec.rb'
408
334
  - 'spec/custom_facts/core/logging_spec.rb'
409
335
  - 'spec/custom_facts/core/resolvable_spec.rb'
410
- - 'spec/custom_facts/core/suitable_spec.rb'
411
336
  - 'spec/custom_facts/util/directory_loader_spec.rb'
412
337
  - 'spec/custom_facts/util/fact_spec.rb'
413
338
  - 'spec/custom_facts/util/normalization_spec.rb'
414
- - 'spec/custom_facts/util/resolution_spec.rb'
415
- - 'spec/facter/resolvers/linux/networking_linux_resolver_spec.rb'
416
339
  - 'spec/framework/core/options_spec.rb'
417
340
 
418
- # Offense count: 22
341
+ # Offense count: 29
419
342
  RSpec/NestedGroups:
420
343
  Max: 4
421
344
 
422
- # Offense count: 39
345
+ # Offense count: 33
423
346
  RSpec/SubjectStub:
424
347
  Exclude:
425
348
  - 'spec/custom_facts/core/aggregate_spec.rb'
@@ -431,7 +354,7 @@ RSpec/SubjectStub:
431
354
  - 'spec/custom_facts/util/fact_spec.rb'
432
355
  - 'spec/custom_facts/util/resolution_spec.rb'
433
356
 
434
- # Offense count: 349
357
+ # Offense count: 246
435
358
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
436
359
  RSpec/VerifiedDoubles:
437
360
  Exclude:
@@ -442,7 +365,6 @@ RSpec/VerifiedDoubles:
442
365
  - 'spec/custom_facts/util/fact_spec.rb'
443
366
  - 'spec/custom_facts/util/resolution_spec.rb'
444
367
  - 'spec/facter/facter_spec.rb'
445
- - 'spec/facter/facts/aix/augeas/version_spec.rb'
446
368
  - 'spec/facter/facts/aix/facterversion_spec.rb'
447
369
  - 'spec/facter/facts/aix/kernel_spec.rb'
448
370
  - 'spec/facter/facts/aix/kernelmajversion_spec.rb'
@@ -459,138 +381,37 @@ RSpec/VerifiedDoubles:
459
381
  - 'spec/facter/facts/debian/kernelmajversion_spec.rb'
460
382
  - 'spec/facter/facts/debian/kernelrelease_spec.rb'
461
383
  - 'spec/facter/facts/debian/kernelversion_spec.rb'
462
- - 'spec/facter/facts/debian/os/distro_spec.rb'
463
- - 'spec/facter/facts/debian/os/hardware_spec.rb'
464
- - 'spec/facter/facts/debian/os/selinux_spec.rb'
465
384
  - 'spec/facter/facts/debian/path_spec.rb'
466
- - 'spec/facter/facts/debian/ruby/platform_spec.rb'
467
- - 'spec/facter/facts/debian/ruby/sitedir_spec.rb'
468
- - 'spec/facter/facts/debian/timezone_spec.rb'
469
385
  - 'spec/facter/facts/el/facterversion_spec.rb'
470
386
  - 'spec/facter/facts/el/kernel_spec.rb'
471
387
  - 'spec/facter/facts/el/kernelmajversion_spec.rb'
472
388
  - 'spec/facter/facts/el/kernelrelease_spec.rb'
473
389
  - 'spec/facter/facts/el/kernelversion_spec.rb'
474
- - 'spec/facter/facts/el/memory/swap/available_bytes_spec.rb'
475
- - 'spec/facter/facts/el/memory/swap/available_spec.rb'
476
- - 'spec/facter/facts/el/memory/swap/capacity_spec.rb'
477
- - 'spec/facter/facts/el/memory/swap/total_bytes_spec.rb'
478
- - 'spec/facter/facts/el/memory/swap/total_spec.rb'
479
- - 'spec/facter/facts/el/memory/swap/used_bytes_spec.rb'
480
- - 'spec/facter/facts/el/memory/swap/used_spec.rb'
481
- - 'spec/facter/facts/el/memory/system/available_bytes_spec.rb'
482
- - 'spec/facter/facts/el/memory/system/available_spec.rb'
483
- - 'spec/facter/facts/el/memory/system/capacity_spec.rb'
484
- - 'spec/facter/facts/el/memory/system/total_bytes_spec.rb'
485
- - 'spec/facter/facts/el/memory/system/total_spec.rb'
486
- - 'spec/facter/facts/el/memory/system/used_bytes_spec.rb'
487
- - 'spec/facter/facts/el/memory/system/used_spec.rb'
488
- - 'spec/facter/facts/el/os/hardware_spec.rb'
489
- - 'spec/facter/facts/el/os/selinux_spec.rb'
490
390
  - 'spec/facter/facts/el/path_spec.rb'
491
- - 'spec/facter/facts/el/processors/count_spec.rb'
492
- - 'spec/facter/facts/el/processors/isa_spec.rb'
493
- - 'spec/facter/facts/el/processors/models_spec.rb'
494
- - 'spec/facter/facts/el/processors/physicalcount_spec.rb'
495
- - 'spec/facter/facts/el/ruby/platform_spec.rb'
496
- - 'spec/facter/facts/el/ruby/sitedir_spec.rb'
497
- - 'spec/facter/facts/el/system_uptime/days_spec.rb'
498
- - 'spec/facter/facts/el/system_uptime/hours_spec.rb'
499
- - 'spec/facter/facts/el/system_uptime/seconds_spec.rb'
500
- - 'spec/facter/facts/el/system_uptime/uptime_spec.rb'
501
- - 'spec/facter/facts/el/timezone_spec.rb'
502
- - 'spec/facter/facts/macosx/augeas_spec.rb'
503
- - 'spec/facter/facts/macosx/dmi/product/name_spec.rb'
504
391
  - 'spec/facter/facts/macosx/facterversion_spec.rb'
505
392
  - 'spec/facter/facts/macosx/filesystems_spec.rb'
506
- - 'spec/facter/facts/macosx/identity/gid_spec.rb'
507
- - 'spec/facter/facts/macosx/identity/group_spec.rb'
508
393
  - 'spec/facter/facts/macosx/identity/privileged_spec.rb'
509
- - 'spec/facter/facts/macosx/identity/uid_spec.rb'
510
- - 'spec/facter/facts/macosx/identity/user_spec.rb'
511
394
  - 'spec/facter/facts/macosx/kernel_spec.rb'
512
395
  - 'spec/facter/facts/macosx/kernelmajversion_spec.rb'
513
396
  - 'spec/facter/facts/macosx/kernelrelease_spec.rb'
514
397
  - 'spec/facter/facts/macosx/kernelversion_spec.rb'
515
- - 'spec/facter/facts/macosx/memory/swap/available_bytes_spec.rb'
516
- - 'spec/facter/facts/macosx/memory/swap/available_spec.rb'
517
398
  - 'spec/facter/facts/macosx/memory/swap/capacity_spec.rb'
518
- - 'spec/facter/facts/macosx/memory/swap/encrypted_spec.rb'
519
- - 'spec/facter/facts/macosx/memory/swap/total_bytes_spec.rb'
520
- - 'spec/facter/facts/macosx/memory/swap/total_spec.rb'
521
399
  - 'spec/facter/facts/macosx/memory/swap/used_bytes_spec.rb'
522
400
  - 'spec/facter/facts/macosx/memory/swap/used_spec.rb'
523
- - 'spec/facter/facts/macosx/memory/system/available_bytes_spec.rb'
524
- - 'spec/facter/facts/macosx/memory/system/available_spec.rb'
525
401
  - 'spec/facter/facts/macosx/memory/system/capacity_spec.rb'
526
- - 'spec/facter/facts/macosx/memory/system/total_bytes_spec.rb'
527
- - 'spec/facter/facts/macosx/memory/system/total_spec.rb'
528
402
  - 'spec/facter/facts/macosx/memory/system/used_bytes_spec.rb'
529
403
  - 'spec/facter/facts/macosx/memory/system/used_spec.rb'
530
- - 'spec/facter/facts/macosx/os/hardware_spec.rb'
531
- - 'spec/facter/facts/macosx/os/release_spec.rb'
532
404
  - 'spec/facter/facts/macosx/path_spec.rb'
533
- - 'spec/facter/facts/macosx/ruby/platform_spec.rb'
534
- - 'spec/facter/facts/macosx/ruby/sitedir_spec.rb'
535
- - 'spec/facter/facts/macosx/system_profiler/boot_mode_spec.rb'
536
- - 'spec/facter/facts/macosx/system_profiler/boot_rom_version_spec.rb'
537
- - 'spec/facter/facts/macosx/system_profiler/boot_volume_spec.rb'
538
- - 'spec/facter/facts/macosx/system_profiler/computer_name_spec.rb'
539
- - 'spec/facter/facts/macosx/system_profiler/cores_spec.rb'
540
- - 'spec/facter/facts/macosx/system_profiler/hardware_uuid_spec.rb'
541
- - 'spec/facter/facts/macosx/system_profiler/kernel_version_spec.rb'
542
- - 'spec/facter/facts/macosx/system_profiler/l2_cache_per_core_spec.rb'
543
- - 'spec/facter/facts/macosx/system_profiler/l3_cache_spec.rb'
544
- - 'spec/facter/facts/macosx/system_profiler/memory_spec.rb'
545
- - 'spec/facter/facts/macosx/system_profiler/model_identifier_spec.rb'
546
- - 'spec/facter/facts/macosx/system_profiler/model_name_spec.rb'
547
- - 'spec/facter/facts/macosx/system_profiler/processor_name_spec.rb'
548
- - 'spec/facter/facts/macosx/system_profiler/processor_speed_spec.rb'
549
- - 'spec/facter/facts/macosx/system_profiler/processors_spec.rb'
550
- - 'spec/facter/facts/macosx/system_profiler/secure_virtual_memory_spec.rb'
551
- - 'spec/facter/facts/macosx/system_profiler/serial_number_spec.rb'
552
- - 'spec/facter/facts/macosx/system_profiler/smc_version_spec.rb'
553
- - 'spec/facter/facts/macosx/system_profiler/system_version_spec.rb'
554
- - 'spec/facter/facts/macosx/system_profiler/uptime_spec.rb'
555
- - 'spec/facter/facts/macosx/system_profiler/username_spec.rb'
556
- - 'spec/facter/facts/macosx/system_uptime/days_spec.rb'
557
- - 'spec/facter/facts/macosx/system_uptime/hours_spec.rb'
558
- - 'spec/facter/facts/macosx/system_uptime/seconds_spec.rb'
559
- - 'spec/facter/facts/macosx/system_uptime/uptime_spec.rb'
560
- - 'spec/facter/facts/macosx/timezone_spec.rb'
561
405
  - 'spec/facter/facts/sles/kernel_spec.rb'
562
406
  - 'spec/facter/facts/sles/kernelmajversion_spec.rb'
563
407
  - 'spec/facter/facts/sles/kernelrelease_spec.rb'
564
408
  - 'spec/facter/facts/sles/kernelversion_spec.rb'
565
- - 'spec/facter/facts/sles/memory/swap/available_bytes_spec.rb'
566
- - 'spec/facter/facts/sles/memory/swap/available_spec.rb'
567
- - 'spec/facter/facts/sles/memory/swap/capacity_spec.rb'
568
- - 'spec/facter/facts/sles/memory/swap/total_bytes_spec.rb'
569
- - 'spec/facter/facts/sles/memory/swap/total_spec.rb'
570
- - 'spec/facter/facts/sles/memory/swap/used_bytes_spec.rb'
571
- - 'spec/facter/facts/sles/memory/swap/used_spec.rb'
572
- - 'spec/facter/facts/sles/memory/system/available_bytes_spec.rb'
573
- - 'spec/facter/facts/sles/memory/system/available_spec.rb'
574
- - 'spec/facter/facts/sles/memory/system/capacity_spec.rb'
575
- - 'spec/facter/facts/sles/memory/system/total_bytes_spec.rb'
576
- - 'spec/facter/facts/sles/memory/system/total_spec.rb'
577
- - 'spec/facter/facts/sles/memory/system/used_bytes_spec.rb'
578
- - 'spec/facter/facts/sles/memory/system/used_spec.rb'
579
- - 'spec/facter/facts/sles/os/hardware_spec.rb'
580
- - 'spec/facter/facts/sles/os/selinux_spec.rb'
581
409
  - 'spec/facter/facts/sles/path_spec.rb'
582
- - 'spec/facter/facts/sles/ruby/platform_spec.rb'
583
- - 'spec/facter/facts/sles/ruby/sitedir_spec.rb'
584
- - 'spec/facter/facts/sles/ssh_spec.rb'
585
- - 'spec/facter/facts/sles/timezone_spec.rb'
586
410
  - 'spec/facter/facts/solaris/kernel_spec.rb'
587
411
  - 'spec/facter/facts/solaris/kernelmajversion_spec.rb'
588
412
  - 'spec/facter/facts/solaris/kernelrelease_spec.rb'
589
413
  - 'spec/facter/facts/solaris/kernelversion_spec.rb'
590
- - 'spec/facter/facts/solaris/os/hardware_spec.rb'
591
414
  - 'spec/facter/facts/solaris/path_spec.rb'
592
- - 'spec/facter/facts/solaris/solaris_zones/current_spec.rb'
593
- - 'spec/facter/facts/solaris/solaris_zones/zone_spec.rb'
594
415
  - 'spec/facter/facts/windows/dmi/product/serial_number_spec.rb'
595
416
  - 'spec/facter/facts/windows/facterversion_spec.rb'
596
417
  - 'spec/facter/facts/windows/hypervisors/hyperv_spec.rb'
@@ -608,7 +429,6 @@ RSpec/VerifiedDoubles:
608
429
  - 'spec/facter/facts/windows/networking/primary_spec.rb'
609
430
  - 'spec/facter/facts/windows/path_spec.rb'
610
431
  - 'spec/facter/facts/windows/processors/models_spec.rb'
611
- - 'spec/facter/facts/windows/timezone_spec.rb'
612
432
  - 'spec/facter/facts/windows/virtualization/is_virtual_spec.rb'
613
433
  - 'spec/facter/facts/windows/virtualization/virtual_spec.rb'
614
434
  - 'spec/facter/query_parser_spec.rb'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.9.pre
1
+ 4.0.10.pre
@@ -44,6 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency 'rubocop-rspec', '~> 1.38'
45
45
  spec.add_development_dependency 'rubycritic', '~> 4.1.0'
46
46
  spec.add_development_dependency 'sys-filesystem', '~> 1.3'
47
+ spec.add_development_dependency 'yard', '~> 0.9'
47
48
 
48
49
  spec.add_runtime_dependency 'hocon', '~> 1.3'
49
50
  spec.add_runtime_dependency 'thor', ['>= 1.0.1', '< 2.0']
@@ -49,12 +49,10 @@ module LegacyFacter
49
49
  end
50
50
 
51
51
  def options(options)
52
- @name = options.delete(:name) if options[:name]
53
-
54
- @timeout = options.delete(:timeout) if options.key?(:timeout)
55
-
56
- @weight = options.delete(:has_weight) if options.key?(:has_weight)
57
-
52
+ accepted_option = %i[name timeout weight fact_type]
53
+ accepted_option.each do |option_name|
54
+ instance_variable_set("@#{option_name}", options.delete(option_name)) if options.key?(option_name)
55
+ end
58
56
  raise ArgumentError, "Invalid aggregate options #{options.keys.inspect}" unless options.keys.empty?
59
57
  end
60
58
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module LegacyFacter
3
+ module Facter
4
4
  module Core
5
5
  module Execution
6
6
  # require_relative 'execution/base'
@@ -42,45 +42,36 @@ module LegacyFacter
42
42
 
43
43
  if expanded_command.nil?
44
44
  if on_fail == :raise
45
- raise LegacyFacter::Core::Execution::ExecutionFailure.new,
45
+ raise Facter::Core::Execution::ExecutionFailure.new,
46
46
  "Could not execute '#{command}': command not found"
47
47
  end
48
48
 
49
49
  return on_fail
50
50
  end
51
51
 
52
- out = ''
53
-
54
52
  begin
55
- wait_for_child = true
56
- out = `#{expanded_command}`.chomp
57
- wait_for_child = false
53
+ out, stderr, _status_ = Open3.capture3(expanded_command.to_s)
54
+ log_stderr_from_file(stderr, expanded_command)
58
55
  rescue StandardError => e
59
56
  return on_fail unless on_fail == :raise
60
57
 
61
- raise LegacyFacter::Core::Execution::ExecutionFailure.new,
58
+ raise Facter::Core::Execution::ExecutionFailure.new,
62
59
  "Failed while executing '#{expanded_command}': #{e.message}"
63
- ensure
64
- if wait_for_child
65
- # We need to ensure that if this command exits early then any spawned
66
- # children will be reaped. Process execution is frequently
67
- # terminated using Timeout.timeout but since the timeout isn't in
68
- # this scope we can't rescue the raised exception. The best that
69
- # we can do is determine if the child has exited, and if it hasn't
70
- # then we need to spawn a thread to wait for the child.
71
- #
72
- # Due to the limitations of Ruby 1.8 there aren't good ways to
73
- # asynchronously run a command and grab the PID of that command
74
- # using the standard library. The best we can do is blindly wait
75
- # on all processes and hope for the best. This issue is described
76
- # at https://tickets.puppetlabs.com/browse/FACT-150
77
- Thread.new { Process.waitall }
78
- end
79
60
  end
80
61
 
81
- out
62
+ out.strip
82
63
  end
83
64
  end
65
+
66
+ private
67
+
68
+ def log_stderr_from_file(msg, command)
69
+ return if !msg || msg.empty?
70
+
71
+ file_name = command.split('/').last
72
+ logger = Facter::Log.new(file_name)
73
+ logger.warn(msg.strip)
74
+ end
84
75
  end
85
76
  end
86
77
  end