lib/validates_host.rb in validates_host-0.3.1 vs lib/validates_host.rb in validates_host-1.0.0

- old
+ new

@@ -1,12 +1,19 @@ -require "validates_host/version" - -#ActiveModel Validators +require 'active_support/core_ext/array/wrap' require 'validates_host/host_name_validator' require 'validates_host/domain_name_validator' require 'validates_host/ip_validator' require 'validates_host/subnet_validator' +if defined?(::Shoulda) + require 'validates_host/require_a_valid_domain_name_matcher' + require 'validates_host/require_a_valid_host_name_matcher' + require 'validates_host/require_a_valid_ip_matcher' + require 'validates_host/require_a_valid_subnet_matcher' +end -#Rspec Matchers -require "validates_host/shoulda-matchers" if defined?(::Shoulda) -require "validates_host/remarkable" if defined?(::Remarkable) +module ValidatesHost + autoload :Subnet, 'validates_host/subnet' + autoload :Ip, 'validates_host/ip' + autoload :HostName, 'validates_host/host_name' + autoload :DomainName, 'validates_host/domain_name' +end \ No newline at end of file