Sha256: 80b8fa422a9956dcfd25b079d16cc68369991546919178a5e27660138e615f02

Contents?: true

Size: 889 Bytes

Versions: 12

Compression:

Stored size: 889 Bytes

Contents

module Serverspec
  module Helper
    module Type
      types = %w(
        base bridge bond cgroup command cron default_gateway file fstab
        group host iis_website iis_app_pool interface ipfilter ipnat
        iptables ip6tables kernel_module linux_kernel_parameter lxc
        mail_alias mysql_config package php_config port ppa process
        routing_table selinux selinux_module service user yumrepo
        windows_feature windows_hot_fix windows_registry_key
        windows_scheduled_task zfs docker_base docker_image
        docker_container x509_certificate x509_private_key
        linux_audit_system
      )

      types.each {|type| require "serverspec/type/#{type}" }

      types.each do |type|
        define_method type do |*args|
          name = args.first
          eval "Serverspec::Type::#{type.to_camel_case}.new(name)"
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
serverspec-ruby19-2.24.3 lib/serverspec/helper/type.rb
serverspec-2.26.0 lib/serverspec/helper/type.rb
serverspec-2.25.0 lib/serverspec/helper/type.rb
serverspec-2.24.3 lib/serverspec/helper/type.rb
serverspec-2.24.2 lib/serverspec/helper/type.rb
serverspec-2.24.1 lib/serverspec/helper/type.rb
serverspec-2.24.0 lib/serverspec/helper/type.rb
serverspec-2.23.1 lib/serverspec/helper/type.rb
serverspec-2.23.0 lib/serverspec/helper/type.rb
serverspec-2.22.0 lib/serverspec/helper/type.rb
serverspec-2.21.1 lib/serverspec/helper/type.rb
serverspec-2.21.0 lib/serverspec/helper/type.rb