Skip to content

Commit

Permalink
Merge pull request #71 from lbeder/update
Browse files Browse the repository at this point in the history
Deprecate older Ruby versions and update style
  • Loading branch information
lbeder committed Aug 18, 2020
2 parents 2eef8b5 + 8002cc9 commit f62f420
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 27 deletions.
123 changes: 108 additions & 15 deletions .rubocop.yml
@@ -1,4 +1,7 @@
# Custom config for RuboCop static code analysis
AllCops:
TargetRubyVersion: 2.5

Metrics/LineLength:
Max: 120
Exclude:
Expand All @@ -25,6 +28,79 @@ Style/SignalException:
Style/RaiseArgs:
Enabled: false

Style/Documentation:
Enabled: false

Style/BlockDelimiters:
Exclude:
- 'spec/**/*'

Style/ModuleFunction:
Enabled: false

Style/ExponentialNotation:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/AccessorGrouping:
Enabled: true

Style/ArrayCoercion:
Enabled: true

Style/BisectedAttrAccessor:
Enabled: true

Style/CaseLikeIf:
Enabled: true

Style/ExplicitBlockArgument:
Enabled: true

Style/GlobalStdStream:
Enabled: true

Style/HashAsLastArrayItem:
Enabled: true

Style/HashLikeCase:
Enabled: true

Style/OptionalBooleanParameter:
Enabled: true

Style/RedundantAssignment:
Enabled: true

Style/RedundantFetchBlock:
Enabled: true

Style/RedundantFileExtensionInRequire:
Enabled: true

Style/RedundantRegexpCharacterClass:
Enabled: true

Style/RedundantRegexpEscape:
Enabled: true

Style/SingleArgumentDig:
Enabled: true

Style/SlicingWithRange:
Enabled: true

Style/StringConcatenation:
Enabled: true

Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation

Expand All @@ -43,34 +119,51 @@ Layout/FirstHashElementIndentation:
Layout/SpaceAroundMethodCallOperator:
Enabled: true

Style/Documentation:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Style/BlockDelimiters:
Lint/RescueException:
Exclude:
- 'spec/**/*'
- 'lib/health_monitor/providers/**/*'

Style/ModuleFunction:
Enabled: false
Lint/RaiseException:
Enabled: true

Style/ExponentialNotation:
Lint/StructNewOverride:
Enabled: true

Style/HashEachMethods:
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Style/HashTransformKeys:
Lint/DeprecatedOpenSSLConstant:
Enabled: true

Style/HashTransformValues:
Lint/DuplicateElsifCondition:
Enabled: true

Lint/RescueException:
Exclude:
- 'lib/health_monitor/providers/**/*'
Lint/DuplicateRescueException:
Enabled: true

Lint/RaiseException:
Lint/EmptyConditionalBody:
Enabled: true

Lint/StructNewOverride:
Lint/FloatComparison:
Enabled: true

Lint/MissingSuper:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Lint/OutOfRangeRegexpRef:
Enabled: true

Lint/SelfAssignment:
Enabled: true

Lint/TopLevelReturnWithArgument:
Enabled: true

Lint/UnreachableLoop:
Enabled: true
9 changes: 0 additions & 9 deletions .travis.yml
Expand Up @@ -3,20 +3,11 @@ rvm:
- 2.5.8
- 2.6.6
- 2.7.0
- ruby-head
gemfile:
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
matrix:
exclude:
- rvm: ruby-head
gemfile: gemfiles/rails_5.0.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails_5.1.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails_5.2.gemfile
script:
- bundle exec rake rubocop
- bundle exec rspec
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 9.0.0 (2020-08-18)

- Require Ruby 2.5.0 and later.

## 8.9.0 (2020-04-16)

- Deprecate Ruby 2.4.0 and update dependencies and style.
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
# health-monitor-rails

[![Gem Version](https://badge.fury.io/rb/health-monitor-rails.svg)](http://badge.fury.io/rb/health-monitor-rails)
[![Build Status](https://travis-ci.org/lbeder/health-monitor-rails.svg)](https://travis-ci.org/lbeder/health-monitor-rails)
[![Build Status](https://travis-ci.com/lbeder/health-monitor-rails.svg?branch=master)](https://travis-ci.com/lbeder/health-monitor-rails)
[![Coverage Status](https://coveralls.io/repos/lbeder/health-monitor-rails/badge.svg)](https://coveralls.io/r/lbeder/health-monitor-rails)

This is a health monitoring Rails mountable plug-in, which checks various services (db, cache, sidekiq, redis, etc.).
Expand Down
3 changes: 3 additions & 0 deletions health-monitor-rails.gemspec
Expand Up @@ -3,6 +3,7 @@
$LOAD_PATH.push File.expand_path('lib', __dir__)
require 'health_monitor/version'

# rubocop:disable Metrics/BlockLength
Gem::Specification.new do |s|
s.name = 'health-monitor-rails'
s.version = HealthMonitor::VERSION
Expand All @@ -19,6 +20,7 @@ Gem::Specification.new do |s|
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
s.test_files = Dir['test/**/*']

s.required_ruby_version = '>= 2.5'
s.add_dependency 'railties', '>= 4.0'

s.add_development_dependency 'appraisal'
Expand All @@ -38,3 +40,4 @@ Gem::Specification.new do |s|
s.add_development_dependency 'sqlite3', '>= 1.3'
s.add_development_dependency 'timecop'
end
# rubocop:enable Metrics/BlockLength
2 changes: 1 addition & 1 deletion lib/health_monitor/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module HealthMonitor
VERSION = '8.9.0'
VERSION = '9.0.0'
end
3 changes: 2 additions & 1 deletion spec/dummy/config.ru
Expand Up @@ -2,5 +2,6 @@

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
require ::File.expand_path('config/environment', __dir__)

run Rails.application

0 comments on commit f62f420

Please sign in to comment.