Git Product home page Git Product logo

http-status-check's People

Contributors

ckross01 avatar dependabot-preview[bot] avatar dependabot[bot] avatar gitter-badger avatar greenkeeper[bot] avatar greenkeeperio-bot avatar guyellis avatar koddsson avatar magikid avatar owenvoke avatar patrickkang avatar robrich avatar thomasmodeneis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

http-status-check's Issues

Change Istanbul to NYC

NYC provides better coverage for ES6 and has become a more active project than Istanbul.

This issue is to swap out Istanbul for NYC:

  1. Add nyc dependency
  2. Remove istanbul dependency
  3. Change any references in package.json or anywhere elsewhere from istanbul to nyc.
  4. Add a .nycrc file with similar settings to .istanbul.yml
  5. Update .gitignore
  6. Remove .istanbul.yml

This commit from the plant project is a good reference for what needs to be done to complete this issue.

site.followRedirect needs unit tests

In uriCheck.js we set followRedirect to false. This should be configurable per site and default to false if missing which will allow for checking collections of shortUrls and their ultimate destinations.

Force Node 5.1.0

  • Check that project runs on Node 5.1.0
  • Add this version to to engines in package.json
  • Check for running version of Node in a test and app start against version in package.json and warn if version mismatch?

Add Cron

Add something like node-cron that allows http-status-check to continuously run at set intervals.

This will be particularly useful if you wanted to use http-status-check as a URL monitoring tool.

If the out-adapter was setup to send failure reports to email or phone then you would be alerted quickly if there was a problem.

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Change to ES6

Lots of the syntax in this project might be more readable if in ES6 syntax. Make one or more changes to the code to change it from ES5 syntax to ES6. Where can we use ES6 classes for example? This issue relies on #31 being done first.

fix 3 broken test for inAdapters/fileAdapter, fix http not existing, increase coverage on mail adapter

 3 failing

  1) inAdapters/fileAdapter/ getRunData() should return checksites.js data if exists:

      AssertionError: expected 'samplesites' to equal 'checksites'
      + expected - actual

      -samplesites
      +checksites
      
      at Context.<anonymous> (test/lib/inAdapters/test.fileAdapter.js:35:27)

  2) inAdapters/fileAdapter/ getRunData() should return samplesites.js data if exists and if checksites.js is missing:
     Error: Expecting HTTP_STATUS_CHECK_FILE environment or checksites.js or samplesites.js to exist.
      at findFile (lib/inAdapters/fileAdapter.js:19:11)
      at Object.getRunData (lib/inAdapters/fileAdapter.js:24:14)
      at Context.<anonymous> (test/lib/inAdapters/test.fileAdapter.js:56:31)

  3) inAdapters/fileAdapter/ getRunData() should throw an exception if neither samplesites.js or checksites.js exist:

      AssertionError: expected 2 to equal 3
      + expected - actual

      -2
      +3
      
      at Context.<anonymous> (test/lib/inAdapters/test.fileAdapter.js:79:34)


fix http not existing, now is https

$ npm run start

> [email protected] start /opt/pocs/http-status-check
> node index.js

X Comentarismo API (http://www.linksilk.com) failed. Here are the problems:
  - Expected header 'location' to be http://linksilk.com/ but instead it was https://linksilk.com/
A total of 6 URIs were tested.
Failure count:  1
Success count:  4
Disable count:  1

Increase coverage:

=============================== Coverage summary ===============================
Statements   : 78.71% ( 196/249 )
Branches     : 73.27% ( 74/101 )
Functions    : 82.35% ( 28/34 )
Lines        : 78.63% ( 195/248 )
================================================================================

By adding test.emailAdapter.js Now coverage is:

=============================== Coverage summary ===============================
Statements   : 93.57% ( 233/249 )
Branches     : 81.19% ( 82/101 )
Functions    : 91.18% ( 31/34 )
Lines        : 93.55% ( 232/248 )
================================================================================

ECONNREFUSED when requesting sites too quickly

Try the alexa100.js file in sitelists/ directory to see that many requests end up with ECONNREFUSED. I suspect this is because there are too many simultaneous requests to the same cluster.

Surpress success

Add a flag to the configuration to surpress the output when it's successful. (Useful to reduce the noise if you have a large list of sites and several are failing.)

Add Babel6 to project

  • Add Babel 6 to project.
  • Add appropriate initialization calls/references so that tests and other files so that ES6 is available.
  • Add an ES6 function (not in Node*) to test suite to confirm that it works.
  • Add an ES6 function (not in Node*) to target code to confirm that it works.
  • Node has some ES6 functionality. To test that Babel is doing the transpiling add something that Node doesn't have.

Split config from site list

Currently the configuration of how the utility will run is lumped together with the list of sites to check. Split this apart so that the list of sites can be pulled from a different source and the config of how the utility runs is separate.

Add Control Sites

Allow a config item on each site entry in the input that is called 'control' or something similar. Defaults to false if missing. This tells the script that we expect this site to be always available and use it to test our internet connection. e.g. google.com, yahoo.com, microsoft.com should always return 200 or 301. If they timeout then there's something wrong with our connectivity and we shouldn't assume a problem with the other sites. Run the control sites at the beginning and at the end.

Email Out Adapter Tests

Write tests for the Email Out Adapter. Mock the email sending with Sinon.js so emails aren't sent when the tests are run.

Twilio Out Adapter

Create an out adapter that sends the output to recipients via Twilio.

MongoDB In Adapter

Create an adapter that reads the input (the URLs that need to be scanned) from a MongoDB.

Add web server

Add a web server that provides a UI into the results of the runs and the ability to add, remove and manage sites that are run.

Email Out Adapter

Complete the Email Out Adapter that's been started so that email(s) get sent to receipients at the end of the run.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.