Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem? #1

Closed
aaronchi opened this issue Feb 4, 2014 · 6 comments
Closed

gem? #1

aaronchi opened this issue Feb 4, 2014 · 6 comments

Comments

@aaronchi
Copy link

aaronchi commented Feb 4, 2014

Would you consider pushing a gem to rubygems?

@KimNorgaard
Copy link
Owner

@aaronchi
Copy link
Author

aaronchi commented Feb 7, 2014

thx!

@aaronchi
Copy link
Author

Saw you are making changes to the gemspec. You should not make this dependent on v3 of Rails.

@KimNorgaard
Copy link
Owner

Care to elaborate on your view? I havn't tested it with rails-versions below 3, but if you can confirm that it works with other versions, then I won't mind removing the dependency.

@aaronchi
Copy link
Author

I have been using it with Rails 3 and Rails 4 just fine. The way you have the gemfile configured now, it will only work with Rails 3.0.x, meaning it won't even run with Rails 3.2.

I would just drop the version requirement on Rails entirely as it seems to work fine. You can check some other validation gems for comparison.

KimNorgaard added a commit that referenced this issue Feb 16, 2014
KimNorgaard added a commit that referenced this issue Feb 16, 2014
@KimNorgaard
Copy link
Owner

Right, I removed the dependencies on specific versions and pushed 1.0.4.Thanks for the input.

schwern added a commit to evalEmpire/validates_hostname that referenced this issue Feb 17, 2020
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#1.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants