facter 3.12.2.cfacter.20181217 → 4.0.7.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1564) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +56 -0
  3. data/.jrubyrc +2 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +122 -0
  6. data/.rubycritic.yml +4 -0
  7. data/.travis.yml +39 -0
  8. data/CODEOWNERS +2 -0
  9. data/Gemfile +7 -0
  10. data/LICENSE +21 -0
  11. data/README.md +47 -0
  12. data/Rakefile +9 -0
  13. data/VERSION +1 -0
  14. data/agent/facter-ng.gemspec +48 -0
  15. data/agent/lib/facter-ng.rb +7 -0
  16. data/bin/facter +6 -0
  17. data/block_groups.conf +14 -0
  18. data/check.sh +12 -0
  19. data/config/config.rb +6 -0
  20. data/custom_facts/my_custom_fact.rb +9 -0
  21. data/custom_facts/my_custom_os_fact.rb +8 -0
  22. data/docs/diagrams/facter_user_interaction.png +0 -0
  23. data/external_facts/my_external_fact.txt +1 -0
  24. data/facter.conf +21 -0
  25. data/facter.gemspec +48 -0
  26. data/lib/custom_facts/core/aggregate.rb +208 -0
  27. data/lib/custom_facts/core/directed_graph.rb +47 -0
  28. data/lib/custom_facts/core/execution.rb +122 -0
  29. data/lib/custom_facts/core/execution/base.rb +87 -0
  30. data/lib/custom_facts/core/execution/posix.rb +55 -0
  31. data/lib/custom_facts/core/execution/windows.rb +63 -0
  32. data/lib/custom_facts/core/file_loader.rb +30 -0
  33. data/lib/custom_facts/core/legacy_facter.rb +260 -0
  34. data/lib/custom_facts/core/logging.rb +200 -0
  35. data/lib/custom_facts/core/resolvable.rb +99 -0
  36. data/lib/custom_facts/core/suitable.rb +109 -0
  37. data/lib/custom_facts/util/collection.rb +179 -0
  38. data/lib/custom_facts/util/composite_loader.rb +18 -0
  39. data/lib/custom_facts/util/config.rb +82 -0
  40. data/lib/custom_facts/util/confine.rb +70 -0
  41. data/lib/custom_facts/util/directory_loader.rb +85 -0
  42. data/lib/custom_facts/util/fact.rb +210 -0
  43. data/lib/custom_facts/util/loader.rb +153 -0
  44. data/lib/custom_facts/util/normalization.rb +95 -0
  45. data/lib/custom_facts/util/nothing_loader.rb +12 -0
  46. data/lib/custom_facts/util/parser.rb +174 -0
  47. data/lib/custom_facts/util/resolution.rb +147 -0
  48. data/lib/custom_facts/util/unix_root.rb +11 -0
  49. data/lib/custom_facts/util/values.rb +109 -0
  50. data/lib/custom_facts/util/windows_root.rb +11 -0
  51. data/lib/custom_facts/version.rb +85 -0
  52. data/lib/facter.rb +159 -0
  53. data/lib/facts/aix/augeas/version.rb +14 -0
  54. data/lib/facts/aix/facterversion.rb +15 -0
  55. data/lib/facts/aix/hypervisors/lpar.rb +18 -0
  56. data/lib/facts/aix/hypervisors/wpar.rb +16 -0
  57. data/lib/facts/aix/kernel.rb +15 -0
  58. data/lib/facts/aix/kernelmajversion.rb +16 -0
  59. data/lib/facts/aix/kernelrelease.rb +15 -0
  60. data/lib/facts/aix/kernelversion.rb +16 -0
  61. data/lib/facts/aix/load_averages.rb +14 -0
  62. data/lib/facts/aix/networking/domain.rb +15 -0
  63. data/lib/facts/aix/networking/fqdn.rb +15 -0
  64. data/lib/facts/aix/networking/hostname.rb +15 -0
  65. data/lib/facts/aix/networking/ip.rb +16 -0
  66. data/lib/facts/aix/networking/primary.rb +15 -0
  67. data/lib/facts/aix/os/architecture.rb +16 -0
  68. data/lib/facts/aix/os/family.rb +16 -0
  69. data/lib/facts/aix/os/hardware.rb +15 -0
  70. data/lib/facts/aix/os/name.rb +16 -0
  71. data/lib/facts/aix/os/release.rb +19 -0
  72. data/lib/facts/aix/path.rb +14 -0
  73. data/lib/facts/aix/ruby/platform.rb +14 -0
  74. data/lib/facts/aix/ruby/sitedir.rb +14 -0
  75. data/lib/facts/aix/ruby/version.rb +15 -0
  76. data/lib/facts/aix/ssh.rb +34 -0
  77. data/lib/facts/base/network_interface.rb +9 -0
  78. data/lib/facts/debian/facterversion.rb +15 -0
  79. data/lib/facts/debian/kernel.rb +15 -0
  80. data/lib/facts/debian/kernelmajversion.rb +24 -0
  81. data/lib/facts/debian/kernelrelease.rb +14 -0
  82. data/lib/facts/debian/kernelversion.rb +15 -0
  83. data/lib/facts/debian/memory/swap/available.rb +15 -0
  84. data/lib/facts/debian/memory/swap/available_bytes.rb +14 -0
  85. data/lib/facts/debian/memory/swap/capacity.rb +14 -0
  86. data/lib/facts/debian/memory/swap/used.rb +15 -0
  87. data/lib/facts/debian/memory/swap/used_bytes.rb +14 -0
  88. data/lib/facts/debian/networking/domain.rb +15 -0
  89. data/lib/facts/debian/networking/fqdn.rb +15 -0
  90. data/lib/facts/debian/networking/hostname.rb +15 -0
  91. data/lib/facts/debian/networking/interfaces.rb +14 -0
  92. data/lib/facts/debian/networking/ip.rb +16 -0
  93. data/lib/facts/debian/networking/primary.rb +15 -0
  94. data/lib/facts/debian/os/architecture.rb +17 -0
  95. data/lib/facts/debian/os/distro.rb +29 -0
  96. data/lib/facts/debian/os/family.rb +17 -0
  97. data/lib/facts/debian/os/hardware.rb +15 -0
  98. data/lib/facts/debian/os/name.rb +16 -0
  99. data/lib/facts/debian/os/release.rb +24 -0
  100. data/lib/facts/debian/os/selinux.rb +21 -0
  101. data/lib/facts/debian/path.rb +15 -0
  102. data/lib/facts/debian/ruby/platform.rb +15 -0
  103. data/lib/facts/debian/ruby/sitedir.rb +15 -0
  104. data/lib/facts/debian/ruby/version.rb +16 -0
  105. data/lib/facts/debian/system_uptime/system_uptime_days.rb +15 -0
  106. data/lib/facts/debian/system_uptime/system_uptime_hours.rb +15 -0
  107. data/lib/facts/debian/system_uptime/system_uptime_minutes.rb +15 -0
  108. data/lib/facts/debian/system_uptime/system_uptime_uptime.rb +15 -0
  109. data/lib/facts/debian/timezone.rb +14 -0
  110. data/lib/facts/el/disks.rb +15 -0
  111. data/lib/facts/el/dmi/bios/release_date.rb +14 -0
  112. data/lib/facts/el/dmi/bios/vendor.rb +14 -0
  113. data/lib/facts/el/dmi/bios/version.rb +14 -0
  114. data/lib/facts/el/dmi/board/manufacturer.rb +14 -0
  115. data/lib/facts/el/dmi/board/product.rb +14 -0
  116. data/lib/facts/el/dmi/board/serial_number.rb +14 -0
  117. data/lib/facts/el/dmi/chassis/asset_tag.rb +14 -0
  118. data/lib/facts/el/dmi/chassis/type.rb +14 -0
  119. data/lib/facts/el/dmi/manufacturer.rb +14 -0
  120. data/lib/facts/el/dmi/product/name.rb +14 -0
  121. data/lib/facts/el/dmi/product/serial_number.rb +14 -0
  122. data/lib/facts/el/dmi/product/uuid.rb +14 -0
  123. data/lib/facts/el/facterversion.rb +14 -0
  124. data/lib/facts/el/filesystems.rb +14 -0
  125. data/lib/facts/el/fips_enabled.rb +14 -0
  126. data/lib/facts/el/kernel.rb +14 -0
  127. data/lib/facts/el/kernelmajversion.rb +23 -0
  128. data/lib/facts/el/kernelrelease.rb +14 -0
  129. data/lib/facts/el/kernelversion.rb +21 -0
  130. data/lib/facts/el/load_averages.rb +14 -0
  131. data/lib/facts/el/memory/swap/available.rb +15 -0
  132. data/lib/facts/el/memory/swap/available_bytes.rb +14 -0
  133. data/lib/facts/el/memory/swap/capacity.rb +14 -0
  134. data/lib/facts/el/memory/swap/total.rb +15 -0
  135. data/lib/facts/el/memory/swap/total_bytes.rb +14 -0
  136. data/lib/facts/el/memory/swap/used.rb +15 -0
  137. data/lib/facts/el/memory/swap/used_bytes.rb +14 -0
  138. data/lib/facts/el/memory/system/available.rb +15 -0
  139. data/lib/facts/el/memory/system/available_bytes.rb +14 -0
  140. data/lib/facts/el/memory/system/capacity.rb +14 -0
  141. data/lib/facts/el/memory/system/total.rb +15 -0
  142. data/lib/facts/el/memory/system/total_bytes.rb +14 -0
  143. data/lib/facts/el/memory/system/used.rb +15 -0
  144. data/lib/facts/el/memory/system/used_bytes.rb +14 -0
  145. data/lib/facts/el/mountpoints.rb +21 -0
  146. data/lib/facts/el/networking/domain.rb +15 -0
  147. data/lib/facts/el/networking/fqdn.rb +15 -0
  148. data/lib/facts/el/networking/hostname.rb +15 -0
  149. data/lib/facts/el/networking/interfaces.rb +14 -0
  150. data/lib/facts/el/networking/ip.rb +16 -0
  151. data/lib/facts/el/networking/primary.rb +15 -0
  152. data/lib/facts/el/os/architecture.rb +16 -0
  153. data/lib/facts/el/os/family.rb +14 -0
  154. data/lib/facts/el/os/hardware.rb +15 -0
  155. data/lib/facts/el/os/name.rb +17 -0
  156. data/lib/facts/el/os/release.rb +18 -0
  157. data/lib/facts/el/os/selinux.rb +21 -0
  158. data/lib/facts/el/path.rb +14 -0
  159. data/lib/facts/el/processors/count.rb +14 -0
  160. data/lib/facts/el/processors/isa.rb +23 -0
  161. data/lib/facts/el/processors/models.rb +14 -0
  162. data/lib/facts/el/processors/physicalcount.rb +14 -0
  163. data/lib/facts/el/ruby/platform.rb +14 -0
  164. data/lib/facts/el/ruby/sitedir.rb +14 -0
  165. data/lib/facts/el/ruby/version.rb +15 -0
  166. data/lib/facts/el/ssh.rb +26 -0
  167. data/lib/facts/el/system_uptime/days.rb +14 -0
  168. data/lib/facts/el/system_uptime/hours.rb +14 -0
  169. data/lib/facts/el/system_uptime/seconds.rb +14 -0
  170. data/lib/facts/el/system_uptime/uptime.rb +14 -0
  171. data/lib/facts/el/timezone.rb +14 -0
  172. data/lib/facts/macosx/augeas.rb +14 -0
  173. data/lib/facts/macosx/count.rb +14 -0
  174. data/lib/facts/macosx/dmi/product/name.rb +14 -0
  175. data/lib/facts/macosx/facterversion.rb +15 -0
  176. data/lib/facts/macosx/filesystems.rb +14 -0
  177. data/lib/facts/macosx/identity/gid.rb +14 -0
  178. data/lib/facts/macosx/identity/group.rb +14 -0
  179. data/lib/facts/macosx/identity/privileged.rb +14 -0
  180. data/lib/facts/macosx/identity/uid.rb +14 -0
  181. data/lib/facts/macosx/identity/user.rb +14 -0
  182. data/lib/facts/macosx/is_virtual.rb +30 -0
  183. data/lib/facts/macosx/isa.rb +14 -0
  184. data/lib/facts/macosx/kernel.rb +14 -0
  185. data/lib/facts/macosx/kernelmajversion.rb +15 -0
  186. data/lib/facts/macosx/kernelrelease.rb +14 -0
  187. data/lib/facts/macosx/kernelversion.rb +14 -0
  188. data/lib/facts/macosx/load_averages.rb +14 -0
  189. data/lib/facts/macosx/memory/swap/available.rb +16 -0
  190. data/lib/facts/macosx/memory/swap/available_bytes.rb +14 -0
  191. data/lib/facts/macosx/memory/swap/capacity.rb +14 -0
  192. data/lib/facts/macosx/memory/swap/encrypted.rb +14 -0
  193. data/lib/facts/macosx/memory/swap/total.rb +16 -0
  194. data/lib/facts/macosx/memory/swap/total_bytes.rb +14 -0
  195. data/lib/facts/macosx/memory/swap/used.rb +16 -0
  196. data/lib/facts/macosx/memory/swap/used_bytes.rb +14 -0
  197. data/lib/facts/macosx/memory/system/available.rb +16 -0
  198. data/lib/facts/macosx/memory/system/available_bytes.rb +14 -0
  199. data/lib/facts/macosx/memory/system/capacity.rb +14 -0
  200. data/lib/facts/macosx/memory/system/total.rb +16 -0
  201. data/lib/facts/macosx/memory/system/total_bytes.rb +14 -0
  202. data/lib/facts/macosx/memory/system/used.rb +16 -0
  203. data/lib/facts/macosx/memory/system/used_bytes.rb +14 -0
  204. data/lib/facts/macosx/models.rb +14 -0
  205. data/lib/facts/macosx/mountpoints.rb +16 -0
  206. data/lib/facts/macosx/network_ip.rb +13 -0
  207. data/lib/facts/macosx/networking/domain.rb +15 -0
  208. data/lib/facts/macosx/networking/fqdn.rb +15 -0
  209. data/lib/facts/macosx/networking/hostname.rb +15 -0
  210. data/lib/facts/macosx/networking/ipaddress.rb +14 -0
  211. data/lib/facts/macosx/os/architecture.rb +15 -0
  212. data/lib/facts/macosx/os/family.rb +16 -0
  213. data/lib/facts/macosx/os/hardware.rb +14 -0
  214. data/lib/facts/macosx/os/name.rb +16 -0
  215. data/lib/facts/macosx/os/release.rb +18 -0
  216. data/lib/facts/macosx/os/sw_vers/build.rb +15 -0
  217. data/lib/facts/macosx/os/sw_vers/product.rb +15 -0
  218. data/lib/facts/macosx/os/sw_vers/version.rb +17 -0
  219. data/lib/facts/macosx/path.rb +15 -0
  220. data/lib/facts/macosx/physicalcount.rb +14 -0
  221. data/lib/facts/macosx/processor_resolver.rb +71 -0
  222. data/lib/facts/macosx/ruby/platform.rb +15 -0
  223. data/lib/facts/macosx/ruby/sitedir.rb +15 -0
  224. data/lib/facts/macosx/ruby/version.rb +16 -0
  225. data/lib/facts/macosx/speed.rb +14 -0
  226. data/lib/facts/macosx/system_profiler/boot_mode.rb +14 -0
  227. data/lib/facts/macosx/system_profiler/boot_rom_version.rb +14 -0
  228. data/lib/facts/macosx/system_profiler/boot_volume.rb +14 -0
  229. data/lib/facts/macosx/system_profiler/computer_name.rb +14 -0
  230. data/lib/facts/macosx/system_profiler/cores.rb +14 -0
  231. data/lib/facts/macosx/system_profiler/hardware_uuid.rb +14 -0
  232. data/lib/facts/macosx/system_profiler/kernel_version.rb +14 -0
  233. data/lib/facts/macosx/system_profiler/l2_cache_per_core.rb +14 -0
  234. data/lib/facts/macosx/system_profiler/l3_cache.rb +14 -0
  235. data/lib/facts/macosx/system_profiler/memory.rb +14 -0
  236. data/lib/facts/macosx/system_profiler/model_identifier.rb +14 -0
  237. data/lib/facts/macosx/system_profiler/model_name.rb +14 -0
  238. data/lib/facts/macosx/system_profiler/processor_name.rb +14 -0
  239. data/lib/facts/macosx/system_profiler/processor_speed.rb +14 -0
  240. data/lib/facts/macosx/system_profiler/processors.rb +14 -0
  241. data/lib/facts/macosx/system_profiler/secure_virtual_memory.rb +14 -0
  242. data/lib/facts/macosx/system_profiler/serial_number.rb +14 -0
  243. data/lib/facts/macosx/system_profiler/smc_version.rb +14 -0
  244. data/lib/facts/macosx/system_profiler/system_version.rb +14 -0
  245. data/lib/facts/macosx/system_profiler/uptime.rb +14 -0
  246. data/lib/facts/macosx/system_profiler/username.rb +14 -0
  247. data/lib/facts/macosx/system_uptime/seconds.rb +14 -0
  248. data/lib/facts/macosx/system_uptime/system_uptime_days.rb +14 -0
  249. data/lib/facts/macosx/system_uptime/system_uptime_hours.rb +14 -0
  250. data/lib/facts/macosx/system_uptime/uptime.rb +14 -0
  251. data/lib/facts/macosx/timezone.rb +14 -0
  252. data/lib/facts/sles/facterversion.rb +14 -0
  253. data/lib/facts/sles/kernel.rb +14 -0
  254. data/lib/facts/sles/kernelmajversion.rb +15 -0
  255. data/lib/facts/sles/kernelrelease.rb +14 -0
  256. data/lib/facts/sles/kernelversion.rb +15 -0
  257. data/lib/facts/sles/memory/swap/available.rb +15 -0
  258. data/lib/facts/sles/memory/swap/available_bytes.rb +14 -0
  259. data/lib/facts/sles/memory/swap/capacity.rb +14 -0
  260. data/lib/facts/sles/memory/swap/total.rb +15 -0
  261. data/lib/facts/sles/memory/swap/total_bytes.rb +14 -0
  262. data/lib/facts/sles/memory/swap/used.rb +15 -0
  263. data/lib/facts/sles/memory/swap/used_bytes.rb +14 -0
  264. data/lib/facts/sles/memory/system/available.rb +15 -0
  265. data/lib/facts/sles/memory/system/available_bytes.rb +14 -0
  266. data/lib/facts/sles/memory/system/capacity.rb +14 -0
  267. data/lib/facts/sles/memory/system/total.rb +15 -0
  268. data/lib/facts/sles/memory/system/total_bytes.rb +14 -0
  269. data/lib/facts/sles/memory/system/used.rb +15 -0
  270. data/lib/facts/sles/memory/system/used_bytes.rb +14 -0
  271. data/lib/facts/sles/networking/domain.rb +15 -0
  272. data/lib/facts/sles/networking/fqdn.rb +15 -0
  273. data/lib/facts/sles/networking/hostname.rb +15 -0
  274. data/lib/facts/sles/networking/interfaces.rb +14 -0
  275. data/lib/facts/sles/networking/ip.rb +16 -0
  276. data/lib/facts/sles/networking/primary.rb +15 -0
  277. data/lib/facts/sles/os/architecture.rb +16 -0
  278. data/lib/facts/sles/os/family.rb +14 -0
  279. data/lib/facts/sles/os/hardware.rb +15 -0
  280. data/lib/facts/sles/os/name.rb +16 -0
  281. data/lib/facts/sles/os/release.rb +27 -0
  282. data/lib/facts/sles/os/selinux.rb +21 -0
  283. data/lib/facts/sles/path.rb +14 -0
  284. data/lib/facts/sles/ruby/platform.rb +14 -0
  285. data/lib/facts/sles/ruby/sitedir.rb +14 -0
  286. data/lib/facts/sles/ruby/version.rb +15 -0
  287. data/lib/facts/sles/ssh.rb +26 -0
  288. data/lib/facts/sles/timezone.rb +14 -0
  289. data/lib/facts/solaris/facterversion.rb +14 -0
  290. data/lib/facts/solaris/kernel.rb +14 -0
  291. data/lib/facts/solaris/kernelmajversion.rb +16 -0
  292. data/lib/facts/solaris/kernelrelease.rb +14 -0
  293. data/lib/facts/solaris/kernelversion.rb +14 -0
  294. data/lib/facts/solaris/networking/domain.rb +15 -0
  295. data/lib/facts/solaris/networking/fqdn.rb +15 -0
  296. data/lib/facts/solaris/networking/hostname.rb +15 -0
  297. data/lib/facts/solaris/networking/ipaddress.rb +14 -0
  298. data/lib/facts/solaris/os/architecture.rb +16 -0
  299. data/lib/facts/solaris/os/family.rb +14 -0
  300. data/lib/facts/solaris/os/hardware.rb +14 -0
  301. data/lib/facts/solaris/os/name.rb +17 -0
  302. data/lib/facts/solaris/os/release.rb +20 -0
  303. data/lib/facts/solaris/path.rb +14 -0
  304. data/lib/facts/solaris/ruby/platform.rb +14 -0
  305. data/lib/facts/solaris/ruby/sitedir.rb +14 -0
  306. data/lib/facts/solaris/ruby/version.rb +15 -0
  307. data/lib/facts/solaris/solaris_zones/current.rb +14 -0
  308. data/lib/facts/solaris/solaris_zones/zone.rb +25 -0
  309. data/lib/facts/windows/dhcp_servers.rb +23 -0
  310. data/lib/facts/windows/dmi/manufacturer.rb +16 -0
  311. data/lib/facts/windows/dmi/product/name.rb +16 -0
  312. data/lib/facts/windows/dmi/product/serial_number.rb +16 -0
  313. data/lib/facts/windows/dmi/product/uuid.rb +16 -0
  314. data/lib/facts/windows/facterversion.rb +15 -0
  315. data/lib/facts/windows/fips_enabled.rb +15 -0
  316. data/lib/facts/windows/hypervisors/hyperv.rb +22 -0
  317. data/lib/facts/windows/hypervisors/kvm.rb +34 -0
  318. data/lib/facts/windows/hypervisors/virtualbox.rb +35 -0
  319. data/lib/facts/windows/hypervisors/vmware.rb +22 -0
  320. data/lib/facts/windows/hypervisors/xen.rb +21 -0
  321. data/lib/facts/windows/identity/privileged.rb +15 -0
  322. data/lib/facts/windows/identity/user.rb +16 -0
  323. data/lib/facts/windows/interfaces.rb +15 -0
  324. data/lib/facts/windows/ipaddress6_interfaces.rb +19 -0
  325. data/lib/facts/windows/ipaddress_interfaces.rb +19 -0
  326. data/lib/facts/windows/kernel/kernel.rb +15 -0
  327. data/lib/facts/windows/kernel/kernel_maj_version.rb +15 -0
  328. data/lib/facts/windows/kernel/kernel_release.rb +15 -0
  329. data/lib/facts/windows/kernel/kernel_version.rb +15 -0
  330. data/lib/facts/windows/macaddress_interfaces.rb +19 -0
  331. data/lib/facts/windows/memory/system/available.rb +17 -0
  332. data/lib/facts/windows/memory/system/available_bytes.rb +17 -0
  333. data/lib/facts/windows/memory/system/capacity.rb +15 -0
  334. data/lib/facts/windows/memory/system/total.rb +17 -0
  335. data/lib/facts/windows/memory/system/total_bytes.rb +17 -0
  336. data/lib/facts/windows/memory/system/used.rb +16 -0
  337. data/lib/facts/windows/memory/system/used_bytes.rb +15 -0
  338. data/lib/facts/windows/mtu_interfaces.rb +19 -0
  339. data/lib/facts/windows/netmask6_interfaces.rb +19 -0
  340. data/lib/facts/windows/netmask_interfaces.rb +19 -0
  341. data/lib/facts/windows/network6_interfaces.rb +19 -0
  342. data/lib/facts/windows/network_interfaces.rb +19 -0
  343. data/lib/facts/windows/networking/dhcp.rb +15 -0
  344. data/lib/facts/windows/networking/domain.rb +16 -0
  345. data/lib/facts/windows/networking/fqdn.rb +20 -0
  346. data/lib/facts/windows/networking/hostname.rb +16 -0
  347. data/lib/facts/windows/networking/interfaces.rb +15 -0
  348. data/lib/facts/windows/networking/ip.rb +16 -0
  349. data/lib/facts/windows/networking/ip6.rb +16 -0
  350. data/lib/facts/windows/networking/mac.rb +16 -0
  351. data/lib/facts/windows/networking/mtu.rb +15 -0
  352. data/lib/facts/windows/networking/netmask.rb +16 -0
  353. data/lib/facts/windows/networking/netmask6.rb +16 -0
  354. data/lib/facts/windows/networking/network.rb +16 -0
  355. data/lib/facts/windows/networking/network6.rb +16 -0
  356. data/lib/facts/windows/networking/primary.rb +15 -0
  357. data/lib/facts/windows/networking/scope6.rb +15 -0
  358. data/lib/facts/windows/os/architecture.rb +16 -0
  359. data/lib/facts/windows/os/family.rb +16 -0
  360. data/lib/facts/windows/os/hardware.rb +16 -0
  361. data/lib/facts/windows/os/name.rb +16 -0
  362. data/lib/facts/windows/os/release.rb +33 -0
  363. data/lib/facts/windows/os/windows/edition_id.rb +16 -0
  364. data/lib/facts/windows/os/windows/installation_type.rb +16 -0
  365. data/lib/facts/windows/os/windows/product_name.rb +16 -0
  366. data/lib/facts/windows/os/windows/release_id.rb +16 -0
  367. data/lib/facts/windows/os/windows/system32.rb +16 -0
  368. data/lib/facts/windows/path.rb +15 -0
  369. data/lib/facts/windows/processor.rb +19 -0
  370. data/lib/facts/windows/processors/count.rb +16 -0
  371. data/lib/facts/windows/processors/isa.rb +16 -0
  372. data/lib/facts/windows/processors/models.rb +15 -0
  373. data/lib/facts/windows/processors/physicalcount.rb +16 -0
  374. data/lib/facts/windows/ruby/platform.rb +16 -0
  375. data/lib/facts/windows/ruby/sitedir.rb +16 -0
  376. data/lib/facts/windows/ruby/version.rb +16 -0
  377. data/lib/facts/windows/scope6_interfaces.rb +19 -0
  378. data/lib/facts/windows/system_uptime/system_uptime_days.rb +16 -0
  379. data/lib/facts/windows/system_uptime/system_uptime_hours.rb +16 -0
  380. data/lib/facts/windows/system_uptime/system_uptime_seconds.rb +16 -0
  381. data/lib/facts/windows/system_uptime/system_uptime_uptime.rb +16 -0
  382. data/lib/facts/windows/timezone.rb +15 -0
  383. data/lib/facts/windows/virtualization/is_virtual.rb +15 -0
  384. data/lib/facts/windows/virtualization/virtual.rb +15 -0
  385. data/lib/facts_utils/bytes_to_human_readable.rb +38 -0
  386. data/lib/facts_utils/uptime_parser.rb +121 -0
  387. data/lib/facts_utils/windows_release_finder.rb +51 -0
  388. data/lib/framework/cli/cli.rb +132 -0
  389. data/lib/framework/cli/cli_launcher.rb +17 -0
  390. data/lib/framework/config/block_list.rb +35 -0
  391. data/lib/framework/config/config_reader.rb +44 -0
  392. data/lib/framework/core/cache_manager.rb +19 -0
  393. data/lib/framework/core/fact/external/external_fact_manager.rb +31 -0
  394. data/lib/framework/core/fact/internal/core_fact.rb +15 -0
  395. data/lib/framework/core/fact/internal/internal_fact_manager.rb +45 -0
  396. data/lib/framework/core/fact_augmenter.rb +37 -0
  397. data/lib/framework/core/fact_filter.rb +36 -0
  398. data/lib/framework/core/fact_loaders/class_discoverer.rb +21 -0
  399. data/lib/framework/core/fact_loaders/external_fact_loader.rb +54 -0
  400. data/lib/framework/core/fact_loaders/fact_loader.rb +72 -0
  401. data/lib/framework/core/fact_loaders/internal_fact_loader.rb +52 -0
  402. data/lib/framework/core/fact_manager.rb +55 -0
  403. data/lib/framework/core/file_loader.rb +60 -0
  404. data/lib/framework/core/options.rb +68 -0
  405. data/lib/framework/core/options/config_file_options.rb +65 -0
  406. data/lib/framework/core/options/default_options.rb +32 -0
  407. data/lib/framework/core/options/helper_options.rb +40 -0
  408. data/lib/framework/core/options/options_validator.rb +42 -0
  409. data/lib/framework/core/options/priority_options.rb +12 -0
  410. data/lib/framework/detector/os_detector.rb +67 -0
  411. data/lib/framework/formatters/formatter_factory.rb +13 -0
  412. data/lib/framework/formatters/formatter_helper.rb +39 -0
  413. data/lib/framework/formatters/hocon_fact_formatter.rb +50 -0
  414. data/lib/framework/formatters/json_fact_formatter.rb +35 -0
  415. data/lib/framework/formatters/legacy_fact_formatter.rb +90 -0
  416. data/lib/framework/formatters/yaml_fact_formatter.rb +16 -0
  417. data/lib/framework/logging/legacy_logger.rb +31 -0
  418. data/lib/framework/logging/logger.rb +65 -0
  419. data/lib/framework/logging/multilogger.rb +115 -0
  420. data/lib/framework/parsers/query_parser.rb +99 -0
  421. data/lib/framework/utils/utils.rb +24 -0
  422. data/lib/models/fact_collection.rb +31 -0
  423. data/lib/models/loaded_fact.rb +13 -0
  424. data/lib/models/resolved_fact.rb +22 -0
  425. data/lib/models/searched_fact.rb +15 -0
  426. data/lib/resolvers/agent_resolver.rb +23 -0
  427. data/lib/resolvers/aix/architecture_resolver.rb +39 -0
  428. data/lib/resolvers/aix/ffi/ffi_helper.rb +35 -0
  429. data/lib/resolvers/aix/hardware_resolver.rb +39 -0
  430. data/lib/resolvers/aix/load_averages_resolver.rb +28 -0
  431. data/lib/resolvers/aix/networking_resolver.rb +34 -0
  432. data/lib/resolvers/aix/os_level_resolver.rb +26 -0
  433. data/lib/resolvers/aix/utils/odm_query.rb +41 -0
  434. data/lib/resolvers/augeas_resolver.rb +24 -0
  435. data/lib/resolvers/base_resolver.rb +33 -0
  436. data/lib/resolvers/debian_version_resolver.rb +34 -0
  437. data/lib/resolvers/disk_resolver.rb +47 -0
  438. data/lib/resolvers/dmi_resolver.rb +59 -0
  439. data/lib/resolvers/eos_release_resolver.rb +31 -0
  440. data/lib/resolvers/facterversion_resolver.rb +23 -0
  441. data/lib/resolvers/filesystems_resolver.rb +32 -0
  442. data/lib/resolvers/fips_enabled_resolver.rb +27 -0
  443. data/lib/resolvers/hostname_resolver.rb +46 -0
  444. data/lib/resolvers/identity_resolver.rb +31 -0
  445. data/lib/resolvers/load_averages_resolver.rb +27 -0
  446. data/lib/resolvers/lpar_resolver.rb +32 -0
  447. data/lib/resolvers/lsb_release_resolver.rb +34 -0
  448. data/lib/resolvers/macosx/dmi_resolver.rb +29 -0
  449. data/lib/resolvers/macosx/filesystems_resolver.rb +33 -0
  450. data/lib/resolvers/macosx/ipaddress_resolver.rb +40 -0
  451. data/lib/resolvers/macosx/load_averages_resolver.rb +27 -0
  452. data/lib/resolvers/macosx/mountpoints_resolver.rb +62 -0
  453. data/lib/resolvers/macosx/swap_memory_resolver.rb +43 -0
  454. data/lib/resolvers/macosx/system_memory_resolver.rb +46 -0
  455. data/lib/resolvers/macosx/system_profiler_resolver.rb +62 -0
  456. data/lib/resolvers/memory_resolver.rb +57 -0
  457. data/lib/resolvers/mountpoints_resolver.rb +62 -0
  458. data/lib/resolvers/networking_linux_resolver.rb +97 -0
  459. data/lib/resolvers/os_level_resolver.rb +28 -0
  460. data/lib/resolvers/os_release_resolver.rb +65 -0
  461. data/lib/resolvers/path_resolver.rb +22 -0
  462. data/lib/resolvers/processors_resolver.rb +56 -0
  463. data/lib/resolvers/redhat_release_resolver.rb +54 -0
  464. data/lib/resolvers/ruby_resolver.rb +25 -0
  465. data/lib/resolvers/selinux_resolver.rb +37 -0
  466. data/lib/resolvers/solaris/ipaddress_resolver.rb +40 -0
  467. data/lib/resolvers/solaris/solaris_os_release_resolver.rb +52 -0
  468. data/lib/resolvers/solaris/solaris_zone_name.rb +32 -0
  469. data/lib/resolvers/solaris/zone_resolver.rb +52 -0
  470. data/lib/resolvers/ssh_resolver.rb +76 -0
  471. data/lib/resolvers/suse_release_resolver.rb +33 -0
  472. data/lib/resolvers/sw_vers_resolver.rb +30 -0
  473. data/lib/resolvers/timezone_resolver.rb +22 -0
  474. data/lib/resolvers/uname_resolver.rb +42 -0
  475. data/lib/resolvers/uptime_resolver.rb +57 -0
  476. data/lib/resolvers/utils/filesystem_helper.rb +29 -0
  477. data/lib/resolvers/utils/fingerprint.rb +11 -0
  478. data/lib/resolvers/utils/ssh.rb +13 -0
  479. data/lib/resolvers/windows/dmi_bios_resolver.rb +41 -0
  480. data/lib/resolvers/windows/dmi_computersystem_resolver.rb +40 -0
  481. data/lib/resolvers/windows/ffi/ffi.rb +68 -0
  482. data/lib/resolvers/windows/ffi/hardware_ffi.rb +17 -0
  483. data/lib/resolvers/windows/ffi/identity_ffi.rb +15 -0
  484. data/lib/resolvers/windows/ffi/ip_adapter_addresses_lh.rb +161 -0
  485. data/lib/resolvers/windows/ffi/kernel_ffi.rb +14 -0
  486. data/lib/resolvers/windows/ffi/memory_ffi.rb +12 -0
  487. data/lib/resolvers/windows/ffi/network_utils.rb +64 -0
  488. data/lib/resolvers/windows/ffi/networking_ffi.rb +34 -0
  489. data/lib/resolvers/windows/ffi/os_version_info_ex.rb +17 -0
  490. data/lib/resolvers/windows/ffi/performance_information.rb +20 -0
  491. data/lib/resolvers/windows/ffi/system32_ffi.rb +18 -0
  492. data/lib/resolvers/windows/ffi/system_info.rb +30 -0
  493. data/lib/resolvers/windows/fips_resolver.rb +32 -0
  494. data/lib/resolvers/windows/hardware_architecture_resolver.rb +64 -0
  495. data/lib/resolvers/windows/identity_resolver.rb +57 -0
  496. data/lib/resolvers/windows/kernel_resolver.rb +42 -0
  497. data/lib/resolvers/windows/memory_resolver.rb +60 -0
  498. data/lib/resolvers/windows/netkvm_resolver.rb +31 -0
  499. data/lib/resolvers/windows/networking_resolver.rb +179 -0
  500. data/lib/resolvers/windows/processors_resolver.rb +65 -0
  501. data/lib/resolvers/windows/product_release_resolver.rb +36 -0
  502. data/lib/resolvers/windows/system32_resolver.rb +45 -0
  503. data/lib/resolvers/windows/uptime_resolver.rb +77 -0
  504. data/lib/resolvers/windows/utils/win32ole.rb +24 -0
  505. data/lib/resolvers/windows/virtualization_resolver.rb +65 -0
  506. data/lib/resolvers/windows/win_os_description_resolver.rb +31 -0
  507. data/lib/resolvers/wpar_resolver.rb +34 -0
  508. data/lib/util/fact.rb +14 -0
  509. data/tasks/create_fact.rake +19 -0
  510. data/tasks/fact_generator/fact.erb +14 -0
  511. data/tasks/fact_generator/fact_creator.rb +105 -0
  512. data/tasks/fact_generator/fact_spec.erb +18 -0
  513. data/tasks/fact_generator/facts.json +358 -0
  514. data/tasks/fact_generator/path.rb +10 -0
  515. metadata +659 -1065
  516. data/ext/facter/Makefile.erb +0 -31
  517. data/ext/facter/cpp-hocon/CMakeLists.txt +0 -67
  518. data/ext/facter/cpp-hocon/CONTRIBUTING.md +0 -9
  519. data/ext/facter/cpp-hocon/LICENSE +0 -17
  520. data/ext/facter/cpp-hocon/MAINTAINERS +0 -33
  521. data/ext/facter/cpp-hocon/README.md +0 -81
  522. data/ext/facter/cpp-hocon/acceptance/Gemfile +0 -18
  523. data/ext/facter/cpp-hocon/acceptance/Rakefile +0 -7
  524. data/ext/facter/cpp-hocon/acceptance/tests/fake.rb +0 -0
  525. data/ext/facter/cpp-hocon/appveyor.yml +0 -48
  526. data/ext/facter/cpp-hocon/lib/CMakeLists.txt +0 -94
  527. data/ext/facter/cpp-hocon/lib/Doxyfile.in +0 -2312
  528. data/ext/facter/cpp-hocon/lib/inc/hocon/config.hpp +0 -734
  529. data/ext/facter/cpp-hocon/lib/inc/hocon/config_exception.hpp +0 -184
  530. data/ext/facter/cpp-hocon/lib/inc/hocon/config_include_context.hpp +0 -51
  531. data/ext/facter/cpp-hocon/lib/inc/hocon/config_includer.hpp +0 -53
  532. data/ext/facter/cpp-hocon/lib/inc/hocon/config_includer_file.hpp +0 -30
  533. data/ext/facter/cpp-hocon/lib/inc/hocon/config_list.hpp +0 -51
  534. data/ext/facter/cpp-hocon/lib/inc/hocon/config_mergeable.hpp +0 -72
  535. data/ext/facter/cpp-hocon/lib/inc/hocon/config_object.hpp +0 -81
  536. data/ext/facter/cpp-hocon/lib/inc/hocon/config_origin.hpp +0 -98
  537. data/ext/facter/cpp-hocon/lib/inc/hocon/config_parse_options.hpp +0 -139
  538. data/ext/facter/cpp-hocon/lib/inc/hocon/config_parseable.hpp +0 -47
  539. data/ext/facter/cpp-hocon/lib/inc/hocon/config_render_options.hpp +0 -128
  540. data/ext/facter/cpp-hocon/lib/inc/hocon/config_resolve_options.hpp +0 -83
  541. data/ext/facter/cpp-hocon/lib/inc/hocon/config_syntax.hpp +0 -24
  542. data/ext/facter/cpp-hocon/lib/inc/hocon/config_value.hpp +0 -267
  543. data/ext/facter/cpp-hocon/lib/inc/hocon/config_value_factory.hpp +0 -48
  544. data/ext/facter/cpp-hocon/lib/inc/hocon/functional_list.hpp +0 -318
  545. data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_document.hpp +0 -95
  546. data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_document_factory.hpp +0 -39
  547. data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_node.hpp +0 -32
  548. data/ext/facter/cpp-hocon/lib/inc/hocon/path.hpp +0 -60
  549. data/ext/facter/cpp-hocon/lib/inc/hocon/program_options.hpp +0 -84
  550. data/ext/facter/cpp-hocon/lib/inc/hocon/types.hpp +0 -63
  551. data/ext/facter/cpp-hocon/lib/inc/internal/config_document_parser.hpp +0 -83
  552. data/ext/facter/cpp-hocon/lib/inc/internal/config_parser.hpp +0 -55
  553. data/ext/facter/cpp-hocon/lib/inc/internal/config_util.hpp +0 -17
  554. data/ext/facter/cpp-hocon/lib/inc/internal/container.hpp +0 -28
  555. data/ext/facter/cpp-hocon/lib/inc/internal/default_transformer.hpp +0 -12
  556. data/ext/facter/cpp-hocon/lib/inc/internal/full_includer.hpp +0 -13
  557. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/abstract_config_node.hpp +0 -16
  558. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/abstract_config_node_value.hpp +0 -12
  559. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_array.hpp +0 -17
  560. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_comment.hpp +0 -14
  561. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_complex_value.hpp +0 -25
  562. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_concatenation.hpp +0 -16
  563. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_field.hpp +0 -29
  564. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_include.hpp +0 -26
  565. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_object.hpp +0 -45
  566. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_path.hpp +0 -25
  567. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_root.hpp +0 -24
  568. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_simple_value.hpp +0 -21
  569. data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_single_token.hpp +0 -20
  570. data/ext/facter/cpp-hocon/lib/inc/internal/parseable.hpp +0 -128
  571. data/ext/facter/cpp-hocon/lib/inc/internal/path_builder.hpp +0 -20
  572. data/ext/facter/cpp-hocon/lib/inc/internal/path_parser.hpp +0 -55
  573. data/ext/facter/cpp-hocon/lib/inc/internal/replaceable_merge_stack.hpp +0 -14
  574. data/ext/facter/cpp-hocon/lib/inc/internal/resolve_context.hpp +0 -53
  575. data/ext/facter/cpp-hocon/lib/inc/internal/resolve_result.hpp +0 -21
  576. data/ext/facter/cpp-hocon/lib/inc/internal/resolve_source.hpp +0 -55
  577. data/ext/facter/cpp-hocon/lib/inc/internal/simple_config_document.hpp +0 -28
  578. data/ext/facter/cpp-hocon/lib/inc/internal/simple_config_origin.hpp +0 -67
  579. data/ext/facter/cpp-hocon/lib/inc/internal/simple_include_context.hpp +0 -22
  580. data/ext/facter/cpp-hocon/lib/inc/internal/simple_includer.hpp +0 -79
  581. data/ext/facter/cpp-hocon/lib/inc/internal/substitution_expression.hpp +0 -28
  582. data/ext/facter/cpp-hocon/lib/inc/internal/token.hpp +0 -45
  583. data/ext/facter/cpp-hocon/lib/inc/internal/tokenizer.hpp +0 -143
  584. data/ext/facter/cpp-hocon/lib/inc/internal/tokens.hpp +0 -135
  585. data/ext/facter/cpp-hocon/lib/inc/internal/unmergeable.hpp +0 -20
  586. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_boolean.hpp +0 -26
  587. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_concatenation.hpp +0 -59
  588. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_delayed_merge.hpp +0 -53
  589. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_delayed_merge_object.hpp +0 -59
  590. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_double.hpp +0 -28
  591. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_int.hpp +0 -25
  592. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_long.hpp +0 -28
  593. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_null.hpp +0 -33
  594. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_number.hpp +0 -38
  595. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_reference.hpp +0 -38
  596. data/ext/facter/cpp-hocon/lib/inc/internal/values/config_string.hpp +0 -32
  597. data/ext/facter/cpp-hocon/lib/inc/internal/values/simple_config_list.hpp +0 -75
  598. data/ext/facter/cpp-hocon/lib/inc/internal/values/simple_config_object.hpp +0 -107
  599. data/ext/facter/cpp-hocon/lib/namespaces.dox.in +0 -6
  600. data/ext/facter/cpp-hocon/lib/src/config.cc +0 -573
  601. data/ext/facter/cpp-hocon/lib/src/config_document_factory.cc +0 -24
  602. data/ext/facter/cpp-hocon/lib/src/config_document_parser.cc +0 -620
  603. data/ext/facter/cpp-hocon/lib/src/config_parse_options.cc +0 -101
  604. data/ext/facter/cpp-hocon/lib/src/config_parser.cc +0 -399
  605. data/ext/facter/cpp-hocon/lib/src/config_render_options.cc +0 -44
  606. data/ext/facter/cpp-hocon/lib/src/config_resolve_options.cc +0 -24
  607. data/ext/facter/cpp-hocon/lib/src/config_util.cc +0 -95
  608. data/ext/facter/cpp-hocon/lib/src/config_value_factory.cc +0 -68
  609. data/ext/facter/cpp-hocon/lib/src/default_transformer.cc +0 -94
  610. data/ext/facter/cpp-hocon/lib/src/nodes/abstract_config_node.cc +0 -19
  611. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_array.cc +0 -13
  612. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_comment.cc +0 -15
  613. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_complex_value.cc +0 -50
  614. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_concatenation.cc +0 -14
  615. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_field.cc +0 -80
  616. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc +0 -38
  617. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_object.cc +0 -318
  618. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_path.cc +0 -47
  619. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_root.cc +0 -70
  620. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_simple_value.cc +0 -50
  621. data/ext/facter/cpp-hocon/lib/src/nodes/config_node_single_token.cc +0 -18
  622. data/ext/facter/cpp-hocon/lib/src/parseable.cc +0 -328
  623. data/ext/facter/cpp-hocon/lib/src/path.cc +0 -219
  624. data/ext/facter/cpp-hocon/lib/src/path_builder.cc +0 -38
  625. data/ext/facter/cpp-hocon/lib/src/path_parser.cc +0 -253
  626. data/ext/facter/cpp-hocon/lib/src/resolve_context.cc +0 -139
  627. data/ext/facter/cpp-hocon/lib/src/resolve_source.cc +0 -216
  628. data/ext/facter/cpp-hocon/lib/src/simple_config_document.cc +0 -69
  629. data/ext/facter/cpp-hocon/lib/src/simple_config_origin.cc +0 -246
  630. data/ext/facter/cpp-hocon/lib/src/simple_include_context.cc +0 -18
  631. data/ext/facter/cpp-hocon/lib/src/simple_includer.cc +0 -186
  632. data/ext/facter/cpp-hocon/lib/src/substitution_expression.cc +0 -35
  633. data/ext/facter/cpp-hocon/lib/src/token.cc +0 -52
  634. data/ext/facter/cpp-hocon/lib/src/tokenizer.cc +0 -568
  635. data/ext/facter/cpp-hocon/lib/src/tokens.cc +0 -257
  636. data/ext/facter/cpp-hocon/lib/src/values/config_boolean.cc +0 -34
  637. data/ext/facter/cpp-hocon/lib/src/values/config_concatenation.cc +0 -260
  638. data/ext/facter/cpp-hocon/lib/src/values/config_delayed_merge.cc +0 -223
  639. data/ext/facter/cpp-hocon/lib/src/values/config_delayed_merge_object.cc +0 -190
  640. data/ext/facter/cpp-hocon/lib/src/values/config_double.cc +0 -35
  641. data/ext/facter/cpp-hocon/lib/src/values/config_int.cc +0 -35
  642. data/ext/facter/cpp-hocon/lib/src/values/config_long.cc +0 -35
  643. data/ext/facter/cpp-hocon/lib/src/values/config_null.cc +0 -35
  644. data/ext/facter/cpp-hocon/lib/src/values/config_number.cc +0 -78
  645. data/ext/facter/cpp-hocon/lib/src/values/config_object.cc +0 -97
  646. data/ext/facter/cpp-hocon/lib/src/values/config_reference.cc +0 -85
  647. data/ext/facter/cpp-hocon/lib/src/values/config_string.cc +0 -47
  648. data/ext/facter/cpp-hocon/lib/src/values/config_value.cc +0 -289
  649. data/ext/facter/cpp-hocon/lib/src/values/simple_config_list.cc +0 -219
  650. data/ext/facter/cpp-hocon/lib/src/values/simple_config_object.cc +0 -515
  651. data/ext/facter/cpp-hocon/lib/tests/CMakeLists.txt +0 -42
  652. data/ext/facter/cpp-hocon/lib/tests/concatenation_test.cc +0 -401
  653. data/ext/facter/cpp-hocon/lib/tests/conf_parser_test.cc +0 -720
  654. data/ext/facter/cpp-hocon/lib/tests/config_document_parser_test.cc +0 -208
  655. data/ext/facter/cpp-hocon/lib/tests/config_document_tests.cc +0 -110
  656. data/ext/facter/cpp-hocon/lib/tests/config_node_test.cc +0 -338
  657. data/ext/facter/cpp-hocon/lib/tests/config_substitution_test.cc +0 -893
  658. data/ext/facter/cpp-hocon/lib/tests/config_test.cc +0 -151
  659. data/ext/facter/cpp-hocon/lib/tests/config_value_factory_test.cc +0 -60
  660. data/ext/facter/cpp-hocon/lib/tests/config_value_test.cc +0 -111
  661. data/ext/facter/cpp-hocon/lib/tests/fixtures.hpp.in +0 -3
  662. data/ext/facter/cpp-hocon/lib/tests/fixtures/test01.conf +0 -91
  663. data/ext/facter/cpp-hocon/lib/tests/fixtures/test01.json +0 -4
  664. data/ext/facter/cpp-hocon/lib/tests/main.cc +0 -8
  665. data/ext/facter/cpp-hocon/lib/tests/path_test.cc +0 -129
  666. data/ext/facter/cpp-hocon/lib/tests/program_options.cc +0 -63
  667. data/ext/facter/cpp-hocon/lib/tests/test.conf +0 -1
  668. data/ext/facter/cpp-hocon/lib/tests/test_utils.cc +0 -452
  669. data/ext/facter/cpp-hocon/lib/tests/test_utils.hpp +0 -140
  670. data/ext/facter/cpp-hocon/lib/tests/token_test.cc +0 -108
  671. data/ext/facter/cpp-hocon/lib/tests/tokenizer_test.cc +0 -694
  672. data/ext/facter/cpp-hocon/lib/version.h.in +0 -28
  673. data/ext/facter/cpp-hocon/locales/CMakeLists.txt +0 -4
  674. data/ext/facter/cpp-hocon/locales/cpp-hocon.pot +0 -767
  675. data/ext/facter/extconf.rb +0 -22
  676. data/ext/facter/facter/CMakeLists.txt +0 -183
  677. data/ext/facter/facter/CONTRIBUTING.md +0 -99
  678. data/ext/facter/facter/Extensibility.md +0 -133
  679. data/ext/facter/facter/Gemfile +0 -13
  680. data/ext/facter/facter/LICENSE +0 -17
  681. data/ext/facter/facter/MAINTAINERS +0 -28
  682. data/ext/facter/facter/README.md +0 -295
  683. data/ext/facter/facter/Rakefile +0 -17
  684. data/ext/facter/facter/acceptance/Gemfile +0 -24
  685. data/ext/facter/facter/acceptance/Rakefile +0 -2
  686. data/ext/facter/facter/acceptance/bin/ci-bootstrap-from-artifacts.sh +0 -55
  687. data/ext/facter/facter/acceptance/config/aio/options.rb +0 -3
  688. data/ext/facter/facter/acceptance/config/git/options.rb +0 -3
  689. data/ext/facter/facter/acceptance/config/nodes/aix-53-power.yaml +0 -7
  690. data/ext/facter/facter/acceptance/config/nodes/aix-61-power.yaml +0 -7
  691. data/ext/facter/facter/acceptance/config/nodes/aix-71-power.yaml +0 -7
  692. data/ext/facter/facter/acceptance/config/nodes/huaweios-6-powerpc.yaml +0 -7
  693. data/ext/facter/facter/acceptance/config/nodes/solaris-10-sparc.yaml +0 -9
  694. data/ext/facter/facter/acceptance/config/nodes/solaris-11-sparc.yaml +0 -9
  695. data/ext/facter/facter/acceptance/lib/facter/acceptance/base_fact_utils.rb +0 -565
  696. data/ext/facter/facter/acceptance/lib/facter/acceptance/user_fact_utils.rb +0 -132
  697. data/ext/facter/facter/acceptance/lib/helper.rb +0 -3
  698. data/ext/facter/facter/acceptance/lib/puppet/acceptance/common_utils.rb +0 -10
  699. data/ext/facter/facter/acceptance/lib/puppet/acceptance/git_utils.rb +0 -19
  700. data/ext/facter/facter/acceptance/lib/puppet/acceptance/install_utils.rb +0 -58
  701. data/ext/facter/facter/acceptance/tests/custom_facts/conflicts_with_builtin_fact.rb +0 -106
  702. data/ext/facter/facter/acceptance/tests/custom_facts/custom_fact_with_10001_weight_overrides_external_fact.rb +0 -30
  703. data/ext/facter/facter/acceptance/tests/custom_facts/having_multiple_facts_in_one_file.rb +0 -40
  704. data/ext/facter/facter/acceptance/tests/custom_facts/using_win32ole_should_not_hang.rb +0 -33
  705. data/ext/facter/facter/acceptance/tests/external_facts/env_var_overrides_external_fact.rb +0 -46
  706. data/ext/facter/facter/acceptance/tests/external_facts/external_dir_overrides_default_external_fact.rb +0 -34
  707. data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact.rb +0 -29
  708. data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact_with_10000_weight_or_less.rb +0 -30
  709. data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact_with_confine.rb +0 -35
  710. data/ext/facter/facter/acceptance/tests/external_facts/external_fact_stderr_messages_output_to_stderr.rb +0 -49
  711. data/ext/facter/facter/acceptance/tests/external_facts/external_facts_only_run_once.rb +0 -43
  712. data/ext/facter/facter/acceptance/tests/external_facts/fact_directory_precedence.rb +0 -109
  713. data/ext/facter/facter/acceptance/tests/external_facts/non_root_users_default_external_fact_directory.rb +0 -142
  714. data/ext/facter/facter/acceptance/tests/external_facts/root_uses_default_external_fact_dir.rb +0 -34
  715. data/ext/facter/facter/acceptance/tests/external_facts/structured_executable_facts.rb +0 -139
  716. data/ext/facter/facter/acceptance/tests/facter_returns_success_on_non_existent_fact.rb +0 -9
  717. data/ext/facter/facter/acceptance/tests/facts/dmi.rb +0 -51
  718. data/ext/facter/facter/acceptance/tests/facts/facterversion.rb +0 -11
  719. data/ext/facter/facter/acceptance/tests/facts/identity.rb +0 -52
  720. data/ext/facter/facter/acceptance/tests/facts/networking_facts.rb +0 -76
  721. data/ext/facter/facter/acceptance/tests/facts/non_root_users_without_errors.rb +0 -32
  722. data/ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb +0 -26
  723. data/ext/facter/facter/acceptance/tests/facts/os_processors_and_kernel.rb +0 -20
  724. data/ext/facter/facter/acceptance/tests/facts/partitions.rb +0 -37
  725. data/ext/facter/facter/acceptance/tests/facts/productname.rb +0 -15
  726. data/ext/facter/facter/acceptance/tests/facts/ruby.rb +0 -59
  727. data/ext/facter/facter/acceptance/tests/facts/validate_file_system_size_bytes.rb +0 -37
  728. data/ext/facter/facter/acceptance/tests/facts/verify_tmpfs_file_system.rb +0 -54
  729. data/ext/facter/facter/acceptance/tests/load_libfacter.rb +0 -66
  730. data/ext/facter/facter/acceptance/tests/no_errors_on_stderr.rb +0 -10
  731. data/ext/facter/facter/acceptance/tests/options/color.rb +0 -16
  732. data/ext/facter/facter/acceptance/tests/options/config.rb +0 -27
  733. data/ext/facter/facter/acceptance/tests/options/config_file/blocklist.rb +0 -35
  734. data/ext/facter/facter/acceptance/tests/options/config_file/blocklist_from_puppet_facts.rb +0 -40
  735. data/ext/facter/facter/acceptance/tests/options/config_file/custom_dir_overridden_by_cli_custom_dir.rb +0 -56
  736. data/ext/facter/facter/acceptance/tests/options/config_file/custom_facts.rb +0 -42
  737. data/ext/facter/facter/acceptance/tests/options/config_file/custom_facts_list.rb +0 -56
  738. data/ext/facter/facter/acceptance/tests/options/config_file/debug.rb +0 -34
  739. data/ext/facter/facter/acceptance/tests/options/config_file/debug_override_config_file.rb +0 -34
  740. data/ext/facter/facter/acceptance/tests/options/config_file/default_file_location.rb +0 -37
  741. data/ext/facter/facter/acceptance/tests/options/config_file/external_dir_conflicts_with_cli_no_external_facts.rb +0 -37
  742. data/ext/facter/facter/acceptance/tests/options/config_file/external_dir_overridden_by_cli_external_dir.rb +0 -40
  743. data/ext/facter/facter/acceptance/tests/options/config_file/external_facts.rb +0 -37
  744. data/ext/facter/facter/acceptance/tests/options/config_file/external_facts_list.rb +0 -43
  745. data/ext/facter/facter/acceptance/tests/options/config_file/load_from_ruby.rb +0 -73
  746. data/ext/facter/facter/acceptance/tests/options/config_file/log_level.rb +0 -35
  747. data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_custom_dir.rb +0 -43
  748. data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_facterlib.rb +0 -43
  749. data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_load_path.rb +0 -49
  750. data/ext/facter/facter/acceptance/tests/options/config_file/no_external_facts.rb +0 -38
  751. data/ext/facter/facter/acceptance/tests/options/config_file/no_external_facts_and_external_dir.rb +0 -34
  752. data/ext/facter/facter/acceptance/tests/options/config_file/no_ruby_disables_custom_facts.rb +0 -52
  753. data/ext/facter/facter/acceptance/tests/options/config_file/no_ruby_disables_ruby_facts.rb +0 -34
  754. data/ext/facter/facter/acceptance/tests/options/config_file/trace.rb +0 -48
  755. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_clear_by_empty_ttls_cache_list.rb +0 -71
  756. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_creates_json_cache_file.rb +0 -48
  757. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_expire_facts_do_not_read_the_old_cached_value.rb +0 -58
  758. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_expire_facts_refresh_the_cached_value.rb +0 -61
  759. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_read_from_the_cached_value.rb +0 -57
  760. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_that_are_corrupt_are_refreshed.rb +0 -53
  761. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_that_are_empty_return_an_empty_value.rb +0 -53
  762. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_puppet_facts_creates_json_for_cached_facts.rb +0 -45
  763. data/ext/facter/facter/acceptance/tests/options/config_file/ttls_puppet_facts_honors_cached_facts.rb +0 -54
  764. data/ext/facter/facter/acceptance/tests/options/config_file/verbose.rb +0 -34
  765. data/ext/facter/facter/acceptance/tests/options/custom_facts.rb +0 -34
  766. data/ext/facter/facter/acceptance/tests/options/custom_facts_facterlib.rb +0 -33
  767. data/ext/facter/facter/acceptance/tests/options/custom_facts_list.rb +0 -48
  768. data/ext/facter/facter/acceptance/tests/options/custom_facts_load_path.rb +0 -42
  769. data/ext/facter/facter/acceptance/tests/options/debug.rb +0 -12
  770. data/ext/facter/facter/acceptance/tests/options/external_facts.rb +0 -28
  771. data/ext/facter/facter/acceptance/tests/options/external_facts_list.rb +0 -35
  772. data/ext/facter/facter/acceptance/tests/options/help.rb +0 -13
  773. data/ext/facter/facter/acceptance/tests/options/json.rb +0 -43
  774. data/ext/facter/facter/acceptance/tests/options/list_block_groups.rb +0 -16
  775. data/ext/facter/facter/acceptance/tests/options/list_cache_groups.rb +0 -16
  776. data/ext/facter/facter/acceptance/tests/options/log_level.rb +0 -13
  777. data/ext/facter/facter/acceptance/tests/options/no_block.rb +0 -34
  778. data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_cache_facts.rb +0 -43
  779. data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_load_cached_facts.rb +0 -58
  780. data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_refresh_cached_facts.rb +0 -63
  781. data/ext/facter/facter/acceptance/tests/options/no_color.rb +0 -16
  782. data/ext/facter/facter/acceptance/tests/options/no_custom_facts.rb +0 -34
  783. data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_custom_dir.rb +0 -19
  784. data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_facterlib.rb +0 -34
  785. data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_load_path.rb +0 -43
  786. data/ext/facter/facter/acceptance/tests/options/no_external_facts.rb +0 -28
  787. data/ext/facter/facter/acceptance/tests/options/no_external_facts_and_external_dir.rb +0 -19
  788. data/ext/facter/facter/acceptance/tests/options/no_ruby.rb +0 -44
  789. data/ext/facter/facter/acceptance/tests/options/puppet_facts.rb +0 -35
  790. data/ext/facter/facter/acceptance/tests/options/show_legacy.rb +0 -18
  791. data/ext/facter/facter/acceptance/tests/options/strict.rb +0 -11
  792. data/ext/facter/facter/acceptance/tests/options/trace.rb +0 -36
  793. data/ext/facter/facter/acceptance/tests/options/verbose.rb +0 -12
  794. data/ext/facter/facter/acceptance/tests/options/version.rb +0 -12
  795. data/ext/facter/facter/acceptance/tests/options/yaml.rb +0 -43
  796. data/ext/facter/facter/acceptance/tests/ticket_1123_facter_with_invalid_locale.rb +0 -22
  797. data/ext/facter/facter/acceptance/tests/ticket_1238_hostname_fqdn.rb +0 -57
  798. data/ext/facter/facter/appveyor.yml +0 -40
  799. data/ext/facter/facter/cmake/FindBLKID.cmake +0 -6
  800. data/ext/facter/facter/cmake/FindCPPHOCON.cmake +0 -6
  801. data/ext/facter/facter/cmake/FindDependency.cmake +0 -54
  802. data/ext/facter/facter/cmake/FindOPENSSL.cmake +0 -10
  803. data/ext/facter/facter/cmake/FindRuby.cmake +0 -286
  804. data/ext/facter/facter/cmake/FindWHEREAMI.cmake +0 -6
  805. data/ext/facter/facter/cmake/FindYAMLCPP.cmake +0 -17
  806. data/ext/facter/facter/contrib/dockerfiles/travis-cpp-builder/Dockerfile +0 -56
  807. data/ext/facter/facter/contrib/dockerfiles/travis-facter-builder/Dockerfile +0 -23
  808. data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/Dockerfile +0 -40
  809. data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/_coverity-submit.erb +0 -12
  810. data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/fix_curl_command.patch +0 -32
  811. data/ext/facter/facter/exe/CMakeLists.txt +0 -39
  812. data/ext/facter/facter/exe/facter.cc +0 -378
  813. data/ext/facter/facter/ext/build_defaults.yaml +0 -14
  814. data/ext/facter/facter/ext/debian/changelog.erb +0 -11
  815. data/ext/facter/facter/ext/debian/compat +0 -1
  816. data/ext/facter/facter/ext/debian/control +0 -14
  817. data/ext/facter/facter/ext/debian/copyright +0 -19
  818. data/ext/facter/facter/ext/debian/docs +0 -2
  819. data/ext/facter/facter/ext/debian/facter.install +0 -4
  820. data/ext/facter/facter/ext/debian/lintian-overrides +0 -0
  821. data/ext/facter/facter/ext/debian/rules +0 -39
  822. data/ext/facter/facter/ext/debian/source/format +0 -1
  823. data/ext/facter/facter/ext/project_data.yaml +0 -30
  824. data/ext/facter/facter/ext/redhat/facter.spec.erb +0 -113
  825. data/ext/facter/facter/ext/windows/facter.bat +0 -8
  826. data/ext/facter/facter/ext/windows/facter_interactive.bat +0 -6
  827. data/ext/facter/facter/ext/windows/run_facter_interactive.bat +0 -9
  828. data/ext/facter/facter/factergo/example/main.go +0 -17
  829. data/ext/facter/facter/factergo/facter.go +0 -42
  830. data/ext/facter/facter/factergo/facter_test.go +0 -25
  831. data/ext/facter/facter/lib/CMakeLists.txt +0 -427
  832. data/ext/facter/facter/lib/Doxyfile +0 -2313
  833. data/ext/facter/facter/lib/Facter.java.in +0 -110
  834. data/ext/facter/facter/lib/Gemfile +0 -11
  835. data/ext/facter/facter/lib/Rakefile +0 -8
  836. data/ext/facter/facter/lib/docs/generate.rb +0 -25
  837. data/ext/facter/facter/lib/docs/namespaces.dox +0 -129
  838. data/ext/facter/facter/lib/docs/template.erb +0 -43
  839. data/ext/facter/facter/lib/facter.rb.in +0 -45
  840. data/ext/facter/facter/lib/gemspec.in +0 -21
  841. data/ext/facter/facter/lib/inc/facter/cwrapper.hpp +0 -18
  842. data/ext/facter/facter/lib/inc/facter/facts/array_value.hpp +0 -125
  843. data/ext/facter/facter/lib/inc/facter/facts/collection.hpp +0 -339
  844. data/ext/facter/facter/lib/inc/facter/facts/external/resolver.hpp +0 -49
  845. data/ext/facter/facter/lib/inc/facter/facts/fact.hpp +0 -669
  846. data/ext/facter/facter/lib/inc/facter/facts/map_value.hpp +0 -127
  847. data/ext/facter/facter/lib/inc/facter/facts/os.hpp +0 -210
  848. data/ext/facter/facter/lib/inc/facter/facts/os_family.hpp +0 -58
  849. data/ext/facter/facter/lib/inc/facter/facts/resolver.hpp +0 -126
  850. data/ext/facter/facter/lib/inc/facter/facts/scalar_value.hpp +0 -152
  851. data/ext/facter/facter/lib/inc/facter/facts/value.hpp +0 -164
  852. data/ext/facter/facter/lib/inc/facter/facts/vm.hpp +0 -157
  853. data/ext/facter/facter/lib/inc/facter/logging/logging.hpp +0 -192
  854. data/ext/facter/facter/lib/inc/facter/ruby/ruby.hpp +0 -73
  855. data/ext/facter/facter/lib/inc/facter/util/config.hpp +0 -84
  856. data/ext/facter/facter/lib/inc/facter/util/string.hpp +0 -72
  857. data/ext/facter/facter/lib/inc/internal/facts/aix/disk_resolver.hpp +0 -25
  858. data/ext/facter/facter/lib/inc/internal/facts/aix/filesystem_resolver.hpp +0 -41
  859. data/ext/facter/facter/lib/inc/internal/facts/aix/kernel_resolver.hpp +0 -25
  860. data/ext/facter/facter/lib/inc/internal/facts/aix/load_average_resolver.hpp +0 -24
  861. data/ext/facter/facter/lib/inc/internal/facts/aix/memory_resolver.hpp +0 -25
  862. data/ext/facter/facter/lib/inc/internal/facts/aix/networking_resolver.hpp +0 -56
  863. data/ext/facter/facter/lib/inc/internal/facts/aix/operating_system_resolver.hpp +0 -24
  864. data/ext/facter/facter/lib/inc/internal/facts/aix/processor_resolver.hpp +0 -25
  865. data/ext/facter/facter/lib/inc/internal/facts/aix/serial_number_resolver.hpp +0 -27
  866. data/ext/facter/facter/lib/inc/internal/facts/bsd/filesystem_resolver.hpp +0 -30
  867. data/ext/facter/facter/lib/inc/internal/facts/bsd/networking_resolver.hpp +0 -61
  868. data/ext/facter/facter/lib/inc/internal/facts/bsd/uptime_resolver.hpp +0 -24
  869. data/ext/facter/facter/lib/inc/internal/facts/cache.hpp +0 -71
  870. data/ext/facter/facter/lib/inc/internal/facts/external/execution_resolver.hpp +0 -31
  871. data/ext/facter/facter/lib/inc/internal/facts/external/json_resolver.hpp +0 -31
  872. data/ext/facter/facter/lib/inc/internal/facts/external/text_resolver.hpp +0 -31
  873. data/ext/facter/facter/lib/inc/internal/facts/external/windows/powershell_resolver.hpp +0 -34
  874. data/ext/facter/facter/lib/inc/internal/facts/external/yaml_resolver.hpp +0 -31
  875. data/ext/facter/facter/lib/inc/internal/facts/freebsd/disk_resolver.hpp +0 -25
  876. data/ext/facter/facter/lib/inc/internal/facts/freebsd/dmi_resolver.hpp +0 -28
  877. data/ext/facter/facter/lib/inc/internal/facts/freebsd/filesystem_resolver.hpp +0 -25
  878. data/ext/facter/facter/lib/inc/internal/facts/freebsd/memory_resolver.hpp +0 -25
  879. data/ext/facter/facter/lib/inc/internal/facts/freebsd/networking_resolver.hpp +0 -49
  880. data/ext/facter/facter/lib/inc/internal/facts/freebsd/operating_system_resolver.hpp +0 -24
  881. data/ext/facter/facter/lib/inc/internal/facts/freebsd/processor_resolver.hpp +0 -25
  882. data/ext/facter/facter/lib/inc/internal/facts/freebsd/virtualization_resolver.hpp +0 -27
  883. data/ext/facter/facter/lib/inc/internal/facts/freebsd/zfs_resolver.hpp +0 -24
  884. data/ext/facter/facter/lib/inc/internal/facts/freebsd/zpool_resolver.hpp +0 -24
  885. data/ext/facter/facter/lib/inc/internal/facts/glib/load_average_resolver.hpp +0 -24
  886. data/ext/facter/facter/lib/inc/internal/facts/linux/disk_resolver.hpp +0 -25
  887. data/ext/facter/facter/lib/inc/internal/facts/linux/dmi_resolver.hpp +0 -37
  888. data/ext/facter/facter/lib/inc/internal/facts/linux/filesystem_resolver.hpp +0 -40
  889. data/ext/facter/facter/lib/inc/internal/facts/linux/fips_resolver.hpp +0 -31
  890. data/ext/facter/facter/lib/inc/internal/facts/linux/kernel_resolver.hpp +0 -25
  891. data/ext/facter/facter/lib/inc/internal/facts/linux/memory_resolver.hpp +0 -25
  892. data/ext/facter/facter/lib/inc/internal/facts/linux/networking_resolver.hpp +0 -85
  893. data/ext/facter/facter/lib/inc/internal/facts/linux/operating_system_resolver.hpp +0 -28
  894. data/ext/facter/facter/lib/inc/internal/facts/linux/os_cisco.hpp +0 -114
  895. data/ext/facter/facter/lib/inc/internal/facts/linux/os_linux.hpp +0 -72
  896. data/ext/facter/facter/lib/inc/internal/facts/linux/os_osrelease.hpp +0 -98
  897. data/ext/facter/facter/lib/inc/internal/facts/linux/processor_resolver.hpp +0 -60
  898. data/ext/facter/facter/lib/inc/internal/facts/linux/release_file.hpp +0 -124
  899. data/ext/facter/facter/lib/inc/internal/facts/linux/uptime_resolver.hpp +0 -24
  900. data/ext/facter/facter/lib/inc/internal/facts/linux/virtualization_resolver.hpp +0 -50
  901. data/ext/facter/facter/lib/inc/internal/facts/openbsd/dmi_resolver.hpp +0 -28
  902. data/ext/facter/facter/lib/inc/internal/facts/openbsd/memory_resolver.hpp +0 -25
  903. data/ext/facter/facter/lib/inc/internal/facts/openbsd/networking_resolver.hpp +0 -49
  904. data/ext/facter/facter/lib/inc/internal/facts/openbsd/processor_resolver.hpp +0 -25
  905. data/ext/facter/facter/lib/inc/internal/facts/openbsd/virtualization_resolver.hpp +0 -25
  906. data/ext/facter/facter/lib/inc/internal/facts/osx/dmi_resolver.hpp +0 -25
  907. data/ext/facter/facter/lib/inc/internal/facts/osx/memory_resolver.hpp +0 -25
  908. data/ext/facter/facter/lib/inc/internal/facts/osx/networking_resolver.hpp +0 -67
  909. data/ext/facter/facter/lib/inc/internal/facts/osx/operating_system_resolver.hpp +0 -25
  910. data/ext/facter/facter/lib/inc/internal/facts/osx/processor_resolver.hpp +0 -25
  911. data/ext/facter/facter/lib/inc/internal/facts/osx/system_profiler_resolver.hpp +0 -25
  912. data/ext/facter/facter/lib/inc/internal/facts/osx/virtualization_resolver.hpp +0 -25
  913. data/ext/facter/facter/lib/inc/internal/facts/posix/identity_resolver.hpp +0 -25
  914. data/ext/facter/facter/lib/inc/internal/facts/posix/kernel_resolver.hpp +0 -25
  915. data/ext/facter/facter/lib/inc/internal/facts/posix/networking_resolver.hpp +0 -55
  916. data/ext/facter/facter/lib/inc/internal/facts/posix/operating_system_resolver.hpp +0 -25
  917. data/ext/facter/facter/lib/inc/internal/facts/posix/processor_resolver.hpp +0 -25
  918. data/ext/facter/facter/lib/inc/internal/facts/posix/ssh_resolver.hpp +0 -28
  919. data/ext/facter/facter/lib/inc/internal/facts/posix/timezone_resolver.hpp +0 -24
  920. data/ext/facter/facter/lib/inc/internal/facts/posix/uptime_resolver.hpp +0 -32
  921. data/ext/facter/facter/lib/inc/internal/facts/posix/xen_resolver.hpp +0 -24
  922. data/ext/facter/facter/lib/inc/internal/facts/resolvers/augeas_resolver.hpp +0 -35
  923. data/ext/facter/facter/lib/inc/internal/facts/resolvers/disk_resolver.hpp +0 -81
  924. data/ext/facter/facter/lib/inc/internal/facts/resolvers/dmi_resolver.hpp +0 -115
  925. data/ext/facter/facter/lib/inc/internal/facts/resolvers/ec2_resolver.hpp +0 -30
  926. data/ext/facter/facter/lib/inc/internal/facts/resolvers/filesystem_resolver.hpp +0 -166
  927. data/ext/facter/facter/lib/inc/internal/facts/resolvers/fips_resolver.hpp +0 -46
  928. data/ext/facter/facter/lib/inc/internal/facts/resolvers/gce_resolver.hpp +0 -28
  929. data/ext/facter/facter/lib/inc/internal/facts/resolvers/hypervisors_resolver.hpp +0 -69
  930. data/ext/facter/facter/lib/inc/internal/facts/resolvers/identity_resolver.hpp +0 -73
  931. data/ext/facter/facter/lib/inc/internal/facts/resolvers/kernel_resolver.hpp +0 -66
  932. data/ext/facter/facter/lib/inc/internal/facts/resolvers/ldom_resolver.hpp +0 -64
  933. data/ext/facter/facter/lib/inc/internal/facts/resolvers/load_average_resolver.hpp +0 -37
  934. data/ext/facter/facter/lib/inc/internal/facts/resolvers/memory_resolver.hpp +0 -99
  935. data/ext/facter/facter/lib/inc/internal/facts/resolvers/networking_resolver.hpp +0 -156
  936. data/ext/facter/facter/lib/inc/internal/facts/resolvers/operating_system_resolver.hpp +0 -235
  937. data/ext/facter/facter/lib/inc/internal/facts/resolvers/path_resolver.hpp +0 -28
  938. data/ext/facter/facter/lib/inc/internal/facts/resolvers/processor_resolver.hpp +0 -80
  939. data/ext/facter/facter/lib/inc/internal/facts/resolvers/ruby_resolver.hpp +0 -56
  940. data/ext/facter/facter/lib/inc/internal/facts/resolvers/ssh_resolver.hpp +0 -105
  941. data/ext/facter/facter/lib/inc/internal/facts/resolvers/system_profiler_resolver.hpp +0 -127
  942. data/ext/facter/facter/lib/inc/internal/facts/resolvers/timezone_resolver.hpp +0 -36
  943. data/ext/facter/facter/lib/inc/internal/facts/resolvers/uptime_resolver.hpp +0 -36
  944. data/ext/facter/facter/lib/inc/internal/facts/resolvers/virtualization_resolver.hpp +0 -95
  945. data/ext/facter/facter/lib/inc/internal/facts/resolvers/xen_resolver.hpp +0 -55
  946. data/ext/facter/facter/lib/inc/internal/facts/resolvers/zfs_resolver.hpp +0 -59
  947. data/ext/facter/facter/lib/inc/internal/facts/resolvers/zone_resolver.hpp +0 -95
  948. data/ext/facter/facter/lib/inc/internal/facts/resolvers/zpool_resolver.hpp +0 -63
  949. data/ext/facter/facter/lib/inc/internal/facts/solaris/disk_resolver.hpp +0 -25
  950. data/ext/facter/facter/lib/inc/internal/facts/solaris/dmi_resolver.hpp +0 -25
  951. data/ext/facter/facter/lib/inc/internal/facts/solaris/filesystem_resolver.hpp +0 -29
  952. data/ext/facter/facter/lib/inc/internal/facts/solaris/kernel_resolver.hpp +0 -25
  953. data/ext/facter/facter/lib/inc/internal/facts/solaris/ldom_resolver.hpp +0 -25
  954. data/ext/facter/facter/lib/inc/internal/facts/solaris/memory_resolver.hpp +0 -25
  955. data/ext/facter/facter/lib/inc/internal/facts/solaris/networking_resolver.hpp +0 -55
  956. data/ext/facter/facter/lib/inc/internal/facts/solaris/operating_system_resolver.hpp +0 -25
  957. data/ext/facter/facter/lib/inc/internal/facts/solaris/processor_resolver.hpp +0 -25
  958. data/ext/facter/facter/lib/inc/internal/facts/solaris/virtualization_resolver.hpp +0 -25
  959. data/ext/facter/facter/lib/inc/internal/facts/solaris/zfs_resolver.hpp +0 -24
  960. data/ext/facter/facter/lib/inc/internal/facts/solaris/zone_resolver.hpp +0 -25
  961. data/ext/facter/facter/lib/inc/internal/facts/solaris/zpool_resolver.hpp +0 -24
  962. data/ext/facter/facter/lib/inc/internal/facts/windows/dmi_resolver.hpp +0 -38
  963. data/ext/facter/facter/lib/inc/internal/facts/windows/identity_resolver.hpp +0 -25
  964. data/ext/facter/facter/lib/inc/internal/facts/windows/kernel_resolver.hpp +0 -25
  965. data/ext/facter/facter/lib/inc/internal/facts/windows/memory_resolver.hpp +0 -25
  966. data/ext/facter/facter/lib/inc/internal/facts/windows/networking_resolver.hpp +0 -74
  967. data/ext/facter/facter/lib/inc/internal/facts/windows/operating_system_resolver.hpp +0 -36
  968. data/ext/facter/facter/lib/inc/internal/facts/windows/processor_resolver.hpp +0 -36
  969. data/ext/facter/facter/lib/inc/internal/facts/windows/timezone_resolver.hpp +0 -24
  970. data/ext/facter/facter/lib/inc/internal/facts/windows/uptime_resolver.hpp +0 -32
  971. data/ext/facter/facter/lib/inc/internal/facts/windows/virtualization_resolver.hpp +0 -37
  972. data/ext/facter/facter/lib/inc/internal/ruby/aggregate_resolution.hpp +0 -77
  973. data/ext/facter/facter/lib/inc/internal/ruby/chunk.hpp +0 -83
  974. data/ext/facter/facter/lib/inc/internal/ruby/confine.hpp +0 -60
  975. data/ext/facter/facter/lib/inc/internal/ruby/fact.hpp +0 -108
  976. data/ext/facter/facter/lib/inc/internal/ruby/module.hpp +0 -165
  977. data/ext/facter/facter/lib/inc/internal/ruby/resolution.hpp +0 -126
  978. data/ext/facter/facter/lib/inc/internal/ruby/ruby_value.hpp +0 -119
  979. data/ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp +0 -56
  980. data/ext/facter/facter/lib/inc/internal/util/agent.hpp +0 -29
  981. data/ext/facter/facter/lib/inc/internal/util/aix/odm.hpp +0 -392
  982. data/ext/facter/facter/lib/inc/internal/util/aix/vmount.hpp +0 -139
  983. data/ext/facter/facter/lib/inc/internal/util/bsd/scoped_ifaddrs.hpp +0 -33
  984. data/ext/facter/facter/lib/inc/internal/util/freebsd/geom.hpp +0 -149
  985. data/ext/facter/facter/lib/inc/internal/util/posix/scoped_addrinfo.hpp +0 -45
  986. data/ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp +0 -34
  987. data/ext/facter/facter/lib/inc/internal/util/posix/scoped_descriptor.hpp +0 -27
  988. data/ext/facter/facter/lib/inc/internal/util/posix/utmpx_file.hpp +0 -57
  989. data/ext/facter/facter/lib/inc/internal/util/scoped_file.hpp +0 -36
  990. data/ext/facter/facter/lib/inc/internal/util/solaris/k_stat.hpp +0 -176
  991. data/ext/facter/facter/lib/inc/internal/util/solaris/scoped_kstat.hpp +0 -45
  992. data/ext/facter/facter/lib/inc/internal/util/versions.hpp +0 -34
  993. data/ext/facter/facter/lib/inc/internal/util/windows/wsa.hpp +0 -92
  994. data/ext/facter/facter/lib/inc/internal/util/yaml.hpp +0 -25
  995. data/ext/facter/facter/lib/schema/core_facts.pot +0 -2017
  996. data/ext/facter/facter/lib/schema/facter.yaml +0 -1947
  997. data/ext/facter/facter/lib/schema/translation_tooling.rb +0 -67
  998. data/ext/facter/facter/lib/spec/unit/facter_spec.rb +0 -136
  999. data/ext/facter/facter/lib/spec_helper.rb.in +0 -27
  1000. data/ext/facter/facter/lib/src/cwrapper.cc +0 -45
  1001. data/ext/facter/facter/lib/src/facts/aix/collection.cc +0 -34
  1002. data/ext/facter/facter/lib/src/facts/aix/disk_resolver.cc +0 -75
  1003. data/ext/facter/facter/lib/src/facts/aix/filesystem_resolver.cc +0 -132
  1004. data/ext/facter/facter/lib/src/facts/aix/kernel_resolver.cc +0 -27
  1005. data/ext/facter/facter/lib/src/facts/aix/load_average_resolver.cc +0 -50
  1006. data/ext/facter/facter/lib/src/facts/aix/memory_resolver.cc +0 -63
  1007. data/ext/facter/facter/lib/src/facts/aix/networking_resolver.cc +0 -250
  1008. data/ext/facter/facter/lib/src/facts/aix/operating_system_resolver.cc +0 -99
  1009. data/ext/facter/facter/lib/src/facts/aix/processor_resolver.cc +0 -106
  1010. data/ext/facter/facter/lib/src/facts/aix/serial_number_resolver.cc +0 -43
  1011. data/ext/facter/facter/lib/src/facts/array_value.cc +0 -111
  1012. data/ext/facter/facter/lib/src/facts/bsd/collection.cc +0 -27
  1013. data/ext/facter/facter/lib/src/facts/bsd/filesystem_resolver.cc +0 -92
  1014. data/ext/facter/facter/lib/src/facts/bsd/networking_resolver.cc +0 -231
  1015. data/ext/facter/facter/lib/src/facts/bsd/uptime_resolver.cc +0 -23
  1016. data/ext/facter/facter/lib/src/facts/cache.cc +0 -117
  1017. data/ext/facter/facter/lib/src/facts/collection.cc +0 -663
  1018. data/ext/facter/facter/lib/src/facts/external/execution_resolver.cc +0 -89
  1019. data/ext/facter/facter/lib/src/facts/external/json_resolver.cc +0 -219
  1020. data/ext/facter/facter/lib/src/facts/external/resolver.cc +0 -12
  1021. data/ext/facter/facter/lib/src/facts/external/text_resolver.cc +0 -45
  1022. data/ext/facter/facter/lib/src/facts/external/windows/powershell_resolver.cc +0 -117
  1023. data/ext/facter/facter/lib/src/facts/external/yaml_resolver.cc +0 -45
  1024. data/ext/facter/facter/lib/src/facts/freebsd/collection.cc +0 -43
  1025. data/ext/facter/facter/lib/src/facts/freebsd/disk_resolver.cc +0 -34
  1026. data/ext/facter/facter/lib/src/facts/freebsd/dmi_resolver.cc +0 -43
  1027. data/ext/facter/facter/lib/src/facts/freebsd/filesystem_resolver.cc +0 -37
  1028. data/ext/facter/facter/lib/src/facts/freebsd/memory_resolver.cc +0 -76
  1029. data/ext/facter/facter/lib/src/facts/freebsd/networking_resolver.cc +0 -64
  1030. data/ext/facter/facter/lib/src/facts/freebsd/operating_system_resolver.cc +0 -17
  1031. data/ext/facter/facter/lib/src/facts/freebsd/processor_resolver.cc +0 -63
  1032. data/ext/facter/facter/lib/src/facts/freebsd/virtualization_resolver.cc +0 -41
  1033. data/ext/facter/facter/lib/src/facts/freebsd/zfs_resolver.cc +0 -12
  1034. data/ext/facter/facter/lib/src/facts/freebsd/zpool_resolver.cc +0 -12
  1035. data/ext/facter/facter/lib/src/facts/glib/load_average_resolver.cc +0 -22
  1036. data/ext/facter/facter/lib/src/facts/linux/collection.cc +0 -44
  1037. data/ext/facter/facter/lib/src/facts/linux/disk_resolver.cc +0 -80
  1038. data/ext/facter/facter/lib/src/facts/linux/dmi_resolver.cc +0 -208
  1039. data/ext/facter/facter/lib/src/facts/linux/filesystem_resolver.cc +0 -282
  1040. data/ext/facter/facter/lib/src/facts/linux/fips_resolver.cc +0 -31
  1041. data/ext/facter/facter/lib/src/facts/linux/kernel_resolver.cc +0 -20
  1042. data/ext/facter/facter/lib/src/facts/linux/memory_resolver.cc +0 -50
  1043. data/ext/facter/facter/lib/src/facts/linux/networking_resolver.cc +0 -296
  1044. data/ext/facter/facter/lib/src/facts/linux/operating_system_resolver.cc +0 -174
  1045. data/ext/facter/facter/lib/src/facts/linux/os_linux.cc +0 -399
  1046. data/ext/facter/facter/lib/src/facts/linux/processor_resolver.cc +0 -200
  1047. data/ext/facter/facter/lib/src/facts/linux/uptime_resolver.cc +0 -15
  1048. data/ext/facter/facter/lib/src/facts/linux/virtualization_resolver.cc +0 -282
  1049. data/ext/facter/facter/lib/src/facts/map_value.cc +0 -119
  1050. data/ext/facter/facter/lib/src/facts/openbsd/collection.cc +0 -37
  1051. data/ext/facter/facter/lib/src/facts/openbsd/dmi_resolver.cc +0 -47
  1052. data/ext/facter/facter/lib/src/facts/openbsd/memory_resolver.cc +0 -76
  1053. data/ext/facter/facter/lib/src/facts/openbsd/networking_resolver.cc +0 -64
  1054. data/ext/facter/facter/lib/src/facts/openbsd/processor_resolver.cc +0 -59
  1055. data/ext/facter/facter/lib/src/facts/openbsd/virtualization_resolver.cc +0 -20
  1056. data/ext/facter/facter/lib/src/facts/osx/collection.cc +0 -39
  1057. data/ext/facter/facter/lib/src/facts/osx/dmi_resolver.cc +0 -32
  1058. data/ext/facter/facter/lib/src/facts/osx/memory_resolver.cc +0 -60
  1059. data/ext/facter/facter/lib/src/facts/osx/networking_resolver.cc +0 -80
  1060. data/ext/facter/facter/lib/src/facts/osx/operating_system_resolver.cc +0 -49
  1061. data/ext/facter/facter/lib/src/facts/osx/processor_resolver.cc +0 -55
  1062. data/ext/facter/facter/lib/src/facts/osx/system_profiler_resolver.cc +0 -66
  1063. data/ext/facter/facter/lib/src/facts/osx/virtualization_resolver.cc +0 -46
  1064. data/ext/facter/facter/lib/src/facts/posix/cache.cc +0 -9
  1065. data/ext/facter/facter/lib/src/facts/posix/collection.cc +0 -48
  1066. data/ext/facter/facter/lib/src/facts/posix/identity_resolver.cc +0 -79
  1067. data/ext/facter/facter/lib/src/facts/posix/kernel_resolver.cc +0 -25
  1068. data/ext/facter/facter/lib/src/facts/posix/networking_resolver.cc +0 -137
  1069. data/ext/facter/facter/lib/src/facts/posix/operatingsystem_resolver.cc +0 -29
  1070. data/ext/facter/facter/lib/src/facts/posix/processor_resolver.cc +0 -22
  1071. data/ext/facter/facter/lib/src/facts/posix/ssh_resolver.cc +0 -116
  1072. data/ext/facter/facter/lib/src/facts/posix/timezone_resolver.cc +0 -26
  1073. data/ext/facter/facter/lib/src/facts/posix/uptime_resolver.cc +0 -72
  1074. data/ext/facter/facter/lib/src/facts/posix/xen_resolver.cc +0 -43
  1075. data/ext/facter/facter/lib/src/facts/resolver.cc +0 -105
  1076. data/ext/facter/facter/lib/src/facts/resolvers/augeas_resolver.cc +0 -56
  1077. data/ext/facter/facter/lib/src/facts/resolvers/disk_resolver.cc +0 -69
  1078. data/ext/facter/facter/lib/src/facts/resolvers/dmi_resolver.cc +0 -160
  1079. data/ext/facter/facter/lib/src/facts/resolvers/ec2_resolver.cc +0 -174
  1080. data/ext/facter/facter/lib/src/facts/resolvers/filesystem_resolver.cc +0 -118
  1081. data/ext/facter/facter/lib/src/facts/resolvers/fips_resolver.cc +0 -23
  1082. data/ext/facter/facter/lib/src/facts/resolvers/gce_resolver.cc +0 -276
  1083. data/ext/facter/facter/lib/src/facts/resolvers/hypervisors_resolver.cc +0 -76
  1084. data/ext/facter/facter/lib/src/facts/resolvers/identity_resolver.cc +0 -50
  1085. data/ext/facter/facter/lib/src/facts/resolvers/kernel_resolver.cc +0 -62
  1086. data/ext/facter/facter/lib/src/facts/resolvers/ldom_resolver.cc +0 -60
  1087. data/ext/facter/facter/lib/src/facts/resolvers/load_average_resolver.cc +0 -36
  1088. data/ext/facter/facter/lib/src/facts/resolvers/memory_resolver.cc +0 -88
  1089. data/ext/facter/facter/lib/src/facts/resolvers/networking_resolver.cc +0 -296
  1090. data/ext/facter/facter/lib/src/facts/resolvers/operating_system_resolver.cc +0 -276
  1091. data/ext/facter/facter/lib/src/facts/resolvers/path_resolver.cc +0 -25
  1092. data/ext/facter/facter/lib/src/facts/resolvers/processor_resolver.cc +0 -70
  1093. data/ext/facter/facter/lib/src/facts/resolvers/ruby_resolver.cc +0 -109
  1094. data/ext/facter/facter/lib/src/facts/resolvers/ssh_resolver.cc +0 -77
  1095. data/ext/facter/facter/lib/src/facts/resolvers/system_profiler_resolver.cc +0 -137
  1096. data/ext/facter/facter/lib/src/facts/resolvers/timezone_resolver.cc +0 -27
  1097. data/ext/facter/facter/lib/src/facts/resolvers/uptime_resolver.cc +0 -63
  1098. data/ext/facter/facter/lib/src/facts/resolvers/virtualization_resolver.cc +0 -119
  1099. data/ext/facter/facter/lib/src/facts/resolvers/xen_resolver.cc +0 -80
  1100. data/ext/facter/facter/lib/src/facts/resolvers/zfs_resolver.cc +0 -63
  1101. data/ext/facter/facter/lib/src/facts/resolvers/zone_resolver.cc +0 -91
  1102. data/ext/facter/facter/lib/src/facts/resolvers/zpool_resolver.cc +0 -93
  1103. data/ext/facter/facter/lib/src/facts/scalar_value.cc +0 -73
  1104. data/ext/facter/facter/lib/src/facts/solaris/collection.cc +0 -51
  1105. data/ext/facter/facter/lib/src/facts/solaris/disk_resolver.cc +0 -35
  1106. data/ext/facter/facter/lib/src/facts/solaris/dmi_resolver.cc +0 -86
  1107. data/ext/facter/facter/lib/src/facts/solaris/filesystem_resolver.cc +0 -92
  1108. data/ext/facter/facter/lib/src/facts/solaris/kernel_resolver.cc +0 -24
  1109. data/ext/facter/facter/lib/src/facts/solaris/ldom_resolver.cc +0 -87
  1110. data/ext/facter/facter/lib/src/facts/solaris/memory_resolver.cc +0 -91
  1111. data/ext/facter/facter/lib/src/facts/solaris/networking_resolver.cc +0 -188
  1112. data/ext/facter/facter/lib/src/facts/solaris/operating_system_resolver.cc +0 -83
  1113. data/ext/facter/facter/lib/src/facts/solaris/processor_resolver.cc +0 -105
  1114. data/ext/facter/facter/lib/src/facts/solaris/virtualization_resolver.cc +0 -38
  1115. data/ext/facter/facter/lib/src/facts/solaris/zfs_resolver.cc +0 -12
  1116. data/ext/facter/facter/lib/src/facts/solaris/zone_resolver.cc +0 -33
  1117. data/ext/facter/facter/lib/src/facts/solaris/zpool_resolver.cc +0 -12
  1118. data/ext/facter/facter/lib/src/facts/windows/cache.cc +0 -11
  1119. data/ext/facter/facter/lib/src/facts/windows/collection.cc +0 -91
  1120. data/ext/facter/facter/lib/src/facts/windows/dmi_resolver.cc +0 -39
  1121. data/ext/facter/facter/lib/src/facts/windows/identity_resolver.cc +0 -46
  1122. data/ext/facter/facter/lib/src/facts/windows/kernel_resolver.cc +0 -58
  1123. data/ext/facter/facter/lib/src/facts/windows/memory_resolver.cc +0 -25
  1124. data/ext/facter/facter/lib/src/facts/windows/networking_resolver.cc +0 -227
  1125. data/ext/facter/facter/lib/src/facts/windows/operating_system_resolver.cc +0 -147
  1126. data/ext/facter/facter/lib/src/facts/windows/processor_resolver.cc +0 -99
  1127. data/ext/facter/facter/lib/src/facts/windows/timezone_resolver.cc +0 -28
  1128. data/ext/facter/facter/lib/src/facts/windows/uptime_resolver.cc +0 -26
  1129. data/ext/facter/facter/lib/src/facts/windows/virtualization_resolver.cc +0 -63
  1130. data/ext/facter/facter/lib/src/java/facter.cc +0 -185
  1131. data/ext/facter/facter/lib/src/logging/logging.cc +0 -151
  1132. data/ext/facter/facter/lib/src/ruby/aggregate_resolution.cc +0 -249
  1133. data/ext/facter/facter/lib/src/ruby/chunk.cc +0 -136
  1134. data/ext/facter/facter/lib/src/ruby/confine.cc +0 -84
  1135. data/ext/facter/facter/lib/src/ruby/fact.cc +0 -398
  1136. data/ext/facter/facter/lib/src/ruby/module.cc +0 -1130
  1137. data/ext/facter/facter/lib/src/ruby/resolution.cc +0 -230
  1138. data/ext/facter/facter/lib/src/ruby/ruby.cc +0 -182
  1139. data/ext/facter/facter/lib/src/ruby/ruby_value.cc +0 -288
  1140. data/ext/facter/facter/lib/src/ruby/simple_resolution.cc +0 -156
  1141. data/ext/facter/facter/lib/src/util/bsd/scoped_ifaddrs.cc +0 -29
  1142. data/ext/facter/facter/lib/src/util/config/config.cc +0 -83
  1143. data/ext/facter/facter/lib/src/util/config/posix/config.cc +0 -12
  1144. data/ext/facter/facter/lib/src/util/config/windows/config.cc +0 -14
  1145. data/ext/facter/facter/lib/src/util/freebsd/geom.cc +0 -130
  1146. data/ext/facter/facter/lib/src/util/posix/scoped_addrinfo.cc +0 -41
  1147. data/ext/facter/facter/lib/src/util/posix/scoped_bio.cc +0 -29
  1148. data/ext/facter/facter/lib/src/util/posix/scoped_descriptor.cc +0 -20
  1149. data/ext/facter/facter/lib/src/util/posix/utmpx_file.cc +0 -36
  1150. data/ext/facter/facter/lib/src/util/scoped_file.cc +0 -26
  1151. data/ext/facter/facter/lib/src/util/solaris/k_stat.cc +0 -157
  1152. data/ext/facter/facter/lib/src/util/solaris/scoped_kstat.cc +0 -31
  1153. data/ext/facter/facter/lib/src/util/string.cc +0 -170
  1154. data/ext/facter/facter/lib/src/util/windows/wsa.cc +0 -69
  1155. data/ext/facter/facter/lib/src/util/yaml.cc +0 -72
  1156. data/ext/facter/facter/lib/tasks/spec.rake +0 -26
  1157. data/ext/facter/facter/lib/tests/CMakeLists.txt +0 -156
  1158. data/ext/facter/facter/lib/tests/collection_fixture.cc +0 -15
  1159. data/ext/facter/facter/lib/tests/collection_fixture.hpp +0 -19
  1160. data/ext/facter/facter/lib/tests/cwrapper.cc +0 -22
  1161. data/ext/facter/facter/lib/tests/facts/array_value.cc +0 -140
  1162. data/ext/facter/facter/lib/tests/facts/boolean_value.cc +0 -67
  1163. data/ext/facter/facter/lib/tests/facts/cache.cc +0 -100
  1164. data/ext/facter/facter/lib/tests/facts/collection.cc +0 -576
  1165. data/ext/facter/facter/lib/tests/facts/double_value.cc +0 -40
  1166. data/ext/facter/facter/lib/tests/facts/external/json_resolver.cc +0 -62
  1167. data/ext/facter/facter/lib/tests/facts/external/posix/execution_resolver.cc +0 -69
  1168. data/ext/facter/facter/lib/tests/facts/external/text_resolver.cc +0 -46
  1169. data/ext/facter/facter/lib/tests/facts/external/windows/execution_resolver.cc +0 -69
  1170. data/ext/facter/facter/lib/tests/facts/external/windows/powershell_resolver.cc +0 -122
  1171. data/ext/facter/facter/lib/tests/facts/external/yaml_resolver.cc +0 -70
  1172. data/ext/facter/facter/lib/tests/facts/integer_value.cc +0 -69
  1173. data/ext/facter/facter/lib/tests/facts/linux/dmi_resolver.cc +0 -116
  1174. data/ext/facter/facter/lib/tests/facts/linux/filesystem_resolver.cc +0 -13
  1175. data/ext/facter/facter/lib/tests/facts/linux/processor_fixture.cc +0 -259
  1176. data/ext/facter/facter/lib/tests/facts/linux/processor_fixture.hpp +0 -77
  1177. data/ext/facter/facter/lib/tests/facts/linux/processor_resolver.cc +0 -312
  1178. data/ext/facter/facter/lib/tests/facts/linux/virtualization_resolver.cc +0 -48
  1179. data/ext/facter/facter/lib/tests/facts/map_value.cc +0 -116
  1180. data/ext/facter/facter/lib/tests/facts/posix/collection.cc +0 -39
  1181. data/ext/facter/facter/lib/tests/facts/posix/uptime_resolver.cc +0 -52
  1182. data/ext/facter/facter/lib/tests/facts/resolvers/augeas_resolver.cc +0 -58
  1183. data/ext/facter/facter/lib/tests/facts/resolvers/disk_resolver.cc +0 -114
  1184. data/ext/facter/facter/lib/tests/facts/resolvers/dmi_resolver.cc +0 -152
  1185. data/ext/facter/facter/lib/tests/facts/resolvers/filesystem_resolver.cc +0 -206
  1186. data/ext/facter/facter/lib/tests/facts/resolvers/identity_resolver.cc +0 -83
  1187. data/ext/facter/facter/lib/tests/facts/resolvers/kernel_resolver.cc +0 -61
  1188. data/ext/facter/facter/lib/tests/facts/resolvers/ldom_resolver.cc +0 -86
  1189. data/ext/facter/facter/lib/tests/facts/resolvers/memory_resolver.cc +0 -135
  1190. data/ext/facter/facter/lib/tests/facts/resolvers/networking_resolver.cc +0 -507
  1191. data/ext/facter/facter/lib/tests/facts/resolvers/operating_system_resolver.cc +0 -247
  1192. data/ext/facter/facter/lib/tests/facts/resolvers/processor_resolver.cc +0 -157
  1193. data/ext/facter/facter/lib/tests/facts/resolvers/ruby_resolver.cc +0 -74
  1194. data/ext/facter/facter/lib/tests/facts/resolvers/ssh_resolver.cc +0 -103
  1195. data/ext/facter/facter/lib/tests/facts/resolvers/system_profiler_resolver.cc +0 -135
  1196. data/ext/facter/facter/lib/tests/facts/resolvers/timezone_resolver.cc +0 -49
  1197. data/ext/facter/facter/lib/tests/facts/resolvers/uptime_resolver.cc +0 -151
  1198. data/ext/facter/facter/lib/tests/facts/resolvers/virtualization_resolver.cc +0 -175
  1199. data/ext/facter/facter/lib/tests/facts/resolvers/xen_resolver.cc +0 -100
  1200. data/ext/facter/facter/lib/tests/facts/resolvers/zfs_resolver.cc +0 -65
  1201. data/ext/facter/facter/lib/tests/facts/resolvers/zone_resolver.cc +0 -122
  1202. data/ext/facter/facter/lib/tests/facts/resolvers/zpool_resolver.cc +0 -69
  1203. data/ext/facter/facter/lib/tests/facts/schema.cc +0 -796
  1204. data/ext/facter/facter/lib/tests/facts/string_value.cc +0 -270
  1205. data/ext/facter/facter/lib/tests/facts/windows/collection.cc +0 -60
  1206. data/ext/facter/facter/lib/tests/facts/windows/networking_resolver.cc +0 -217
  1207. data/ext/facter/facter/lib/tests/fixtures.cc +0 -63
  1208. data/ext/facter/facter/lib/tests/fixtures.hpp.in +0 -27
  1209. data/ext/facter/facter/lib/tests/fixtures/execution/with space/command_with_space.bat +0 -2
  1210. data/ext/facter/facter/lib/tests/fixtures/facts/external/json/facts.json +0 -12
  1211. data/ext/facter/facter/lib/tests/fixtures/facts/external/json/invalid.json +0 -1
  1212. data/ext/facter/facter/lib/tests/fixtures/facts/external/ordering/bar/foo.yaml +0 -1
  1213. data/ext/facter/facter/lib/tests/fixtures/facts/external/ordering/foo/foo.yaml +0 -1
  1214. data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/error_message +0 -4
  1215. data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/facts +0 -5
  1216. data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/failed +0 -3
  1217. data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/not_executable +0 -1
  1218. data/ext/facter/facter/lib/tests/fixtures/facts/external/text/facts.txt +0 -4
  1219. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/error_message.bat +0 -4
  1220. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/facts.bat +0 -4
  1221. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/failed.cmd +0 -2
  1222. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/not_executable +0 -1
  1223. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/ruby_script.rb +0 -1
  1224. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/error_message.ps1 +0 -3
  1225. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/facts.ps1 +0 -4
  1226. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/failed.ps1 +0 -2
  1227. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1 +0 -21
  1228. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/not_executable +0 -1
  1229. data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/yaml.ps1 +0 -18
  1230. data/ext/facter/facter/lib/tests/fixtures/facts/external/yaml/facts.yaml +0 -15
  1231. data/ext/facter/facter/lib/tests/fixtures/facts/external/yaml/invalid.yaml +0 -1
  1232. data/ext/facter/facter/lib/tests/fixtures/facts/external/z/303/266/facts.rb +0 -3
  1233. data/ext/facter/facter/lib/tests/fixtures/facts/external/z/303/266/facts.txt +0 -1
  1234. data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/azure +0 -3
  1235. data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/azure-unknown +0 -3
  1236. data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/not-azure +0 -0
  1237. data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/full.txt +0 -83
  1238. data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/full_alternative.txt +0 -83
  1239. data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/none.txt +0 -2
  1240. data/ext/facter/facter/lib/tests/fixtures/ruby/100_resolutions.rb +0 -7
  1241. data/ext/facter/facter/lib/tests/fixtures/ruby/101_resolutions.rb +0 -7
  1242. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate.rb +0 -9
  1243. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_invalid_require.rb +0 -9
  1244. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_block.rb +0 -30
  1245. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_cycle.rb +0 -9
  1246. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_invalid_merge.rb +0 -13
  1247. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_merge.rb +0 -23
  1248. data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_require.rb +0 -16
  1249. data/ext/facter/facter/lib/tests/fixtures/ruby/array_confine.rb +0 -6
  1250. data/ext/facter/facter/lib/tests/fixtures/ruby/array_fact.rb +0 -5
  1251. data/ext/facter/facter/lib/tests/fixtures/ruby/bad_command.rb +0 -19
  1252. data/ext/facter/facter/lib/tests/fixtures/ruby/bad_syntax.rb +0 -2
  1253. data/ext/facter/facter/lib/tests/fixtures/ruby/bignum_fact_value.rb +0 -5
  1254. data/ext/facter/facter/lib/tests/fixtures/ruby/block_confine.rb +0 -9
  1255. data/ext/facter/facter/lib/tests/fixtures/ruby/block_false_confine.rb +0 -9
  1256. data/ext/facter/facter/lib/tests/fixtures/ruby/block_nil_confine.rb +0 -9
  1257. data/ext/facter/facter/lib/tests/fixtures/ruby/block_true_confine.rb +0 -9
  1258. data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_false_confine.rb +0 -6
  1259. data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_false_fact.rb +0 -5
  1260. data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_true_confine.rb +0 -6
  1261. data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_true_fact.rb +0 -5
  1262. data/ext/facter/facter/lib/tests/fixtures/ruby/command_with_space.rb +0 -5
  1263. data/ext/facter/facter/lib/tests/fixtures/ruby/confine_missing_fact.rb +0 -22
  1264. data/ext/facter/facter/lib/tests/fixtures/ruby/confine_weight.rb +0 -20
  1265. data/ext/facter/facter/lib/tests/fixtures/ruby/custom_dir/expect_network_init.rb +0 -15
  1266. data/ext/facter/facter/lib/tests/fixtures/ruby/cycle.rb +0 -7
  1267. data/ext/facter/facter/lib/tests/fixtures/ruby/debug.rb +0 -7
  1268. data/ext/facter/facter/lib/tests/fixtures/ruby/debugging.rb +0 -14
  1269. data/ext/facter/facter/lib/tests/fixtures/ruby/debugonce.rb +0 -9
  1270. data/ext/facter/facter/lib/tests/fixtures/ruby/define_aggregate_fact.rb +0 -13
  1271. data/ext/facter/facter/lib/tests/fixtures/ruby/define_fact.rb +0 -9
  1272. data/ext/facter/facter/lib/tests/fixtures/ruby/double_fact.rb +0 -5
  1273. data/ext/facter/facter/lib/tests/fixtures/ruby/empty_command.rb +0 -3
  1274. data/ext/facter/facter/lib/tests/fixtures/ruby/empty_fact.rb +0 -1
  1275. data/ext/facter/facter/lib/tests/fixtures/ruby/empty_fact_with_value.rb +0 -1
  1276. data/ext/facter/facter/lib/tests/fixtures/ruby/empty_setcode_command.rb +0 -3
  1277. data/ext/facter/facter/lib/tests/fixtures/ruby/exec.rb +0 -7
  1278. data/ext/facter/facter/lib/tests/fixtures/ruby/execute_on_fail_raise.rb +0 -17
  1279. data/ext/facter/facter/lib/tests/fixtures/ruby/execute_on_fail_value.rb +0 -5
  1280. data/ext/facter/facter/lib/tests/fixtures/ruby/execute_timeout.rb +0 -1
  1281. data/ext/facter/facter/lib/tests/fixtures/ruby/execution_failure.rb +0 -5
  1282. data/ext/facter/facter/lib/tests/fixtures/ruby/existing_aggregate_resolution.rb +0 -5
  1283. data/ext/facter/facter/lib/tests/fixtures/ruby/existing_simple_resolution.rb +0 -5
  1284. data/ext/facter/facter/lib/tests/fixtures/ruby/fact.rb +0 -7
  1285. data/ext/facter/facter/lib/tests/fixtures/ruby/facter.rb +0 -7
  1286. data/ext/facter/facter/lib/tests/fixtures/ruby/facterversion.rb +0 -17
  1287. data/ext/facter/facter/lib/tests/fixtures/ruby/hash_fact.rb +0 -5
  1288. data/ext/facter/facter/lib/tests/fixtures/ruby/hash_with_non_string_key.rb +0 -5
  1289. data/ext/facter/facter/lib/tests/fixtures/ruby/integer_fact.rb +0 -5
  1290. data/ext/facter/facter/lib/tests/fixtures/ruby/log_exception.rb +0 -21
  1291. data/ext/facter/facter/lib/tests/fixtures/ruby/lookup.rb +0 -7
  1292. data/ext/facter/facter/lib/tests/fixtures/ruby/multi_confine.rb +0 -6
  1293. data/ext/facter/facter/lib/tests/fixtures/ruby/named_resolution.rb +0 -13
  1294. data/ext/facter/facter/lib/tests/fixtures/ruby/negative_number.rb +0 -5
  1295. data/ext/facter/facter/lib/tests/fixtures/ruby/nil_fact.rb +0 -5
  1296. data/ext/facter/facter/lib/tests/fixtures/ruby/nonexistent_command.rb +0 -21
  1297. data/ext/facter/facter/lib/tests/fixtures/ruby/on_message.rb +0 -16
  1298. data/ext/facter/facter/lib/tests/fixtures/ruby/range_confine.rb +0 -6
  1299. data/ext/facter/facter/lib/tests/fixtures/ruby/regexp_confine.rb +0 -6
  1300. data/ext/facter/facter/lib/tests/fixtures/ruby/ruby.rb +0 -6
  1301. data/ext/facter/facter/lib/tests/fixtures/ruby/simple.rb +0 -11
  1302. data/ext/facter/facter/lib/tests/fixtures/ruby/simple_command.rb +0 -7
  1303. data/ext/facter/facter/lib/tests/fixtures/ruby/simple_confine.rb +0 -6
  1304. data/ext/facter/facter/lib/tests/fixtures/ruby/simple_resolution.rb +0 -5
  1305. data/ext/facter/facter/lib/tests/fixtures/ruby/single_allocation.rb +0 -7
  1306. data/ext/facter/facter/lib/tests/fixtures/ruby/stderr_output.rb +0 -9
  1307. data/ext/facter/facter/lib/tests/fixtures/ruby/string_fact.rb +0 -5
  1308. data/ext/facter/facter/lib/tests/fixtures/ruby/timeout.rb +0 -10
  1309. data/ext/facter/facter/lib/tests/fixtures/ruby/trace.rb +0 -22
  1310. data/ext/facter/facter/lib/tests/fixtures/ruby/uni/341/220/201dir/customfacts/342/204/242.rb +0 -6
  1311. data/ext/facter/facter/lib/tests/fixtures/ruby/uses_exit_code.rb +0 -7
  1312. data/ext/facter/facter/lib/tests/fixtures/ruby/value.rb +0 -6
  1313. data/ext/facter/facter/lib/tests/fixtures/ruby/version.rb +0 -2
  1314. data/ext/facter/facter/lib/tests/fixtures/ruby/warn.rb +0 -7
  1315. data/ext/facter/facter/lib/tests/fixtures/ruby/warnonce.rb +0 -9
  1316. data/ext/facter/facter/lib/tests/fixtures/ruby/weight.rb +0 -20
  1317. data/ext/facter/facter/lib/tests/fixtures/ruby/weight_option.rb +0 -17
  1318. data/ext/facter/facter/lib/tests/fixtures/ruby/which.rb +0 -9
  1319. data/ext/facter/facter/lib/tests/fixtures/ruby/windows/ole.rb +0 -7
  1320. data/ext/facter/facter/lib/tests/java/facter.cc +0 -69
  1321. data/ext/facter/facter/lib/tests/log_capture.cc +0 -29
  1322. data/ext/facter/facter/lib/tests/log_capture.hpp +0 -35
  1323. data/ext/facter/facter/lib/tests/logging/logging.cc +0 -69
  1324. data/ext/facter/facter/lib/tests/main.cc +0 -20
  1325. data/ext/facter/facter/lib/tests/mock_server.cc +0 -44
  1326. data/ext/facter/facter/lib/tests/mock_server.hpp +0 -25
  1327. data/ext/facter/facter/lib/tests/ruby/ruby.cc +0 -634
  1328. data/ext/facter/facter/lib/tests/ruby/ruby_dirfacts.cc +0 -35
  1329. data/ext/facter/facter/lib/tests/ruby/ruby_helper.cc +0 -41
  1330. data/ext/facter/facter/lib/tests/ruby/ruby_helper.hpp +0 -8
  1331. data/ext/facter/facter/lib/tests/ruby/windows/ruby.cc +0 -53
  1332. data/ext/facter/facter/lib/tests/util/bsd/scoped_ifaddrs.cc +0 -10
  1333. data/ext/facter/facter/lib/tests/util/posix/scoped_addrinfo.cc +0 -11
  1334. data/ext/facter/facter/lib/tests/util/posix/scoped_bio.cc +0 -12
  1335. data/ext/facter/facter/lib/tests/util/posix/scoped_descriptor.cc +0 -22
  1336. data/ext/facter/facter/lib/tests/util/string.cc +0 -291
  1337. data/ext/facter/facter/lib/version.h.in +0 -28
  1338. data/ext/facter/facter/locales/CMakeLists.txt +0 -7
  1339. data/ext/facter/facter/locales/FACTER.pot +0 -1621
  1340. data/ext/facter/facter/man/man8/facter.8 +0 -205
  1341. data/ext/facter/facter/scripts/cpplint.py +0 -4754
  1342. data/ext/facter/facter/scripts/travis_target.sh +0 -83
  1343. data/ext/facter/facter/tasks/ci.rake +0 -22
  1344. data/ext/facter/leatherman/CHANGELOG.md +0 -439
  1345. data/ext/facter/leatherman/CMakeLists.txt +0 -143
  1346. data/ext/facter/leatherman/CONTRIBUTING.md +0 -98
  1347. data/ext/facter/leatherman/LICENSE +0 -17
  1348. data/ext/facter/leatherman/LeathermanConfig.cmake.in +0 -57
  1349. data/ext/facter/leatherman/LeathermanConfigVersion.cmake.in +0 -11
  1350. data/ext/facter/leatherman/MAINTAINERS +0 -28
  1351. data/ext/facter/leatherman/README.md +0 -416
  1352. data/ext/facter/leatherman/appveyor.yml +0 -47
  1353. data/ext/facter/leatherman/catch/CMakeLists.txt +0 -1
  1354. data/ext/facter/leatherman/cmake/FindICU.cmake +0 -690
  1355. data/ext/facter/leatherman/cmake/GetGitRevisionDescription.cmake +0 -130
  1356. data/ext/facter/leatherman/cmake/GetGitRevisionDescription.cmake.in +0 -38
  1357. data/ext/facter/leatherman/cmake/cflags.cmake +0 -117
  1358. data/ext/facter/leatherman/cmake/generate_translations.cmake +0 -17
  1359. data/ext/facter/leatherman/cmake/internal.cmake +0 -241
  1360. data/ext/facter/leatherman/cmake/leatherman.cmake.in +0 -369
  1361. data/ext/facter/leatherman/cmake/leatherman_config.cmake +0 -80
  1362. data/ext/facter/leatherman/cmake/normalize_pot.cmake +0 -17
  1363. data/ext/facter/leatherman/cmake/options.cmake +0 -22
  1364. data/ext/facter/leatherman/cmake/pod2man.cmake +0 -36
  1365. data/ext/facter/leatherman/curl/CMakeLists.txt +0 -42
  1366. data/ext/facter/leatherman/curl/inc/leatherman/curl/client.hpp +0 -450
  1367. data/ext/facter/leatherman/curl/inc/leatherman/curl/request.hpp +0 -130
  1368. data/ext/facter/leatherman/curl/inc/leatherman/curl/response.hpp +0 -80
  1369. data/ext/facter/leatherman/curl/src/client.cc +0 -590
  1370. data/ext/facter/leatherman/curl/src/request.cc +0 -112
  1371. data/ext/facter/leatherman/curl/src/response.cc +0 -62
  1372. data/ext/facter/leatherman/curl/tests/CMakeLists.txt +0 -22
  1373. data/ext/facter/leatherman/curl/tests/client_test.cc +0 -628
  1374. data/ext/facter/leatherman/curl/tests/fixtures.cc +0 -27
  1375. data/ext/facter/leatherman/curl/tests/fixtures.hpp +0 -31
  1376. data/ext/facter/leatherman/curl/tests/mock_curl.cc +0 -431
  1377. data/ext/facter/leatherman/curl/tests/mock_curl.hpp +0 -86
  1378. data/ext/facter/leatherman/curl/tests/request_test.cc +0 -85
  1379. data/ext/facter/leatherman/curl/tests/response_test.cc +0 -58
  1380. data/ext/facter/leatherman/dynamic_library/CMakeLists.txt +0 -43
  1381. data/ext/facter/leatherman/dynamic_library/inc/leatherman/dynamic_library/dynamic_library.hpp +0 -122
  1382. data/ext/facter/leatherman/dynamic_library/src/dynamic_library.cc +0 -57
  1383. data/ext/facter/leatherman/dynamic_library/src/posix/dynamic_library.cc +0 -91
  1384. data/ext/facter/leatherman/dynamic_library/src/windows/dynamic_library.cc +0 -128
  1385. data/ext/facter/leatherman/dynamic_library/tests/dynamic_library_tests.cc +0 -94
  1386. data/ext/facter/leatherman/dynamic_library/tests/fixtures.hpp.in +0 -3
  1387. data/ext/facter/leatherman/dynamic_library/tests/test-lib/goodbye.cc +0 -5
  1388. data/ext/facter/leatherman/dynamic_library/tests/test-lib/hello.cc +0 -7
  1389. data/ext/facter/leatherman/execution/CMakeLists.txt +0 -65
  1390. data/ext/facter/leatherman/execution/inc/leatherman/execution/execution.hpp +0 -488
  1391. data/ext/facter/leatherman/execution/src/execution.cc +0 -510
  1392. data/ext/facter/leatherman/execution/src/posix/execution.cc +0 -574
  1393. data/ext/facter/leatherman/execution/src/posix/generic/platform.cc +0 -30
  1394. data/ext/facter/leatherman/execution/src/posix/platform.hpp +0 -15
  1395. data/ext/facter/leatherman/execution/src/posix/solaris/platform.cc +0 -197
  1396. data/ext/facter/leatherman/execution/src/windows/execution.cc +0 -698
  1397. data/ext/facter/leatherman/execution/tests/fixtures.hpp.in +0 -2
  1398. data/ext/facter/leatherman/execution/tests/fixtures/echo_pid +0 -2
  1399. data/ext/facter/leatherman/execution/tests/fixtures/error_message +0 -5
  1400. data/ext/facter/leatherman/execution/tests/fixtures/execution/selfkill.sh +0 -3
  1401. data/ext/facter/leatherman/execution/tests/fixtures/execution/sleep.sh +0 -3
  1402. data/ext/facter/leatherman/execution/tests/fixtures/facts +0 -5
  1403. data/ext/facter/leatherman/execution/tests/fixtures/failed +0 -3
  1404. data/ext/facter/leatherman/execution/tests/fixtures/ls/crlf.txt +0 -3
  1405. data/ext/facter/leatherman/execution/tests/fixtures/ls/file1.txt +0 -1
  1406. data/ext/facter/leatherman/execution/tests/fixtures/ls/file2.txt +0 -1
  1407. data/ext/facter/leatherman/execution/tests/fixtures/ls/file3.txt +0 -1
  1408. data/ext/facter/leatherman/execution/tests/fixtures/ls/file4.txt +0 -7
  1409. data/ext/facter/leatherman/execution/tests/fixtures/not_executable +0 -1
  1410. data/ext/facter/leatherman/execution/tests/fixtures/windows/error_message.bat +0 -6
  1411. data/ext/facter/leatherman/execution/tests/fixtures/windows/facts.bat +0 -4
  1412. data/ext/facter/leatherman/execution/tests/fixtures/windows/failed.cmd +0 -2
  1413. data/ext/facter/leatherman/execution/tests/fixtures/windows/not_executable +0 -1
  1414. data/ext/facter/leatherman/execution/tests/fixtures/windows/ruby_script.rb +0 -1
  1415. data/ext/facter/leatherman/execution/tests/log_capture.cc +0 -29
  1416. data/ext/facter/leatherman/execution/tests/log_capture.hpp +0 -35
  1417. data/ext/facter/leatherman/execution/tests/lth_cat.cc +0 -38
  1418. data/ext/facter/leatherman/execution/tests/lth_cat.hpp +0 -9
  1419. data/ext/facter/leatherman/execution/tests/posix/execution.cc +0 -728
  1420. data/ext/facter/leatherman/execution/tests/posix/solaris/execution.cc +0 -54
  1421. data/ext/facter/leatherman/execution/tests/windows/execution.cc +0 -789
  1422. data/ext/facter/leatherman/file_util/CMakeLists.txt +0 -18
  1423. data/ext/facter/leatherman/file_util/inc/leatherman/file_util/directory.hpp +0 -28
  1424. data/ext/facter/leatherman/file_util/inc/leatherman/file_util/file.hpp +0 -95
  1425. data/ext/facter/leatherman/file_util/src/directory.cc +0 -51
  1426. data/ext/facter/leatherman/file_util/src/file.cc +0 -131
  1427. data/ext/facter/leatherman/file_util/tests/directory_utils_test.cc +0 -87
  1428. data/ext/facter/leatherman/file_util/tests/file_utils_test.cc +0 -195
  1429. data/ext/facter/leatherman/file_util/tests/fixtures.cc +0 -37
  1430. data/ext/facter/leatherman/file_util/tests/fixtures.hpp +0 -39
  1431. data/ext/facter/leatherman/json_container/CMakeLists.txt +0 -11
  1432. data/ext/facter/leatherman/json_container/README.md +0 -108
  1433. data/ext/facter/leatherman/json_container/inc/leatherman/json_container/json_container.hpp +0 -443
  1434. data/ext/facter/leatherman/json_container/src/json_container.cc +0 -655
  1435. data/ext/facter/leatherman/json_container/tests/json_container_test.cc +0 -1129
  1436. data/ext/facter/leatherman/locale/CMakeLists.txt +0 -46
  1437. data/ext/facter/leatherman/locale/disabled/locale.cc +0 -38
  1438. data/ext/facter/leatherman/locale/inc/leatherman/locale/locale.hpp +0 -263
  1439. data/ext/facter/leatherman/locale/locales/CMakeLists.txt +0 -6
  1440. data/ext/facter/leatherman/locale/locales/fr.po +0 -40
  1441. data/ext/facter/leatherman/locale/locales/leatherman_locale.pot +0 -41
  1442. data/ext/facter/leatherman/locale/src/locale.cc +0 -96
  1443. data/ext/facter/leatherman/locale/tests/format.cc +0 -117
  1444. data/ext/facter/leatherman/locale/tests/locale.cc +0 -190
  1445. data/ext/facter/leatherman/locales/CMakeLists.txt +0 -7
  1446. data/ext/facter/leatherman/locales/leatherman.pot +0 -717
  1447. data/ext/facter/leatherman/logging/CMakeLists.txt +0 -43
  1448. data/ext/facter/leatherman/logging/inc/leatherman/logging/logging.hpp +0 -264
  1449. data/ext/facter/leatherman/logging/locales/CMakeLists.txt +0 -6
  1450. data/ext/facter/leatherman/logging/locales/fr.po +0 -72
  1451. data/ext/facter/leatherman/logging/locales/leatherman_logging.pot +0 -72
  1452. data/ext/facter/leatherman/logging/src/logging.cc +0 -229
  1453. data/ext/facter/leatherman/logging/src/posix/logging.cc +0 -39
  1454. data/ext/facter/leatherman/logging/src/windows/logging.cc +0 -52
  1455. data/ext/facter/leatherman/logging/tests/logging.cc +0 -118
  1456. data/ext/facter/leatherman/logging/tests/logging.hpp +0 -88
  1457. data/ext/facter/leatherman/logging/tests/logging_i18n.cc +0 -103
  1458. data/ext/facter/leatherman/logging/tests/logging_on_message.cc +0 -61
  1459. data/ext/facter/leatherman/logging/tests/logging_stream.cc +0 -159
  1460. data/ext/facter/leatherman/logging/tests/logging_stream_lines.cc +0 -172
  1461. data/ext/facter/leatherman/logging/tests/posix/logging.cc +0 -23
  1462. data/ext/facter/leatherman/logging/tests/windows/logging.cc +0 -13
  1463. data/ext/facter/leatherman/nowide/CMakeLists.txt +0 -7
  1464. data/ext/facter/leatherman/rapidjson/CMakeLists.txt +0 -1
  1465. data/ext/facter/leatherman/ruby/CMakeLists.txt +0 -26
  1466. data/ext/facter/leatherman/ruby/inc/leatherman/ruby/api.hpp +0 -748
  1467. data/ext/facter/leatherman/ruby/src/api.cc +0 -528
  1468. data/ext/facter/leatherman/ruby/src/posix/api.cc +0 -14
  1469. data/ext/facter/leatherman/ruby/src/windows/api.cc +0 -20
  1470. data/ext/facter/leatherman/ruby/tests/api-test.cc +0 -206
  1471. data/ext/facter/leatherman/scripts/cpplint.py +0 -6323
  1472. data/ext/facter/leatherman/tests/CMakeLists.txt +0 -22
  1473. data/ext/facter/leatherman/tests/main.cc +0 -17
  1474. data/ext/facter/leatherman/util/CMakeLists.txt +0 -36
  1475. data/ext/facter/leatherman/util/inc/leatherman/util/environment.hpp +0 -69
  1476. data/ext/facter/leatherman/util/inc/leatherman/util/option_set.hpp +0 -228
  1477. data/ext/facter/leatherman/util/inc/leatherman/util/posix/scoped_descriptor.hpp +0 -32
  1478. data/ext/facter/leatherman/util/inc/leatherman/util/regex.hpp +0 -80
  1479. data/ext/facter/leatherman/util/inc/leatherman/util/scope_exit.hpp +0 -62
  1480. data/ext/facter/leatherman/util/inc/leatherman/util/scoped_env.hpp +0 -35
  1481. data/ext/facter/leatherman/util/inc/leatherman/util/scoped_resource.hpp +0 -130
  1482. data/ext/facter/leatherman/util/inc/leatherman/util/strings.hpp +0 -57
  1483. data/ext/facter/leatherman/util/inc/leatherman/util/time.hpp +0 -36
  1484. data/ext/facter/leatherman/util/inc/leatherman/util/timer.hpp +0 -43
  1485. data/ext/facter/leatherman/util/inc/leatherman/util/uri.hpp +0 -23
  1486. data/ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp +0 -32
  1487. data/ext/facter/leatherman/util/src/environment.cc +0 -29
  1488. data/ext/facter/leatherman/util/src/posix/environment.cc +0 -75
  1489. data/ext/facter/leatherman/util/src/posix/scoped_descriptor.cc +0 -23
  1490. data/ext/facter/leatherman/util/src/posix/time.cc +0 -9
  1491. data/ext/facter/leatherman/util/src/scope_exit.cc +0 -43
  1492. data/ext/facter/leatherman/util/src/scoped_env.cc +0 -37
  1493. data/ext/facter/leatherman/util/src/strings.cc +0 -41
  1494. data/ext/facter/leatherman/util/src/time.cc +0 -49
  1495. data/ext/facter/leatherman/util/src/uri.cc +0 -75
  1496. data/ext/facter/leatherman/util/src/windows/environment.cc +0 -75
  1497. data/ext/facter/leatherman/util/src/windows/scoped_handle.cc +0 -24
  1498. data/ext/facter/leatherman/util/src/windows/time.cc +0 -10
  1499. data/ext/facter/leatherman/util/tests/environment.cc +0 -90
  1500. data/ext/facter/leatherman/util/tests/option_set.cc +0 -234
  1501. data/ext/facter/leatherman/util/tests/posix/environment.cc +0 -36
  1502. data/ext/facter/leatherman/util/tests/scoped_env.cc +0 -52
  1503. data/ext/facter/leatherman/util/tests/strings_test.cc +0 -71
  1504. data/ext/facter/leatherman/util/tests/timer.cc +0 -39
  1505. data/ext/facter/leatherman/util/tests/uri.cc +0 -104
  1506. data/ext/facter/leatherman/util/tests/windows/environment.cc +0 -30
  1507. data/ext/facter/leatherman/vendor/Catch-1.10.0.zip +0 -0
  1508. data/ext/facter/leatherman/vendor/nowide/build/Jamfile.v2 +0 -26
  1509. data/ext/facter/leatherman/vendor/nowide/doc/Doxyfile +0 -1632
  1510. data/ext/facter/leatherman/vendor/nowide/doc/LICENSE_1_0.txt +0 -23
  1511. data/ext/facter/leatherman/vendor/nowide/doc/gendoc.sh +0 -11
  1512. data/ext/facter/leatherman/vendor/nowide/doc/main.txt +0 -354
  1513. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/args.hpp +0 -167
  1514. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cenv.hpp +0 -126
  1515. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/config.hpp +0 -54
  1516. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/convert.hpp +0 -154
  1517. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cstdio.hpp +0 -101
  1518. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cstdlib.hpp +0 -16
  1519. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/filebuf.hpp +0 -415
  1520. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/fstream.hpp +0 -283
  1521. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/integration/filesystem.hpp +0 -28
  1522. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/iostream.hpp +0 -99
  1523. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/stackstring.hpp +0 -154
  1524. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/system.hpp +0 -46
  1525. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/utf8_codecvt.hpp +0 -499
  1526. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/windows.hpp +0 -39
  1527. data/ext/facter/leatherman/vendor/nowide/index.html +0 -16
  1528. data/ext/facter/leatherman/vendor/nowide/src/iostream.cpp +0 -263
  1529. data/ext/facter/leatherman/vendor/nowide/standalone/CMakeLists.txt +0 -104
  1530. data/ext/facter/leatherman/vendor/nowide/standalone/MinGW.cmake +0 -9
  1531. data/ext/facter/leatherman/vendor/nowide/standalone/config.hpp +0 -37
  1532. data/ext/facter/leatherman/vendor/nowide/standalone/convert +0 -34
  1533. data/ext/facter/leatherman/vendor/nowide/standalone/encoding_errors.hpp +0 -58
  1534. data/ext/facter/leatherman/vendor/nowide/standalone/encoding_utf.hpp +0 -84
  1535. data/ext/facter/leatherman/vendor/nowide/standalone/run_convert_and_build.sh +0 -17
  1536. data/ext/facter/leatherman/vendor/nowide/standalone/scoped_ptr.hpp +0 -93
  1537. data/ext/facter/leatherman/vendor/nowide/standalone/utf.hpp +0 -469
  1538. data/ext/facter/leatherman/vendor/nowide/template.hpp +0 -19
  1539. data/ext/facter/leatherman/vendor/nowide/test/Jamfile.v2 +0 -43
  1540. data/ext/facter/leatherman/vendor/nowide/test/test.hpp +0 -25
  1541. data/ext/facter/leatherman/vendor/nowide/test/test_codecvt.cpp +0 -254
  1542. data/ext/facter/leatherman/vendor/nowide/test/test_convert.cpp +0 -101
  1543. data/ext/facter/leatherman/vendor/nowide/test/test_env.cpp +0 -49
  1544. data/ext/facter/leatherman/vendor/nowide/test/test_fs.cpp +0 -48
  1545. data/ext/facter/leatherman/vendor/nowide/test/test_fstream.cpp +0 -184
  1546. data/ext/facter/leatherman/vendor/nowide/test/test_iostream.cpp +0 -52
  1547. data/ext/facter/leatherman/vendor/nowide/test/test_stdio.cpp +0 -60
  1548. data/ext/facter/leatherman/vendor/nowide/test/test_system.cpp +0 -91
  1549. data/ext/facter/leatherman/vendor/rapidjson-1.0.2.zip +0 -0
  1550. data/ext/facter/leatherman/windows/CMakeLists.txt +0 -27
  1551. data/ext/facter/leatherman/windows/inc/leatherman/windows/file_util.hpp +0 -23
  1552. data/ext/facter/leatherman/windows/inc/leatherman/windows/process.hpp +0 -22
  1553. data/ext/facter/leatherman/windows/inc/leatherman/windows/registry.hpp +0 -56
  1554. data/ext/facter/leatherman/windows/inc/leatherman/windows/system_error.hpp +0 -23
  1555. data/ext/facter/leatherman/windows/inc/leatherman/windows/user.hpp +0 -30
  1556. data/ext/facter/leatherman/windows/inc/leatherman/windows/windows.hpp +0 -10
  1557. data/ext/facter/leatherman/windows/inc/leatherman/windows/wmi.hpp +0 -193
  1558. data/ext/facter/leatherman/windows/src/file_util.cc +0 -28
  1559. data/ext/facter/leatherman/windows/src/process.cc +0 -42
  1560. data/ext/facter/leatherman/windows/src/registry.cc +0 -96
  1561. data/ext/facter/leatherman/windows/src/system_error.cc +0 -33
  1562. data/ext/facter/leatherman/windows/src/user.cc +0 -76
  1563. data/ext/facter/leatherman/windows/src/wmi.cc +0 -208
  1564. data/ext/facter/leatherman/windows/tests/file_utils_test.cc +0 -13
@@ -1,91 +0,0 @@
1
- #include <leatherman/dynamic_library/dynamic_library.hpp>
2
- #include <leatherman/logging/logging.hpp>
3
- #include <dlfcn.h>
4
-
5
- using namespace std;
6
- namespace lth_locale = leatherman::locale;
7
-
8
- namespace leatherman { namespace dynamic_library {
9
-
10
- dynamic_library dynamic_library::find_by_pattern(std::string const& pattern)
11
- {
12
- // POSIX doesn't have this capability
13
- return dynamic_library();
14
- }
15
-
16
- dynamic_library dynamic_library::find_by_symbol(std::string const& symbol)
17
- {
18
- dynamic_library library;
19
-
20
- // Load the "null" library; this will cause dlsym to search for the symbol
21
- void* handle = dlopen(nullptr, RTLD_GLOBAL | RTLD_LAZY);
22
- if (!handle) {
23
- return library;
24
- }
25
-
26
- // Check to see if a search for the symbol succeeds
27
- if (!dlsym(handle, symbol.c_str())) {
28
- dlclose(handle);
29
- return library;
30
- }
31
-
32
- // At least one loaded module will resolve the given symbol
33
- // Return this handle to allow the caller to search for other symbols
34
- library._handle = handle;
35
- library._first_load = false;
36
- return library;
37
- }
38
-
39
- bool dynamic_library::load(string const& name, bool global)
40
- {
41
- close();
42
-
43
- auto load_mode = (global ? RTLD_GLOBAL : RTLD_LOCAL) | RTLD_LAZY;
44
-
45
- _handle = dlopen(name.c_str(), load_mode);
46
- if (!_handle) {
47
- LOG_DEBUG("library {1} not found {2} ({3}).", name.c_str(), strerror(errno), errno);
48
- return false;
49
- }
50
- _first_load = true;
51
- _name = name;
52
- return true;
53
- }
54
-
55
- void dynamic_library::close()
56
- {
57
- if (_handle) {
58
- dlclose(_handle);
59
- _handle = nullptr;
60
- }
61
- _name.clear();
62
- _first_load = false;
63
- }
64
-
65
- void* dynamic_library::find_symbol(string const& name, bool throw_if_missing, string const& alias) const
66
- {
67
- if (!_handle) {
68
- if (throw_if_missing) {
69
- throw missing_import_exception("library is not loaded.");
70
- } else {
71
- LOG_DEBUG("library {1} is not loaded when attempting to load symbol {2}.", _name.c_str(), name.c_str());
72
- }
73
- return nullptr;
74
- }
75
- void* symbol = dlsym(_handle, name.c_str());
76
- if (!symbol && !alias.empty()) {
77
- LOG_DEBUG("symbol {1} not found in library {2}, trying alias {3}.", name.c_str(), _name.c_str(), alias.c_str());
78
- symbol = dlsym(_handle, alias.c_str());
79
- }
80
- if (!symbol) {
81
- if (throw_if_missing) {
82
- throw missing_import_exception(lth_locale::format("symbol {1} was not found in {2}.", name, _name));
83
- } else {
84
- LOG_DEBUG("symbol {1} not found in library {2}.", name.c_str(), _name.c_str());
85
- }
86
- }
87
- return symbol;
88
- }
89
-
90
- }} // namespace leatherman::dynamic_library
91
-
@@ -1,128 +0,0 @@
1
- #include <leatherman/util/scoped_resource.hpp>
2
- #include <leatherman/util/regex.hpp>
3
- #include <leatherman/dynamic_library/dynamic_library.hpp>
4
- #include <leatherman/windows/system_error.hpp>
5
- #include <leatherman/windows/windows.hpp>
6
- #include <leatherman/logging/logging.hpp>
7
- #include <leatherman/locale/locale.hpp>
8
- #include <boost/nowide/convert.hpp>
9
- #include <tlhelp32.h>
10
-
11
- // Mark string for translation (alias for leatherman::locale::format)
12
- using leatherman::locale::_;
13
-
14
- using namespace std;
15
- using namespace leatherman::util;
16
- using namespace leatherman::windows;
17
- namespace lth_locale = leatherman::locale;
18
-
19
- namespace leatherman { namespace dynamic_library {
20
-
21
- dynamic_library dynamic_library::find_by_pattern(std::string const& pattern)
22
- {
23
- dynamic_library library;
24
-
25
- // Check to see if the library is loaded. Walk the list of loaded modules and match against pattern.
26
- // See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686849(v=vs.85).aspx for details on
27
- // the Tool Help library.
28
- HANDLE hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
29
- if (hModuleSnap == INVALID_HANDLE_VALUE) {
30
- LOG_DEBUG("library matching pattern {1} not found, CreateToolhelp32Snapshot failed: {2}.", pattern.c_str(), windows::system_error());
31
- return library;
32
- }
33
- scoped_resource<HANDLE> hModSnap(hModuleSnap, CloseHandle);
34
-
35
- MODULEENTRY32 me32 = {};
36
- me32.dwSize = sizeof(MODULEENTRY32);
37
- if (!Module32First(hModSnap, &me32)) {
38
- LOG_DEBUG("library matching pattern {1} not found, Module32First failed: {2}.", pattern.c_str(), windows::system_error());
39
- return library;
40
- }
41
-
42
- boost::regex rx(pattern);
43
- do {
44
- auto libname = boost::nowide::narrow(me32.szModule);
45
- if (re_search(libname, rx)) {
46
- // Use GetModuleHandleEx to ensure the reference count is incremented. If the module has been
47
- // unloaded since the snapshot was made, this may fail and we should return an empty library.
48
- HMODULE hMod;
49
- if (GetModuleHandleEx(0, me32.szModule, &hMod)) {
50
- library._handle = hMod;
51
- library._first_load = false;
52
- LOG_DEBUG("library {1} found from pattern {2}", libname, pattern);
53
- } else {
54
- LOG_DEBUG("library {1} found from pattern {2}, but unloaded before handle was acquired", libname, pattern);
55
- }
56
- return library;
57
- } else {
58
- LOG_TRACE("library %1% didn't match pattern %2%", libname, pattern);
59
- }
60
- } while (Module32Next(hModSnap, &me32));
61
-
62
- LOG_DEBUG("no loaded libraries found matching pattern {1}", pattern);
63
- return library;
64
- }
65
-
66
- dynamic_library dynamic_library::find_by_symbol(std::string const& symbol)
67
- {
68
- // Windows doesn't have this capability.
69
- return dynamic_library();
70
- }
71
-
72
- bool dynamic_library::load(string const& name, bool global)
73
- {
74
- close();
75
-
76
- // Check if the module has already been loaded (and increment the ref count).
77
- HMODULE hMod;
78
- auto wname = boost::nowide::widen(name);
79
- if (!GetModuleHandleExW(0, wname.c_str(), &hMod)) {
80
- // Load now
81
- hMod = LoadLibraryW(wname.c_str());
82
- if (!hMod) {
83
- LOG_DEBUG("library {1} not found {2}.", name.c_str(), windows::system_error());
84
- return false;
85
- }
86
- _first_load = true;
87
- }
88
- _handle = hMod;
89
- _name = name;
90
- return true;
91
- }
92
-
93
- void dynamic_library::close()
94
- {
95
- if (_handle) {
96
- FreeLibrary(static_cast<HMODULE>(_handle));
97
- _handle = nullptr;
98
- }
99
- _name.clear();
100
- _first_load = false;
101
- }
102
-
103
- void* dynamic_library::find_symbol(string const& name, bool throw_if_missing, string const& alias) const
104
- {
105
- if (!_handle) {
106
- if (throw_if_missing) {
107
- throw missing_import_exception(_("library is not loaded"));
108
- } else {
109
- LOG_DEBUG("library {1} is not loaded when attempting to load symbol {2}.", _name.c_str(), name.c_str());
110
- }
111
- return nullptr;
112
- }
113
- auto symbol = GetProcAddress(static_cast<HMODULE>(_handle), name.c_str());
114
- if (!symbol && !alias.empty()) {
115
- LOG_DEBUG("symbol {1} not found in library {2}, trying alias {3}.", name.c_str(), _name.c_str(), alias.c_str());
116
- symbol = GetProcAddress(static_cast<HMODULE>(_handle), alias.c_str());
117
- }
118
- if (!symbol) {
119
- if (throw_if_missing) {
120
- throw missing_import_exception(_("symbol {1} was not found in {2}.", name, _name));
121
- } else {
122
- LOG_DEBUG("symbol {1} not found in library {2}.", name.c_str(), _name.c_str());
123
- }
124
- }
125
- return reinterpret_cast<void *>(symbol);
126
- }
127
-
128
- }} // namespace leatherman::dynamic_library
@@ -1,94 +0,0 @@
1
- #include <catch.hpp>
2
- #include <leatherman/dynamic_library/dynamic_library.hpp>
3
- #include "fixtures.hpp"
4
-
5
- using namespace leatherman::dynamic_library;
6
-
7
- std::string const lib_path = TEST_LIB_DIRECTORY + std::string("/libtest.so");
8
- std::string const lib_path2 = TEST_LIB_DIRECTORY + std::string("/libtest1.so");
9
-
10
- TEST_CASE("dynamic_library::load and dynamic_library::close", "[dyn-lib]") {
11
- SECTION("should not be loaded by default") {
12
- dynamic_library lib;
13
- REQUIRE_FALSE(lib.loaded());
14
- }
15
-
16
- SECTION("should load library from path, then close it"){
17
- dynamic_library lib;
18
- REQUIRE(lib.load(lib_path));
19
- REQUIRE(lib.loaded());
20
- REQUIRE(lib.first_load());
21
- lib.close();
22
- REQUIRE_FALSE(lib.loaded());
23
- }
24
-
25
- SECTION("should fail to load a nonexistent library") {
26
- dynamic_library lib;
27
- REQUIRE_FALSE(lib.load("no_such_library"));
28
- }
29
- }
30
-
31
- TEST_CASE("dynamic_library::find_symbol", "[dyn-lib]"){
32
- dynamic_library lib;
33
- REQUIRE(lib.load(lib_path));
34
-
35
- SECTION("should fail to find nonexistent symbol") {
36
- REQUIRE_FALSE(lib.find_symbol("not_here"));
37
- REQUIRE_THROWS(lib.find_symbol("not_here", true));
38
- }
39
-
40
- SECTION("should find library function") {
41
- REQUIRE(lib.find_symbol("hello"));
42
- }
43
-
44
- SECTION("should find aliased symbol"){
45
- dynamic_library lib2;
46
- REQUIRE(lib2.load(lib_path2));
47
- REQUIRE(lib2.find_symbol("not_here", false, "goodbye"));
48
- }
49
- }
50
-
51
- TEST_CASE("dynamic_library::dyanmic_library(dynamic_library && other)", "[dyn-lib]") {
52
- SECTION("should move library to new variable") {
53
- dynamic_library lib;
54
- REQUIRE(lib.load(lib_path));
55
- REQUIRE(lib.loaded());
56
- dynamic_library lib2 = std::move(lib);
57
- REQUIRE(lib2.loaded());
58
- REQUIRE(lib2.name() == lib_path);
59
- REQUIRE_FALSE(lib.loaded());
60
- }
61
- }
62
-
63
- #ifdef _WIN32
64
- TEST_CASE("dynamic_library::find_by_pattern", "[dyn-lib]"){
65
- SECTION("should fail to find a missing library"){
66
- REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
67
- }
68
-
69
- SECTION("should find a library matching a pattern"){
70
- dynamic_library lib;
71
- lib.load(lib_path);
72
- REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
73
- dynamic_library lib2;
74
- lib2.load(lib_path2);
75
- REQUIRE(dynamic_library::find_by_pattern("libtest1").loaded());
76
- }
77
- }
78
- #else
79
- TEST_CASE("dynamic_library::find_by_symbol", "[dyn-lib]"){
80
- SECTION("should fail to find a missing symbol"){
81
- REQUIRE_FALSE(dynamic_library::find_by_symbol("no_such_symbol").loaded());
82
- }
83
-
84
- SECTION("should find a library with the given symbol"){
85
- dynamic_library lib;
86
- REQUIRE(lib.load(lib_path));
87
- REQUIRE_FALSE(dynamic_library::find_by_symbol("goodbye").loaded());
88
- dynamic_library lib2;
89
- REQUIRE(lib2.load(lib_path2, true));
90
- REQUIRE(lib2.find_symbol("goodbye"));
91
- REQUIRE(dynamic_library::find_by_symbol("goodbye").loaded());
92
- }
93
- }
94
- #endif
@@ -1,3 +0,0 @@
1
- #pragma once
2
-
3
- #define TEST_LIB_DIRECTORY "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"
@@ -1,5 +0,0 @@
1
- #include <iostream>
2
-
3
- extern "C" void goodbye(){
4
- std::cout << "Goodbye!";
5
- }
@@ -1,7 +0,0 @@
1
- #include <iostream>
2
-
3
- void goodbye();
4
-
5
- extern "C" void hello(){
6
- std::cout << "Hello world!";
7
- }
@@ -1,65 +0,0 @@
1
- find_package(Boost 1.54 REQUIRED COMPONENTS regex filesystem system)
2
-
3
- add_leatherman_deps("${Boost_LIBRARIES}")
4
- if ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
5
- # We use functions provided by this library in the implementation
6
- # of the create_detached_process execution option on Solaris to
7
- # execute the child processes in their own contracts
8
- add_leatherman_deps(contract)
9
- endif()
10
- add_leatherman_includes("${Boost_INCLUDE_DIRS}")
11
-
12
- leatherman_dependency(util)
13
- leatherman_dependency(nowide)
14
- leatherman_dependency(locale)
15
- leatherman_dependency(logging)
16
- leatherman_dependency(file_util)
17
- if (BUILDING_LEATHERMAN)
18
- leatherman_logging_namespace("leatherman.execution")
19
- leatherman_logging_line_numbers()
20
- endif()
21
-
22
- if(WIN32)
23
- leatherman_dependency(windows)
24
- endif()
25
-
26
- add_leatherman_headers(inc/leatherman)
27
- if(WIN32)
28
- add_leatherman_library(src/execution.cc src/windows/execution.cc)
29
- else()
30
- if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
31
- # LFS flags are needed to compile the posix/solaris/platform.cc such that it links correctly
32
- # against the libcontract library. They're not applied universally as they impact the ability
33
- # to use other OS functions. This usage is safe as long as global variables based on these flags
34
- # are avoided, according to http://docs.oracle.com/cd/E19455-01/806-0634/6j9vo5alu/index.html
35
- EXECUTE_PROCESS( COMMAND getconf LFS_CFLAGS OUTPUT_VARIABLE LFS_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE )
36
- set(LEATHERMAN_CXX_FLAGS "${LEATHERMAN_CXX_FLAGS} ${LFS_CFLAGS}")
37
- add_leatherman_library(src/execution.cc src/posix/execution.cc src/posix/solaris/platform.cc)
38
- else()
39
- add_leatherman_library(src/execution.cc src/posix/execution.cc src/posix/generic/platform.cc)
40
- endif()
41
- endif()
42
-
43
- if(WIN32)
44
- set(PLATFORM_TESTS tests/windows/execution.cc)
45
- else()
46
- set(PLATFORM_TESTS tests/posix/execution.cc)
47
- if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
48
- list(APPEND PLATFORM_TESTS tests/posix/solaris/execution.cc)
49
- endif()
50
- endif()
51
-
52
- add_leatherman_test(tests/log_capture.cc ${PLATFORM_TESTS})
53
-
54
- if (BUILDING_LEATHERMAN)
55
- # Dumb implementation of cat.exe for testing stdin/stdout/stderr handling.
56
- include_directories(BEFORE ${LEATHERMAN_NOWIDE_INCLUDE})
57
- add_executable(lth_cat tests/lth_cat.cc)
58
- target_link_libraries(lth_cat ${LEATHERMAN_NOWIDE_LIBS})
59
- set_target_properties(lth_cat PROPERTIES COMPILE_FLAGS "${LEATHERMAN_CXX_FLAGS}")
60
-
61
- configure_file (
62
- "${CMAKE_CURRENT_LIST_DIR}/tests/fixtures.hpp.in"
63
- "${CMAKE_CURRENT_LIST_DIR}/tests/fixtures.hpp"
64
- )
65
- endif()
@@ -1,488 +0,0 @@
1
- /**
2
- * @file
3
- * Declares functions used for executing commands.
4
- */
5
- #pragma once
6
-
7
- #include <leatherman/util/environment.hpp>
8
- #include <leatherman/util/option_set.hpp>
9
- #include <boost/optional.hpp>
10
- #include <boost/filesystem.hpp>
11
-
12
- #include <string>
13
- #include <vector>
14
- #include <map>
15
- #include <tuple>
16
- #include <utility>
17
- #include <stdexcept>
18
- #include <functional>
19
-
20
- namespace lth_util = leatherman::util;
21
-
22
- namespace leatherman { namespace execution {
23
-
24
- /**
25
- * The supported execution options.
26
- */
27
- enum class execution_options
28
- {
29
- /**
30
- * No options.
31
- */
32
- none = 0,
33
- /**
34
- * Redirect stderr to stdout. This will override redirect_stderr_to_null if both are set.
35
- */
36
- redirect_stderr_to_stdout = (1 << 1),
37
- /**
38
- * Throw an exception if the child process exits with a nonzero status.
39
- */
40
- throw_on_nonzero_exit = (1 << 2),
41
- /**
42
- * Throw an exception if the child process is terminated due to a signal.
43
- */
44
- throw_on_signal = (1 << 3),
45
- /**
46
- * Automatically trim output leading and trailing whitespace.
47
- */
48
- trim_output = (1 << 4),
49
- /**
50
- * Merge specified environment with the current process environment.
51
- */
52
- merge_environment = (1 << 5),
53
- /**
54
- * Redirect stderr to "null".
55
- */
56
- redirect_stderr_to_null = (1 << 6),
57
- /**
58
- * Preserve (do not quote) arguments.
59
- */
60
- preserve_arguments = (1 << 7),
61
- /**
62
- * Create a new process such that it can outlive its parent. This involves running it
63
- * in a separate process group on Windows, and in a separate contract on Solaris.
64
- */
65
- create_detached_process = (1 << 8),
66
- /**
67
- * Inherit locale environment variables from the current process. Limited to LC_ALL and
68
- * LOCALE, which are specifically overridden to "C" with merge_environment.
69
- * Will not override those variables if explicitly passed in an environment map.
70
- */
71
- inherit_locale = (1 << 9),
72
- /**
73
- * On windows, converts \r\n newlines to standard \n
74
- */
75
- convert_newlines = (1 << 10),
76
- /**
77
- * On POSIX systems, use `fork()` instead of `vfork()` when creating the new process.
78
- * Ignored on windows.
79
- * The `fork()` is typically slower than `vfork()` because it creates a copy
80
- * of the parent's address space for the child process (`vfork()` lets the
81
- * child process re-use the parent's address space) but safer from deadlocks
82
- * if called from multi threaded processes.
83
- */
84
- thread_safe = (1 << 11),
85
- /**
86
- * Allow standard input to be unread, rather than failing if it is ignored.
87
- */
88
- allow_stdin_unread = (1 << 12),
89
- /**
90
- * A combination of all throw options.
91
- */
92
- throw_on_failure = throw_on_nonzero_exit | throw_on_signal,
93
- };
94
-
95
- /**
96
- * System command shell available for executing shell scripts.
97
- * Uses 'cmd' on Windows and 'sh' on *nix systems.
98
- */
99
- extern const char *const command_shell;
100
-
101
- /**
102
- * System command shell arguments to accept a script as an argument.
103
- * Uses '/c' on Windows and '-c' on *nix systems.
104
- */
105
- extern const char *const command_args;
106
-
107
- /**
108
- * Base class for execution exceptions.
109
- */
110
- struct execution_exception : std::runtime_error
111
- {
112
- /**
113
- * Constructs a execution_exception.
114
- * @param message The exception message.
115
- */
116
- explicit execution_exception(std::string const& message);
117
- };
118
-
119
- /**
120
- * Base class for execution failures.
121
- */
122
- struct execution_failure_exception : execution_exception
123
- {
124
- /**
125
- * Constructs a execution_failure_exception.
126
- * @param message The exception message.
127
- * @param output The child process stdout output.
128
- * @param error The child process stderr output.
129
- */
130
- execution_failure_exception(std::string const& message, std::string output, std::string error);
131
-
132
- /**
133
- * Gets the child process stdout output.
134
- * @return Returns the child process stdout output.
135
- */
136
- std::string const& output() const;
137
-
138
- /**
139
- * Gets the child process stderr output.
140
- * @return Returns the child process stderr output.
141
- */
142
- std::string const& error() const;
143
-
144
- private:
145
- std::string _output;
146
- std::string _error;
147
- };
148
-
149
- /**
150
- * Exception that is thrown when a child exits with a non-zero status code.
151
- */
152
- struct child_exit_exception : execution_failure_exception
153
- {
154
- /**
155
- * Constructs a child_exit_exception.
156
- * @param message The exception message.
157
- * @param status_code The exit status code of the child process.
158
- * @param output The child process stdout output.
159
- * @param error The child process stderr output.
160
- */
161
- child_exit_exception(std::string const& message, int status_code, std::string output, std::string error);
162
-
163
- /**
164
- * Gets the child process exit status code.
165
- * @return Returns the child process exit status code.
166
- */
167
- int status_code() const;
168
-
169
- private:
170
- int _status_code;
171
- };
172
-
173
- /**
174
- * Exception that is thrown when a child exists due to a signal.
175
- */
176
- struct child_signal_exception : execution_failure_exception
177
- {
178
- /**
179
- * Constructs a child_signal_exception.
180
- * @param message The exception message.
181
- * @param signal The signal code that terminated the child process.
182
- * @param output The child process stdout output.
183
- * @param error The child process stderr output.
184
- */
185
- child_signal_exception(std::string const& message, int signal, std::string output, std::string error);
186
-
187
- /**
188
- * Gets the signal that terminated the child process.
189
- * @return Returns the signal that terminated the child process.
190
- */
191
- int signal() const;
192
-
193
- private:
194
- int _signal;
195
- };
196
-
197
- /**
198
- * Exception that is thrown when a command times out.
199
- */
200
- struct timeout_exception : execution_exception
201
- {
202
- /**
203
- * Constructs a timeout_exception.
204
- * @param message The exception message.
205
- * @param pid The process id of the process that timed out and was killed.
206
- */
207
- timeout_exception(std::string const& message, size_t pid);
208
-
209
- /**
210
- * Gets the process id of the process that timed out and was killed.
211
- * @return Returns the process id of the process that timed out and was killed.
212
- */
213
- size_t pid() const;
214
-
215
- private:
216
- size_t _pid;
217
- };
218
-
219
- /**
220
- * Encapsulates return value from executing a process.
221
- */
222
- struct result
223
- {
224
- /**
225
- * Constructor.
226
- */
227
- result(bool s, std::string o, std::string e, int ec, size_t p)
228
- : success(s), output(move(o)), error(move(e)), exit_code(ec), pid(p) {}
229
- /**
230
- * Whether or not the command succeeded, defaults to true.
231
- */
232
- bool success = true;
233
- /**
234
- * Output from stdout.
235
- */
236
- std::string output;
237
- /**
238
- * Output from stderr (if not redirected).
239
- */
240
- std::string error;
241
- /**
242
- * The process exit code, defaults to 0.
243
- */
244
- int exit_code = 0;
245
- /**
246
- * The process ID
247
- */
248
- size_t pid = 0;
249
- };
250
-
251
- /**
252
- * Searches the given paths for the given executable file.
253
- * @param file The file to search for.
254
- * @param directories The directories to search.
255
- * @return Returns the full path or empty if the file could not be found.
256
- */
257
- std::string which(std::string const& file, std::vector<std::string> const& directories = lth_util::environment::search_paths());
258
-
259
- /**
260
- * Expands the executable in the command to the full path.
261
- * @param command The command to expand.
262
- * @param directories The directories to search.
263
- * @return Returns the expanded command if the executable was found or empty if it was not found..
264
- */
265
- std::string expand_command(std::string const& command, std::vector<std::string> const& directories = lth_util::environment::search_paths());
266
-
267
- /**
268
- * Executes the given program.
269
- * @param file The name or path of the program to execute.
270
- * @param timeout The timeout, in seconds. Defaults to no timeout.
271
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
272
- * @return Returns a result struct.
273
- */
274
- result execute(
275
- std::string const& file,
276
- uint32_t timeout = 0,
277
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
278
-
279
- /**
280
- * Executes the given program.
281
- * @param file The name or path of the program to execute.
282
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
283
- * @param timeout The timeout, in seconds. Defaults to no timeout.
284
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
285
- * @return Returns a result struct.
286
- */
287
- result execute(
288
- std::string const& file,
289
- std::vector<std::string> const& arguments,
290
- uint32_t timeout = 0,
291
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
292
-
293
- /**
294
- * Executes the given program.
295
- * @param file The name or path of the program to execute.
296
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
297
- * @param environment The environment variables to pass to the child process.
298
- * @param timeout The timeout, in seconds. Defaults to no timeout.
299
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
300
- * @return Returns a result struct.
301
- */
302
- result execute(
303
- std::string const& file,
304
- std::vector<std::string> const& arguments,
305
- std::map<std::string, std::string> const& environment,
306
- uint32_t timeout = 0,
307
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
308
-
309
- /**
310
- * Executes the given program.
311
- * @param file The name or path of the program to execute.
312
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
313
- * @param input A string to place on stdin for the child process before reading output.
314
- * @param timeout The timeout, in seconds. Defaults to no timeout.
315
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
316
- * @return Returns a result struct.
317
- */
318
- result execute(
319
- std::string const& file,
320
- std::vector<std::string> const& arguments,
321
- std::string const& input,
322
- uint32_t timeout = 0,
323
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
324
-
325
- /**
326
- * Executes the given program.
327
- * @param file The name or path of the program to execute.
328
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
329
- * @param input A string to place on stdin for the child process before reading output.
330
- * @param environment The environment variables to pass to the child process.
331
- * @param timeout The timeout, in seconds. Defaults to no timeout.
332
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
333
- * @return Returns a result struct.
334
- */
335
- result execute(
336
- std::string const& file,
337
- std::vector<std::string> const& arguments,
338
- std::string const& input,
339
- std::map<std::string, std::string> const& environment,
340
- uint32_t timeout = 0,
341
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
342
-
343
- /**
344
- * Executes the given program by calling a specified callback that receives the pid of the program's process.
345
- * @param file The name or path of the program to execute.
346
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
347
- * @param input A string to place on stdin for the child process before reading output.
348
- * @param environment The environment variables to pass to the child process.
349
- * @param pid_callback The callback that is called with the pid of the child process. Defaults to no callback, in which case the pid won't be processed.
350
- * @param timeout The timeout, in seconds. Defaults to no timeout.
351
- * @param options The execution options. Defaults to trimming output, merging the environment, and redirecting stderr to null.
352
- * @return Returns a result struct.
353
- */
354
- result execute(
355
- std::string const& file,
356
- std::vector<std::string> const& arguments,
357
- std::string const& input,
358
- std::map<std::string, std::string> const& environment,
359
- std::function<void(size_t)> pid_callback = nullptr,
360
- uint32_t timeout = 0,
361
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment, execution_options::redirect_stderr_to_null });
362
-
363
- /**
364
- * Executes the given program by writing the output of stdout and stderr to specified files. The output
365
- * is processed line-by-line, so binary data isn't supported.
366
- * @param file The name or path of the program to execute.
367
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
368
- * @param input A string to place on stdin for the child process before reading output.
369
- * @param out_file The file where the output on stdout will be written.
370
- * @param err_file The file where the output on stderr will be written. Defaults to no file, in which case the output on stderr will be buffered and returned in the result struct.
371
- * @param environment The environment variables to pass to the child process.
372
- * @param pid_callback The callback that is called with the pid of the child process. Defaults to no callback, in which case the pid will not be processed.
373
- * @param timeout The timeout, in seconds. Defaults to no timeout.
374
- * @param options The execution options. Defaults to trimming output and merging the environment.
375
- * @return Returns a result struct that will not contain the output of the streams for which a file was specified.
376
- *
377
- * Throws an execution_exception error in case it fails to open a file.
378
- */
379
- result execute(
380
- std::string const& file,
381
- std::vector<std::string> const& arguments,
382
- std::string const& input,
383
- std::string const& out_file,
384
- std::string const& err_file = "",
385
- std::map<std::string, std::string> const& environment = std::map<std::string, std::string>(),
386
- std::function<void(size_t)> pid_callback = nullptr,
387
- uint32_t timeout = 0,
388
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment });
389
-
390
- /**
391
- * Executes the given program by writing the output of stdout and stderr to specified files. The output
392
- * is processed line-by-line, so binary data isn't supported.
393
- * @param file The name or path of the program to execute.
394
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
395
- * @param input A string to place on stdin for the child process before reading output.
396
- * @param out_file The file where the output on stdout will be written.
397
- * @param err_file The file where the output on stderr will be written.
398
- * @param environment The environment variables to pass to the child process.
399
- * @param pid_callback The callback that is called with the pid of the child process.
400
- * @param timeout The timeout, in seconds.
401
- * @param perms The file permissions to apply when creating the out_file and err_file.
402
- * On Windows this only toggles read-only.
403
- * @param options The execution options. Defaults to trimming output and merging the environment.
404
- * @return Returns a result struct that will not contain the output of the streams for which a file was specified.
405
- *
406
- * Throws an execution_exception error in case it fails to open a file.
407
- */
408
- result execute(
409
- std::string const& file,
410
- std::vector<std::string> const& arguments,
411
- std::string const& input,
412
- std::string const& out_file,
413
- std::string const& err_file,
414
- std::map<std::string, std::string> const& environment,
415
- std::function<void(size_t)> pid_callback,
416
- uint32_t timeout,
417
- boost::optional<boost::filesystem::perms> perms,
418
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment });
419
-
420
- /**
421
- * Executes the given program and returns each line of output.
422
- * @param file The name or path of the program to execute.
423
- * @param stdout_callback The callback that is called with each line of output on stdout.
424
- * @param stderr_callback The callback that is called with each line of output on stderr. If nullptr, implies redirect_stderr_to_null unless redirect_stderr_to_stdout is set in options.
425
- * @param timeout The timeout, in seconds. Defaults to no timeout.
426
- * @param options The execution options. Defaults to trimming output and merging the environment.
427
- * @return Returns true if the execution succeeded or false if it did not.
428
- */
429
- bool each_line(
430
- std::string const& file,
431
- std::function<bool(std::string&)> stdout_callback,
432
- std::function<bool(std::string&)> stderr_callback = nullptr,
433
- uint32_t timeout = 0,
434
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment });
435
-
436
- /**
437
- * Executes the given program and returns each line of output.
438
- * @param file The name or path of the program to execute.
439
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
440
- * @param stdout_callback The callback that is called with each line of output on stdout.
441
- * @param stderr_callback The callback that is called with each line of output on stderr. If nullptr, implies redirect_stderr_to_null unless redirect_stderr_to_stdout is set in options.
442
- * @param timeout The timeout, in seconds. Defaults to no timeout.
443
- * @param options The execution options. Defaults to trimming output and merging the environment.
444
- * @return Returns true if the execution succeeded or false if it did not.
445
- */
446
- bool each_line(
447
- std::string const& file,
448
- std::vector<std::string> const& arguments,
449
- std::function<bool(std::string&)> stdout_callback,
450
- std::function<bool(std::string&)> stderr_callback = nullptr,
451
- uint32_t timeout = 0,
452
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment });
453
-
454
- /**
455
- * Executes the given program and returns each line of output.
456
- * @param file The name or path of the program to execute.
457
- * @param arguments The arguments to pass to the program. On Windows they will be quoted as needed for spaces.
458
- * @param environment The environment variables to pass to the child process.
459
- * @param stdout_callback The callback that is called with each line of output on stdout.
460
- * @param stderr_callback The callback that is called with each line of output on stderr. If nullptr, implies redirect_stderr_to_null unless redirect_to_stdout is set in options.
461
- * @param timeout The timeout, in seconds. Defaults to no timeout.
462
- * @param options The execution options. Defaults to trimming output and merging the environment.
463
- * @return Returns true if the execution succeeded or false if it did not.
464
- */
465
- bool each_line(
466
- std::string const& file,
467
- std::vector<std::string> const& arguments,
468
- std::map<std::string, std::string> const& environment,
469
- std::function<bool(std::string&)> stdout_callback,
470
- std::function<bool(std::string&)> stderr_callback = nullptr,
471
- uint32_t timeout = 0,
472
- lth_util::option_set<execution_options> const& options = { execution_options::trim_output, execution_options::merge_environment });
473
-
474
- /**
475
- * Processes stdout and stderror streams of a child process.
476
- * @param trim True if output should be trimmed or false if not.
477
- * @param stdout_callback The callback to use when a line is read for stdout.
478
- * @param stderr_callback The callback to use when a line is read for stderr.
479
- * @param read_streams The callback that is called to read stdout and stderr streams.
480
- * @return Returns a tuple of stdout and stderr output. If stdout_callback or stderr_callback is given, it will return empty strings.
481
- */
482
- std::tuple<std::string, std::string> process_streams(
483
- bool trim,
484
- std::function<bool(std::string&)> const& stdout_callback,
485
- std::function<bool(std::string&)> const& stderr_callback,
486
- std::function<void(std::function<bool(std::string const&)>, std::function<bool(std::string const&)>)> const& read_streams);
487
-
488
- }} // namespace leatherman::execution