ssnepenthe / recipe-scraper

A library for scraping recipes from popular recipe sites.
GNU General Public License v2.0
47 stars 15 forks source link

Allrecipes.com categories #20

Closed dmonizer closed 6 years ago

dmonizer commented 6 years ago

added categories for allrecipes.com. code from master did generate null for categories. My first ever open source contribution, so please bear with me :)

ssnepenthe commented 6 years ago

Nice catch and congratulations on the first contribution!

Would you mind updating the tests for allrecipes.com as well?

Sorry I haven't gotten around to writing a contribution guide but it would look a bit like this:

  1. Download the latest HTML by running ./bin/test-tools html:get-host allrecipes.com from the recipe-scraper directory.
  2. Update the categories in each file within the tests/data/results/allrecipes.com directory
  3. Run ./vendor/bin/phpunit --filter=AllRecipesCom to verify that everything is working as expected
  4. Run ./vendor/bin/phpcs --standard=PSR2 src/Scrapers/AllRecipesCom.php to verify coding standards are met

This should get the checks to pass on Travis and then I can merge.

Thanks!

dmonizer commented 6 years ago

I honestly don't understand, what's wrong, sorry :)

on my machine:

./vendor/bin/phpunit --filter=AllRecipesCom PHPUnit 6.5.5 by Sebastian Bergmann and contributors.

Runtime: PHP 7.0.22-0ubuntu0.16.04.1 with Xdebug 2.4.0 Configuration: /home/erik/repos/recipe-scraper/phpunit.xml

.. 2 / 2 (100%)

Time: 492 ms, Memory: 8.00MB

OK (2 tests, 10 assertions)

ssnepenthe commented 6 years ago

No worries 😄 - the problem was that the test HTML data needed an update. Everything looks good, thanks again for the help!