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.
- checksums.yaml +4 -4
- data/.gitignore +56 -0
- data/.jrubyrc +2 -0
- data/.rspec +3 -0
- data/.rubocop.yml +122 -0
- data/.rubycritic.yml +4 -0
- data/.travis.yml +39 -0
- data/CODEOWNERS +2 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +47 -0
- data/Rakefile +9 -0
- data/VERSION +1 -0
- data/agent/facter-ng.gemspec +48 -0
- data/agent/lib/facter-ng.rb +7 -0
- data/bin/facter +6 -0
- data/block_groups.conf +14 -0
- data/check.sh +12 -0
- data/config/config.rb +6 -0
- data/custom_facts/my_custom_fact.rb +9 -0
- data/custom_facts/my_custom_os_fact.rb +8 -0
- data/docs/diagrams/facter_user_interaction.png +0 -0
- data/external_facts/my_external_fact.txt +1 -0
- data/facter.conf +21 -0
- data/facter.gemspec +48 -0
- data/lib/custom_facts/core/aggregate.rb +208 -0
- data/lib/custom_facts/core/directed_graph.rb +47 -0
- data/lib/custom_facts/core/execution.rb +122 -0
- data/lib/custom_facts/core/execution/base.rb +87 -0
- data/lib/custom_facts/core/execution/posix.rb +55 -0
- data/lib/custom_facts/core/execution/windows.rb +63 -0
- data/lib/custom_facts/core/file_loader.rb +30 -0
- data/lib/custom_facts/core/legacy_facter.rb +260 -0
- data/lib/custom_facts/core/logging.rb +200 -0
- data/lib/custom_facts/core/resolvable.rb +99 -0
- data/lib/custom_facts/core/suitable.rb +109 -0
- data/lib/custom_facts/util/collection.rb +179 -0
- data/lib/custom_facts/util/composite_loader.rb +18 -0
- data/lib/custom_facts/util/config.rb +82 -0
- data/lib/custom_facts/util/confine.rb +70 -0
- data/lib/custom_facts/util/directory_loader.rb +85 -0
- data/lib/custom_facts/util/fact.rb +210 -0
- data/lib/custom_facts/util/loader.rb +153 -0
- data/lib/custom_facts/util/normalization.rb +95 -0
- data/lib/custom_facts/util/nothing_loader.rb +12 -0
- data/lib/custom_facts/util/parser.rb +174 -0
- data/lib/custom_facts/util/resolution.rb +147 -0
- data/lib/custom_facts/util/unix_root.rb +11 -0
- data/lib/custom_facts/util/values.rb +109 -0
- data/lib/custom_facts/util/windows_root.rb +11 -0
- data/lib/custom_facts/version.rb +85 -0
- data/lib/facter.rb +159 -0
- data/lib/facts/aix/augeas/version.rb +14 -0
- data/lib/facts/aix/facterversion.rb +15 -0
- data/lib/facts/aix/hypervisors/lpar.rb +18 -0
- data/lib/facts/aix/hypervisors/wpar.rb +16 -0
- data/lib/facts/aix/kernel.rb +15 -0
- data/lib/facts/aix/kernelmajversion.rb +16 -0
- data/lib/facts/aix/kernelrelease.rb +15 -0
- data/lib/facts/aix/kernelversion.rb +16 -0
- data/lib/facts/aix/load_averages.rb +14 -0
- data/lib/facts/aix/networking/domain.rb +15 -0
- data/lib/facts/aix/networking/fqdn.rb +15 -0
- data/lib/facts/aix/networking/hostname.rb +15 -0
- data/lib/facts/aix/networking/ip.rb +16 -0
- data/lib/facts/aix/networking/primary.rb +15 -0
- data/lib/facts/aix/os/architecture.rb +16 -0
- data/lib/facts/aix/os/family.rb +16 -0
- data/lib/facts/aix/os/hardware.rb +15 -0
- data/lib/facts/aix/os/name.rb +16 -0
- data/lib/facts/aix/os/release.rb +19 -0
- data/lib/facts/aix/path.rb +14 -0
- data/lib/facts/aix/ruby/platform.rb +14 -0
- data/lib/facts/aix/ruby/sitedir.rb +14 -0
- data/lib/facts/aix/ruby/version.rb +15 -0
- data/lib/facts/aix/ssh.rb +34 -0
- data/lib/facts/base/network_interface.rb +9 -0
- data/lib/facts/debian/facterversion.rb +15 -0
- data/lib/facts/debian/kernel.rb +15 -0
- data/lib/facts/debian/kernelmajversion.rb +24 -0
- data/lib/facts/debian/kernelrelease.rb +14 -0
- data/lib/facts/debian/kernelversion.rb +15 -0
- data/lib/facts/debian/memory/swap/available.rb +15 -0
- data/lib/facts/debian/memory/swap/available_bytes.rb +14 -0
- data/lib/facts/debian/memory/swap/capacity.rb +14 -0
- data/lib/facts/debian/memory/swap/used.rb +15 -0
- data/lib/facts/debian/memory/swap/used_bytes.rb +14 -0
- data/lib/facts/debian/networking/domain.rb +15 -0
- data/lib/facts/debian/networking/fqdn.rb +15 -0
- data/lib/facts/debian/networking/hostname.rb +15 -0
- data/lib/facts/debian/networking/interfaces.rb +14 -0
- data/lib/facts/debian/networking/ip.rb +16 -0
- data/lib/facts/debian/networking/primary.rb +15 -0
- data/lib/facts/debian/os/architecture.rb +17 -0
- data/lib/facts/debian/os/distro.rb +29 -0
- data/lib/facts/debian/os/family.rb +17 -0
- data/lib/facts/debian/os/hardware.rb +15 -0
- data/lib/facts/debian/os/name.rb +16 -0
- data/lib/facts/debian/os/release.rb +24 -0
- data/lib/facts/debian/os/selinux.rb +21 -0
- data/lib/facts/debian/path.rb +15 -0
- data/lib/facts/debian/ruby/platform.rb +15 -0
- data/lib/facts/debian/ruby/sitedir.rb +15 -0
- data/lib/facts/debian/ruby/version.rb +16 -0
- data/lib/facts/debian/system_uptime/system_uptime_days.rb +15 -0
- data/lib/facts/debian/system_uptime/system_uptime_hours.rb +15 -0
- data/lib/facts/debian/system_uptime/system_uptime_minutes.rb +15 -0
- data/lib/facts/debian/system_uptime/system_uptime_uptime.rb +15 -0
- data/lib/facts/debian/timezone.rb +14 -0
- data/lib/facts/el/disks.rb +15 -0
- data/lib/facts/el/dmi/bios/release_date.rb +14 -0
- data/lib/facts/el/dmi/bios/vendor.rb +14 -0
- data/lib/facts/el/dmi/bios/version.rb +14 -0
- data/lib/facts/el/dmi/board/manufacturer.rb +14 -0
- data/lib/facts/el/dmi/board/product.rb +14 -0
- data/lib/facts/el/dmi/board/serial_number.rb +14 -0
- data/lib/facts/el/dmi/chassis/asset_tag.rb +14 -0
- data/lib/facts/el/dmi/chassis/type.rb +14 -0
- data/lib/facts/el/dmi/manufacturer.rb +14 -0
- data/lib/facts/el/dmi/product/name.rb +14 -0
- data/lib/facts/el/dmi/product/serial_number.rb +14 -0
- data/lib/facts/el/dmi/product/uuid.rb +14 -0
- data/lib/facts/el/facterversion.rb +14 -0
- data/lib/facts/el/filesystems.rb +14 -0
- data/lib/facts/el/fips_enabled.rb +14 -0
- data/lib/facts/el/kernel.rb +14 -0
- data/lib/facts/el/kernelmajversion.rb +23 -0
- data/lib/facts/el/kernelrelease.rb +14 -0
- data/lib/facts/el/kernelversion.rb +21 -0
- data/lib/facts/el/load_averages.rb +14 -0
- data/lib/facts/el/memory/swap/available.rb +15 -0
- data/lib/facts/el/memory/swap/available_bytes.rb +14 -0
- data/lib/facts/el/memory/swap/capacity.rb +14 -0
- data/lib/facts/el/memory/swap/total.rb +15 -0
- data/lib/facts/el/memory/swap/total_bytes.rb +14 -0
- data/lib/facts/el/memory/swap/used.rb +15 -0
- data/lib/facts/el/memory/swap/used_bytes.rb +14 -0
- data/lib/facts/el/memory/system/available.rb +15 -0
- data/lib/facts/el/memory/system/available_bytes.rb +14 -0
- data/lib/facts/el/memory/system/capacity.rb +14 -0
- data/lib/facts/el/memory/system/total.rb +15 -0
- data/lib/facts/el/memory/system/total_bytes.rb +14 -0
- data/lib/facts/el/memory/system/used.rb +15 -0
- data/lib/facts/el/memory/system/used_bytes.rb +14 -0
- data/lib/facts/el/mountpoints.rb +21 -0
- data/lib/facts/el/networking/domain.rb +15 -0
- data/lib/facts/el/networking/fqdn.rb +15 -0
- data/lib/facts/el/networking/hostname.rb +15 -0
- data/lib/facts/el/networking/interfaces.rb +14 -0
- data/lib/facts/el/networking/ip.rb +16 -0
- data/lib/facts/el/networking/primary.rb +15 -0
- data/lib/facts/el/os/architecture.rb +16 -0
- data/lib/facts/el/os/family.rb +14 -0
- data/lib/facts/el/os/hardware.rb +15 -0
- data/lib/facts/el/os/name.rb +17 -0
- data/lib/facts/el/os/release.rb +18 -0
- data/lib/facts/el/os/selinux.rb +21 -0
- data/lib/facts/el/path.rb +14 -0
- data/lib/facts/el/processors/count.rb +14 -0
- data/lib/facts/el/processors/isa.rb +23 -0
- data/lib/facts/el/processors/models.rb +14 -0
- data/lib/facts/el/processors/physicalcount.rb +14 -0
- data/lib/facts/el/ruby/platform.rb +14 -0
- data/lib/facts/el/ruby/sitedir.rb +14 -0
- data/lib/facts/el/ruby/version.rb +15 -0
- data/lib/facts/el/ssh.rb +26 -0
- data/lib/facts/el/system_uptime/days.rb +14 -0
- data/lib/facts/el/system_uptime/hours.rb +14 -0
- data/lib/facts/el/system_uptime/seconds.rb +14 -0
- data/lib/facts/el/system_uptime/uptime.rb +14 -0
- data/lib/facts/el/timezone.rb +14 -0
- data/lib/facts/macosx/augeas.rb +14 -0
- data/lib/facts/macosx/count.rb +14 -0
- data/lib/facts/macosx/dmi/product/name.rb +14 -0
- data/lib/facts/macosx/facterversion.rb +15 -0
- data/lib/facts/macosx/filesystems.rb +14 -0
- data/lib/facts/macosx/identity/gid.rb +14 -0
- data/lib/facts/macosx/identity/group.rb +14 -0
- data/lib/facts/macosx/identity/privileged.rb +14 -0
- data/lib/facts/macosx/identity/uid.rb +14 -0
- data/lib/facts/macosx/identity/user.rb +14 -0
- data/lib/facts/macosx/is_virtual.rb +30 -0
- data/lib/facts/macosx/isa.rb +14 -0
- data/lib/facts/macosx/kernel.rb +14 -0
- data/lib/facts/macosx/kernelmajversion.rb +15 -0
- data/lib/facts/macosx/kernelrelease.rb +14 -0
- data/lib/facts/macosx/kernelversion.rb +14 -0
- data/lib/facts/macosx/load_averages.rb +14 -0
- data/lib/facts/macosx/memory/swap/available.rb +16 -0
- data/lib/facts/macosx/memory/swap/available_bytes.rb +14 -0
- data/lib/facts/macosx/memory/swap/capacity.rb +14 -0
- data/lib/facts/macosx/memory/swap/encrypted.rb +14 -0
- data/lib/facts/macosx/memory/swap/total.rb +16 -0
- data/lib/facts/macosx/memory/swap/total_bytes.rb +14 -0
- data/lib/facts/macosx/memory/swap/used.rb +16 -0
- data/lib/facts/macosx/memory/swap/used_bytes.rb +14 -0
- data/lib/facts/macosx/memory/system/available.rb +16 -0
- data/lib/facts/macosx/memory/system/available_bytes.rb +14 -0
- data/lib/facts/macosx/memory/system/capacity.rb +14 -0
- data/lib/facts/macosx/memory/system/total.rb +16 -0
- data/lib/facts/macosx/memory/system/total_bytes.rb +14 -0
- data/lib/facts/macosx/memory/system/used.rb +16 -0
- data/lib/facts/macosx/memory/system/used_bytes.rb +14 -0
- data/lib/facts/macosx/models.rb +14 -0
- data/lib/facts/macosx/mountpoints.rb +16 -0
- data/lib/facts/macosx/network_ip.rb +13 -0
- data/lib/facts/macosx/networking/domain.rb +15 -0
- data/lib/facts/macosx/networking/fqdn.rb +15 -0
- data/lib/facts/macosx/networking/hostname.rb +15 -0
- data/lib/facts/macosx/networking/ipaddress.rb +14 -0
- data/lib/facts/macosx/os/architecture.rb +15 -0
- data/lib/facts/macosx/os/family.rb +16 -0
- data/lib/facts/macosx/os/hardware.rb +14 -0
- data/lib/facts/macosx/os/name.rb +16 -0
- data/lib/facts/macosx/os/release.rb +18 -0
- data/lib/facts/macosx/os/sw_vers/build.rb +15 -0
- data/lib/facts/macosx/os/sw_vers/product.rb +15 -0
- data/lib/facts/macosx/os/sw_vers/version.rb +17 -0
- data/lib/facts/macosx/path.rb +15 -0
- data/lib/facts/macosx/physicalcount.rb +14 -0
- data/lib/facts/macosx/processor_resolver.rb +71 -0
- data/lib/facts/macosx/ruby/platform.rb +15 -0
- data/lib/facts/macosx/ruby/sitedir.rb +15 -0
- data/lib/facts/macosx/ruby/version.rb +16 -0
- data/lib/facts/macosx/speed.rb +14 -0
- data/lib/facts/macosx/system_profiler/boot_mode.rb +14 -0
- data/lib/facts/macosx/system_profiler/boot_rom_version.rb +14 -0
- data/lib/facts/macosx/system_profiler/boot_volume.rb +14 -0
- data/lib/facts/macosx/system_profiler/computer_name.rb +14 -0
- data/lib/facts/macosx/system_profiler/cores.rb +14 -0
- data/lib/facts/macosx/system_profiler/hardware_uuid.rb +14 -0
- data/lib/facts/macosx/system_profiler/kernel_version.rb +14 -0
- data/lib/facts/macosx/system_profiler/l2_cache_per_core.rb +14 -0
- data/lib/facts/macosx/system_profiler/l3_cache.rb +14 -0
- data/lib/facts/macosx/system_profiler/memory.rb +14 -0
- data/lib/facts/macosx/system_profiler/model_identifier.rb +14 -0
- data/lib/facts/macosx/system_profiler/model_name.rb +14 -0
- data/lib/facts/macosx/system_profiler/processor_name.rb +14 -0
- data/lib/facts/macosx/system_profiler/processor_speed.rb +14 -0
- data/lib/facts/macosx/system_profiler/processors.rb +14 -0
- data/lib/facts/macosx/system_profiler/secure_virtual_memory.rb +14 -0
- data/lib/facts/macosx/system_profiler/serial_number.rb +14 -0
- data/lib/facts/macosx/system_profiler/smc_version.rb +14 -0
- data/lib/facts/macosx/system_profiler/system_version.rb +14 -0
- data/lib/facts/macosx/system_profiler/uptime.rb +14 -0
- data/lib/facts/macosx/system_profiler/username.rb +14 -0
- data/lib/facts/macosx/system_uptime/seconds.rb +14 -0
- data/lib/facts/macosx/system_uptime/system_uptime_days.rb +14 -0
- data/lib/facts/macosx/system_uptime/system_uptime_hours.rb +14 -0
- data/lib/facts/macosx/system_uptime/uptime.rb +14 -0
- data/lib/facts/macosx/timezone.rb +14 -0
- data/lib/facts/sles/facterversion.rb +14 -0
- data/lib/facts/sles/kernel.rb +14 -0
- data/lib/facts/sles/kernelmajversion.rb +15 -0
- data/lib/facts/sles/kernelrelease.rb +14 -0
- data/lib/facts/sles/kernelversion.rb +15 -0
- data/lib/facts/sles/memory/swap/available.rb +15 -0
- data/lib/facts/sles/memory/swap/available_bytes.rb +14 -0
- data/lib/facts/sles/memory/swap/capacity.rb +14 -0
- data/lib/facts/sles/memory/swap/total.rb +15 -0
- data/lib/facts/sles/memory/swap/total_bytes.rb +14 -0
- data/lib/facts/sles/memory/swap/used.rb +15 -0
- data/lib/facts/sles/memory/swap/used_bytes.rb +14 -0
- data/lib/facts/sles/memory/system/available.rb +15 -0
- data/lib/facts/sles/memory/system/available_bytes.rb +14 -0
- data/lib/facts/sles/memory/system/capacity.rb +14 -0
- data/lib/facts/sles/memory/system/total.rb +15 -0
- data/lib/facts/sles/memory/system/total_bytes.rb +14 -0
- data/lib/facts/sles/memory/system/used.rb +15 -0
- data/lib/facts/sles/memory/system/used_bytes.rb +14 -0
- data/lib/facts/sles/networking/domain.rb +15 -0
- data/lib/facts/sles/networking/fqdn.rb +15 -0
- data/lib/facts/sles/networking/hostname.rb +15 -0
- data/lib/facts/sles/networking/interfaces.rb +14 -0
- data/lib/facts/sles/networking/ip.rb +16 -0
- data/lib/facts/sles/networking/primary.rb +15 -0
- data/lib/facts/sles/os/architecture.rb +16 -0
- data/lib/facts/sles/os/family.rb +14 -0
- data/lib/facts/sles/os/hardware.rb +15 -0
- data/lib/facts/sles/os/name.rb +16 -0
- data/lib/facts/sles/os/release.rb +27 -0
- data/lib/facts/sles/os/selinux.rb +21 -0
- data/lib/facts/sles/path.rb +14 -0
- data/lib/facts/sles/ruby/platform.rb +14 -0
- data/lib/facts/sles/ruby/sitedir.rb +14 -0
- data/lib/facts/sles/ruby/version.rb +15 -0
- data/lib/facts/sles/ssh.rb +26 -0
- data/lib/facts/sles/timezone.rb +14 -0
- data/lib/facts/solaris/facterversion.rb +14 -0
- data/lib/facts/solaris/kernel.rb +14 -0
- data/lib/facts/solaris/kernelmajversion.rb +16 -0
- data/lib/facts/solaris/kernelrelease.rb +14 -0
- data/lib/facts/solaris/kernelversion.rb +14 -0
- data/lib/facts/solaris/networking/domain.rb +15 -0
- data/lib/facts/solaris/networking/fqdn.rb +15 -0
- data/lib/facts/solaris/networking/hostname.rb +15 -0
- data/lib/facts/solaris/networking/ipaddress.rb +14 -0
- data/lib/facts/solaris/os/architecture.rb +16 -0
- data/lib/facts/solaris/os/family.rb +14 -0
- data/lib/facts/solaris/os/hardware.rb +14 -0
- data/lib/facts/solaris/os/name.rb +17 -0
- data/lib/facts/solaris/os/release.rb +20 -0
- data/lib/facts/solaris/path.rb +14 -0
- data/lib/facts/solaris/ruby/platform.rb +14 -0
- data/lib/facts/solaris/ruby/sitedir.rb +14 -0
- data/lib/facts/solaris/ruby/version.rb +15 -0
- data/lib/facts/solaris/solaris_zones/current.rb +14 -0
- data/lib/facts/solaris/solaris_zones/zone.rb +25 -0
- data/lib/facts/windows/dhcp_servers.rb +23 -0
- data/lib/facts/windows/dmi/manufacturer.rb +16 -0
- data/lib/facts/windows/dmi/product/name.rb +16 -0
- data/lib/facts/windows/dmi/product/serial_number.rb +16 -0
- data/lib/facts/windows/dmi/product/uuid.rb +16 -0
- data/lib/facts/windows/facterversion.rb +15 -0
- data/lib/facts/windows/fips_enabled.rb +15 -0
- data/lib/facts/windows/hypervisors/hyperv.rb +22 -0
- data/lib/facts/windows/hypervisors/kvm.rb +34 -0
- data/lib/facts/windows/hypervisors/virtualbox.rb +35 -0
- data/lib/facts/windows/hypervisors/vmware.rb +22 -0
- data/lib/facts/windows/hypervisors/xen.rb +21 -0
- data/lib/facts/windows/identity/privileged.rb +15 -0
- data/lib/facts/windows/identity/user.rb +16 -0
- data/lib/facts/windows/interfaces.rb +15 -0
- data/lib/facts/windows/ipaddress6_interfaces.rb +19 -0
- data/lib/facts/windows/ipaddress_interfaces.rb +19 -0
- data/lib/facts/windows/kernel/kernel.rb +15 -0
- data/lib/facts/windows/kernel/kernel_maj_version.rb +15 -0
- data/lib/facts/windows/kernel/kernel_release.rb +15 -0
- data/lib/facts/windows/kernel/kernel_version.rb +15 -0
- data/lib/facts/windows/macaddress_interfaces.rb +19 -0
- data/lib/facts/windows/memory/system/available.rb +17 -0
- data/lib/facts/windows/memory/system/available_bytes.rb +17 -0
- data/lib/facts/windows/memory/system/capacity.rb +15 -0
- data/lib/facts/windows/memory/system/total.rb +17 -0
- data/lib/facts/windows/memory/system/total_bytes.rb +17 -0
- data/lib/facts/windows/memory/system/used.rb +16 -0
- data/lib/facts/windows/memory/system/used_bytes.rb +15 -0
- data/lib/facts/windows/mtu_interfaces.rb +19 -0
- data/lib/facts/windows/netmask6_interfaces.rb +19 -0
- data/lib/facts/windows/netmask_interfaces.rb +19 -0
- data/lib/facts/windows/network6_interfaces.rb +19 -0
- data/lib/facts/windows/network_interfaces.rb +19 -0
- data/lib/facts/windows/networking/dhcp.rb +15 -0
- data/lib/facts/windows/networking/domain.rb +16 -0
- data/lib/facts/windows/networking/fqdn.rb +20 -0
- data/lib/facts/windows/networking/hostname.rb +16 -0
- data/lib/facts/windows/networking/interfaces.rb +15 -0
- data/lib/facts/windows/networking/ip.rb +16 -0
- data/lib/facts/windows/networking/ip6.rb +16 -0
- data/lib/facts/windows/networking/mac.rb +16 -0
- data/lib/facts/windows/networking/mtu.rb +15 -0
- data/lib/facts/windows/networking/netmask.rb +16 -0
- data/lib/facts/windows/networking/netmask6.rb +16 -0
- data/lib/facts/windows/networking/network.rb +16 -0
- data/lib/facts/windows/networking/network6.rb +16 -0
- data/lib/facts/windows/networking/primary.rb +15 -0
- data/lib/facts/windows/networking/scope6.rb +15 -0
- data/lib/facts/windows/os/architecture.rb +16 -0
- data/lib/facts/windows/os/family.rb +16 -0
- data/lib/facts/windows/os/hardware.rb +16 -0
- data/lib/facts/windows/os/name.rb +16 -0
- data/lib/facts/windows/os/release.rb +33 -0
- data/lib/facts/windows/os/windows/edition_id.rb +16 -0
- data/lib/facts/windows/os/windows/installation_type.rb +16 -0
- data/lib/facts/windows/os/windows/product_name.rb +16 -0
- data/lib/facts/windows/os/windows/release_id.rb +16 -0
- data/lib/facts/windows/os/windows/system32.rb +16 -0
- data/lib/facts/windows/path.rb +15 -0
- data/lib/facts/windows/processor.rb +19 -0
- data/lib/facts/windows/processors/count.rb +16 -0
- data/lib/facts/windows/processors/isa.rb +16 -0
- data/lib/facts/windows/processors/models.rb +15 -0
- data/lib/facts/windows/processors/physicalcount.rb +16 -0
- data/lib/facts/windows/ruby/platform.rb +16 -0
- data/lib/facts/windows/ruby/sitedir.rb +16 -0
- data/lib/facts/windows/ruby/version.rb +16 -0
- data/lib/facts/windows/scope6_interfaces.rb +19 -0
- data/lib/facts/windows/system_uptime/system_uptime_days.rb +16 -0
- data/lib/facts/windows/system_uptime/system_uptime_hours.rb +16 -0
- data/lib/facts/windows/system_uptime/system_uptime_seconds.rb +16 -0
- data/lib/facts/windows/system_uptime/system_uptime_uptime.rb +16 -0
- data/lib/facts/windows/timezone.rb +15 -0
- data/lib/facts/windows/virtualization/is_virtual.rb +15 -0
- data/lib/facts/windows/virtualization/virtual.rb +15 -0
- data/lib/facts_utils/bytes_to_human_readable.rb +38 -0
- data/lib/facts_utils/uptime_parser.rb +121 -0
- data/lib/facts_utils/windows_release_finder.rb +51 -0
- data/lib/framework/cli/cli.rb +132 -0
- data/lib/framework/cli/cli_launcher.rb +17 -0
- data/lib/framework/config/block_list.rb +35 -0
- data/lib/framework/config/config_reader.rb +44 -0
- data/lib/framework/core/cache_manager.rb +19 -0
- data/lib/framework/core/fact/external/external_fact_manager.rb +31 -0
- data/lib/framework/core/fact/internal/core_fact.rb +15 -0
- data/lib/framework/core/fact/internal/internal_fact_manager.rb +45 -0
- data/lib/framework/core/fact_augmenter.rb +37 -0
- data/lib/framework/core/fact_filter.rb +36 -0
- data/lib/framework/core/fact_loaders/class_discoverer.rb +21 -0
- data/lib/framework/core/fact_loaders/external_fact_loader.rb +54 -0
- data/lib/framework/core/fact_loaders/fact_loader.rb +72 -0
- data/lib/framework/core/fact_loaders/internal_fact_loader.rb +52 -0
- data/lib/framework/core/fact_manager.rb +55 -0
- data/lib/framework/core/file_loader.rb +60 -0
- data/lib/framework/core/options.rb +68 -0
- data/lib/framework/core/options/config_file_options.rb +65 -0
- data/lib/framework/core/options/default_options.rb +32 -0
- data/lib/framework/core/options/helper_options.rb +40 -0
- data/lib/framework/core/options/options_validator.rb +42 -0
- data/lib/framework/core/options/priority_options.rb +12 -0
- data/lib/framework/detector/os_detector.rb +67 -0
- data/lib/framework/formatters/formatter_factory.rb +13 -0
- data/lib/framework/formatters/formatter_helper.rb +39 -0
- data/lib/framework/formatters/hocon_fact_formatter.rb +50 -0
- data/lib/framework/formatters/json_fact_formatter.rb +35 -0
- data/lib/framework/formatters/legacy_fact_formatter.rb +90 -0
- data/lib/framework/formatters/yaml_fact_formatter.rb +16 -0
- data/lib/framework/logging/legacy_logger.rb +31 -0
- data/lib/framework/logging/logger.rb +65 -0
- data/lib/framework/logging/multilogger.rb +115 -0
- data/lib/framework/parsers/query_parser.rb +99 -0
- data/lib/framework/utils/utils.rb +24 -0
- data/lib/models/fact_collection.rb +31 -0
- data/lib/models/loaded_fact.rb +13 -0
- data/lib/models/resolved_fact.rb +22 -0
- data/lib/models/searched_fact.rb +15 -0
- data/lib/resolvers/agent_resolver.rb +23 -0
- data/lib/resolvers/aix/architecture_resolver.rb +39 -0
- data/lib/resolvers/aix/ffi/ffi_helper.rb +35 -0
- data/lib/resolvers/aix/hardware_resolver.rb +39 -0
- data/lib/resolvers/aix/load_averages_resolver.rb +28 -0
- data/lib/resolvers/aix/networking_resolver.rb +34 -0
- data/lib/resolvers/aix/os_level_resolver.rb +26 -0
- data/lib/resolvers/aix/utils/odm_query.rb +41 -0
- data/lib/resolvers/augeas_resolver.rb +24 -0
- data/lib/resolvers/base_resolver.rb +33 -0
- data/lib/resolvers/debian_version_resolver.rb +34 -0
- data/lib/resolvers/disk_resolver.rb +47 -0
- data/lib/resolvers/dmi_resolver.rb +59 -0
- data/lib/resolvers/eos_release_resolver.rb +31 -0
- data/lib/resolvers/facterversion_resolver.rb +23 -0
- data/lib/resolvers/filesystems_resolver.rb +32 -0
- data/lib/resolvers/fips_enabled_resolver.rb +27 -0
- data/lib/resolvers/hostname_resolver.rb +46 -0
- data/lib/resolvers/identity_resolver.rb +31 -0
- data/lib/resolvers/load_averages_resolver.rb +27 -0
- data/lib/resolvers/lpar_resolver.rb +32 -0
- data/lib/resolvers/lsb_release_resolver.rb +34 -0
- data/lib/resolvers/macosx/dmi_resolver.rb +29 -0
- data/lib/resolvers/macosx/filesystems_resolver.rb +33 -0
- data/lib/resolvers/macosx/ipaddress_resolver.rb +40 -0
- data/lib/resolvers/macosx/load_averages_resolver.rb +27 -0
- data/lib/resolvers/macosx/mountpoints_resolver.rb +62 -0
- data/lib/resolvers/macosx/swap_memory_resolver.rb +43 -0
- data/lib/resolvers/macosx/system_memory_resolver.rb +46 -0
- data/lib/resolvers/macosx/system_profiler_resolver.rb +62 -0
- data/lib/resolvers/memory_resolver.rb +57 -0
- data/lib/resolvers/mountpoints_resolver.rb +62 -0
- data/lib/resolvers/networking_linux_resolver.rb +97 -0
- data/lib/resolvers/os_level_resolver.rb +28 -0
- data/lib/resolvers/os_release_resolver.rb +65 -0
- data/lib/resolvers/path_resolver.rb +22 -0
- data/lib/resolvers/processors_resolver.rb +56 -0
- data/lib/resolvers/redhat_release_resolver.rb +54 -0
- data/lib/resolvers/ruby_resolver.rb +25 -0
- data/lib/resolvers/selinux_resolver.rb +37 -0
- data/lib/resolvers/solaris/ipaddress_resolver.rb +40 -0
- data/lib/resolvers/solaris/solaris_os_release_resolver.rb +52 -0
- data/lib/resolvers/solaris/solaris_zone_name.rb +32 -0
- data/lib/resolvers/solaris/zone_resolver.rb +52 -0
- data/lib/resolvers/ssh_resolver.rb +76 -0
- data/lib/resolvers/suse_release_resolver.rb +33 -0
- data/lib/resolvers/sw_vers_resolver.rb +30 -0
- data/lib/resolvers/timezone_resolver.rb +22 -0
- data/lib/resolvers/uname_resolver.rb +42 -0
- data/lib/resolvers/uptime_resolver.rb +57 -0
- data/lib/resolvers/utils/filesystem_helper.rb +29 -0
- data/lib/resolvers/utils/fingerprint.rb +11 -0
- data/lib/resolvers/utils/ssh.rb +13 -0
- data/lib/resolvers/windows/dmi_bios_resolver.rb +41 -0
- data/lib/resolvers/windows/dmi_computersystem_resolver.rb +40 -0
- data/lib/resolvers/windows/ffi/ffi.rb +68 -0
- data/lib/resolvers/windows/ffi/hardware_ffi.rb +17 -0
- data/lib/resolvers/windows/ffi/identity_ffi.rb +15 -0
- data/lib/resolvers/windows/ffi/ip_adapter_addresses_lh.rb +161 -0
- data/lib/resolvers/windows/ffi/kernel_ffi.rb +14 -0
- data/lib/resolvers/windows/ffi/memory_ffi.rb +12 -0
- data/lib/resolvers/windows/ffi/network_utils.rb +64 -0
- data/lib/resolvers/windows/ffi/networking_ffi.rb +34 -0
- data/lib/resolvers/windows/ffi/os_version_info_ex.rb +17 -0
- data/lib/resolvers/windows/ffi/performance_information.rb +20 -0
- data/lib/resolvers/windows/ffi/system32_ffi.rb +18 -0
- data/lib/resolvers/windows/ffi/system_info.rb +30 -0
- data/lib/resolvers/windows/fips_resolver.rb +32 -0
- data/lib/resolvers/windows/hardware_architecture_resolver.rb +64 -0
- data/lib/resolvers/windows/identity_resolver.rb +57 -0
- data/lib/resolvers/windows/kernel_resolver.rb +42 -0
- data/lib/resolvers/windows/memory_resolver.rb +60 -0
- data/lib/resolvers/windows/netkvm_resolver.rb +31 -0
- data/lib/resolvers/windows/networking_resolver.rb +179 -0
- data/lib/resolvers/windows/processors_resolver.rb +65 -0
- data/lib/resolvers/windows/product_release_resolver.rb +36 -0
- data/lib/resolvers/windows/system32_resolver.rb +45 -0
- data/lib/resolvers/windows/uptime_resolver.rb +77 -0
- data/lib/resolvers/windows/utils/win32ole.rb +24 -0
- data/lib/resolvers/windows/virtualization_resolver.rb +65 -0
- data/lib/resolvers/windows/win_os_description_resolver.rb +31 -0
- data/lib/resolvers/wpar_resolver.rb +34 -0
- data/lib/util/fact.rb +14 -0
- data/tasks/create_fact.rake +19 -0
- data/tasks/fact_generator/fact.erb +14 -0
- data/tasks/fact_generator/fact_creator.rb +105 -0
- data/tasks/fact_generator/fact_spec.erb +18 -0
- data/tasks/fact_generator/facts.json +358 -0
- data/tasks/fact_generator/path.rb +10 -0
- metadata +659 -1065
- data/ext/facter/Makefile.erb +0 -31
- data/ext/facter/cpp-hocon/CMakeLists.txt +0 -67
- data/ext/facter/cpp-hocon/CONTRIBUTING.md +0 -9
- data/ext/facter/cpp-hocon/LICENSE +0 -17
- data/ext/facter/cpp-hocon/MAINTAINERS +0 -33
- data/ext/facter/cpp-hocon/README.md +0 -81
- data/ext/facter/cpp-hocon/acceptance/Gemfile +0 -18
- data/ext/facter/cpp-hocon/acceptance/Rakefile +0 -7
- data/ext/facter/cpp-hocon/acceptance/tests/fake.rb +0 -0
- data/ext/facter/cpp-hocon/appveyor.yml +0 -48
- data/ext/facter/cpp-hocon/lib/CMakeLists.txt +0 -94
- data/ext/facter/cpp-hocon/lib/Doxyfile.in +0 -2312
- data/ext/facter/cpp-hocon/lib/inc/hocon/config.hpp +0 -734
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_exception.hpp +0 -184
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_include_context.hpp +0 -51
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_includer.hpp +0 -53
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_includer_file.hpp +0 -30
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_list.hpp +0 -51
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_mergeable.hpp +0 -72
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_object.hpp +0 -81
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_origin.hpp +0 -98
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_parse_options.hpp +0 -139
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_parseable.hpp +0 -47
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_render_options.hpp +0 -128
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_resolve_options.hpp +0 -83
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_syntax.hpp +0 -24
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_value.hpp +0 -267
- data/ext/facter/cpp-hocon/lib/inc/hocon/config_value_factory.hpp +0 -48
- data/ext/facter/cpp-hocon/lib/inc/hocon/functional_list.hpp +0 -318
- data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_document.hpp +0 -95
- data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_document_factory.hpp +0 -39
- data/ext/facter/cpp-hocon/lib/inc/hocon/parser/config_node.hpp +0 -32
- data/ext/facter/cpp-hocon/lib/inc/hocon/path.hpp +0 -60
- data/ext/facter/cpp-hocon/lib/inc/hocon/program_options.hpp +0 -84
- data/ext/facter/cpp-hocon/lib/inc/hocon/types.hpp +0 -63
- data/ext/facter/cpp-hocon/lib/inc/internal/config_document_parser.hpp +0 -83
- data/ext/facter/cpp-hocon/lib/inc/internal/config_parser.hpp +0 -55
- data/ext/facter/cpp-hocon/lib/inc/internal/config_util.hpp +0 -17
- data/ext/facter/cpp-hocon/lib/inc/internal/container.hpp +0 -28
- data/ext/facter/cpp-hocon/lib/inc/internal/default_transformer.hpp +0 -12
- data/ext/facter/cpp-hocon/lib/inc/internal/full_includer.hpp +0 -13
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/abstract_config_node.hpp +0 -16
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/abstract_config_node_value.hpp +0 -12
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_array.hpp +0 -17
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_comment.hpp +0 -14
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_complex_value.hpp +0 -25
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_concatenation.hpp +0 -16
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_field.hpp +0 -29
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_include.hpp +0 -26
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_object.hpp +0 -45
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_path.hpp +0 -25
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_root.hpp +0 -24
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_simple_value.hpp +0 -21
- data/ext/facter/cpp-hocon/lib/inc/internal/nodes/config_node_single_token.hpp +0 -20
- data/ext/facter/cpp-hocon/lib/inc/internal/parseable.hpp +0 -128
- data/ext/facter/cpp-hocon/lib/inc/internal/path_builder.hpp +0 -20
- data/ext/facter/cpp-hocon/lib/inc/internal/path_parser.hpp +0 -55
- data/ext/facter/cpp-hocon/lib/inc/internal/replaceable_merge_stack.hpp +0 -14
- data/ext/facter/cpp-hocon/lib/inc/internal/resolve_context.hpp +0 -53
- data/ext/facter/cpp-hocon/lib/inc/internal/resolve_result.hpp +0 -21
- data/ext/facter/cpp-hocon/lib/inc/internal/resolve_source.hpp +0 -55
- data/ext/facter/cpp-hocon/lib/inc/internal/simple_config_document.hpp +0 -28
- data/ext/facter/cpp-hocon/lib/inc/internal/simple_config_origin.hpp +0 -67
- data/ext/facter/cpp-hocon/lib/inc/internal/simple_include_context.hpp +0 -22
- data/ext/facter/cpp-hocon/lib/inc/internal/simple_includer.hpp +0 -79
- data/ext/facter/cpp-hocon/lib/inc/internal/substitution_expression.hpp +0 -28
- data/ext/facter/cpp-hocon/lib/inc/internal/token.hpp +0 -45
- data/ext/facter/cpp-hocon/lib/inc/internal/tokenizer.hpp +0 -143
- data/ext/facter/cpp-hocon/lib/inc/internal/tokens.hpp +0 -135
- data/ext/facter/cpp-hocon/lib/inc/internal/unmergeable.hpp +0 -20
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_boolean.hpp +0 -26
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_concatenation.hpp +0 -59
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_delayed_merge.hpp +0 -53
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_delayed_merge_object.hpp +0 -59
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_double.hpp +0 -28
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_int.hpp +0 -25
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_long.hpp +0 -28
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_null.hpp +0 -33
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_number.hpp +0 -38
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_reference.hpp +0 -38
- data/ext/facter/cpp-hocon/lib/inc/internal/values/config_string.hpp +0 -32
- data/ext/facter/cpp-hocon/lib/inc/internal/values/simple_config_list.hpp +0 -75
- data/ext/facter/cpp-hocon/lib/inc/internal/values/simple_config_object.hpp +0 -107
- data/ext/facter/cpp-hocon/lib/namespaces.dox.in +0 -6
- data/ext/facter/cpp-hocon/lib/src/config.cc +0 -573
- data/ext/facter/cpp-hocon/lib/src/config_document_factory.cc +0 -24
- data/ext/facter/cpp-hocon/lib/src/config_document_parser.cc +0 -620
- data/ext/facter/cpp-hocon/lib/src/config_parse_options.cc +0 -101
- data/ext/facter/cpp-hocon/lib/src/config_parser.cc +0 -399
- data/ext/facter/cpp-hocon/lib/src/config_render_options.cc +0 -44
- data/ext/facter/cpp-hocon/lib/src/config_resolve_options.cc +0 -24
- data/ext/facter/cpp-hocon/lib/src/config_util.cc +0 -95
- data/ext/facter/cpp-hocon/lib/src/config_value_factory.cc +0 -68
- data/ext/facter/cpp-hocon/lib/src/default_transformer.cc +0 -94
- data/ext/facter/cpp-hocon/lib/src/nodes/abstract_config_node.cc +0 -19
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_array.cc +0 -13
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_comment.cc +0 -15
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_complex_value.cc +0 -50
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_concatenation.cc +0 -14
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_field.cc +0 -80
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc +0 -38
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_object.cc +0 -318
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_path.cc +0 -47
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_root.cc +0 -70
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_simple_value.cc +0 -50
- data/ext/facter/cpp-hocon/lib/src/nodes/config_node_single_token.cc +0 -18
- data/ext/facter/cpp-hocon/lib/src/parseable.cc +0 -328
- data/ext/facter/cpp-hocon/lib/src/path.cc +0 -219
- data/ext/facter/cpp-hocon/lib/src/path_builder.cc +0 -38
- data/ext/facter/cpp-hocon/lib/src/path_parser.cc +0 -253
- data/ext/facter/cpp-hocon/lib/src/resolve_context.cc +0 -139
- data/ext/facter/cpp-hocon/lib/src/resolve_source.cc +0 -216
- data/ext/facter/cpp-hocon/lib/src/simple_config_document.cc +0 -69
- data/ext/facter/cpp-hocon/lib/src/simple_config_origin.cc +0 -246
- data/ext/facter/cpp-hocon/lib/src/simple_include_context.cc +0 -18
- data/ext/facter/cpp-hocon/lib/src/simple_includer.cc +0 -186
- data/ext/facter/cpp-hocon/lib/src/substitution_expression.cc +0 -35
- data/ext/facter/cpp-hocon/lib/src/token.cc +0 -52
- data/ext/facter/cpp-hocon/lib/src/tokenizer.cc +0 -568
- data/ext/facter/cpp-hocon/lib/src/tokens.cc +0 -257
- data/ext/facter/cpp-hocon/lib/src/values/config_boolean.cc +0 -34
- data/ext/facter/cpp-hocon/lib/src/values/config_concatenation.cc +0 -260
- data/ext/facter/cpp-hocon/lib/src/values/config_delayed_merge.cc +0 -223
- data/ext/facter/cpp-hocon/lib/src/values/config_delayed_merge_object.cc +0 -190
- data/ext/facter/cpp-hocon/lib/src/values/config_double.cc +0 -35
- data/ext/facter/cpp-hocon/lib/src/values/config_int.cc +0 -35
- data/ext/facter/cpp-hocon/lib/src/values/config_long.cc +0 -35
- data/ext/facter/cpp-hocon/lib/src/values/config_null.cc +0 -35
- data/ext/facter/cpp-hocon/lib/src/values/config_number.cc +0 -78
- data/ext/facter/cpp-hocon/lib/src/values/config_object.cc +0 -97
- data/ext/facter/cpp-hocon/lib/src/values/config_reference.cc +0 -85
- data/ext/facter/cpp-hocon/lib/src/values/config_string.cc +0 -47
- data/ext/facter/cpp-hocon/lib/src/values/config_value.cc +0 -289
- data/ext/facter/cpp-hocon/lib/src/values/simple_config_list.cc +0 -219
- data/ext/facter/cpp-hocon/lib/src/values/simple_config_object.cc +0 -515
- data/ext/facter/cpp-hocon/lib/tests/CMakeLists.txt +0 -42
- data/ext/facter/cpp-hocon/lib/tests/concatenation_test.cc +0 -401
- data/ext/facter/cpp-hocon/lib/tests/conf_parser_test.cc +0 -720
- data/ext/facter/cpp-hocon/lib/tests/config_document_parser_test.cc +0 -208
- data/ext/facter/cpp-hocon/lib/tests/config_document_tests.cc +0 -110
- data/ext/facter/cpp-hocon/lib/tests/config_node_test.cc +0 -338
- data/ext/facter/cpp-hocon/lib/tests/config_substitution_test.cc +0 -893
- data/ext/facter/cpp-hocon/lib/tests/config_test.cc +0 -151
- data/ext/facter/cpp-hocon/lib/tests/config_value_factory_test.cc +0 -60
- data/ext/facter/cpp-hocon/lib/tests/config_value_test.cc +0 -111
- data/ext/facter/cpp-hocon/lib/tests/fixtures.hpp.in +0 -3
- data/ext/facter/cpp-hocon/lib/tests/fixtures/test01.conf +0 -91
- data/ext/facter/cpp-hocon/lib/tests/fixtures/test01.json +0 -4
- data/ext/facter/cpp-hocon/lib/tests/main.cc +0 -8
- data/ext/facter/cpp-hocon/lib/tests/path_test.cc +0 -129
- data/ext/facter/cpp-hocon/lib/tests/program_options.cc +0 -63
- data/ext/facter/cpp-hocon/lib/tests/test.conf +0 -1
- data/ext/facter/cpp-hocon/lib/tests/test_utils.cc +0 -452
- data/ext/facter/cpp-hocon/lib/tests/test_utils.hpp +0 -140
- data/ext/facter/cpp-hocon/lib/tests/token_test.cc +0 -108
- data/ext/facter/cpp-hocon/lib/tests/tokenizer_test.cc +0 -694
- data/ext/facter/cpp-hocon/lib/version.h.in +0 -28
- data/ext/facter/cpp-hocon/locales/CMakeLists.txt +0 -4
- data/ext/facter/cpp-hocon/locales/cpp-hocon.pot +0 -767
- data/ext/facter/extconf.rb +0 -22
- data/ext/facter/facter/CMakeLists.txt +0 -183
- data/ext/facter/facter/CONTRIBUTING.md +0 -99
- data/ext/facter/facter/Extensibility.md +0 -133
- data/ext/facter/facter/Gemfile +0 -13
- data/ext/facter/facter/LICENSE +0 -17
- data/ext/facter/facter/MAINTAINERS +0 -28
- data/ext/facter/facter/README.md +0 -295
- data/ext/facter/facter/Rakefile +0 -17
- data/ext/facter/facter/acceptance/Gemfile +0 -24
- data/ext/facter/facter/acceptance/Rakefile +0 -2
- data/ext/facter/facter/acceptance/bin/ci-bootstrap-from-artifacts.sh +0 -55
- data/ext/facter/facter/acceptance/config/aio/options.rb +0 -3
- data/ext/facter/facter/acceptance/config/git/options.rb +0 -3
- data/ext/facter/facter/acceptance/config/nodes/aix-53-power.yaml +0 -7
- data/ext/facter/facter/acceptance/config/nodes/aix-61-power.yaml +0 -7
- data/ext/facter/facter/acceptance/config/nodes/aix-71-power.yaml +0 -7
- data/ext/facter/facter/acceptance/config/nodes/huaweios-6-powerpc.yaml +0 -7
- data/ext/facter/facter/acceptance/config/nodes/solaris-10-sparc.yaml +0 -9
- data/ext/facter/facter/acceptance/config/nodes/solaris-11-sparc.yaml +0 -9
- data/ext/facter/facter/acceptance/lib/facter/acceptance/base_fact_utils.rb +0 -565
- data/ext/facter/facter/acceptance/lib/facter/acceptance/user_fact_utils.rb +0 -132
- data/ext/facter/facter/acceptance/lib/helper.rb +0 -3
- data/ext/facter/facter/acceptance/lib/puppet/acceptance/common_utils.rb +0 -10
- data/ext/facter/facter/acceptance/lib/puppet/acceptance/git_utils.rb +0 -19
- data/ext/facter/facter/acceptance/lib/puppet/acceptance/install_utils.rb +0 -58
- data/ext/facter/facter/acceptance/tests/custom_facts/conflicts_with_builtin_fact.rb +0 -106
- data/ext/facter/facter/acceptance/tests/custom_facts/custom_fact_with_10001_weight_overrides_external_fact.rb +0 -30
- data/ext/facter/facter/acceptance/tests/custom_facts/having_multiple_facts_in_one_file.rb +0 -40
- data/ext/facter/facter/acceptance/tests/custom_facts/using_win32ole_should_not_hang.rb +0 -33
- data/ext/facter/facter/acceptance/tests/external_facts/env_var_overrides_external_fact.rb +0 -46
- data/ext/facter/facter/acceptance/tests/external_facts/external_dir_overrides_default_external_fact.rb +0 -34
- data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact.rb +0 -29
- data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact_with_10000_weight_or_less.rb +0 -30
- data/ext/facter/facter/acceptance/tests/external_facts/external_fact_overrides_custom_fact_with_confine.rb +0 -35
- data/ext/facter/facter/acceptance/tests/external_facts/external_fact_stderr_messages_output_to_stderr.rb +0 -49
- data/ext/facter/facter/acceptance/tests/external_facts/external_facts_only_run_once.rb +0 -43
- data/ext/facter/facter/acceptance/tests/external_facts/fact_directory_precedence.rb +0 -109
- data/ext/facter/facter/acceptance/tests/external_facts/non_root_users_default_external_fact_directory.rb +0 -142
- data/ext/facter/facter/acceptance/tests/external_facts/root_uses_default_external_fact_dir.rb +0 -34
- data/ext/facter/facter/acceptance/tests/external_facts/structured_executable_facts.rb +0 -139
- data/ext/facter/facter/acceptance/tests/facter_returns_success_on_non_existent_fact.rb +0 -9
- data/ext/facter/facter/acceptance/tests/facts/dmi.rb +0 -51
- data/ext/facter/facter/acceptance/tests/facts/facterversion.rb +0 -11
- data/ext/facter/facter/acceptance/tests/facts/identity.rb +0 -52
- data/ext/facter/facter/acceptance/tests/facts/networking_facts.rb +0 -76
- data/ext/facter/facter/acceptance/tests/facts/non_root_users_without_errors.rb +0 -32
- data/ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb +0 -26
- data/ext/facter/facter/acceptance/tests/facts/os_processors_and_kernel.rb +0 -20
- data/ext/facter/facter/acceptance/tests/facts/partitions.rb +0 -37
- data/ext/facter/facter/acceptance/tests/facts/productname.rb +0 -15
- data/ext/facter/facter/acceptance/tests/facts/ruby.rb +0 -59
- data/ext/facter/facter/acceptance/tests/facts/validate_file_system_size_bytes.rb +0 -37
- data/ext/facter/facter/acceptance/tests/facts/verify_tmpfs_file_system.rb +0 -54
- data/ext/facter/facter/acceptance/tests/load_libfacter.rb +0 -66
- data/ext/facter/facter/acceptance/tests/no_errors_on_stderr.rb +0 -10
- data/ext/facter/facter/acceptance/tests/options/color.rb +0 -16
- data/ext/facter/facter/acceptance/tests/options/config.rb +0 -27
- data/ext/facter/facter/acceptance/tests/options/config_file/blocklist.rb +0 -35
- data/ext/facter/facter/acceptance/tests/options/config_file/blocklist_from_puppet_facts.rb +0 -40
- data/ext/facter/facter/acceptance/tests/options/config_file/custom_dir_overridden_by_cli_custom_dir.rb +0 -56
- data/ext/facter/facter/acceptance/tests/options/config_file/custom_facts.rb +0 -42
- data/ext/facter/facter/acceptance/tests/options/config_file/custom_facts_list.rb +0 -56
- data/ext/facter/facter/acceptance/tests/options/config_file/debug.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/config_file/debug_override_config_file.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/config_file/default_file_location.rb +0 -37
- data/ext/facter/facter/acceptance/tests/options/config_file/external_dir_conflicts_with_cli_no_external_facts.rb +0 -37
- data/ext/facter/facter/acceptance/tests/options/config_file/external_dir_overridden_by_cli_external_dir.rb +0 -40
- data/ext/facter/facter/acceptance/tests/options/config_file/external_facts.rb +0 -37
- data/ext/facter/facter/acceptance/tests/options/config_file/external_facts_list.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/config_file/load_from_ruby.rb +0 -73
- data/ext/facter/facter/acceptance/tests/options/config_file/log_level.rb +0 -35
- data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_custom_dir.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_facterlib.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/config_file/no_custom_facts_and_load_path.rb +0 -49
- data/ext/facter/facter/acceptance/tests/options/config_file/no_external_facts.rb +0 -38
- data/ext/facter/facter/acceptance/tests/options/config_file/no_external_facts_and_external_dir.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/config_file/no_ruby_disables_custom_facts.rb +0 -52
- data/ext/facter/facter/acceptance/tests/options/config_file/no_ruby_disables_ruby_facts.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/config_file/trace.rb +0 -48
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_clear_by_empty_ttls_cache_list.rb +0 -71
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_creates_json_cache_file.rb +0 -48
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_expire_facts_do_not_read_the_old_cached_value.rb +0 -58
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_expire_facts_refresh_the_cached_value.rb +0 -61
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_read_from_the_cached_value.rb +0 -57
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_that_are_corrupt_are_refreshed.rb +0 -53
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_cached_facts_that_are_empty_return_an_empty_value.rb +0 -53
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_puppet_facts_creates_json_for_cached_facts.rb +0 -45
- data/ext/facter/facter/acceptance/tests/options/config_file/ttls_puppet_facts_honors_cached_facts.rb +0 -54
- data/ext/facter/facter/acceptance/tests/options/config_file/verbose.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/custom_facts.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/custom_facts_facterlib.rb +0 -33
- data/ext/facter/facter/acceptance/tests/options/custom_facts_list.rb +0 -48
- data/ext/facter/facter/acceptance/tests/options/custom_facts_load_path.rb +0 -42
- data/ext/facter/facter/acceptance/tests/options/debug.rb +0 -12
- data/ext/facter/facter/acceptance/tests/options/external_facts.rb +0 -28
- data/ext/facter/facter/acceptance/tests/options/external_facts_list.rb +0 -35
- data/ext/facter/facter/acceptance/tests/options/help.rb +0 -13
- data/ext/facter/facter/acceptance/tests/options/json.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/list_block_groups.rb +0 -16
- data/ext/facter/facter/acceptance/tests/options/list_cache_groups.rb +0 -16
- data/ext/facter/facter/acceptance/tests/options/log_level.rb +0 -13
- data/ext/facter/facter/acceptance/tests/options/no_block.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_cache_facts.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_load_cached_facts.rb +0 -58
- data/ext/facter/facter/acceptance/tests/options/no_cache_should_not_refresh_cached_facts.rb +0 -63
- data/ext/facter/facter/acceptance/tests/options/no_color.rb +0 -16
- data/ext/facter/facter/acceptance/tests/options/no_custom_facts.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_custom_dir.rb +0 -19
- data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_facterlib.rb +0 -34
- data/ext/facter/facter/acceptance/tests/options/no_custom_facts_and_load_path.rb +0 -43
- data/ext/facter/facter/acceptance/tests/options/no_external_facts.rb +0 -28
- data/ext/facter/facter/acceptance/tests/options/no_external_facts_and_external_dir.rb +0 -19
- data/ext/facter/facter/acceptance/tests/options/no_ruby.rb +0 -44
- data/ext/facter/facter/acceptance/tests/options/puppet_facts.rb +0 -35
- data/ext/facter/facter/acceptance/tests/options/show_legacy.rb +0 -18
- data/ext/facter/facter/acceptance/tests/options/strict.rb +0 -11
- data/ext/facter/facter/acceptance/tests/options/trace.rb +0 -36
- data/ext/facter/facter/acceptance/tests/options/verbose.rb +0 -12
- data/ext/facter/facter/acceptance/tests/options/version.rb +0 -12
- data/ext/facter/facter/acceptance/tests/options/yaml.rb +0 -43
- data/ext/facter/facter/acceptance/tests/ticket_1123_facter_with_invalid_locale.rb +0 -22
- data/ext/facter/facter/acceptance/tests/ticket_1238_hostname_fqdn.rb +0 -57
- data/ext/facter/facter/appveyor.yml +0 -40
- data/ext/facter/facter/cmake/FindBLKID.cmake +0 -6
- data/ext/facter/facter/cmake/FindCPPHOCON.cmake +0 -6
- data/ext/facter/facter/cmake/FindDependency.cmake +0 -54
- data/ext/facter/facter/cmake/FindOPENSSL.cmake +0 -10
- data/ext/facter/facter/cmake/FindRuby.cmake +0 -286
- data/ext/facter/facter/cmake/FindWHEREAMI.cmake +0 -6
- data/ext/facter/facter/cmake/FindYAMLCPP.cmake +0 -17
- data/ext/facter/facter/contrib/dockerfiles/travis-cpp-builder/Dockerfile +0 -56
- data/ext/facter/facter/contrib/dockerfiles/travis-facter-builder/Dockerfile +0 -23
- data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/Dockerfile +0 -40
- data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/_coverity-submit.erb +0 -12
- data/ext/facter/facter/contrib/dockerfiles/travis-facter-coverity/fix_curl_command.patch +0 -32
- data/ext/facter/facter/exe/CMakeLists.txt +0 -39
- data/ext/facter/facter/exe/facter.cc +0 -378
- data/ext/facter/facter/ext/build_defaults.yaml +0 -14
- data/ext/facter/facter/ext/debian/changelog.erb +0 -11
- data/ext/facter/facter/ext/debian/compat +0 -1
- data/ext/facter/facter/ext/debian/control +0 -14
- data/ext/facter/facter/ext/debian/copyright +0 -19
- data/ext/facter/facter/ext/debian/docs +0 -2
- data/ext/facter/facter/ext/debian/facter.install +0 -4
- data/ext/facter/facter/ext/debian/lintian-overrides +0 -0
- data/ext/facter/facter/ext/debian/rules +0 -39
- data/ext/facter/facter/ext/debian/source/format +0 -1
- data/ext/facter/facter/ext/project_data.yaml +0 -30
- data/ext/facter/facter/ext/redhat/facter.spec.erb +0 -113
- data/ext/facter/facter/ext/windows/facter.bat +0 -8
- data/ext/facter/facter/ext/windows/facter_interactive.bat +0 -6
- data/ext/facter/facter/ext/windows/run_facter_interactive.bat +0 -9
- data/ext/facter/facter/factergo/example/main.go +0 -17
- data/ext/facter/facter/factergo/facter.go +0 -42
- data/ext/facter/facter/factergo/facter_test.go +0 -25
- data/ext/facter/facter/lib/CMakeLists.txt +0 -427
- data/ext/facter/facter/lib/Doxyfile +0 -2313
- data/ext/facter/facter/lib/Facter.java.in +0 -110
- data/ext/facter/facter/lib/Gemfile +0 -11
- data/ext/facter/facter/lib/Rakefile +0 -8
- data/ext/facter/facter/lib/docs/generate.rb +0 -25
- data/ext/facter/facter/lib/docs/namespaces.dox +0 -129
- data/ext/facter/facter/lib/docs/template.erb +0 -43
- data/ext/facter/facter/lib/facter.rb.in +0 -45
- data/ext/facter/facter/lib/gemspec.in +0 -21
- data/ext/facter/facter/lib/inc/facter/cwrapper.hpp +0 -18
- data/ext/facter/facter/lib/inc/facter/facts/array_value.hpp +0 -125
- data/ext/facter/facter/lib/inc/facter/facts/collection.hpp +0 -339
- data/ext/facter/facter/lib/inc/facter/facts/external/resolver.hpp +0 -49
- data/ext/facter/facter/lib/inc/facter/facts/fact.hpp +0 -669
- data/ext/facter/facter/lib/inc/facter/facts/map_value.hpp +0 -127
- data/ext/facter/facter/lib/inc/facter/facts/os.hpp +0 -210
- data/ext/facter/facter/lib/inc/facter/facts/os_family.hpp +0 -58
- data/ext/facter/facter/lib/inc/facter/facts/resolver.hpp +0 -126
- data/ext/facter/facter/lib/inc/facter/facts/scalar_value.hpp +0 -152
- data/ext/facter/facter/lib/inc/facter/facts/value.hpp +0 -164
- data/ext/facter/facter/lib/inc/facter/facts/vm.hpp +0 -157
- data/ext/facter/facter/lib/inc/facter/logging/logging.hpp +0 -192
- data/ext/facter/facter/lib/inc/facter/ruby/ruby.hpp +0 -73
- data/ext/facter/facter/lib/inc/facter/util/config.hpp +0 -84
- data/ext/facter/facter/lib/inc/facter/util/string.hpp +0 -72
- data/ext/facter/facter/lib/inc/internal/facts/aix/disk_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/aix/filesystem_resolver.hpp +0 -41
- data/ext/facter/facter/lib/inc/internal/facts/aix/kernel_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/aix/load_average_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/aix/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/aix/networking_resolver.hpp +0 -56
- data/ext/facter/facter/lib/inc/internal/facts/aix/operating_system_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/aix/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/aix/serial_number_resolver.hpp +0 -27
- data/ext/facter/facter/lib/inc/internal/facts/bsd/filesystem_resolver.hpp +0 -30
- data/ext/facter/facter/lib/inc/internal/facts/bsd/networking_resolver.hpp +0 -61
- data/ext/facter/facter/lib/inc/internal/facts/bsd/uptime_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/cache.hpp +0 -71
- data/ext/facter/facter/lib/inc/internal/facts/external/execution_resolver.hpp +0 -31
- data/ext/facter/facter/lib/inc/internal/facts/external/json_resolver.hpp +0 -31
- data/ext/facter/facter/lib/inc/internal/facts/external/text_resolver.hpp +0 -31
- data/ext/facter/facter/lib/inc/internal/facts/external/windows/powershell_resolver.hpp +0 -34
- data/ext/facter/facter/lib/inc/internal/facts/external/yaml_resolver.hpp +0 -31
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/disk_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/dmi_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/filesystem_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/networking_resolver.hpp +0 -49
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/operating_system_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/virtualization_resolver.hpp +0 -27
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/zfs_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/freebsd/zpool_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/glib/load_average_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/linux/disk_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/linux/dmi_resolver.hpp +0 -37
- data/ext/facter/facter/lib/inc/internal/facts/linux/filesystem_resolver.hpp +0 -40
- data/ext/facter/facter/lib/inc/internal/facts/linux/fips_resolver.hpp +0 -31
- data/ext/facter/facter/lib/inc/internal/facts/linux/kernel_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/linux/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/linux/networking_resolver.hpp +0 -85
- data/ext/facter/facter/lib/inc/internal/facts/linux/operating_system_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/linux/os_cisco.hpp +0 -114
- data/ext/facter/facter/lib/inc/internal/facts/linux/os_linux.hpp +0 -72
- data/ext/facter/facter/lib/inc/internal/facts/linux/os_osrelease.hpp +0 -98
- data/ext/facter/facter/lib/inc/internal/facts/linux/processor_resolver.hpp +0 -60
- data/ext/facter/facter/lib/inc/internal/facts/linux/release_file.hpp +0 -124
- data/ext/facter/facter/lib/inc/internal/facts/linux/uptime_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/linux/virtualization_resolver.hpp +0 -50
- data/ext/facter/facter/lib/inc/internal/facts/openbsd/dmi_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/openbsd/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/openbsd/networking_resolver.hpp +0 -49
- data/ext/facter/facter/lib/inc/internal/facts/openbsd/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/openbsd/virtualization_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/dmi_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/networking_resolver.hpp +0 -67
- data/ext/facter/facter/lib/inc/internal/facts/osx/operating_system_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/system_profiler_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/osx/virtualization_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/posix/identity_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/posix/kernel_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/posix/networking_resolver.hpp +0 -55
- data/ext/facter/facter/lib/inc/internal/facts/posix/operating_system_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/posix/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/posix/ssh_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/posix/timezone_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/posix/uptime_resolver.hpp +0 -32
- data/ext/facter/facter/lib/inc/internal/facts/posix/xen_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/augeas_resolver.hpp +0 -35
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/disk_resolver.hpp +0 -81
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/dmi_resolver.hpp +0 -115
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/ec2_resolver.hpp +0 -30
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/filesystem_resolver.hpp +0 -166
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/fips_resolver.hpp +0 -46
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/gce_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/hypervisors_resolver.hpp +0 -69
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/identity_resolver.hpp +0 -73
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/kernel_resolver.hpp +0 -66
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/ldom_resolver.hpp +0 -64
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/load_average_resolver.hpp +0 -37
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/memory_resolver.hpp +0 -99
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/networking_resolver.hpp +0 -156
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/operating_system_resolver.hpp +0 -235
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/path_resolver.hpp +0 -28
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/processor_resolver.hpp +0 -80
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/ruby_resolver.hpp +0 -56
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/ssh_resolver.hpp +0 -105
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/system_profiler_resolver.hpp +0 -127
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/timezone_resolver.hpp +0 -36
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/uptime_resolver.hpp +0 -36
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/virtualization_resolver.hpp +0 -95
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/xen_resolver.hpp +0 -55
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/zfs_resolver.hpp +0 -59
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/zone_resolver.hpp +0 -95
- data/ext/facter/facter/lib/inc/internal/facts/resolvers/zpool_resolver.hpp +0 -63
- data/ext/facter/facter/lib/inc/internal/facts/solaris/disk_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/dmi_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/filesystem_resolver.hpp +0 -29
- data/ext/facter/facter/lib/inc/internal/facts/solaris/kernel_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/ldom_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/networking_resolver.hpp +0 -55
- data/ext/facter/facter/lib/inc/internal/facts/solaris/operating_system_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/processor_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/virtualization_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/zfs_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/solaris/zone_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/solaris/zpool_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/windows/dmi_resolver.hpp +0 -38
- data/ext/facter/facter/lib/inc/internal/facts/windows/identity_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/windows/kernel_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/windows/memory_resolver.hpp +0 -25
- data/ext/facter/facter/lib/inc/internal/facts/windows/networking_resolver.hpp +0 -74
- data/ext/facter/facter/lib/inc/internal/facts/windows/operating_system_resolver.hpp +0 -36
- data/ext/facter/facter/lib/inc/internal/facts/windows/processor_resolver.hpp +0 -36
- data/ext/facter/facter/lib/inc/internal/facts/windows/timezone_resolver.hpp +0 -24
- data/ext/facter/facter/lib/inc/internal/facts/windows/uptime_resolver.hpp +0 -32
- data/ext/facter/facter/lib/inc/internal/facts/windows/virtualization_resolver.hpp +0 -37
- data/ext/facter/facter/lib/inc/internal/ruby/aggregate_resolution.hpp +0 -77
- data/ext/facter/facter/lib/inc/internal/ruby/chunk.hpp +0 -83
- data/ext/facter/facter/lib/inc/internal/ruby/confine.hpp +0 -60
- data/ext/facter/facter/lib/inc/internal/ruby/fact.hpp +0 -108
- data/ext/facter/facter/lib/inc/internal/ruby/module.hpp +0 -165
- data/ext/facter/facter/lib/inc/internal/ruby/resolution.hpp +0 -126
- data/ext/facter/facter/lib/inc/internal/ruby/ruby_value.hpp +0 -119
- data/ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp +0 -56
- data/ext/facter/facter/lib/inc/internal/util/agent.hpp +0 -29
- data/ext/facter/facter/lib/inc/internal/util/aix/odm.hpp +0 -392
- data/ext/facter/facter/lib/inc/internal/util/aix/vmount.hpp +0 -139
- data/ext/facter/facter/lib/inc/internal/util/bsd/scoped_ifaddrs.hpp +0 -33
- data/ext/facter/facter/lib/inc/internal/util/freebsd/geom.hpp +0 -149
- data/ext/facter/facter/lib/inc/internal/util/posix/scoped_addrinfo.hpp +0 -45
- data/ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp +0 -34
- data/ext/facter/facter/lib/inc/internal/util/posix/scoped_descriptor.hpp +0 -27
- data/ext/facter/facter/lib/inc/internal/util/posix/utmpx_file.hpp +0 -57
- data/ext/facter/facter/lib/inc/internal/util/scoped_file.hpp +0 -36
- data/ext/facter/facter/lib/inc/internal/util/solaris/k_stat.hpp +0 -176
- data/ext/facter/facter/lib/inc/internal/util/solaris/scoped_kstat.hpp +0 -45
- data/ext/facter/facter/lib/inc/internal/util/versions.hpp +0 -34
- data/ext/facter/facter/lib/inc/internal/util/windows/wsa.hpp +0 -92
- data/ext/facter/facter/lib/inc/internal/util/yaml.hpp +0 -25
- data/ext/facter/facter/lib/schema/core_facts.pot +0 -2017
- data/ext/facter/facter/lib/schema/facter.yaml +0 -1947
- data/ext/facter/facter/lib/schema/translation_tooling.rb +0 -67
- data/ext/facter/facter/lib/spec/unit/facter_spec.rb +0 -136
- data/ext/facter/facter/lib/spec_helper.rb.in +0 -27
- data/ext/facter/facter/lib/src/cwrapper.cc +0 -45
- data/ext/facter/facter/lib/src/facts/aix/collection.cc +0 -34
- data/ext/facter/facter/lib/src/facts/aix/disk_resolver.cc +0 -75
- data/ext/facter/facter/lib/src/facts/aix/filesystem_resolver.cc +0 -132
- data/ext/facter/facter/lib/src/facts/aix/kernel_resolver.cc +0 -27
- data/ext/facter/facter/lib/src/facts/aix/load_average_resolver.cc +0 -50
- data/ext/facter/facter/lib/src/facts/aix/memory_resolver.cc +0 -63
- data/ext/facter/facter/lib/src/facts/aix/networking_resolver.cc +0 -250
- data/ext/facter/facter/lib/src/facts/aix/operating_system_resolver.cc +0 -99
- data/ext/facter/facter/lib/src/facts/aix/processor_resolver.cc +0 -106
- data/ext/facter/facter/lib/src/facts/aix/serial_number_resolver.cc +0 -43
- data/ext/facter/facter/lib/src/facts/array_value.cc +0 -111
- data/ext/facter/facter/lib/src/facts/bsd/collection.cc +0 -27
- data/ext/facter/facter/lib/src/facts/bsd/filesystem_resolver.cc +0 -92
- data/ext/facter/facter/lib/src/facts/bsd/networking_resolver.cc +0 -231
- data/ext/facter/facter/lib/src/facts/bsd/uptime_resolver.cc +0 -23
- data/ext/facter/facter/lib/src/facts/cache.cc +0 -117
- data/ext/facter/facter/lib/src/facts/collection.cc +0 -663
- data/ext/facter/facter/lib/src/facts/external/execution_resolver.cc +0 -89
- data/ext/facter/facter/lib/src/facts/external/json_resolver.cc +0 -219
- data/ext/facter/facter/lib/src/facts/external/resolver.cc +0 -12
- data/ext/facter/facter/lib/src/facts/external/text_resolver.cc +0 -45
- data/ext/facter/facter/lib/src/facts/external/windows/powershell_resolver.cc +0 -117
- data/ext/facter/facter/lib/src/facts/external/yaml_resolver.cc +0 -45
- data/ext/facter/facter/lib/src/facts/freebsd/collection.cc +0 -43
- data/ext/facter/facter/lib/src/facts/freebsd/disk_resolver.cc +0 -34
- data/ext/facter/facter/lib/src/facts/freebsd/dmi_resolver.cc +0 -43
- data/ext/facter/facter/lib/src/facts/freebsd/filesystem_resolver.cc +0 -37
- data/ext/facter/facter/lib/src/facts/freebsd/memory_resolver.cc +0 -76
- data/ext/facter/facter/lib/src/facts/freebsd/networking_resolver.cc +0 -64
- data/ext/facter/facter/lib/src/facts/freebsd/operating_system_resolver.cc +0 -17
- data/ext/facter/facter/lib/src/facts/freebsd/processor_resolver.cc +0 -63
- data/ext/facter/facter/lib/src/facts/freebsd/virtualization_resolver.cc +0 -41
- data/ext/facter/facter/lib/src/facts/freebsd/zfs_resolver.cc +0 -12
- data/ext/facter/facter/lib/src/facts/freebsd/zpool_resolver.cc +0 -12
- data/ext/facter/facter/lib/src/facts/glib/load_average_resolver.cc +0 -22
- data/ext/facter/facter/lib/src/facts/linux/collection.cc +0 -44
- data/ext/facter/facter/lib/src/facts/linux/disk_resolver.cc +0 -80
- data/ext/facter/facter/lib/src/facts/linux/dmi_resolver.cc +0 -208
- data/ext/facter/facter/lib/src/facts/linux/filesystem_resolver.cc +0 -282
- data/ext/facter/facter/lib/src/facts/linux/fips_resolver.cc +0 -31
- data/ext/facter/facter/lib/src/facts/linux/kernel_resolver.cc +0 -20
- data/ext/facter/facter/lib/src/facts/linux/memory_resolver.cc +0 -50
- data/ext/facter/facter/lib/src/facts/linux/networking_resolver.cc +0 -296
- data/ext/facter/facter/lib/src/facts/linux/operating_system_resolver.cc +0 -174
- data/ext/facter/facter/lib/src/facts/linux/os_linux.cc +0 -399
- data/ext/facter/facter/lib/src/facts/linux/processor_resolver.cc +0 -200
- data/ext/facter/facter/lib/src/facts/linux/uptime_resolver.cc +0 -15
- data/ext/facter/facter/lib/src/facts/linux/virtualization_resolver.cc +0 -282
- data/ext/facter/facter/lib/src/facts/map_value.cc +0 -119
- data/ext/facter/facter/lib/src/facts/openbsd/collection.cc +0 -37
- data/ext/facter/facter/lib/src/facts/openbsd/dmi_resolver.cc +0 -47
- data/ext/facter/facter/lib/src/facts/openbsd/memory_resolver.cc +0 -76
- data/ext/facter/facter/lib/src/facts/openbsd/networking_resolver.cc +0 -64
- data/ext/facter/facter/lib/src/facts/openbsd/processor_resolver.cc +0 -59
- data/ext/facter/facter/lib/src/facts/openbsd/virtualization_resolver.cc +0 -20
- data/ext/facter/facter/lib/src/facts/osx/collection.cc +0 -39
- data/ext/facter/facter/lib/src/facts/osx/dmi_resolver.cc +0 -32
- data/ext/facter/facter/lib/src/facts/osx/memory_resolver.cc +0 -60
- data/ext/facter/facter/lib/src/facts/osx/networking_resolver.cc +0 -80
- data/ext/facter/facter/lib/src/facts/osx/operating_system_resolver.cc +0 -49
- data/ext/facter/facter/lib/src/facts/osx/processor_resolver.cc +0 -55
- data/ext/facter/facter/lib/src/facts/osx/system_profiler_resolver.cc +0 -66
- data/ext/facter/facter/lib/src/facts/osx/virtualization_resolver.cc +0 -46
- data/ext/facter/facter/lib/src/facts/posix/cache.cc +0 -9
- data/ext/facter/facter/lib/src/facts/posix/collection.cc +0 -48
- data/ext/facter/facter/lib/src/facts/posix/identity_resolver.cc +0 -79
- data/ext/facter/facter/lib/src/facts/posix/kernel_resolver.cc +0 -25
- data/ext/facter/facter/lib/src/facts/posix/networking_resolver.cc +0 -137
- data/ext/facter/facter/lib/src/facts/posix/operatingsystem_resolver.cc +0 -29
- data/ext/facter/facter/lib/src/facts/posix/processor_resolver.cc +0 -22
- data/ext/facter/facter/lib/src/facts/posix/ssh_resolver.cc +0 -116
- data/ext/facter/facter/lib/src/facts/posix/timezone_resolver.cc +0 -26
- data/ext/facter/facter/lib/src/facts/posix/uptime_resolver.cc +0 -72
- data/ext/facter/facter/lib/src/facts/posix/xen_resolver.cc +0 -43
- data/ext/facter/facter/lib/src/facts/resolver.cc +0 -105
- data/ext/facter/facter/lib/src/facts/resolvers/augeas_resolver.cc +0 -56
- data/ext/facter/facter/lib/src/facts/resolvers/disk_resolver.cc +0 -69
- data/ext/facter/facter/lib/src/facts/resolvers/dmi_resolver.cc +0 -160
- data/ext/facter/facter/lib/src/facts/resolvers/ec2_resolver.cc +0 -174
- data/ext/facter/facter/lib/src/facts/resolvers/filesystem_resolver.cc +0 -118
- data/ext/facter/facter/lib/src/facts/resolvers/fips_resolver.cc +0 -23
- data/ext/facter/facter/lib/src/facts/resolvers/gce_resolver.cc +0 -276
- data/ext/facter/facter/lib/src/facts/resolvers/hypervisors_resolver.cc +0 -76
- data/ext/facter/facter/lib/src/facts/resolvers/identity_resolver.cc +0 -50
- data/ext/facter/facter/lib/src/facts/resolvers/kernel_resolver.cc +0 -62
- data/ext/facter/facter/lib/src/facts/resolvers/ldom_resolver.cc +0 -60
- data/ext/facter/facter/lib/src/facts/resolvers/load_average_resolver.cc +0 -36
- data/ext/facter/facter/lib/src/facts/resolvers/memory_resolver.cc +0 -88
- data/ext/facter/facter/lib/src/facts/resolvers/networking_resolver.cc +0 -296
- data/ext/facter/facter/lib/src/facts/resolvers/operating_system_resolver.cc +0 -276
- data/ext/facter/facter/lib/src/facts/resolvers/path_resolver.cc +0 -25
- data/ext/facter/facter/lib/src/facts/resolvers/processor_resolver.cc +0 -70
- data/ext/facter/facter/lib/src/facts/resolvers/ruby_resolver.cc +0 -109
- data/ext/facter/facter/lib/src/facts/resolvers/ssh_resolver.cc +0 -77
- data/ext/facter/facter/lib/src/facts/resolvers/system_profiler_resolver.cc +0 -137
- data/ext/facter/facter/lib/src/facts/resolvers/timezone_resolver.cc +0 -27
- data/ext/facter/facter/lib/src/facts/resolvers/uptime_resolver.cc +0 -63
- data/ext/facter/facter/lib/src/facts/resolvers/virtualization_resolver.cc +0 -119
- data/ext/facter/facter/lib/src/facts/resolvers/xen_resolver.cc +0 -80
- data/ext/facter/facter/lib/src/facts/resolvers/zfs_resolver.cc +0 -63
- data/ext/facter/facter/lib/src/facts/resolvers/zone_resolver.cc +0 -91
- data/ext/facter/facter/lib/src/facts/resolvers/zpool_resolver.cc +0 -93
- data/ext/facter/facter/lib/src/facts/scalar_value.cc +0 -73
- data/ext/facter/facter/lib/src/facts/solaris/collection.cc +0 -51
- data/ext/facter/facter/lib/src/facts/solaris/disk_resolver.cc +0 -35
- data/ext/facter/facter/lib/src/facts/solaris/dmi_resolver.cc +0 -86
- data/ext/facter/facter/lib/src/facts/solaris/filesystem_resolver.cc +0 -92
- data/ext/facter/facter/lib/src/facts/solaris/kernel_resolver.cc +0 -24
- data/ext/facter/facter/lib/src/facts/solaris/ldom_resolver.cc +0 -87
- data/ext/facter/facter/lib/src/facts/solaris/memory_resolver.cc +0 -91
- data/ext/facter/facter/lib/src/facts/solaris/networking_resolver.cc +0 -188
- data/ext/facter/facter/lib/src/facts/solaris/operating_system_resolver.cc +0 -83
- data/ext/facter/facter/lib/src/facts/solaris/processor_resolver.cc +0 -105
- data/ext/facter/facter/lib/src/facts/solaris/virtualization_resolver.cc +0 -38
- data/ext/facter/facter/lib/src/facts/solaris/zfs_resolver.cc +0 -12
- data/ext/facter/facter/lib/src/facts/solaris/zone_resolver.cc +0 -33
- data/ext/facter/facter/lib/src/facts/solaris/zpool_resolver.cc +0 -12
- data/ext/facter/facter/lib/src/facts/windows/cache.cc +0 -11
- data/ext/facter/facter/lib/src/facts/windows/collection.cc +0 -91
- data/ext/facter/facter/lib/src/facts/windows/dmi_resolver.cc +0 -39
- data/ext/facter/facter/lib/src/facts/windows/identity_resolver.cc +0 -46
- data/ext/facter/facter/lib/src/facts/windows/kernel_resolver.cc +0 -58
- data/ext/facter/facter/lib/src/facts/windows/memory_resolver.cc +0 -25
- data/ext/facter/facter/lib/src/facts/windows/networking_resolver.cc +0 -227
- data/ext/facter/facter/lib/src/facts/windows/operating_system_resolver.cc +0 -147
- data/ext/facter/facter/lib/src/facts/windows/processor_resolver.cc +0 -99
- data/ext/facter/facter/lib/src/facts/windows/timezone_resolver.cc +0 -28
- data/ext/facter/facter/lib/src/facts/windows/uptime_resolver.cc +0 -26
- data/ext/facter/facter/lib/src/facts/windows/virtualization_resolver.cc +0 -63
- data/ext/facter/facter/lib/src/java/facter.cc +0 -185
- data/ext/facter/facter/lib/src/logging/logging.cc +0 -151
- data/ext/facter/facter/lib/src/ruby/aggregate_resolution.cc +0 -249
- data/ext/facter/facter/lib/src/ruby/chunk.cc +0 -136
- data/ext/facter/facter/lib/src/ruby/confine.cc +0 -84
- data/ext/facter/facter/lib/src/ruby/fact.cc +0 -398
- data/ext/facter/facter/lib/src/ruby/module.cc +0 -1130
- data/ext/facter/facter/lib/src/ruby/resolution.cc +0 -230
- data/ext/facter/facter/lib/src/ruby/ruby.cc +0 -182
- data/ext/facter/facter/lib/src/ruby/ruby_value.cc +0 -288
- data/ext/facter/facter/lib/src/ruby/simple_resolution.cc +0 -156
- data/ext/facter/facter/lib/src/util/bsd/scoped_ifaddrs.cc +0 -29
- data/ext/facter/facter/lib/src/util/config/config.cc +0 -83
- data/ext/facter/facter/lib/src/util/config/posix/config.cc +0 -12
- data/ext/facter/facter/lib/src/util/config/windows/config.cc +0 -14
- data/ext/facter/facter/lib/src/util/freebsd/geom.cc +0 -130
- data/ext/facter/facter/lib/src/util/posix/scoped_addrinfo.cc +0 -41
- data/ext/facter/facter/lib/src/util/posix/scoped_bio.cc +0 -29
- data/ext/facter/facter/lib/src/util/posix/scoped_descriptor.cc +0 -20
- data/ext/facter/facter/lib/src/util/posix/utmpx_file.cc +0 -36
- data/ext/facter/facter/lib/src/util/scoped_file.cc +0 -26
- data/ext/facter/facter/lib/src/util/solaris/k_stat.cc +0 -157
- data/ext/facter/facter/lib/src/util/solaris/scoped_kstat.cc +0 -31
- data/ext/facter/facter/lib/src/util/string.cc +0 -170
- data/ext/facter/facter/lib/src/util/windows/wsa.cc +0 -69
- data/ext/facter/facter/lib/src/util/yaml.cc +0 -72
- data/ext/facter/facter/lib/tasks/spec.rake +0 -26
- data/ext/facter/facter/lib/tests/CMakeLists.txt +0 -156
- data/ext/facter/facter/lib/tests/collection_fixture.cc +0 -15
- data/ext/facter/facter/lib/tests/collection_fixture.hpp +0 -19
- data/ext/facter/facter/lib/tests/cwrapper.cc +0 -22
- data/ext/facter/facter/lib/tests/facts/array_value.cc +0 -140
- data/ext/facter/facter/lib/tests/facts/boolean_value.cc +0 -67
- data/ext/facter/facter/lib/tests/facts/cache.cc +0 -100
- data/ext/facter/facter/lib/tests/facts/collection.cc +0 -576
- data/ext/facter/facter/lib/tests/facts/double_value.cc +0 -40
- data/ext/facter/facter/lib/tests/facts/external/json_resolver.cc +0 -62
- data/ext/facter/facter/lib/tests/facts/external/posix/execution_resolver.cc +0 -69
- data/ext/facter/facter/lib/tests/facts/external/text_resolver.cc +0 -46
- data/ext/facter/facter/lib/tests/facts/external/windows/execution_resolver.cc +0 -69
- data/ext/facter/facter/lib/tests/facts/external/windows/powershell_resolver.cc +0 -122
- data/ext/facter/facter/lib/tests/facts/external/yaml_resolver.cc +0 -70
- data/ext/facter/facter/lib/tests/facts/integer_value.cc +0 -69
- data/ext/facter/facter/lib/tests/facts/linux/dmi_resolver.cc +0 -116
- data/ext/facter/facter/lib/tests/facts/linux/filesystem_resolver.cc +0 -13
- data/ext/facter/facter/lib/tests/facts/linux/processor_fixture.cc +0 -259
- data/ext/facter/facter/lib/tests/facts/linux/processor_fixture.hpp +0 -77
- data/ext/facter/facter/lib/tests/facts/linux/processor_resolver.cc +0 -312
- data/ext/facter/facter/lib/tests/facts/linux/virtualization_resolver.cc +0 -48
- data/ext/facter/facter/lib/tests/facts/map_value.cc +0 -116
- data/ext/facter/facter/lib/tests/facts/posix/collection.cc +0 -39
- data/ext/facter/facter/lib/tests/facts/posix/uptime_resolver.cc +0 -52
- data/ext/facter/facter/lib/tests/facts/resolvers/augeas_resolver.cc +0 -58
- data/ext/facter/facter/lib/tests/facts/resolvers/disk_resolver.cc +0 -114
- data/ext/facter/facter/lib/tests/facts/resolvers/dmi_resolver.cc +0 -152
- data/ext/facter/facter/lib/tests/facts/resolvers/filesystem_resolver.cc +0 -206
- data/ext/facter/facter/lib/tests/facts/resolvers/identity_resolver.cc +0 -83
- data/ext/facter/facter/lib/tests/facts/resolvers/kernel_resolver.cc +0 -61
- data/ext/facter/facter/lib/tests/facts/resolvers/ldom_resolver.cc +0 -86
- data/ext/facter/facter/lib/tests/facts/resolvers/memory_resolver.cc +0 -135
- data/ext/facter/facter/lib/tests/facts/resolvers/networking_resolver.cc +0 -507
- data/ext/facter/facter/lib/tests/facts/resolvers/operating_system_resolver.cc +0 -247
- data/ext/facter/facter/lib/tests/facts/resolvers/processor_resolver.cc +0 -157
- data/ext/facter/facter/lib/tests/facts/resolvers/ruby_resolver.cc +0 -74
- data/ext/facter/facter/lib/tests/facts/resolvers/ssh_resolver.cc +0 -103
- data/ext/facter/facter/lib/tests/facts/resolvers/system_profiler_resolver.cc +0 -135
- data/ext/facter/facter/lib/tests/facts/resolvers/timezone_resolver.cc +0 -49
- data/ext/facter/facter/lib/tests/facts/resolvers/uptime_resolver.cc +0 -151
- data/ext/facter/facter/lib/tests/facts/resolvers/virtualization_resolver.cc +0 -175
- data/ext/facter/facter/lib/tests/facts/resolvers/xen_resolver.cc +0 -100
- data/ext/facter/facter/lib/tests/facts/resolvers/zfs_resolver.cc +0 -65
- data/ext/facter/facter/lib/tests/facts/resolvers/zone_resolver.cc +0 -122
- data/ext/facter/facter/lib/tests/facts/resolvers/zpool_resolver.cc +0 -69
- data/ext/facter/facter/lib/tests/facts/schema.cc +0 -796
- data/ext/facter/facter/lib/tests/facts/string_value.cc +0 -270
- data/ext/facter/facter/lib/tests/facts/windows/collection.cc +0 -60
- data/ext/facter/facter/lib/tests/facts/windows/networking_resolver.cc +0 -217
- data/ext/facter/facter/lib/tests/fixtures.cc +0 -63
- data/ext/facter/facter/lib/tests/fixtures.hpp.in +0 -27
- data/ext/facter/facter/lib/tests/fixtures/execution/with space/command_with_space.bat +0 -2
- data/ext/facter/facter/lib/tests/fixtures/facts/external/json/facts.json +0 -12
- data/ext/facter/facter/lib/tests/fixtures/facts/external/json/invalid.json +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/ordering/bar/foo.yaml +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/ordering/foo/foo.yaml +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/error_message +0 -4
- data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/facts +0 -5
- data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/failed +0 -3
- data/ext/facter/facter/lib/tests/fixtures/facts/external/posix/execution/not_executable +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/text/facts.txt +0 -4
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/error_message.bat +0 -4
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/facts.bat +0 -4
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/failed.cmd +0 -2
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/not_executable +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/execution/ruby_script.rb +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/error_message.ps1 +0 -3
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/facts.ps1 +0 -4
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/failed.ps1 +0 -2
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1 +0 -21
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/not_executable +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/yaml.ps1 +0 -18
- data/ext/facter/facter/lib/tests/fixtures/facts/external/yaml/facts.yaml +0 -15
- data/ext/facter/facter/lib/tests/fixtures/facts/external/yaml/invalid.yaml +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/external/z/303/266/facts.rb +0 -3
- data/ext/facter/facter/lib/tests/fixtures/facts/external/z/303/266/facts.txt +0 -1
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/azure +0 -3
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/azure-unknown +0 -3
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/cloud/not-azure +0 -0
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/full.txt +0 -83
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/full_alternative.txt +0 -83
- data/ext/facter/facter/lib/tests/fixtures/facts/linux/dmidecode/none.txt +0 -2
- data/ext/facter/facter/lib/tests/fixtures/ruby/100_resolutions.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/101_resolutions.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_invalid_require.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_block.rb +0 -30
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_cycle.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_invalid_merge.rb +0 -13
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_merge.rb +0 -23
- data/ext/facter/facter/lib/tests/fixtures/ruby/aggregate_with_require.rb +0 -16
- data/ext/facter/facter/lib/tests/fixtures/ruby/array_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/array_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/bad_command.rb +0 -19
- data/ext/facter/facter/lib/tests/fixtures/ruby/bad_syntax.rb +0 -2
- data/ext/facter/facter/lib/tests/fixtures/ruby/bignum_fact_value.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/block_confine.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/block_false_confine.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/block_nil_confine.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/block_true_confine.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_false_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_false_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_true_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/boolean_true_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/command_with_space.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/confine_missing_fact.rb +0 -22
- data/ext/facter/facter/lib/tests/fixtures/ruby/confine_weight.rb +0 -20
- data/ext/facter/facter/lib/tests/fixtures/ruby/custom_dir/expect_network_init.rb +0 -15
- data/ext/facter/facter/lib/tests/fixtures/ruby/cycle.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/debug.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/debugging.rb +0 -14
- data/ext/facter/facter/lib/tests/fixtures/ruby/debugonce.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/define_aggregate_fact.rb +0 -13
- data/ext/facter/facter/lib/tests/fixtures/ruby/define_fact.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/double_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/empty_command.rb +0 -3
- data/ext/facter/facter/lib/tests/fixtures/ruby/empty_fact.rb +0 -1
- data/ext/facter/facter/lib/tests/fixtures/ruby/empty_fact_with_value.rb +0 -1
- data/ext/facter/facter/lib/tests/fixtures/ruby/empty_setcode_command.rb +0 -3
- data/ext/facter/facter/lib/tests/fixtures/ruby/exec.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/execute_on_fail_raise.rb +0 -17
- data/ext/facter/facter/lib/tests/fixtures/ruby/execute_on_fail_value.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/execute_timeout.rb +0 -1
- data/ext/facter/facter/lib/tests/fixtures/ruby/execution_failure.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/existing_aggregate_resolution.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/existing_simple_resolution.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/fact.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/facter.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/facterversion.rb +0 -17
- data/ext/facter/facter/lib/tests/fixtures/ruby/hash_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/hash_with_non_string_key.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/integer_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/log_exception.rb +0 -21
- data/ext/facter/facter/lib/tests/fixtures/ruby/lookup.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/multi_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/named_resolution.rb +0 -13
- data/ext/facter/facter/lib/tests/fixtures/ruby/negative_number.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/nil_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/nonexistent_command.rb +0 -21
- data/ext/facter/facter/lib/tests/fixtures/ruby/on_message.rb +0 -16
- data/ext/facter/facter/lib/tests/fixtures/ruby/range_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/regexp_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/ruby.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/simple.rb +0 -11
- data/ext/facter/facter/lib/tests/fixtures/ruby/simple_command.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/simple_confine.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/simple_resolution.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/single_allocation.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/stderr_output.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/string_fact.rb +0 -5
- data/ext/facter/facter/lib/tests/fixtures/ruby/timeout.rb +0 -10
- data/ext/facter/facter/lib/tests/fixtures/ruby/trace.rb +0 -22
- data/ext/facter/facter/lib/tests/fixtures/ruby/uni/341/220/201dir/customfacts/342/204/242.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/uses_exit_code.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/value.rb +0 -6
- data/ext/facter/facter/lib/tests/fixtures/ruby/version.rb +0 -2
- data/ext/facter/facter/lib/tests/fixtures/ruby/warn.rb +0 -7
- data/ext/facter/facter/lib/tests/fixtures/ruby/warnonce.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/weight.rb +0 -20
- data/ext/facter/facter/lib/tests/fixtures/ruby/weight_option.rb +0 -17
- data/ext/facter/facter/lib/tests/fixtures/ruby/which.rb +0 -9
- data/ext/facter/facter/lib/tests/fixtures/ruby/windows/ole.rb +0 -7
- data/ext/facter/facter/lib/tests/java/facter.cc +0 -69
- data/ext/facter/facter/lib/tests/log_capture.cc +0 -29
- data/ext/facter/facter/lib/tests/log_capture.hpp +0 -35
- data/ext/facter/facter/lib/tests/logging/logging.cc +0 -69
- data/ext/facter/facter/lib/tests/main.cc +0 -20
- data/ext/facter/facter/lib/tests/mock_server.cc +0 -44
- data/ext/facter/facter/lib/tests/mock_server.hpp +0 -25
- data/ext/facter/facter/lib/tests/ruby/ruby.cc +0 -634
- data/ext/facter/facter/lib/tests/ruby/ruby_dirfacts.cc +0 -35
- data/ext/facter/facter/lib/tests/ruby/ruby_helper.cc +0 -41
- data/ext/facter/facter/lib/tests/ruby/ruby_helper.hpp +0 -8
- data/ext/facter/facter/lib/tests/ruby/windows/ruby.cc +0 -53
- data/ext/facter/facter/lib/tests/util/bsd/scoped_ifaddrs.cc +0 -10
- data/ext/facter/facter/lib/tests/util/posix/scoped_addrinfo.cc +0 -11
- data/ext/facter/facter/lib/tests/util/posix/scoped_bio.cc +0 -12
- data/ext/facter/facter/lib/tests/util/posix/scoped_descriptor.cc +0 -22
- data/ext/facter/facter/lib/tests/util/string.cc +0 -291
- data/ext/facter/facter/lib/version.h.in +0 -28
- data/ext/facter/facter/locales/CMakeLists.txt +0 -7
- data/ext/facter/facter/locales/FACTER.pot +0 -1621
- data/ext/facter/facter/man/man8/facter.8 +0 -205
- data/ext/facter/facter/scripts/cpplint.py +0 -4754
- data/ext/facter/facter/scripts/travis_target.sh +0 -83
- data/ext/facter/facter/tasks/ci.rake +0 -22
- data/ext/facter/leatherman/CHANGELOG.md +0 -439
- data/ext/facter/leatherman/CMakeLists.txt +0 -143
- data/ext/facter/leatherman/CONTRIBUTING.md +0 -98
- data/ext/facter/leatherman/LICENSE +0 -17
- data/ext/facter/leatherman/LeathermanConfig.cmake.in +0 -57
- data/ext/facter/leatherman/LeathermanConfigVersion.cmake.in +0 -11
- data/ext/facter/leatherman/MAINTAINERS +0 -28
- data/ext/facter/leatherman/README.md +0 -416
- data/ext/facter/leatherman/appveyor.yml +0 -47
- data/ext/facter/leatherman/catch/CMakeLists.txt +0 -1
- data/ext/facter/leatherman/cmake/FindICU.cmake +0 -690
- data/ext/facter/leatherman/cmake/GetGitRevisionDescription.cmake +0 -130
- data/ext/facter/leatherman/cmake/GetGitRevisionDescription.cmake.in +0 -38
- data/ext/facter/leatherman/cmake/cflags.cmake +0 -117
- data/ext/facter/leatherman/cmake/generate_translations.cmake +0 -17
- data/ext/facter/leatherman/cmake/internal.cmake +0 -241
- data/ext/facter/leatherman/cmake/leatherman.cmake.in +0 -369
- data/ext/facter/leatherman/cmake/leatherman_config.cmake +0 -80
- data/ext/facter/leatherman/cmake/normalize_pot.cmake +0 -17
- data/ext/facter/leatherman/cmake/options.cmake +0 -22
- data/ext/facter/leatherman/cmake/pod2man.cmake +0 -36
- data/ext/facter/leatherman/curl/CMakeLists.txt +0 -42
- data/ext/facter/leatherman/curl/inc/leatherman/curl/client.hpp +0 -450
- data/ext/facter/leatherman/curl/inc/leatherman/curl/request.hpp +0 -130
- data/ext/facter/leatherman/curl/inc/leatherman/curl/response.hpp +0 -80
- data/ext/facter/leatherman/curl/src/client.cc +0 -590
- data/ext/facter/leatherman/curl/src/request.cc +0 -112
- data/ext/facter/leatherman/curl/src/response.cc +0 -62
- data/ext/facter/leatherman/curl/tests/CMakeLists.txt +0 -22
- data/ext/facter/leatherman/curl/tests/client_test.cc +0 -628
- data/ext/facter/leatherman/curl/tests/fixtures.cc +0 -27
- data/ext/facter/leatherman/curl/tests/fixtures.hpp +0 -31
- data/ext/facter/leatherman/curl/tests/mock_curl.cc +0 -431
- data/ext/facter/leatherman/curl/tests/mock_curl.hpp +0 -86
- data/ext/facter/leatherman/curl/tests/request_test.cc +0 -85
- data/ext/facter/leatherman/curl/tests/response_test.cc +0 -58
- data/ext/facter/leatherman/dynamic_library/CMakeLists.txt +0 -43
- data/ext/facter/leatherman/dynamic_library/inc/leatherman/dynamic_library/dynamic_library.hpp +0 -122
- data/ext/facter/leatherman/dynamic_library/src/dynamic_library.cc +0 -57
- data/ext/facter/leatherman/dynamic_library/src/posix/dynamic_library.cc +0 -91
- data/ext/facter/leatherman/dynamic_library/src/windows/dynamic_library.cc +0 -128
- data/ext/facter/leatherman/dynamic_library/tests/dynamic_library_tests.cc +0 -94
- data/ext/facter/leatherman/dynamic_library/tests/fixtures.hpp.in +0 -3
- data/ext/facter/leatherman/dynamic_library/tests/test-lib/goodbye.cc +0 -5
- data/ext/facter/leatherman/dynamic_library/tests/test-lib/hello.cc +0 -7
- data/ext/facter/leatherman/execution/CMakeLists.txt +0 -65
- data/ext/facter/leatherman/execution/inc/leatherman/execution/execution.hpp +0 -488
- data/ext/facter/leatherman/execution/src/execution.cc +0 -510
- data/ext/facter/leatherman/execution/src/posix/execution.cc +0 -574
- data/ext/facter/leatherman/execution/src/posix/generic/platform.cc +0 -30
- data/ext/facter/leatherman/execution/src/posix/platform.hpp +0 -15
- data/ext/facter/leatherman/execution/src/posix/solaris/platform.cc +0 -197
- data/ext/facter/leatherman/execution/src/windows/execution.cc +0 -698
- data/ext/facter/leatherman/execution/tests/fixtures.hpp.in +0 -2
- data/ext/facter/leatherman/execution/tests/fixtures/echo_pid +0 -2
- data/ext/facter/leatherman/execution/tests/fixtures/error_message +0 -5
- data/ext/facter/leatherman/execution/tests/fixtures/execution/selfkill.sh +0 -3
- data/ext/facter/leatherman/execution/tests/fixtures/execution/sleep.sh +0 -3
- data/ext/facter/leatherman/execution/tests/fixtures/facts +0 -5
- data/ext/facter/leatherman/execution/tests/fixtures/failed +0 -3
- data/ext/facter/leatherman/execution/tests/fixtures/ls/crlf.txt +0 -3
- data/ext/facter/leatherman/execution/tests/fixtures/ls/file1.txt +0 -1
- data/ext/facter/leatherman/execution/tests/fixtures/ls/file2.txt +0 -1
- data/ext/facter/leatherman/execution/tests/fixtures/ls/file3.txt +0 -1
- data/ext/facter/leatherman/execution/tests/fixtures/ls/file4.txt +0 -7
- data/ext/facter/leatherman/execution/tests/fixtures/not_executable +0 -1
- data/ext/facter/leatherman/execution/tests/fixtures/windows/error_message.bat +0 -6
- data/ext/facter/leatherman/execution/tests/fixtures/windows/facts.bat +0 -4
- data/ext/facter/leatherman/execution/tests/fixtures/windows/failed.cmd +0 -2
- data/ext/facter/leatherman/execution/tests/fixtures/windows/not_executable +0 -1
- data/ext/facter/leatherman/execution/tests/fixtures/windows/ruby_script.rb +0 -1
- data/ext/facter/leatherman/execution/tests/log_capture.cc +0 -29
- data/ext/facter/leatherman/execution/tests/log_capture.hpp +0 -35
- data/ext/facter/leatherman/execution/tests/lth_cat.cc +0 -38
- data/ext/facter/leatherman/execution/tests/lth_cat.hpp +0 -9
- data/ext/facter/leatherman/execution/tests/posix/execution.cc +0 -728
- data/ext/facter/leatherman/execution/tests/posix/solaris/execution.cc +0 -54
- data/ext/facter/leatherman/execution/tests/windows/execution.cc +0 -789
- data/ext/facter/leatherman/file_util/CMakeLists.txt +0 -18
- data/ext/facter/leatherman/file_util/inc/leatherman/file_util/directory.hpp +0 -28
- data/ext/facter/leatherman/file_util/inc/leatherman/file_util/file.hpp +0 -95
- data/ext/facter/leatherman/file_util/src/directory.cc +0 -51
- data/ext/facter/leatherman/file_util/src/file.cc +0 -131
- data/ext/facter/leatherman/file_util/tests/directory_utils_test.cc +0 -87
- data/ext/facter/leatherman/file_util/tests/file_utils_test.cc +0 -195
- data/ext/facter/leatherman/file_util/tests/fixtures.cc +0 -37
- data/ext/facter/leatherman/file_util/tests/fixtures.hpp +0 -39
- data/ext/facter/leatherman/json_container/CMakeLists.txt +0 -11
- data/ext/facter/leatherman/json_container/README.md +0 -108
- data/ext/facter/leatherman/json_container/inc/leatherman/json_container/json_container.hpp +0 -443
- data/ext/facter/leatherman/json_container/src/json_container.cc +0 -655
- data/ext/facter/leatherman/json_container/tests/json_container_test.cc +0 -1129
- data/ext/facter/leatherman/locale/CMakeLists.txt +0 -46
- data/ext/facter/leatherman/locale/disabled/locale.cc +0 -38
- data/ext/facter/leatherman/locale/inc/leatherman/locale/locale.hpp +0 -263
- data/ext/facter/leatherman/locale/locales/CMakeLists.txt +0 -6
- data/ext/facter/leatherman/locale/locales/fr.po +0 -40
- data/ext/facter/leatherman/locale/locales/leatherman_locale.pot +0 -41
- data/ext/facter/leatherman/locale/src/locale.cc +0 -96
- data/ext/facter/leatherman/locale/tests/format.cc +0 -117
- data/ext/facter/leatherman/locale/tests/locale.cc +0 -190
- data/ext/facter/leatherman/locales/CMakeLists.txt +0 -7
- data/ext/facter/leatherman/locales/leatherman.pot +0 -717
- data/ext/facter/leatherman/logging/CMakeLists.txt +0 -43
- data/ext/facter/leatherman/logging/inc/leatherman/logging/logging.hpp +0 -264
- data/ext/facter/leatherman/logging/locales/CMakeLists.txt +0 -6
- data/ext/facter/leatherman/logging/locales/fr.po +0 -72
- data/ext/facter/leatherman/logging/locales/leatherman_logging.pot +0 -72
- data/ext/facter/leatherman/logging/src/logging.cc +0 -229
- data/ext/facter/leatherman/logging/src/posix/logging.cc +0 -39
- data/ext/facter/leatherman/logging/src/windows/logging.cc +0 -52
- data/ext/facter/leatherman/logging/tests/logging.cc +0 -118
- data/ext/facter/leatherman/logging/tests/logging.hpp +0 -88
- data/ext/facter/leatherman/logging/tests/logging_i18n.cc +0 -103
- data/ext/facter/leatherman/logging/tests/logging_on_message.cc +0 -61
- data/ext/facter/leatherman/logging/tests/logging_stream.cc +0 -159
- data/ext/facter/leatherman/logging/tests/logging_stream_lines.cc +0 -172
- data/ext/facter/leatherman/logging/tests/posix/logging.cc +0 -23
- data/ext/facter/leatherman/logging/tests/windows/logging.cc +0 -13
- data/ext/facter/leatherman/nowide/CMakeLists.txt +0 -7
- data/ext/facter/leatherman/rapidjson/CMakeLists.txt +0 -1
- data/ext/facter/leatherman/ruby/CMakeLists.txt +0 -26
- data/ext/facter/leatherman/ruby/inc/leatherman/ruby/api.hpp +0 -748
- data/ext/facter/leatherman/ruby/src/api.cc +0 -528
- data/ext/facter/leatherman/ruby/src/posix/api.cc +0 -14
- data/ext/facter/leatherman/ruby/src/windows/api.cc +0 -20
- data/ext/facter/leatherman/ruby/tests/api-test.cc +0 -206
- data/ext/facter/leatherman/scripts/cpplint.py +0 -6323
- data/ext/facter/leatherman/tests/CMakeLists.txt +0 -22
- data/ext/facter/leatherman/tests/main.cc +0 -17
- data/ext/facter/leatherman/util/CMakeLists.txt +0 -36
- data/ext/facter/leatherman/util/inc/leatherman/util/environment.hpp +0 -69
- data/ext/facter/leatherman/util/inc/leatherman/util/option_set.hpp +0 -228
- data/ext/facter/leatherman/util/inc/leatherman/util/posix/scoped_descriptor.hpp +0 -32
- data/ext/facter/leatherman/util/inc/leatherman/util/regex.hpp +0 -80
- data/ext/facter/leatherman/util/inc/leatherman/util/scope_exit.hpp +0 -62
- data/ext/facter/leatherman/util/inc/leatherman/util/scoped_env.hpp +0 -35
- data/ext/facter/leatherman/util/inc/leatherman/util/scoped_resource.hpp +0 -130
- data/ext/facter/leatherman/util/inc/leatherman/util/strings.hpp +0 -57
- data/ext/facter/leatherman/util/inc/leatherman/util/time.hpp +0 -36
- data/ext/facter/leatherman/util/inc/leatherman/util/timer.hpp +0 -43
- data/ext/facter/leatherman/util/inc/leatherman/util/uri.hpp +0 -23
- data/ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp +0 -32
- data/ext/facter/leatherman/util/src/environment.cc +0 -29
- data/ext/facter/leatherman/util/src/posix/environment.cc +0 -75
- data/ext/facter/leatherman/util/src/posix/scoped_descriptor.cc +0 -23
- data/ext/facter/leatherman/util/src/posix/time.cc +0 -9
- data/ext/facter/leatherman/util/src/scope_exit.cc +0 -43
- data/ext/facter/leatherman/util/src/scoped_env.cc +0 -37
- data/ext/facter/leatherman/util/src/strings.cc +0 -41
- data/ext/facter/leatherman/util/src/time.cc +0 -49
- data/ext/facter/leatherman/util/src/uri.cc +0 -75
- data/ext/facter/leatherman/util/src/windows/environment.cc +0 -75
- data/ext/facter/leatherman/util/src/windows/scoped_handle.cc +0 -24
- data/ext/facter/leatherman/util/src/windows/time.cc +0 -10
- data/ext/facter/leatherman/util/tests/environment.cc +0 -90
- data/ext/facter/leatherman/util/tests/option_set.cc +0 -234
- data/ext/facter/leatherman/util/tests/posix/environment.cc +0 -36
- data/ext/facter/leatherman/util/tests/scoped_env.cc +0 -52
- data/ext/facter/leatherman/util/tests/strings_test.cc +0 -71
- data/ext/facter/leatherman/util/tests/timer.cc +0 -39
- data/ext/facter/leatherman/util/tests/uri.cc +0 -104
- data/ext/facter/leatherman/util/tests/windows/environment.cc +0 -30
- data/ext/facter/leatherman/vendor/Catch-1.10.0.zip +0 -0
- data/ext/facter/leatherman/vendor/nowide/build/Jamfile.v2 +0 -26
- data/ext/facter/leatherman/vendor/nowide/doc/Doxyfile +0 -1632
- data/ext/facter/leatherman/vendor/nowide/doc/LICENSE_1_0.txt +0 -23
- data/ext/facter/leatherman/vendor/nowide/doc/gendoc.sh +0 -11
- data/ext/facter/leatherman/vendor/nowide/doc/main.txt +0 -354
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/args.hpp +0 -167
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cenv.hpp +0 -126
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/config.hpp +0 -54
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/convert.hpp +0 -154
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cstdio.hpp +0 -101
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cstdlib.hpp +0 -16
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/filebuf.hpp +0 -415
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/fstream.hpp +0 -283
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/integration/filesystem.hpp +0 -28
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/iostream.hpp +0 -99
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/stackstring.hpp +0 -154
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/system.hpp +0 -46
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/utf8_codecvt.hpp +0 -499
- data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/windows.hpp +0 -39
- data/ext/facter/leatherman/vendor/nowide/index.html +0 -16
- data/ext/facter/leatherman/vendor/nowide/src/iostream.cpp +0 -263
- data/ext/facter/leatherman/vendor/nowide/standalone/CMakeLists.txt +0 -104
- data/ext/facter/leatherman/vendor/nowide/standalone/MinGW.cmake +0 -9
- data/ext/facter/leatherman/vendor/nowide/standalone/config.hpp +0 -37
- data/ext/facter/leatherman/vendor/nowide/standalone/convert +0 -34
- data/ext/facter/leatherman/vendor/nowide/standalone/encoding_errors.hpp +0 -58
- data/ext/facter/leatherman/vendor/nowide/standalone/encoding_utf.hpp +0 -84
- data/ext/facter/leatherman/vendor/nowide/standalone/run_convert_and_build.sh +0 -17
- data/ext/facter/leatherman/vendor/nowide/standalone/scoped_ptr.hpp +0 -93
- data/ext/facter/leatherman/vendor/nowide/standalone/utf.hpp +0 -469
- data/ext/facter/leatherman/vendor/nowide/template.hpp +0 -19
- data/ext/facter/leatherman/vendor/nowide/test/Jamfile.v2 +0 -43
- data/ext/facter/leatherman/vendor/nowide/test/test.hpp +0 -25
- data/ext/facter/leatherman/vendor/nowide/test/test_codecvt.cpp +0 -254
- data/ext/facter/leatherman/vendor/nowide/test/test_convert.cpp +0 -101
- data/ext/facter/leatherman/vendor/nowide/test/test_env.cpp +0 -49
- data/ext/facter/leatherman/vendor/nowide/test/test_fs.cpp +0 -48
- data/ext/facter/leatherman/vendor/nowide/test/test_fstream.cpp +0 -184
- data/ext/facter/leatherman/vendor/nowide/test/test_iostream.cpp +0 -52
- data/ext/facter/leatherman/vendor/nowide/test/test_stdio.cpp +0 -60
- data/ext/facter/leatherman/vendor/nowide/test/test_system.cpp +0 -91
- data/ext/facter/leatherman/vendor/rapidjson-1.0.2.zip +0 -0
- data/ext/facter/leatherman/windows/CMakeLists.txt +0 -27
- data/ext/facter/leatherman/windows/inc/leatherman/windows/file_util.hpp +0 -23
- data/ext/facter/leatherman/windows/inc/leatherman/windows/process.hpp +0 -22
- data/ext/facter/leatherman/windows/inc/leatherman/windows/registry.hpp +0 -56
- data/ext/facter/leatherman/windows/inc/leatherman/windows/system_error.hpp +0 -23
- data/ext/facter/leatherman/windows/inc/leatherman/windows/user.hpp +0 -30
- data/ext/facter/leatherman/windows/inc/leatherman/windows/windows.hpp +0 -10
- data/ext/facter/leatherman/windows/inc/leatherman/windows/wmi.hpp +0 -193
- data/ext/facter/leatherman/windows/src/file_util.cc +0 -28
- data/ext/facter/leatherman/windows/src/process.cc +0 -42
- data/ext/facter/leatherman/windows/src/registry.cc +0 -96
- data/ext/facter/leatherman/windows/src/system_error.cc +0 -33
- data/ext/facter/leatherman/windows/src/user.cc +0 -76
- data/ext/facter/leatherman/windows/src/wmi.cc +0 -208
- data/ext/facter/leatherman/windows/tests/file_utils_test.cc +0 -13
@@ -1,42 +0,0 @@
|
|
1
|
-
# Setup compiling the test executable. C++ compile flags are inherited from the parent directory.
|
2
|
-
include_directories(${LEATHERMAN_CATCH_INCLUDE})
|
3
|
-
|
4
|
-
set(TEST_CASES
|
5
|
-
concatenation_test.cc
|
6
|
-
config_document_parser_test.cc
|
7
|
-
config_node_test.cc
|
8
|
-
config_value_test.cc
|
9
|
-
path_test.cc
|
10
|
-
token_test.cc
|
11
|
-
tokenizer_test.cc
|
12
|
-
test_utils.cc
|
13
|
-
config_document_tests.cc
|
14
|
-
conf_parser_test.cc
|
15
|
-
config_substitution_test.cc
|
16
|
-
config_value_factory_test.cc
|
17
|
-
config_test.cc
|
18
|
-
program_options.cc
|
19
|
-
)
|
20
|
-
|
21
|
-
add_executable(lib${PROJECT_NAME}_test $<TARGET_OBJECTS:libprojectsrc> ${TEST_CASES} main.cc)
|
22
|
-
|
23
|
-
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
24
|
-
target_link_libraries(lib${PROJECT_NAME}_test rt)
|
25
|
-
endif()
|
26
|
-
|
27
|
-
target_link_libraries(lib${PROJECT_NAME}_test
|
28
|
-
${Boost_LIBRARIES}
|
29
|
-
${LEATHERMAN_LIBRARIES}
|
30
|
-
${CMAKE_THREAD_LIBS_INIT}
|
31
|
-
)
|
32
|
-
|
33
|
-
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BOOST_STATIC AND LEATHERMAN_USE_LOCALES)
|
34
|
-
target_link_libraries(lib${PROJECT_NAME}_test iconv)
|
35
|
-
endif()
|
36
|
-
|
37
|
-
add_test(NAME "unit_tests" COMMAND lib${PROJECT_NAME}_test)
|
38
|
-
|
39
|
-
configure_file (
|
40
|
-
"${CMAKE_CURRENT_LIST_DIR}/fixtures.hpp.in"
|
41
|
-
"${CMAKE_CURRENT_LIST_DIR}/fixtures.hpp"
|
42
|
-
)
|
@@ -1,401 +0,0 @@
|
|
1
|
-
#include <catch.hpp>
|
2
|
-
|
3
|
-
#include <hocon/config.hpp>
|
4
|
-
#include "test_utils.hpp"
|
5
|
-
#include <hocon/config_list.hpp>
|
6
|
-
|
7
|
-
using namespace hocon;
|
8
|
-
using namespace hocon::test_utils;
|
9
|
-
|
10
|
-
TEST_CASE("concatenation") {
|
11
|
-
|
12
|
-
SECTION("no substitutions string concatenation") {
|
13
|
-
auto conf = parse_config(R"(a : true "xyz" 123 foo)")->resolve();
|
14
|
-
REQUIRE(conf->get_string("a") == "true xyz 123 foo");
|
15
|
-
}
|
16
|
-
|
17
|
-
SECTION("trivial string concatenation") {
|
18
|
-
auto conf = parse_config(R"(a : ${x}foo, x = 1)")->resolve();
|
19
|
-
REQUIRE(conf->get_string("a") == "1foo");
|
20
|
-
}
|
21
|
-
|
22
|
-
SECTION("two substitution string concatenation") {
|
23
|
-
auto conf = parse_config(R"(a : ${x}foo${x}, x = 1)")->resolve();
|
24
|
-
REQUIRE(conf->get_string("a") == "1foo1");
|
25
|
-
}
|
26
|
-
|
27
|
-
SECTION("string concatenation cannot span lines") {
|
28
|
-
bool thrown = false;
|
29
|
-
try {
|
30
|
-
auto conf = parse_config(R"(a : ${x}
|
31
|
-
foo, x = 1)")->resolve();
|
32
|
-
} catch (const hocon::parse_exception& e) {
|
33
|
-
thrown = true;
|
34
|
-
REQUIRE(std::string(e.what()).find("not be followed") != std::string::npos);
|
35
|
-
}
|
36
|
-
REQUIRE(thrown);
|
37
|
-
}
|
38
|
-
|
39
|
-
SECTION("string concatenation cannot contain objects") {
|
40
|
-
bool thrown = false;
|
41
|
-
try {
|
42
|
-
auto conf = parse_config("R(a : abc { x : y })")->resolve();
|
43
|
-
} catch (const hocon::config_exception& e) {
|
44
|
-
thrown = true;
|
45
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
46
|
-
REQUIRE_STRING_CONTAINS(e.what(), "abc");
|
47
|
-
// TODO: Add this when we can properly print subexpressions from exceptions
|
48
|
-
// REQUIRE_STRING_CONTAINS(e.what(), R"({"X":"Y"})");
|
49
|
-
}
|
50
|
-
REQUIRE(thrown);
|
51
|
-
}
|
52
|
-
|
53
|
-
SECTION("object concatenation cannot contain null") {
|
54
|
-
bool thrown = false;
|
55
|
-
try {
|
56
|
-
auto conf = parse_config(R"(a : null { x : y })")->resolve();
|
57
|
-
} catch (const hocon::config_exception& e) {
|
58
|
-
thrown = true;
|
59
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
60
|
-
REQUIRE_STRING_CONTAINS(e.what(), "null");
|
61
|
-
// TODO: Add this when we can properly print subexpressions from exceptions
|
62
|
-
// REQUIRE_STRING_CONTAINS(e.what(), R"({"X":"Y"})");
|
63
|
-
}
|
64
|
-
REQUIRE(thrown);
|
65
|
-
}
|
66
|
-
|
67
|
-
SECTION("string concatenation cannot contain arrays") {
|
68
|
-
bool thrown = false;
|
69
|
-
try {
|
70
|
-
auto conf = parse_config(R"(a : abc [1, 2])")->resolve();
|
71
|
-
} catch (const hocon::config_exception& e) {
|
72
|
-
thrown = true;
|
73
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
74
|
-
REQUIRE_STRING_CONTAINS(e.what(), "abc");
|
75
|
-
// TODO: Add this when we can properly print subexpressions from exceptions
|
76
|
-
// REQUIRE_STRING_CONTAINS(e.what(), "[1,2]");
|
77
|
-
}
|
78
|
-
REQUIRE(thrown);
|
79
|
-
}
|
80
|
-
|
81
|
-
SECTION("string concatenation cannot contain objects via substitution") {
|
82
|
-
bool thrown = false;
|
83
|
-
try {
|
84
|
-
auto conf = parse_config(R"(a : abc ${x}, x: { y : z })")->resolve();
|
85
|
-
} catch (const hocon::config_exception& e) {
|
86
|
-
thrown = true;
|
87
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
88
|
-
REQUIRE_STRING_CONTAINS(e.what(), "abc");
|
89
|
-
// TODO: Add this when we can properly print subexpressions in exceptions
|
90
|
-
// REQUIRE_STRING_CONTAINS(e.what(), R"({"X":"Y"})");
|
91
|
-
}
|
92
|
-
REQUIRE(thrown);
|
93
|
-
|
94
|
-
}
|
95
|
-
|
96
|
-
SECTION("string concatenation cannot contain arrays via substitution") {
|
97
|
-
bool thrown = false;
|
98
|
-
try {
|
99
|
-
auto conf = parse_config(R"(a : abc ${x}, x: [1, 2])")->resolve();
|
100
|
-
} catch (const hocon::config_exception& e) {
|
101
|
-
thrown = true;
|
102
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
103
|
-
REQUIRE_STRING_CONTAINS(e.what(), "abc");
|
104
|
-
// TODO: Add this when we can properly print subexpressions in exceptions
|
105
|
-
// REQUIRE_STRING_CONTAINS(e.what(), "[1,2]");
|
106
|
-
}
|
107
|
-
REQUIRE(thrown);
|
108
|
-
}
|
109
|
-
|
110
|
-
SECTION("list concatenation with no substitutions") {
|
111
|
-
auto conf = parse_config(" a : [1,2] [3,4] ");
|
112
|
-
std::vector<unwrapped_value> expected { 1,2,3,4 };
|
113
|
-
unwrapped_value v(expected);
|
114
|
-
bool test = v == conf->get_list("a")->unwrapped();
|
115
|
-
REQUIRE(test);
|
116
|
-
}
|
117
|
-
|
118
|
-
SECTION("list concatenation with substitutions") {
|
119
|
-
auto conf = parse_config(" a : ${x} [3,4] ${y}, x : [1,2], y : [5,6] ")->resolve();
|
120
|
-
std::vector<unwrapped_value> expected {1,2,3,4,5,6};
|
121
|
-
unwrapped_value v(expected);
|
122
|
-
bool test = v == conf->get_list("a")->unwrapped();
|
123
|
-
REQUIRE(test);
|
124
|
-
}
|
125
|
-
|
126
|
-
SECTION("list concatenation with self-references") {
|
127
|
-
auto conf = parse_config(" a : [1, 2], a : ${a} [3,4], a : ${a} [5,6] ")->resolve();
|
128
|
-
std::vector<unwrapped_value> expected {1,2,3,4,5,6};
|
129
|
-
unwrapped_value v(expected);
|
130
|
-
bool test = v == conf->get_list("a")->unwrapped();
|
131
|
-
REQUIRE(test);
|
132
|
-
}
|
133
|
-
|
134
|
-
SECTION("list concat can span lines inside brackets") {
|
135
|
-
auto conf = parse_config(" a : [1,2\n] [3,4] ");
|
136
|
-
std::vector<unwrapped_value> v {1,2,3,4};
|
137
|
-
unwrapped_value expected(v);
|
138
|
-
bool test = expected == conf->get_list("a")->unwrapped();
|
139
|
-
REQUIRE(test);
|
140
|
-
}
|
141
|
-
|
142
|
-
SECTION("list concatenation cannot span lines") {
|
143
|
-
bool thrown = false;
|
144
|
-
try {
|
145
|
-
auto conf = parse_config(R"(a: [1,2]
|
146
|
-
[3,4])")->resolve();
|
147
|
-
} catch (const hocon::parse_exception& e) {
|
148
|
-
thrown = true;
|
149
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting");
|
150
|
-
REQUIRE_STRING_CONTAINS(e.what(), "'['");
|
151
|
-
}
|
152
|
-
REQUIRE(thrown);
|
153
|
-
}
|
154
|
-
|
155
|
-
SECTION("object concatenation without substitutions") {
|
156
|
-
auto conf = parse_config(" a : { b : c } { x : y } ");
|
157
|
-
std::unordered_map<std::string, unwrapped_value> m {{"b", std::string("c")}, {"x", std::string("y")}};
|
158
|
-
unwrapped_value expected(m);
|
159
|
-
bool test = expected == conf->get_object("a")->unwrapped();
|
160
|
-
REQUIRE(test);
|
161
|
-
}
|
162
|
-
|
163
|
-
SECTION("object concatenation should preserve merge order") {
|
164
|
-
auto conf = parse_config(" a : { b : 1 } { b : 2 } { b : 3 } { b : 4 } ");
|
165
|
-
REQUIRE(4 == conf->get_int("a.b"));
|
166
|
-
}
|
167
|
-
|
168
|
-
SECTION("object concatenation with substitutions") {
|
169
|
-
auto conf = parse_config(" a : ${x} { b : 1 } ${y}, x : { a : 0 }, y : { c : 2 } ")->resolve();
|
170
|
-
std::unordered_map<std::string, unwrapped_value> m {{"a", 0}, {"b", 1}, {"c", 2}};
|
171
|
-
unwrapped_value expected(m);
|
172
|
-
bool test = expected == conf->get_object("a")->unwrapped();
|
173
|
-
REQUIRE(test);
|
174
|
-
}
|
175
|
-
|
176
|
-
SECTION("object concatenation with self-references") {
|
177
|
-
auto conf = parse_config(" a : { a : 0 }, a : ${a} { b : 1 }, a : ${a} { c : 2 } ")->resolve();
|
178
|
-
std::unordered_map<std::string, unwrapped_value> m {{"a", 0}, {"b", 1}, {"c", 2}};
|
179
|
-
unwrapped_value expected(m);
|
180
|
-
bool test = expected == conf->get_object("a")->unwrapped();
|
181
|
-
REQUIRE(test);
|
182
|
-
}
|
183
|
-
|
184
|
-
SECTION("object concatenation self-reference override") {
|
185
|
-
auto conf = parse_config(" a : { b : 3 }, a : { b : 2 } ${a} ")->resolve();
|
186
|
-
std::unordered_map<std::string, unwrapped_value> m {{"b", 3}};
|
187
|
-
unwrapped_value expected(m);
|
188
|
-
bool test = expected == conf->get_object("a")->unwrapped();
|
189
|
-
REQUIRE(test);
|
190
|
-
}
|
191
|
-
|
192
|
-
SECTION("object concatenation can span lines inside braces") {
|
193
|
-
auto conf = parse_config(" a : { b : c\n } { x : y } ");
|
194
|
-
std::unordered_map<std::string, unwrapped_value> m {{"b", std::string("c")}, {"x", std::string("y")}};
|
195
|
-
unwrapped_value expected(m);
|
196
|
-
bool test = expected == conf->get_object("a")->unwrapped();
|
197
|
-
REQUIRE(test);
|
198
|
-
}
|
199
|
-
|
200
|
-
SECTION("object concatenation cannot span lines") {
|
201
|
-
bool thrown = false;
|
202
|
-
try {
|
203
|
-
auto conf = parse_config(R"(A : { b : c}
|
204
|
-
{x : y })")->resolve();
|
205
|
-
} catch (const hocon::parse_exception& e) {
|
206
|
-
thrown = true;
|
207
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting");
|
208
|
-
REQUIRE_STRING_CONTAINS(e.what(), "'{'");
|
209
|
-
}
|
210
|
-
REQUIRE(thrown);
|
211
|
-
}
|
212
|
-
|
213
|
-
// TODO: stringConcatInsideArrayValue
|
214
|
-
// TODO: stringNonConcatInsideArrayValue
|
215
|
-
// TODO: objectConcatInsideArrayValue
|
216
|
-
// TODO: objectNonConcatInsideArrayValue
|
217
|
-
|
218
|
-
SECTION("list concatenation inside an array") {
|
219
|
-
auto conf = parse_config(" a : [ [1, 2] [3, 4] ] ");
|
220
|
-
std::vector<unwrapped_value> inner {1,2,3,4};
|
221
|
-
std::vector<unwrapped_value> outer;
|
222
|
-
outer.emplace_back(inner);
|
223
|
-
unwrapped_value expected(outer);
|
224
|
-
bool test = expected == conf->get_list("a")->unwrapped();
|
225
|
-
REQUIRE(test);
|
226
|
-
};
|
227
|
-
// TODO: listNonConcatInsideArrayValue
|
228
|
-
// These all require we have the data access methods fleshed out
|
229
|
-
|
230
|
-
SECTION("string concatenations can be keys") {
|
231
|
-
auto conf = parse_config(R"(123 foo : "value" )")->resolve();
|
232
|
-
REQUIRE(conf->get_string("123 foo") == "value");
|
233
|
-
}
|
234
|
-
|
235
|
-
SECTION("objects are not keys") {
|
236
|
-
bool thrown = false;
|
237
|
-
try {
|
238
|
-
auto conf = parse_config(R"({ { a : 1 } : "value")")->resolve();
|
239
|
-
} catch (const hocon::parse_exception& e) {
|
240
|
-
thrown = true;
|
241
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting a close");
|
242
|
-
REQUIRE_STRING_CONTAINS(e.what(), "'{'");
|
243
|
-
}
|
244
|
-
REQUIRE(thrown);
|
245
|
-
}
|
246
|
-
|
247
|
-
SECTION("arrays are not keys") {
|
248
|
-
bool thrown = false;
|
249
|
-
try {
|
250
|
-
auto conf = parse_config(R"({ [ 1, 2 ] : "value")")->resolve();
|
251
|
-
} catch (const hocon::parse_exception& e) {
|
252
|
-
thrown = true;
|
253
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting a close");
|
254
|
-
REQUIRE_STRING_CONTAINS(e.what(), "'['");
|
255
|
-
}
|
256
|
-
REQUIRE(thrown);
|
257
|
-
}
|
258
|
-
|
259
|
-
// TODO: '+=' pending tests go here
|
260
|
-
|
261
|
-
// TODO: arrayConcatenationInDoubleNestedDelayedMerge
|
262
|
-
// TODO: arrayConcatenationAsPartOfDelayedMerge
|
263
|
-
// TODO: arrayConcatenationInDoubleNestedDelayedMerge2
|
264
|
-
// TODO: arrayConcatenationInTripleNestedDelayedMerge
|
265
|
-
// Again, waiting on good accessors for lists
|
266
|
-
|
267
|
-
SECTION("string concatenation with defined optional substitution") {
|
268
|
-
auto conf = parse_config("bar=bar, a = foo${?bar}")->resolve();
|
269
|
-
REQUIRE(conf->get_string("a") == "foobar");
|
270
|
-
}
|
271
|
-
|
272
|
-
// TODO: concatUndefinedSubstitutionWithArray
|
273
|
-
// TODO: concatDefinedOptionalSubstitutionWithArray
|
274
|
-
// Guess why?
|
275
|
-
|
276
|
-
SECTION("object concatenation with defined optional substitution") {
|
277
|
-
auto conf = parse_config(R"(bar={ y : 42 }, a = { x : "foo" } ${?bar})")->resolve();
|
278
|
-
REQUIRE(conf->get_string("a.x") == "foo");
|
279
|
-
REQUIRE(conf->get_int("a.y") == 42);
|
280
|
-
}
|
281
|
-
|
282
|
-
SECTION("concatenate two undefined substitutions with a space") {
|
283
|
-
auto conf = parse_config(R"(foo=abc, bar=def, a = ${foo} ${bar})")->resolve();
|
284
|
-
REQUIRE(conf->get_string("a") == "abc def");
|
285
|
-
}
|
286
|
-
|
287
|
-
SECTION("concatenate object substitutions with no space") {
|
288
|
-
auto conf = parse_config(R"(foo = { a : 1}, bar = { b : 2 }, x = ${foo}${bar})")->resolve();
|
289
|
-
REQUIRE(conf->get_int("x.a") == 1);
|
290
|
-
REQUIRE(conf->get_int("x.b") == 2);
|
291
|
-
}
|
292
|
-
|
293
|
-
SECTION("concatenate object substitutions with a space") {
|
294
|
-
auto conf = parse_config(R"(foo = { a : 1}, bar = { b : 2 }, x = ${foo} ${bar})")->resolve();
|
295
|
-
REQUIRE(conf->get_int("x.a") == 1);
|
296
|
-
REQUIRE(conf->get_int("x.b") == 2);
|
297
|
-
}
|
298
|
-
|
299
|
-
SECTION("concatenate object substitutions with quoted space") {
|
300
|
-
REQUIRE_THROWS_AS(
|
301
|
-
parse_config(R"(foo = { a : 1}, bar = { b : 2 }, x = ${foo}" "${bar})")->resolve(),
|
302
|
-
config_exception
|
303
|
-
);
|
304
|
-
}
|
305
|
-
|
306
|
-
// TODO: concatSubstitutionsThatAreListsWithSpace
|
307
|
-
|
308
|
-
SECTION("concatenate list substitutions with quoted space") {
|
309
|
-
REQUIRE_THROWS_AS(
|
310
|
-
parse_config(R"(foo = [1], bar = [2], x = ${foo}" "${bar})")->resolve(),
|
311
|
-
config_exception
|
312
|
-
);
|
313
|
-
}
|
314
|
-
|
315
|
-
SECTION("string concatenation with undefined substitution") {
|
316
|
-
auto conf = parse_config("a = foo${?bar}")->resolve();
|
317
|
-
REQUIRE(conf->get_string("a") == "foo");
|
318
|
-
}
|
319
|
-
|
320
|
-
SECTION("object concatenation with undefined substitution") {
|
321
|
-
auto conf = parse_config(R"(a = { x : "foo" } ${?bar})")->resolve();
|
322
|
-
REQUIRE(conf->get_string("a.x") == "foo");
|
323
|
-
}
|
324
|
-
|
325
|
-
SECTION("concatenate two undefined substitutions") {
|
326
|
-
auto conf = parse_config(R"(a = ${?foo}${?bar})")->resolve();
|
327
|
-
REQUIRE_FALSE(conf->has_path("a"));
|
328
|
-
}
|
329
|
-
|
330
|
-
SECTION("concatenate several undefined substitusion") {
|
331
|
-
auto conf = parse_config(R"(a = ${?foo}${?bar}${?baz}${?woooo})")->resolve();
|
332
|
-
REQUIRE_FALSE(conf->has_path("a"));
|
333
|
-
}
|
334
|
-
|
335
|
-
SECTION("concatenate two undefined substitutions with a space") {
|
336
|
-
auto conf = parse_config(R"(a = ${?foo} ${?bar})")->resolve();
|
337
|
-
REQUIRE(conf->get_string("a") == " ");
|
338
|
-
}
|
339
|
-
|
340
|
-
SECTION("concatenate two undefined substitutions with an empty string") {
|
341
|
-
auto conf = parse_config(R"(a = ""${?foo}${?bar})")->resolve();
|
342
|
-
REQUIRE(conf->get_string("a") == "");
|
343
|
-
}
|
344
|
-
}
|
345
|
-
|
346
|
-
TEST_CASE("Concatenation pending '+=' implementation", "[!shouldfail]") {
|
347
|
-
// TODO: emptyArrayPlusEquals
|
348
|
-
// TODO: missingArrayPlusEquals
|
349
|
-
// TODO: shortArrayPlusEquals
|
350
|
-
// You guessed it, these need a good story around pulling arrays out
|
351
|
-
|
352
|
-
SECTION("can't concatenate numbers as an array using +=") {
|
353
|
-
bool thrown = false;
|
354
|
-
try {
|
355
|
-
auto conf = parse_config(R"(a = 10, a += 2)")->resolve();
|
356
|
-
} catch (const hocon::config_exception& e) {
|
357
|
-
thrown = true;
|
358
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
359
|
-
REQUIRE_STRING_CONTAINS(e.what(), "10");
|
360
|
-
REQUIRE_STRING_CONTAINS(e.what(), "[2]");
|
361
|
-
}
|
362
|
-
REQUIRE(thrown);
|
363
|
-
}
|
364
|
-
|
365
|
-
SECTION("can't concatenate strings with an array using +=") {
|
366
|
-
bool thrown = false;
|
367
|
-
try {
|
368
|
-
auto conf = parse_config(R"(a = "abc", a += 2)")->resolve();
|
369
|
-
} catch (const hocon::config_exception& e) {
|
370
|
-
thrown = true;
|
371
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
372
|
-
REQUIRE_STRING_CONTAINS(e.what(), "abc");
|
373
|
-
REQUIRE_STRING_CONTAINS(e.what(), "[2]");
|
374
|
-
}
|
375
|
-
REQUIRE(thrown);
|
376
|
-
}
|
377
|
-
|
378
|
-
SECTION("can't concatenate objectss with an array using +=") {
|
379
|
-
bool thrown = false;
|
380
|
-
try {
|
381
|
-
auto conf = parse_config(R"(a = { x : y }, a += 2)")->resolve();
|
382
|
-
} catch (const hocon::config_exception& e) {
|
383
|
-
thrown = true;
|
384
|
-
REQUIRE_STRING_CONTAINS(e.what(), "Cannot concatenate");
|
385
|
-
REQUIRE_STRING_CONTAINS(e.what(), R"("x":"y")");
|
386
|
-
REQUIRE_STRING_CONTAINS(e.what(), "[2]");
|
387
|
-
}
|
388
|
-
REQUIRE(thrown);
|
389
|
-
}
|
390
|
-
|
391
|
-
// TODO: plusEqualsNestedPath
|
392
|
-
// TODO: plusEqualsNestedObjects
|
393
|
-
// TODO: plusEqualsSingleNestedObject
|
394
|
-
// TOOD: substitutionPlusEqualsSubstitution
|
395
|
-
// TODO: plusEqualsMultipleTimes
|
396
|
-
// TOOD: plusEqualsMultipleTimesNested
|
397
|
-
// TODO: plusEqualsAnObjectMultipleTimes
|
398
|
-
// TODO: plusEqualsAnObjectMultipleTimesNested
|
399
|
-
// TOOD: plusEqualsMultipleTimesNestedInArray
|
400
|
-
// TODO: plusEqualsMultipleTimesNestedInPlusEquals
|
401
|
-
}
|
@@ -1,720 +0,0 @@
|
|
1
|
-
#include <catch.hpp>
|
2
|
-
#include "test_utils.hpp"
|
3
|
-
|
4
|
-
#include <boost/algorithm/string/replace.hpp>
|
5
|
-
|
6
|
-
#include <hocon/config.hpp>
|
7
|
-
#include <hocon/config_list.hpp>
|
8
|
-
#include <hocon/config_exception.hpp>
|
9
|
-
#include <hocon/config_parse_options.hpp>
|
10
|
-
#include <internal/values/simple_config_object.hpp>
|
11
|
-
#include <internal/values/config_reference.hpp>
|
12
|
-
#include <internal/substitution_expression.hpp>
|
13
|
-
#include <internal/parseable.hpp>
|
14
|
-
#include <internal/resolve_context.hpp>
|
15
|
-
#include <internal/path_parser.hpp>
|
16
|
-
#include "test_utils.hpp"
|
17
|
-
|
18
|
-
using namespace std;
|
19
|
-
using namespace hocon;
|
20
|
-
using namespace hocon::test_utils;
|
21
|
-
|
22
|
-
static shared_value parse_without_resolving(string s) {
|
23
|
-
auto options = config_parse_options()
|
24
|
-
.set_origin_description(make_shared<string>("test conf string"))
|
25
|
-
.set_syntax(config_syntax::CONF);
|
26
|
-
return parseable::new_string(move(s), move(options))->parse_value();
|
27
|
-
}
|
28
|
-
|
29
|
-
static shared_value parse(string s) {
|
30
|
-
auto tree = parse_without_resolving(move(s));
|
31
|
-
if (auto obj = dynamic_pointer_cast<const config_object>(tree)) {
|
32
|
-
return resolve_context::resolve(tree, obj, config_resolve_options(false));
|
33
|
-
}
|
34
|
-
return tree;
|
35
|
-
}
|
36
|
-
|
37
|
-
TEST_CASE("invalid conf throws") {
|
38
|
-
for (auto const& invalid : whitespace_variations(invalid_conf(), false)) {
|
39
|
-
CAPTURE(invalid.test);
|
40
|
-
REQUIRE_THROWS_AS(parse(invalid.test), config_exception);
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
TEST_CASE("valid conf works") {
|
45
|
-
// all we're checking here unfortunately is that it doesn't throw.
|
46
|
-
// for a more thorough check, use the EquivalentsTest stuff.
|
47
|
-
for (auto const& valid : whitespace_variations(valid_conf(), true)) {
|
48
|
-
CAPTURE(valid.test);
|
49
|
-
REQUIRE_NOTHROW(parse(valid.test));
|
50
|
-
auto our_ast = parse(valid.test);
|
51
|
-
// let's also check round-trip rendering
|
52
|
-
auto rendered = our_ast->render();
|
53
|
-
CAPTURE(rendered);
|
54
|
-
auto reparsed = parse(rendered);
|
55
|
-
REQUIRE(*our_ast == *reparsed);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
static path parse_path(string s) {
|
60
|
-
// parse first by wrapping into a whole document and using the regular parser.
|
61
|
-
shared_value tree;
|
62
|
-
CAPTURE(s);
|
63
|
-
REQUIRE_NOTHROW(tree = parse_without_resolving("[${"+s+"}]"));
|
64
|
-
path result = [&]() {
|
65
|
-
if (auto list = dynamic_pointer_cast<const config_list>(tree)) {
|
66
|
-
if (auto ref = dynamic_pointer_cast<const config_reference>(list->get(0))) {
|
67
|
-
return ref->expression()->get_path();
|
68
|
-
}
|
69
|
-
}
|
70
|
-
return path();
|
71
|
-
}();
|
72
|
-
|
73
|
-
// also parse with the standalone path parser and be sure the
|
74
|
-
// outcome is the same
|
75
|
-
path should_be_same;
|
76
|
-
REQUIRE_NOTHROW(should_be_same = path_parser::parse_path(s));
|
77
|
-
REQUIRE(result == should_be_same);
|
78
|
-
|
79
|
-
return result;
|
80
|
-
}
|
81
|
-
|
82
|
-
TEST_CASE("path parsing") {
|
83
|
-
REQUIRE(path({"a"}) == parse_path("a"));
|
84
|
-
REQUIRE(path(vector<string>{"a", "b"}) == parse_path("a.b"));
|
85
|
-
REQUIRE(path({"a.b"}) == parse_path("\"a.b\""));
|
86
|
-
REQUIRE(path({"a."}) == parse_path("\"a.\""));
|
87
|
-
REQUIRE(path({".b"}) == parse_path("\".b\""));
|
88
|
-
REQUIRE(path({"true"}) == parse_path("true"));
|
89
|
-
REQUIRE(path({"a"}) == parse_path(" a "));
|
90
|
-
REQUIRE(path(vector<string>{"a ", "b"}) == parse_path(" a .b"));
|
91
|
-
REQUIRE(path(vector<string>{"a ", " b"}) == parse_path(" a . b"));
|
92
|
-
REQUIRE(path({"a b"}) == parse_path(" a b"));
|
93
|
-
REQUIRE(path(vector<string>{"a", "b.c", "d"}) == parse_path("a.\"b.c\".d"));
|
94
|
-
REQUIRE(path(vector<string>{"3", "14"}) == parse_path("3.14"));
|
95
|
-
REQUIRE(path(vector<string>{"3", "14", "159"}) == parse_path("3.14.159"));
|
96
|
-
REQUIRE(path(vector<string>{"a3", "14"}) == parse_path("a3.14"));
|
97
|
-
REQUIRE(path({""}) == parse_path("\"\""));
|
98
|
-
REQUIRE(path(vector<string>{"a", "", "b"}) == parse_path("a.\"\".b"));
|
99
|
-
REQUIRE(path(vector<string>{"a", ""}) == parse_path("a.\"\""));
|
100
|
-
REQUIRE(path(vector<string>{"", "b"}) == parse_path("\"\".b"));
|
101
|
-
REQUIRE(path(vector<string>{"", "", ""}) == parse_path(R"( "".""."" )"));
|
102
|
-
REQUIRE(path({"a-c"}) == parse_path("a-c"));
|
103
|
-
REQUIRE(path({"a_c"}) == parse_path("a_c"));
|
104
|
-
REQUIRE(path({"-"}) == parse_path("\"-\""));
|
105
|
-
REQUIRE(path({"-"}) == parse_path("-"));
|
106
|
-
REQUIRE(path({"-foo"}) == parse_path("-foo"));
|
107
|
-
REQUIRE(path({"-10"}) == parse_path("-10"));
|
108
|
-
|
109
|
-
// here 10.0 is part of an unquoted string;
|
110
|
-
REQUIRE(path(vector<string>{"foo10", "0"}) == parse_path("foo10.0"));
|
111
|
-
// here 10.0 is a number that gets value-concatenated;
|
112
|
-
REQUIRE(path(vector<string>{"10", "0foo"}) == parse_path("10.0foo"));
|
113
|
-
// just a number;
|
114
|
-
REQUIRE(path(vector<string>{"10", "0"}) == parse_path("10.0"));
|
115
|
-
// multiple-decimal number;
|
116
|
-
REQUIRE(path(vector<string>{"1", "2", "3", "4"}) == parse_path("1.2.3.4"));
|
117
|
-
|
118
|
-
for (string invalid : {"", " ", " \n \n ", "a.", ".b", "a..b", "a${b}c", "\"\".", ".\"\""}) {
|
119
|
-
REQUIRE_THROWS_AS(parse_without_resolving("[${"+invalid+"}]"), bad_path_exception);
|
120
|
-
REQUIRE_THROWS_AS(path_parser::parse_path(invalid), bad_path_exception);
|
121
|
-
}
|
122
|
-
}
|
123
|
-
|
124
|
-
TEST_CASE("duplicate key last wins") {
|
125
|
-
auto obj = parse_config(R"({ "a" : 10, "a" : 11 } )");
|
126
|
-
REQUIRE(1u == obj->root()->size());
|
127
|
-
REQUIRE(11 == obj->get_int("a"));
|
128
|
-
}
|
129
|
-
|
130
|
-
TEST_CASE("duplicate key objects merged") {
|
131
|
-
auto obj = parse_config(R"({ "a" : { "x" : 1, "y" : 2 }, "a" : { "x" : 42, "z" : 100 } })");
|
132
|
-
REQUIRE(1u == obj->root()->size());
|
133
|
-
REQUIRE(3u == obj->get_object("a")->size());
|
134
|
-
REQUIRE(42 == obj->get_int("a.x"));
|
135
|
-
REQUIRE(2 == obj->get_int("a.y"));
|
136
|
-
REQUIRE(100 == obj->get_int("a.z"));
|
137
|
-
}
|
138
|
-
|
139
|
-
TEST_CASE("duplicate key objects merged recursively") {
|
140
|
-
auto obj = parse_config(R"({ "a" : { "b" : { "x" : 1, "y" : 2 } }, "a" : { "b" : { "x" : 42, "z" : 100 } } })");
|
141
|
-
REQUIRE(1u == obj->root()->size());
|
142
|
-
REQUIRE(1u == obj->get_object("a")->size());
|
143
|
-
REQUIRE(3u == obj->get_object("a.b")->size());
|
144
|
-
REQUIRE(42 == obj->get_int("a.b.x"));
|
145
|
-
REQUIRE(2 == obj->get_int("a.b.y"));
|
146
|
-
REQUIRE(100 == obj->get_int("a.b.z"));
|
147
|
-
}
|
148
|
-
|
149
|
-
TEST_CASE("duplicate key objects merged recursively deeper") {
|
150
|
-
auto obj = parse_config(R"({ "a" : { "b" : { "c" : { "x" : 1, "y" : 2 } } }, "a" : { "b" : { "c" : { "x" : 42, "z" : 100 } } } })");
|
151
|
-
REQUIRE(1u == obj->root()->size());
|
152
|
-
REQUIRE(1u == obj->get_object("a")->size());
|
153
|
-
REQUIRE(1u == obj->get_object("a.b")->size());
|
154
|
-
REQUIRE(3u == obj->get_object("a.b.c")->size());
|
155
|
-
REQUIRE(42 == obj->get_int("a.b.c.x"));
|
156
|
-
REQUIRE(2 == obj->get_int("a.b.c.y"));
|
157
|
-
REQUIRE(100 == obj->get_int("a.b.c.z"));
|
158
|
-
}
|
159
|
-
|
160
|
-
TEST_CASE("duplicate key object null object") {
|
161
|
-
auto obj = parse_config(R"({ a : { b : 1 }, a : null, a : { c : 2 } })");
|
162
|
-
REQUIRE(1u == obj->root()->size());
|
163
|
-
REQUIRE(1u == obj->get_object("a")->size());
|
164
|
-
REQUIRE(2 == obj->get_int("a.c"));
|
165
|
-
}
|
166
|
-
|
167
|
-
TEST_CASE("duplicate key object number object") {
|
168
|
-
auto obj = parse_config(R"({ a : { b : 1 }, a : 42, a : { c : 2 } })");
|
169
|
-
REQUIRE(1u == obj->root()->size());
|
170
|
-
REQUIRE(1u == obj->get_object("a")->size());
|
171
|
-
REQUIRE(2 == obj->get_int("a.c"));
|
172
|
-
}
|
173
|
-
|
174
|
-
TEST_CASE("implied comma handling") {
|
175
|
-
auto valids = {
|
176
|
-
R"(
|
177
|
-
// one line
|
178
|
-
{
|
179
|
-
a : y, b : z, c : [ 1, 2, 3 ]
|
180
|
-
}
|
181
|
-
)", R"(
|
182
|
-
// multiline but with all commas
|
183
|
-
{
|
184
|
-
a : y,
|
185
|
-
b : z,
|
186
|
-
c : [
|
187
|
-
1,
|
188
|
-
2,
|
189
|
-
3,
|
190
|
-
],
|
191
|
-
}
|
192
|
-
)", R"(
|
193
|
-
// multiline with no commas
|
194
|
-
{
|
195
|
-
a : y
|
196
|
-
b : z
|
197
|
-
c : [
|
198
|
-
1
|
199
|
-
2
|
200
|
-
3
|
201
|
-
]
|
202
|
-
}
|
203
|
-
)"
|
204
|
-
};
|
205
|
-
|
206
|
-
auto drop_curlies = [](string const &s) {
|
207
|
-
// drop the outside curly braces
|
208
|
-
auto first = s.find('{');
|
209
|
-
auto last = s.rfind('}');
|
210
|
-
return s.substr(0, first) + s.substr(first + 1, last - (first + 1)) + s.substr(last + 1);
|
211
|
-
};
|
212
|
-
|
213
|
-
auto changes = vector<function<string(string const &)>>{
|
214
|
-
[](string const &s) { return s; },
|
215
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, "\n", "\n\n"); },
|
216
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, "\n", "\n\n\n"); },
|
217
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, ",\n", "\n,\n"); },
|
218
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, ",\n", "\n\n,\n\n"); },
|
219
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, "\n", "\n "); },
|
220
|
-
[](string const &s) { return boost::algorithm::replace_all_copy(s, ",\n", " \n \n , \n \n "); },
|
221
|
-
[&](string const &s) { return drop_curlies(s); }
|
222
|
-
};
|
223
|
-
|
224
|
-
auto tested = 0u;
|
225
|
-
for (auto v : valids) {
|
226
|
-
for (auto change : changes) {
|
227
|
-
++tested;
|
228
|
-
auto obj = parse_config(change(v));
|
229
|
-
CAPTURE(v);
|
230
|
-
REQUIRE(3u == obj->root()->size());
|
231
|
-
REQUIRE("y" == obj->get_string("a"));
|
232
|
-
REQUIRE("z" == obj->get_string("b"));
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
REQUIRE((valids.size() * changes.size()) == tested);
|
237
|
-
|
238
|
-
// TODO: move implied comma handling (pending) tests here once they pass
|
239
|
-
|
240
|
-
auto no_newline_in_object = parse_config(" { a : b c } ");
|
241
|
-
REQUIRE("b c" == no_newline_in_object->get_string("a"));
|
242
|
-
|
243
|
-
auto no_newline_at_end = parse_config("a : b");
|
244
|
-
REQUIRE("b" == no_newline_at_end->get_string("a"));
|
245
|
-
|
246
|
-
REQUIRE_THROWS_AS(parse_config("{ a : y b : z }"), config_exception);
|
247
|
-
|
248
|
-
REQUIRE_THROWS_AS(parse_config(R"({ "a" : "y" "b" : "z" })"), config_exception);
|
249
|
-
|
250
|
-
// with no newline or comma, we do value concatenation
|
251
|
-
auto no_newline_in_array = parse_config(" { c : [ 1 2 3 ] } ");
|
252
|
-
REQUIRE(vector<string>{"1 2 3"} == no_newline_in_array->get_string_list("c"));
|
253
|
-
|
254
|
-
auto no_newline_in_array_with_quoted = parse_config(R"( { c : [ "4" "5" "6" ] } )");
|
255
|
-
REQUIRE(vector<string>{"4 5 6"} == no_newline_in_array_with_quoted->get_string_list("c"));
|
256
|
-
}
|
257
|
-
|
258
|
-
TEST_CASE("keys with slash") {
|
259
|
-
auto obj = parse_config(R"(/a/b/c=42, x/y/z : 32)");
|
260
|
-
REQUIRE(42 == obj->get_int("/a/b/c"));
|
261
|
-
REQUIRE(32 == obj->get_int("x/y/z"));
|
262
|
-
}
|
263
|
-
|
264
|
-
static void line_number_test(int num, string text) {
|
265
|
-
try {
|
266
|
-
parse_config(text);
|
267
|
-
} catch(config_exception &e) {
|
268
|
-
cout << e.what() << endl;
|
269
|
-
REQUIRE_STRING_CONTAINS(e.what(), to_string(num)+":");
|
270
|
-
}
|
271
|
-
}
|
272
|
-
|
273
|
-
TEST_CASE("line numbers in errors (pending)", "[!shouldfail]") {
|
274
|
-
// error is at the last char
|
275
|
-
line_number_test(1, "}");
|
276
|
-
line_number_test(2, "\n}");
|
277
|
-
line_number_test(3, "\n\n}");
|
278
|
-
|
279
|
-
// error is before a final newline
|
280
|
-
line_number_test(1, "}\n");
|
281
|
-
line_number_test(2, "\n}\n");
|
282
|
-
line_number_test(3, "\n\n}\n");
|
283
|
-
|
284
|
-
// with unquoted string
|
285
|
-
line_number_test(1, "foo");
|
286
|
-
line_number_test(2, "\nfoo");
|
287
|
-
line_number_test(3, "\n\nfoo");
|
288
|
-
|
289
|
-
// with quoted string
|
290
|
-
line_number_test(1, "\"foo\"");
|
291
|
-
line_number_test(2, "\n\"foo\"");
|
292
|
-
line_number_test(3, "\n\n\"foo\"");
|
293
|
-
|
294
|
-
// newlines in triple-quoted string should not hose up the numbering
|
295
|
-
line_number_test(1, "a : \"\"\"foo\"\"\"}");
|
296
|
-
line_number_test(2, "a : \"\"\"foo\n\"\"\"}");
|
297
|
-
line_number_test(3, "a : \"\"\"foo\nbar\nbaz\"\"\"}");
|
298
|
-
// newlines after the triple quoted string
|
299
|
-
line_number_test(5, "a : \"\"\"foo\nbar\nbaz\"\"\"\n\n}");
|
300
|
-
// triple quoted string ends in a newline
|
301
|
-
line_number_test(6, "a : \"\"\"foo\nbar\nbaz\n\"\"\"\n\n}");
|
302
|
-
// end in the middle of triple-quoted string
|
303
|
-
line_number_test(5, "a : \"\"\"foo\n\n\nbar\n");
|
304
|
-
}
|
305
|
-
|
306
|
-
TEST_CASE("to string for parseables") {
|
307
|
-
// just be sure the to_string don't throw, to get test coverage
|
308
|
-
auto options = config_parse_options();
|
309
|
-
parseable::new_file("foo", options)->to_string();
|
310
|
-
// TODO: are other APIs needed?
|
311
|
-
}
|
312
|
-
|
313
|
-
static void assert_comments(vector<string> const& comments, shared_config conf) {
|
314
|
-
REQUIRE(comments == conf->root()->origin()->comments());
|
315
|
-
}
|
316
|
-
|
317
|
-
static void assert_comments(vector<string> const& comments, shared_config conf, string const& path) {
|
318
|
-
REQUIRE(comments == conf->get_value(path)->origin()->comments());
|
319
|
-
}
|
320
|
-
|
321
|
-
static void assert_comments(vector<string> const& comments, shared_config conf, string const& path, int index) {
|
322
|
-
// TODO:
|
323
|
-
// auto v = conf->get_list(path)->get(index);
|
324
|
-
// REQUIRE(comments == v->origin()->comments());
|
325
|
-
}
|
326
|
-
|
327
|
-
TEST_CASE("track comments for single field") {
|
328
|
-
// no comments
|
329
|
-
auto conf0 = parse_config(R"(
|
330
|
-
{
|
331
|
-
foo=10 }
|
332
|
-
)");
|
333
|
-
assert_comments({}, conf0, "foo");
|
334
|
-
|
335
|
-
// comment in front of a field is used
|
336
|
-
auto conf1 = parse_config(R"(
|
337
|
-
{ # Before
|
338
|
-
foo=10 }
|
339
|
-
)");
|
340
|
-
assert_comments({" Before"}, conf1, "foo");
|
341
|
-
|
342
|
-
// comment with a blank line after is dropped
|
343
|
-
auto conf2 = parse_config(R"(
|
344
|
-
{ # BlankAfter
|
345
|
-
|
346
|
-
foo=10 }
|
347
|
-
)");
|
348
|
-
assert_comments({}, conf2, "foo");
|
349
|
-
|
350
|
-
// comment in front of a field is used with no root {}
|
351
|
-
auto conf3 = parse_config(R"(
|
352
|
-
# BeforeNoBraces
|
353
|
-
foo=10
|
354
|
-
)");
|
355
|
-
assert_comments({" BeforeNoBraces"}, conf3, "foo");
|
356
|
-
|
357
|
-
// comment with a blank line after is dropped with no root {}
|
358
|
-
auto conf4 = parse_config(R"(
|
359
|
-
# BlankAfterNoBraces
|
360
|
-
|
361
|
-
foo=10
|
362
|
-
)");
|
363
|
-
assert_comments({}, conf4, "foo");
|
364
|
-
|
365
|
-
// comment same line after field is used
|
366
|
-
auto conf5 = parse_config(R"(
|
367
|
-
{
|
368
|
-
foo=10 # SameLine
|
369
|
-
}
|
370
|
-
)");
|
371
|
-
assert_comments({" SameLine"}, conf5, "foo");
|
372
|
-
|
373
|
-
// comment before field separator is used
|
374
|
-
auto conf6 = parse_config(R"(
|
375
|
-
{
|
376
|
-
foo # BeforeSep
|
377
|
-
=10
|
378
|
-
}
|
379
|
-
)");
|
380
|
-
assert_comments({" BeforeSep"}, conf6, "foo");
|
381
|
-
|
382
|
-
// comment after field separator is used
|
383
|
-
auto conf7 = parse_config(R"(
|
384
|
-
{
|
385
|
-
foo= # AfterSep
|
386
|
-
10
|
387
|
-
}
|
388
|
-
)");
|
389
|
-
assert_comments({" AfterSep"}, conf7, "foo");
|
390
|
-
|
391
|
-
// comment on next line is NOT used
|
392
|
-
auto conf8 = parse_config(R"(
|
393
|
-
{
|
394
|
-
foo=10
|
395
|
-
# NextLine
|
396
|
-
}
|
397
|
-
)");
|
398
|
-
assert_comments({}, conf8, "foo");
|
399
|
-
|
400
|
-
// comment before field separator on new line
|
401
|
-
auto conf9 = parse_config(R"(
|
402
|
-
{
|
403
|
-
foo
|
404
|
-
# BeforeSepOwnLine
|
405
|
-
=10
|
406
|
-
}
|
407
|
-
)");
|
408
|
-
assert_comments({" BeforeSepOwnLine"}, conf9, "foo");
|
409
|
-
|
410
|
-
// comment after field separator on its own line
|
411
|
-
auto conf10 = parse_config(R"(
|
412
|
-
{
|
413
|
-
foo=
|
414
|
-
# AfterSepOwnLine
|
415
|
-
10
|
416
|
-
}
|
417
|
-
)");
|
418
|
-
assert_comments({" AfterSepOwnLine"}, conf10, "foo");
|
419
|
-
|
420
|
-
// comments comments everywhere
|
421
|
-
auto conf11 = parse_config(R"(
|
422
|
-
{# Before
|
423
|
-
foo
|
424
|
-
# BeforeSep
|
425
|
-
= # AfterSepSameLine
|
426
|
-
# AfterSepNextLine
|
427
|
-
10 # AfterValue
|
428
|
-
# AfterValueNewLine (should NOT be used)
|
429
|
-
}
|
430
|
-
)");
|
431
|
-
assert_comments({" Before", " BeforeSep", " AfterSepSameLine", " AfterSepNextLine", " AfterValue"}, conf11, "foo");
|
432
|
-
|
433
|
-
// empty object
|
434
|
-
auto conf12 = parse_config(R"(# BeforeEmpty
|
435
|
-
{} #AfterEmpty
|
436
|
-
# NewLine
|
437
|
-
)");
|
438
|
-
assert_comments({" BeforeEmpty", "AfterEmpty"}, conf12);
|
439
|
-
|
440
|
-
// empty array
|
441
|
-
auto conf13 = parse_config(R"(
|
442
|
-
foo=
|
443
|
-
# BeforeEmptyArray
|
444
|
-
[] #AfterEmptyArray
|
445
|
-
# NewLine
|
446
|
-
)");
|
447
|
-
assert_comments({" BeforeEmptyArray", "AfterEmptyArray"}, conf13, "foo");
|
448
|
-
|
449
|
-
// array element
|
450
|
-
auto conf14 = parse_config(R"(
|
451
|
-
foo=[
|
452
|
-
# BeforeElement
|
453
|
-
10 # AfterElement
|
454
|
-
]
|
455
|
-
)");
|
456
|
-
assert_comments({" BeforeElement", " AfterElement"}, conf14, "foo", 0);
|
457
|
-
|
458
|
-
// field with comma after it
|
459
|
-
auto conf15 = parse_config(R"(
|
460
|
-
foo=10, # AfterCommaField
|
461
|
-
)");
|
462
|
-
assert_comments({" AfterCommaField"}, conf15, "foo");
|
463
|
-
|
464
|
-
// element with comma after it
|
465
|
-
auto conf16 = parse_config(R"(
|
466
|
-
foo=[10, # AfterCommaElement
|
467
|
-
]
|
468
|
-
)");
|
469
|
-
assert_comments({" AfterCommaElement"}, conf16, "foo", 0);
|
470
|
-
|
471
|
-
// field with comma after it but comment isn't on the field's line, so not used
|
472
|
-
auto conf17 = parse_config(R"(
|
473
|
-
foo=10
|
474
|
-
, # AfterCommaFieldNotUsed
|
475
|
-
)");
|
476
|
-
assert_comments({}, conf17, "foo");
|
477
|
-
|
478
|
-
// element with comma after it but comment isn't on the field's line, so not used
|
479
|
-
auto conf18 = parse_config(R"(
|
480
|
-
foo=[10
|
481
|
-
, # AfterCommaElementNotUsed
|
482
|
-
]
|
483
|
-
)");
|
484
|
-
assert_comments({}, conf18, "foo", 0);
|
485
|
-
|
486
|
-
// comment on new line, before comma, should not be used
|
487
|
-
auto conf19 = parse_config(R"(
|
488
|
-
foo=10
|
489
|
-
# BeforeCommaFieldNotUsed
|
490
|
-
,
|
491
|
-
)");
|
492
|
-
assert_comments({}, conf19, "foo");
|
493
|
-
|
494
|
-
// comment on new line, before comma, should not be used
|
495
|
-
auto conf20 = parse_config(R"(
|
496
|
-
foo=[10
|
497
|
-
# BeforeCommaElementNotUsed
|
498
|
-
,
|
499
|
-
]
|
500
|
-
)");
|
501
|
-
assert_comments({}, conf20, "foo", 0);
|
502
|
-
|
503
|
-
// comment on same line before comma
|
504
|
-
auto conf21 = parse_config(R"(
|
505
|
-
foo=10 # BeforeCommaFieldSameLine
|
506
|
-
,
|
507
|
-
)");
|
508
|
-
assert_comments({" BeforeCommaFieldSameLine"}, conf21, "foo");
|
509
|
-
|
510
|
-
// comment on same line before comma
|
511
|
-
auto conf22 = parse_config(R"(
|
512
|
-
foo=[10 # BeforeCommaElementSameLine
|
513
|
-
,
|
514
|
-
]
|
515
|
-
)");
|
516
|
-
assert_comments({" BeforeCommaElementSameLine"}, conf22, "foo", 0);
|
517
|
-
|
518
|
-
// comment with a line containing only whitespace after is dropped
|
519
|
-
auto conf23 = parse_config(R"(
|
520
|
-
{ # BlankAfter
|
521
|
-
|
522
|
-
foo=10 }
|
523
|
-
)");
|
524
|
-
assert_comments({}, conf23, "foo");
|
525
|
-
}
|
526
|
-
|
527
|
-
TEST_CASE("track comments for multiple fields") {
|
528
|
-
// nested objects
|
529
|
-
auto conf5 = parse_config(R"(
|
530
|
-
# Outside
|
531
|
-
bar {
|
532
|
-
# Ignore me
|
533
|
-
|
534
|
-
# Middle
|
535
|
-
# two lines
|
536
|
-
baz {
|
537
|
-
# Inner
|
538
|
-
foo=10 # AfterInner
|
539
|
-
# This should be ignored
|
540
|
-
} # AfterMiddle
|
541
|
-
# ignored
|
542
|
-
} # AfterOutside
|
543
|
-
# ignored!
|
544
|
-
)");
|
545
|
-
assert_comments({" Inner", " AfterInner"}, conf5, "bar.baz.foo");
|
546
|
-
assert_comments({" Middle", " two lines", " AfterMiddle"}, conf5, "bar.baz");
|
547
|
-
assert_comments({" Outside", " AfterOutside"}, conf5, "bar");
|
548
|
-
|
549
|
-
// multiple fields
|
550
|
-
auto conf6 = parse_config(R"({
|
551
|
-
# this is not with a field
|
552
|
-
|
553
|
-
# this is field A
|
554
|
-
a : 10,
|
555
|
-
# this is field B
|
556
|
-
b : 12 # goes with field B which has no comma
|
557
|
-
# this is field C
|
558
|
-
c : 14, # goes with field C after comma
|
559
|
-
# not used
|
560
|
-
# this is not used
|
561
|
-
# nor is this
|
562
|
-
# multi-line block
|
563
|
-
|
564
|
-
# this is with field D
|
565
|
-
# this is with field D also
|
566
|
-
d : 16
|
567
|
-
|
568
|
-
# this is after the fields
|
569
|
-
})");
|
570
|
-
assert_comments({" this is field A"}, conf6, "a");
|
571
|
-
assert_comments({" this is field B", " goes with field B which has no comma"}, conf6, "b");
|
572
|
-
assert_comments({" this is field C", " goes with field C after comma"}, conf6, "c");
|
573
|
-
assert_comments({" this is with field D", " this is with field D also"}, conf6, "d");
|
574
|
-
|
575
|
-
// array
|
576
|
-
auto conf7 = parse_config(R"(
|
577
|
-
# before entire array
|
578
|
-
array = [
|
579
|
-
# goes with 0
|
580
|
-
0,
|
581
|
-
# goes with 1
|
582
|
-
1, # with 1 after comma
|
583
|
-
# goes with 2
|
584
|
-
2 # no comma after 2
|
585
|
-
# not with anything
|
586
|
-
] # after entire array
|
587
|
-
)");
|
588
|
-
assert_comments({" goes with 0"}, conf7, "array", 0);
|
589
|
-
assert_comments({" goes with 1", " with 1 after comma"}, conf7, "array", 1);
|
590
|
-
assert_comments({" goes with 2", " no comma after 2"}, conf7, "array", 2);
|
591
|
-
assert_comments({" before entire array", " after entire array"}, conf7, "array");
|
592
|
-
}
|
593
|
-
|
594
|
-
// TODO: this test used to fail due to an unimplemented method. Now it seems to reveal a bug in comment handling.
|
595
|
-
TEST_CASE("track comments for multiple fields (pending)", "[!shouldfail]") {
|
596
|
-
// properties-like syntax
|
597
|
-
auto conf8 = parse_config(R"(
|
598
|
-
# ignored comment
|
599
|
-
|
600
|
-
# x.y comment
|
601
|
-
x.y = 10
|
602
|
-
# x.z comment
|
603
|
-
x.z = 11
|
604
|
-
# x.a comment
|
605
|
-
x.a = 12
|
606
|
-
# a.b comment
|
607
|
-
a.b = 14
|
608
|
-
a.c = 15
|
609
|
-
a.d = 16 # a.d comment
|
610
|
-
# ignored comment
|
611
|
-
)");
|
612
|
-
|
613
|
-
assert_comments({" x.y comment"}, conf8, "x.y");
|
614
|
-
assert_comments({" x.z comment"}, conf8, "x.z");
|
615
|
-
assert_comments({" x.a comment"}, conf8, "x.a");
|
616
|
-
assert_comments({" a.b comment"}, conf8, "a.b");
|
617
|
-
assert_comments({}, conf8, "a.c");
|
618
|
-
assert_comments({" a.d comment"}, conf8, "a.d");
|
619
|
-
// here we're concerned that comments apply only to leaf
|
620
|
-
// nodes, not to parent objects.
|
621
|
-
|
622
|
-
// TODO: comments are currently being applied to the root as well. Why?
|
623
|
-
assert_comments({}, conf8, "x");
|
624
|
-
assert_comments({}, conf8, "a");
|
625
|
-
}
|
626
|
-
|
627
|
-
TEST_CASE("include file") {
|
628
|
-
auto conf = config::parse_string("include file(\"" + fixture_path("test01") + "\")");
|
629
|
-
|
630
|
-
// should have loaded conf, json
|
631
|
-
REQUIRE(42u == conf->get_int("ints.fortyTwo"));
|
632
|
-
REQUIRE(1u == conf->get_int("fromJson1"));
|
633
|
-
}
|
634
|
-
|
635
|
-
TEST_CASE("include file relative paths") {
|
636
|
-
auto conf = config::parse_string("root { include file(\"" + fixture_path("test01.conf") + "\") }");
|
637
|
-
REQUIRE("abcd" == conf->get_string("root.strings.abcdAgain"));
|
638
|
-
}
|
639
|
-
|
640
|
-
TEST_CASE("include file with extension") {
|
641
|
-
auto conf = config::parse_string("include file(\"" + fixture_path("test01.conf") + "\")");
|
642
|
-
|
643
|
-
REQUIRE(42u == conf->get_int("ints.fortyTwo"));
|
644
|
-
REQUIRE_THROWS_AS(conf->get_int("fromJson1"), config_exception);
|
645
|
-
}
|
646
|
-
|
647
|
-
TEST_CASE("include file whitespace inside parens") {
|
648
|
-
auto conf = config::parse_string("include file( \n \"" + fixture_path("test01") + "\" \n )");
|
649
|
-
|
650
|
-
|
651
|
-
// should have loaded conf, json
|
652
|
-
REQUIRE(42u == conf->get_int("ints.fortyTwo"));
|
653
|
-
REQUIRE(1u == conf->get_int("fromJson1"));
|
654
|
-
}
|
655
|
-
|
656
|
-
TEST_CASE("include file no whitespace outside parens") {
|
657
|
-
bool thrown = false;
|
658
|
-
try {
|
659
|
-
auto conf = config::parse_string("include file (\"" + fixture_path("test01") + "\")");
|
660
|
-
} catch (const hocon::config_exception& e) {
|
661
|
-
thrown = true;
|
662
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting include parameter");
|
663
|
-
}
|
664
|
-
REQUIRE(thrown);
|
665
|
-
}
|
666
|
-
|
667
|
-
TEST_CASE("include file not quoted") {
|
668
|
-
bool thrown = false;
|
669
|
-
try {
|
670
|
-
auto conf = config::parse_string("include file(" + fixture_path("test01") + ")");
|
671
|
-
} catch (const hocon::config_exception& e) {
|
672
|
-
thrown = true;
|
673
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting include parameter");
|
674
|
-
}
|
675
|
-
REQUIRE(thrown);
|
676
|
-
}
|
677
|
-
|
678
|
-
TEST_CASE("include file not quoted and special char") {
|
679
|
-
bool thrown = false;
|
680
|
-
try {
|
681
|
-
auto conf = config::parse_string("include file(:" + fixture_path("test01") + ")");
|
682
|
-
} catch (const hocon::config_exception& e) {
|
683
|
-
thrown = true;
|
684
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting a quoted string");
|
685
|
-
}
|
686
|
-
REQUIRE(thrown);
|
687
|
-
}
|
688
|
-
|
689
|
-
TEST_CASE("include file unclosed parens") {
|
690
|
-
bool thrown = false;
|
691
|
-
try {
|
692
|
-
auto conf = config::parse_string("include file(" + fixture_path("test01"));
|
693
|
-
} catch (const hocon::config_exception& e) {
|
694
|
-
thrown = true;
|
695
|
-
REQUIRE_STRING_CONTAINS(e.what(), "expecting include parameter");
|
696
|
-
}
|
697
|
-
REQUIRE(thrown);
|
698
|
-
}
|
699
|
-
|
700
|
-
// TODO: require URL support
|
701
|
-
// include url basename
|
702
|
-
// include url with extension
|
703
|
-
// include url invalid
|
704
|
-
// include resources?
|
705
|
-
// include url heuristically
|
706
|
-
// include url basename heuristically
|
707
|
-
// TODO: unicode support
|
708
|
-
// accept bom starting file
|
709
|
-
// accept bom start of string config
|
710
|
-
// accept bom in string value
|
711
|
-
// accept bom whitespace
|
712
|
-
|
713
|
-
TEST_CASE("accept multi period numeric path") {
|
714
|
-
auto conf1 = config::parse_string("0.1.2.3=foobar1");
|
715
|
-
REQUIRE("foobar1" == conf1->get_string("0.1.2.3"));
|
716
|
-
auto conf2 = config::parse_string("0.1.2.3.ABC=foobar2");
|
717
|
-
REQUIRE("foobar2" == conf2->get_string("0.1.2.3.ABC"));
|
718
|
-
auto conf3 = config::parse_string("ABC.0.1.2.3=foobar3");
|
719
|
-
REQUIRE("foobar3" == conf3->get_string("ABC.0.1.2.3"));
|
720
|
-
}
|