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

Refactor Goldencobra::Article #37

Open
5minpause opened this issue Feb 2, 2016 · 0 comments
Open

Refactor Goldencobra::Article #37

5minpause opened this issue Feb 2, 2016 · 0 comments

Comments

@5minpause
Copy link
Contributor

According to https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::Article

marcometz pushed a commit that referenced this issue Feb 3, 2016
…s-http-in-verschiedenen-stellen to master

This class can be used in a new rake task to check arbitrary models for valid attribute values.
The first use case is checking for valid uris.
Example:
rake attribute_validator:url MODEL_NAME=Goldencobra::Article ATTRIBUTE_NAME=canonical_url
The last commit introduces a new Service object to repair found attributes.
The AttributeValidator now uses a new RepairService to fix the errors it found.
This works only for url values right now and fixes 'http://' and 'https://'
errors. It could easily be extended to repair other attributes as well.
GC-177

* commit '7ffac0e6c270d3c49b873fefdfea5ea984faa88e':
  Fixes URLs for multiple occurences of protocol
  Uses new Service object to repair found attributes
  Fixes the check for host and scheme
  Introduces an AttributeValidator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant