Break out CheckIfDead class into a separate GitHub repo
Closed, ResolvedPublic5 Story Points

Description

The CheckIfDead class could be useful to lots of open source developers, but in order for that to happen, it needs to be broken out into a separate repo and then included in the IABot repo via Composer or a similar mechanism.

In the process, we should probably break the checkDeadlinks() function into smaller testable pieces and add a convenience function for testing individual URLs (that is called something like 'isDeadLink' rather than 'checkDeadLink', which is ambiguous).

Finally, a README needs to be written with some basic documentation.

Existing code is here: https://github.com/cyberpower678/Cyberbot_II/blob/master/IABot/checkIfDead.php

Also, make this a composer package. This task does not include refactoring Cyberbot code to use the new library.

kaldari created this task.Jul 12 2016, 5:27 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 12 2016, 5:27 PM
kaldari edited the task description. (Show Details)Jul 14 2016, 5:40 PM
kaldari edited the task description. (Show Details)Jul 14 2016, 5:42 PM
DannyH triaged this task as "Normal" priority.Jul 14 2016, 5:44 PM
DannyH set the point value for this task to 5.
DannyH moved this task from Sprint planning/estimation to Backlog on the Community-Tech board.
Niharika claimed this task.Jul 19 2016, 4:33 PM
Niharika edited projects, added Community-Tech-Sprint; removed Community-Tech.
Niharika moved this task from Ready to In Development on the Community-Tech-Sprint board.
kaldari claimed this task.Jul 28 2016, 5:17 PM
kaldari added a subscriber: Niharika.
kaldari reassigned this task from kaldari to Niharika.Aug 1 2016, 8:12 PM
kaldari closed this task as "Resolved".Aug 3 2016, 10:11 PM
kaldari reopened this task as "Open".Aug 3 2016, 10:13 PM

We're also going to do the Packagist packaging as part of this ticket.

I've updated the code to remove all the error array instances. The return format now is:

[ 'url1' => true, 'url2' => false ]

I've updated the tests accordingly.

Looking into the Packagist bit now.

You only removed the bits that return the error correct? The curl error codes are still part of the checks though, right?

You only removed the bits that return the error correct? The curl error codes are still part of the checks though, right?

Correct.

Looks good, but I'm still concerned about requiring PHP 5.6. Tool Labs only runs 5.5 and current versions of HHVM are mostly based on PHP 5.5 (from my understanding). I haven't tried building this in Vagrant yet, but I'm not sure if it would or not. Is there anything keeping us from using PHP 5.5 besides requiring a less up-to-date version of phpunit?

Do we need this class on tool labs?

We (as in IABot) don't, but other people might. For example, this would be a nice class for citation bot to use or even CopyPatrol.

As far as I can tell this class is fully operational on PHP 5.5 and only requires 5.6 for PHPUnit, which can easily be remedied by dowloading PHPUnit-old.

Okay, I will amend it to support 5.5.

kaldari closed this task as "Resolved".Aug 16 2016, 8:25 PM
kaldari moved this task from Needs Review/Feedback to Done on the Community-Tech-Sprint board.
DannyH moved this task from Backlog to Untriaged on the Community-Tech board.Aug 31 2016, 12:12 AM
kaldari moved this task from Untriaged to Archive on the Community-Tech board.Aug 31 2016, 8:04 PM