learn-co-curriculum / oo-student-scraper

Other
2 stars 316 forks source link

command_line_interface Class -> add_attributes_to_students method #62

Closed sarjumulmi closed 6 years ago

sarjumulmi commented 7 years ago

command_line_interface Class -> add_attributes_to_students method attributes = Scraper.scrape_profile_page(student.profile_url) seems to be incorrect Should be: attributes = Scraper.scrape_profile_page(BASE_PATH + student.profile_url)

kwebster2 commented 7 years ago

@aturkewi @cjbrock There is a general inconsistency between the tests and the CLI regarding student.profile_url. According to the way the CLI is written, student.profile_url should return the entire url, with BASE_PATH ("./fixtures/student-site/") prepended to it in the scrape_index_page method. This is also what is suggested by the example of the desired behavior for the scrape_index_page method in the README.

However, the tests expect the scrape_index_page method to return the :profile_url without "./fixtures/student-site/" prepended.

There a couple options to fix this, though I'm not sure which would be best: 1.) Edit the example of the desired behavior in the README to show the profile_url without "./fixtures/student-site", and then pass BASE_PATH to the scrape_profile_page method call in the CLI 2.) Modify the tests to have "./fixtures/student-site/" prepended to the profile_urls of the student hashes in :student_index_array, which would require the student to prepend "./fixtures/student-site" to the profile_url in the scrape_index_page method (might require adding additional clarification in the README)

curiositypaths commented 6 years ago

Hi there,

Thank you for the suggestions. We updated the assignment README and specs to provide a more accurate description of the Scraper.scrape_index_page method input and output.

If you still feel that there is an issue with the curriculum, please reopen the issue and provide more detail about why it's a curriculum issue, the steps needed to reproduce the issue, and any additional relevant information about your development environment (local or IDE).

As always, thanks for contributing! 💙