Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uriklar/testproj


https://github.com/uriklar/testproj

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

A few comments about stuff I wasn't sure about

== Task 1:

I wasn't sure if you intended the SafeDestroy library to be change the default scope of any model including it, so I tried doing that, but after seeing it's taking me a while (with no results) I simply added the default scope to the User model itself.

Didn't really have time for the bonus task, but my guess would be having to override ActiveRecords find method.

== Task 2:

The full name method can be found on the User model.

== Task 3:

The answer for this is in person.js and person_private.js

== Task 4 solution description:

I would create some module to be incharge of checking the domain availability.
To do so I would use the mechanize gem which aloows me scrape pages along with interacting with them.

The "available" method would parse the domain parameter, go to godaddy.com, enter the domain parameter in the search box (labeled #searchDomainName) and click the form submit button.

The resulting page has a div with class unavailableCopy for unavailable domains, or a results div with a green h3 tag for available ones.

I'd return the result of this scraping function in the required json format.

A way to improve the performence could be caching past results in my DB, and checking if the requested domain is in my DB before going to look for it in godaddy. This would probably require an expiry method for the cached results so the DB remains updated.

Hope I did good, let me know if you have any questions about something here.
Thanks,
Uri