forked from KimNorgaard/validates_hostname
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Change to a Rails 4 ActiveModel validator.
Rails 4 introduced ActiveModel, ActiveModel::Validations and ActiveModel::EachValidator. Instead of injecting ourselves into ActiveRecord::Base, we will be automatically picked up. This fixes KimNorgaard#10. We can now also be used on ActiveModel as well as ActiveRecord. This simplifies testing. Also * rspec-rails was dropped becasue it seems to want all of Rails loaded. We only needed one convenience method, errors_on. It has been copied into our test model. * Bumped our runtime dependency to activemodel >= 4.0. Dropped the others. * Dropped the development dependency on all of Rails. We only need ActiveModel.
- Loading branch information
Showing
6 changed files
with
249 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,16 @@ spec = Gem::Specification.new do |s| | |
s.version = GEM_VERSION | ||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Kim Nørgaard"] | ||
s.description = 'Extension to ActiveRecord::Base for validating hostnames' | ||
s.description = 'Extension to validate hostnames in Rails' | ||
s.summary = 'Checks for valid hostnames' | ||
s.email = '[email protected]' | ||
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "MIT-LICENSE"] | ||
s.files = ["validates_hostname.gemspec", "MIT-LICENSE", "CHANGELOG.rdoc", "README.rdoc", "Rakefile", "lib/validates_hostname", "lib/validates_hostname/version.rb", "lib/validates_hostname.rb"] | ||
s.homepage = %q{https://github.com/KimNorgaard/validates_hostname} | ||
s.licenses = 'MIT' | ||
s.require_paths = ["lib"] | ||
s.add_runtime_dependency 'activerecord', '>= 3.0' | ||
s.add_runtime_dependency 'activesupport', '>= 3.0' | ||
s.add_runtime_dependency 'activemodel', '>= 4.0' | ||
s.add_development_dependency 'rspec', '~> 3.0' | ||
s.add_development_dependency 'rspec-rails' | ||
s.add_development_dependency 'rails' | ||
s.add_development_dependency 'sqlite3' | ||
s.add_development_dependency 'pry-byebug' | ||
s.add_development_dependency 'rspec-collection_matchers' | ||
end | ||
|
Oops, something went wrong.