summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-04-16Mark unused variables with underscore-prefix.Steve Kemp
This stops warnings when running with "ruby -w".
2015-04-16Work with the new return-type from tests.Steve Kemp
Now tests will no longe return "true" or "false", instead they will return "TEST_FAILED" or "TEST_PASSED". There is a third return-value of "TEST_SKIPPED" which essentially ignores a test.
2015-04-16Updated to use types for test-returns.Steve Kemp
This commit introduces a major change in custodian. In the past any test had either two results: * return false - The test failed. * return true - The test passed. We're now using an enum, more or less, such that a test may return a "skipped" result which will neither raise nor clear any alert(s). This is useful in its own right but is being introduced specifically to allow SSL-certificate tests to avoid raising and clearing outside working days/hours. This closes #10328. This fixes #10328.
2015-04-16Mark unused variables as unused.Steve Kemp
We do that with the standard "_"-prefix.
2015-04-16Mark variables as unused.Steve Kemp
We've now prefixed our transient/unused variables with "_" to stop any future errors about variables not being used.
2015-04-16Correctly initialize our state.Steve Kemp
We'd failed to set the default value of our loaded-marker to false, although in-practice this wasn't a problem.
2015-04-16Ensure we load our base-class.Steve Kemp
2015-04-16Fixed to be valid.Steve Kemp
Due to some sloppy edits this module was not correct.
2015-04-16Fixed syntax error.Steve Kemp
2015-04-16Correctly use the result of the resolution in the alert.Steve Kemp
There was a bug in that we used the same local-variable "result" for two purposes, trashing the intended use-case.
2015-04-16Resolve hostnames for both A + AAAA.Steve Kemp
The Bytemark-specific notifier, using mauve, appends some text to the bottom of each alert: http://example.com/ resolves to 1.2.3.4 which is INSIDE|OUTSIDE bytemark This text was previously limited to the IPv4 address, but now is repeated for each family which resolves successfully. This closes #10568. This fixes #10568.
2015-03-10Log the failure-reason on the temporary-fails.Steve Kemp
2015-03-09Show error-message clearly on connection-failure.Steve Kemp
This was failing because '$ERROR_INFO' is only available if you require 'English'
2015-03-09Updated to test for more whitespace issues.Steve Kemp
2015-03-09Removed trailing whitespace from the codeSteve Kemp
2015-03-09Remove spaces inside empty hashesSteve Kemp
2015-03-09Remove spaces inside blocks.Steve Kemp
2015-03-09More minor space fixupsSteve Kemp
2015-03-09Whitespace fixups.Steve Kemp
These were all identified and suggested by rubocop.
2015-03-09Use def with parentheses when there are parameters.Steve Kemp
2015-03-09Removed spaces inside parenthesis.Steve Kemp
2015-03-09Prefer single-quotes when you don't need interpolation.Steve Kemp
So "foo" is less good than 'foo'.
2015-03-09 Prefer single-quoted strings inside interpolations.Steve Kemp
2015-03-09Do not terminate expressions with ";".Steve Kemp
Ruby is not Perl, much as I sometimes wish it were.
2015-03-09Avoid redudent returns.Steve Kemp
The last expression of a method is the return value. So: def foo; false ; end Is the same as: def foo; return false; end
2015-03-09Avoid bogus casing of method-name.Steve Kemp
So "getURL" becomes "get_url_contents"
2015-03-09Don't use parenthesis aroudn conditions in an if.Steve Kemp
2015-03-09Do not use parentheses for method calls with no arguments.Steve Kemp
This is neater. Flagged by rubocop
2015-03-09Avoid "Array.new" and "Hash.new"Steve Kemp
Instead use {} + ().
2015-03-09Removed bogus period.Steve Kemp
2015-03-09Omit the parentheses in defs when the method doesn't accept any arguments.Steve Kemp
This is neater.
2015-03-09Minor indentation fixup.Steve Kemp
2015-03-09Don't use "::" for method-calls.Steve Kemp
Instead prefer ".". Flagged by rubocop
2015-03-09Avoid arguments we're not using.Steve Kemp
Having methods take arguments which are ignored is a misleading thing, prefix with "_" to make that explicit, or remove.
2015-03-09Removed dead code.Steve Kemp
After raising an exception the following code could not be reached.
2015-03-09Avoid redundent ".to_s" methods.Steve Kemp
These are not required if the argument is string already, or has a _to_s method which will be automatically invoked by magic.
2015-03-09Don't rescue the 'Exception'Steve Kemp
Instead rescue a 'StandardError' which is slightly more specific. (Rescuing more specific exceptions is good.)
2015-03-09Avoid useless wrapping of return-value.Steve Kemp
This: def foo line end Is the same as this: def foo return( line ) end
2015-03-09File.exists? is deprecated.Steve Kemp
We prefer "File.exist?". Flagged by rubocop.
2015-03-09Use long-namesSteve Kemp
Instead of "$0" use $PROGRAM_NAME, instead of $! use "$LOAD_PATH". This is more explicit and less-magic. Flagged by rubocop
2015-03-04Allow SSL-check to be disabled, via "no_ssl_check"Steve Kemp
2015-03-04New release - reporting SSL errors correctly.Steve Kemp
2015-03-04Work correctly if SSL library is too old for SNI.Steve Kemp
2015-03-04Reinstate the default logger as - file.Steve Kemp
2015-03-04Updated comments and code-order. No functional change.Steve Kemp
2015-03-04Don't use a logger.Steve Kemp
Instead we run quietly if nothing was output, and run verbosely if we see "--verbose".
2015-03-04New releaseSteve Kemp
2015-03-04Allow tests to be qualified IPv4/IPv6-only.Steve Kemp
Via "ipv6_only" and "IPv4_only"
2015-03-04Explictly convert the class to a string.Steve Kemp
This is required under Ruby 1.8, as I discovered when deploying to offsite3.
2015-03-02Explicitly abort on unknown test-typesSteve Kemp