diff --git a/.overcommit.yml b/.overcommit.yml new file mode 100644 index 000000000..625994a5b --- /dev/null +++ b/.overcommit.yml @@ -0,0 +1,8 @@ +PreCommit: + RuboCop: + enabled: true + on_warn: fail # Treat all warnings as failures + + TrailingWhitespace: + enabled: true + diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c491cea2..b83d0f33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## next release - Updated portuguese translations +- Added automatic RuboCop validation on pre-commit - Fix a bug: wrong variable reference in `SingleSignOnConcern:Merge_form_sso` - Fix a bug: wrong focus behavior on text editor diff --git a/Gemfile b/Gemfile index fa5abd22d..46d891218 100644 --- a/Gemfile +++ b/Gemfile @@ -36,6 +36,7 @@ group :development do gem 'web-console', '>= 3.3.0' # Preview mail in the browser gem 'listen', '~> 3.0.5' + gem 'overcommit' gem 'rb-readline' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'railroady' @@ -50,9 +51,9 @@ group :test do gem 'faker' gem 'minitest-reporters' gem 'pdf-reader' + gem 'rubyXL' gem 'vcr', '6.0.0' gem 'webmock' - gem 'rubyXL' end group :production, :staging do @@ -66,8 +67,6 @@ gem 'pg_search' # authentication gem 'devise', '>= 4.6.0' - - gem 'omniauth', '~> 1.9.0' gem 'omniauth-oauth2' gem 'omniauth_openid_connect' @@ -145,4 +144,4 @@ gem 'tzinfo-data' # compilation of dynamic stylesheets (home page & theme) gem 'sassc', '= 2.1.0' -gem 'redis-session-store' \ No newline at end of file +gem 'redis-session-store' diff --git a/Gemfile.lock b/Gemfile.lock index dfb8000e3..1abd78ea6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -93,6 +93,7 @@ GEM caxlsx_rails (0.6.2) actionpack (>= 3.1) caxlsx (>= 3.0) + childprocess (4.1.0) chroma (0.2.0) cldr-plurals-runtime-rb (1.0.1) coercible (1.0.0) @@ -176,6 +177,7 @@ GEM image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) + iniparse (1.5.0) jbuilder (2.10.0) activesupport (>= 5.0.0) jbuilder_cache_multi (0.1.0) @@ -272,6 +274,10 @@ GEM openlab_ruby (0.0.7) httparty (~> 0.20) orm_adapter (0.5.0) + overcommit (0.59.1) + childprocess (>= 0.6.3, < 5) + iniparse (~> 1.4) + rexml (~> 3.2) parallel (1.19.1) parser (3.1.2.0) ast (~> 2.4.1) @@ -532,6 +538,7 @@ DEPENDENCIES omniauth-rails_csrf_protection (~> 0.1) omniauth_openid_connect openlab_ruby + overcommit pdf-reader pg pg_search