diff --git a/CHANGELOG b/CHANGELOG index e17c17b..0ac1fcd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,7 +19,7 @@ * Merged PR get rid of old school hash rockets syntax #92 from DmytroStepaniuk * Merged PR Converted whitelist testing to use IPAddr objects. #64 jordanyaker * Added on_success and on_failure callbacks - * Makes sure errors are seperated by a period and a space and a period always ends the list of errors + * Makes sure errors are separated by a period and a space and a period always ends the list of errors * 3.0.0 * First release on rails5 branch @@ -28,9 +28,9 @@ * Cleaned up README * redis_url now defaults to nil (url determined by redis gem) * Cleaned out rails 4.0 dependent code - * Cleaned up test code and updated to rails 5 standards, uses smarter_bundler to handle gem ruby version isssues + * Cleaned up test code and updated to rails 5 standards, uses smarter_bundler to handle gem ruby version issues * Added rails 5.1 test - * Split all releases to this rails* branchs - master is only for edge development + * Split all releases to this rails* branches - master is only for edge development * 2.7.0 * Add ability to check health of redis when url is non-standard redis url @@ -56,7 +56,7 @@ * Fix route reload issue * Various fixes to get tests working with bundle/jruby and other gem issues * Document additional branches - * Fix route reload issue (auto routing previosuly conflicted with devise) + * Fix route reload issue (auto routing previously conflicted with devise) * Removed ref to rails 2.3, 3.* * 2.2.1 @@ -82,13 +82,13 @@ * Uses ActiveRecord::Migration.check_pending! if available and returns the message if an exception is raised (Rails 4.0+) * Simplified routing rules down to one rule for Rails 3.0+ * Includes some changes for rails 4.1 (edge) - but still a work in progress -* 1.3.1 - Include changes from contributers: +* 1.3.1 - Include changes from contributors: * Migrations with dots are now handled * the list of checks for "full" / "all" can be configured * 1.2.0 - The gem can now be configured, including timeouts, status codes and text returned on success - - Customn checks can be added via initializer like config.add_custom_check { CustomCheckClass.a_custom_check } + - Custom checks can be added via initializer like config.add_custom_check { CustomCheckClass.a_custom_check } - You can now request the response to be json or xml (via url or Content-accepted header) - - reduced tests to the versions of ruby recomended for the different versions of rails + - reduced tests to the versions of ruby recommended for the different versions of rails * 1.1.2 - Change to bundler support for building gems, as jeweler gem was broken by v2.0.0 of rubygems * 1.1.0 - Include cache check (Thanks to https://github.com/mgomes1 ) and some changes to test setup to workaround and diagnose test failures under rvm * 1.0.2 - Included travis config and gemfiles used in travis tests in gem and changes to test setup so that gem test diff --git a/README.rdoc b/README.rdoc index 1d82787..0687ce7 100644 --- a/README.rdoc +++ b/README.rdoc @@ -42,7 +42,7 @@ The health_check controller disables sessions for versions that eagerly load ses == Checks * standard (default) - site, database and migrations checks are run plus email if ActionMailer is defined and it is not using the default configuration -* all / full - all checks are run (can be overriden in config block) +* all / full - all checks are run (can be overridden in config block) * cache - checks that a value can be written to the cache * custom - runs checks added via config.add_custom_check * database - checks that the current migration level can be read from the database @@ -155,7 +155,7 @@ To change the configuration of health_check, create a file `config/initializers/ config.origin_ip_whitelist = %w(123.123.123.123 10.11.12.0/24 2400:cb00::/32) # Use ActionDispatch::Request's remote_ip method when behind a proxy to pick up the real remote IP for origin_ip_whitelist check - # Otherwise uses Rack::Request's ip method (the default, and always used by Middleware), which is more susceptable to spoofing + # Otherwise uses Rack::Request's ip method (the default, and always used by Middleware), which is more susceptible to spoofing # See https://stackoverflow.com/questions/10997005/whats-the-difference-between-request-remote-ip-and-request-ip-in-rails config.accept_proxied_requests = false @@ -211,7 +211,7 @@ When installed as middleware, exceptions thrown when running the full stack test Use a website monitoring service to check the url regularly for the word "success" (without the quotes) rather than just a 200 http status so that any substitution of a different server or generic information page should also be reported as an error. -If an error is encounted, the text "health_check failed: some error message/s" will be returned and the http status will be 500. +If an error is encountered, the text "health_check failed: some error message/s" will be returned and the http status will be 500. See @@ -258,7 +258,7 @@ See https://github.com/ianheggie/health_check/wiki/Ajax-Example for an Ajax exam == Silencing log output -It is recomended that you use silencer, lograge or one of the other log filtering gems. +It is recommended that you use silencer, lograge or one of the other log filtering gems. For example, with lograge use the following to exclude health_check from being logged: diff --git a/lib/health_check/s3_health_check.rb b/lib/health_check/s3_health_check.rb index fa72049..bd892ca 100644 --- a/lib/health_check/s3_health_check.rb +++ b/lib/health_check/s3_health_check.rb @@ -12,11 +12,11 @@ def check if permissions.nil? # backward compatible permissions = [:R, :W, :D] end - permissions.each do |permision| + permissions.each do |permission| begin - send(permision, bucket_name) + send(permission, bucket_name) rescue Exception => e - raise "bucket:#{bucket_name}, permission:#{permision} - #{e.message}" + raise "bucket:#{bucket_name}, permission:#{permission} - #{e.message}" end end end diff --git a/test/setup_railsapp b/test/setup_railsapp index 63bbb1c..bf01020 100755 --- a/test/setup_railsapp +++ b/test/setup_railsapp @@ -258,7 +258,7 @@ case "$actual_rails_version" in # Can't do this as a require as we may go back to testing JRuby echo Force sqlite to 1.3.13+ version for Rails 5.0 ... gem=sqlite3 - sed -i.bak -e "s/^\([ ${TAB}]*gem[ ${TAB}]*[${QUOTES}]${gem}[${QUOTES}]\)\(.*\)$/\1, '~> 1.3.13' # overriden: \2/" Gemfile + sed -i.bak -e "s/^\([ ${TAB}]*gem[ ${TAB}]*[${QUOTES}]${gem}[${QUOTES}]\)\(.*\)$/\1, '~> 1.3.13' # overridden: \2/" Gemfile fi ;; esac @@ -266,7 +266,7 @@ if egrep -q REQUIRED ${INITIAL_BUNDLE_GEMFILE} ; then sed -n "s/^[ ${TAB}]*gem[ ${TAB}]*[${QUOTES}]\([^${QUOTES}]*\)[${QUOTES}].*REQUIRED.*/\1/p" ${INITIAL_BUNDLE_GEMFILE} | while read gem do echo "Commenting out gem '$gem' line in Gemfile" - sed -i.bak -e "s/^\([ ${TAB}]*gem[ ${TAB}]*[${QUOTES}]${gem}[${QUOTES}].*\)$/# overriden by REQUIRED below: \1/" Gemfile + sed -i.bak -e "s/^\([ ${TAB}]*gem[ ${TAB}]*[${QUOTES}]${gem}[${QUOTES}].*\)$/# overridden by REQUIRED below: \1/" Gemfile done echo Adding Required gems egrep REQUIRED ${INITIAL_BUNDLE_GEMFILE} | tee -a Gemfile diff --git a/test/test_with_railsapp b/test/test_with_railsapp index c514df4..09e3eab 100755 --- a/test/test_with_railsapp +++ b/test/test_with_railsapp @@ -710,7 +710,7 @@ case "$run_test" in expected_status=404,500,502 $testurl ${host}/another/url $expected_status - echo 'TESTING default route has been overriden ...' + echo 'TESTING default route has been overridden ...' expected_status=404,500,502 $testurl ${host}/health_check/site $expected_status