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

create sitemaps model #77

Closed
MothOnMars opened this issue Jun 6, 2018 · 3 comments
Closed

create sitemaps model #77

MothOnMars opened this issue Jun 6, 2018 · 3 comments
Assignees

Comments

@MothOnMars
Copy link
Contributor

MothOnMars commented Jun 6, 2018

We need a standard ActiveRecord model for a new Sitemap class. A sitemap should:

  • belong to :searchgov_domain (which can have many sitemaps)
  • have a non-null, varchar(2000) url database column
    • the url should be unique
    • the url should be read-only
  • have a nullable varchar(255) last_crawl_status column
  • have a nullable datetime last_crawled_at column
  • determine the searchgov_domain it belongs to at the time of creation (see SearchgovUrl#set_searchgov_domain)
  • mix in the Fetchable module, which includes additional validations

The spec should include the line it_should_behave_like 'a record with a fetchable url' to include the default Fetchable tests. This class has a lot in common with the other Fetchable classes: IndexedDocument and SearchgovUrl. Those classes and their specs may be helpful. Try to use Shoulda's simple one-line matchers for standard tests such as validations, etc.

@MothOnMars MothOnMars self-assigned this Jun 8, 2018
@MothOnMars
Copy link
Contributor Author

@ethanewing , here's the next story for you. Please let me know if you have questions.

@ethanewing
Copy link
Contributor

Will do!

@MothOnMars
Copy link
Contributor Author

Resolved by #92

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