diff --git a/.env.example b/.env.example index 7e808735..af728a53 100644 --- a/.env.example +++ b/.env.example @@ -36,3 +36,6 @@ AWS_ACCESS_KEY_ID=XXXXXXXX AWS_SECRET_ACCESS_KEY=XXXXXXXX AWS_BUCKET=timeoverflow_development AWS_REGION=us-east-1 + +# WTI API key +WTI_PROJECT_API_KEY=XXXXXXXX diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e654a923..1ab86738 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,8 +36,7 @@ jobs: bundle exec rails db:setup bundle exec rspec - name: Publish code coverage - uses: paambaati/codeclimate-action@v3.2.0 - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + uses: qltysh/qlty-action/coverage@v1 with: - coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov + token: ${{ secrets.QLTY_COVERAGE_TOKEN }} + files: coverage/.resultset.json diff --git a/.gitignore b/.gitignore index 5c942096..572b3820 100644 --- a/.gitignore +++ b/.gitignore @@ -1,37 +1,24 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -# Ignore bundler config +# Ignore bundler config. /.bundle # Ignore all logfiles and tempfiles. -/log/*.log -/tmp +/log/* +!/log/.keep +/tmp/* +!/tmp/.keep -# Ignore .vagrant folder with images -.vagrant -.metadata +# Ignore uploaded files in development. +/storage/* +!/storage/.keep -# CTAGS generated files -.tags -tags +# Ignore master key for decrypting credentials and more. +/config/master.key -# Misc -*.rbc -*.sassc -**.orig -.sass-cache -capybara-*.html -/vendor/bundle +# Ignore compiled assets and node_modules +/app/assets/builds/* +!/app/assets/builds/.keep /public/assets -/storage/ -/coverage/ -/spec/tmp/* -.byebug_history +/node_modules + +# Ignore ENV files .env -.DS_Store -.idea/ -.localeapp diff --git a/Gemfile b/Gemfile index c77b86bc..09e12b44 100644 --- a/Gemfile +++ b/Gemfile @@ -38,9 +38,9 @@ group :production do end group :development do - gem 'localeapp', '~> 3.3', require: false gem 'letter_opener', '~> 1.7.0' gem 'web-console', '~> 4.2' + gem 'web_translate_it', '~> 3' end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 3dbc6808..dfba9e11 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,29 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.2.2.1) - actionpack (= 7.2.2.1) - activesupport (= 7.2.2.1) + actioncable (7.2.2.2) + actionpack (= 7.2.2.2) + activesupport (= 7.2.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailbox (7.2.2.2) + actionpack (= 7.2.2.2) + activejob (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) mail (>= 2.8.0) - actionmailer (7.2.2.1) - actionpack (= 7.2.2.1) - actionview (= 7.2.2.1) - activejob (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailer (7.2.2.2) + actionpack (= 7.2.2.2) + actionview (= 7.2.2.2) + activejob (= 7.2.2.2) + activesupport (= 7.2.2.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.2.1) - actionview (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionpack (7.2.2.2) + actionview (= 7.2.2.2) + activesupport (= 7.2.2.2) nokogiri (>= 1.8.5) racc rack (>= 2.2.4, < 3.2) @@ -32,15 +32,15 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.2.1) - actionpack (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actiontext (7.2.2.2) + actionpack (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.2.1) - activesupport (= 7.2.2.1) + actionview (7.2.2.2) + activesupport (= 7.2.2.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -60,22 +60,22 @@ GEM kaminari (>= 1.2.1) railties (>= 6.1) ransack (>= 4.0) - activejob (7.2.2.1) - activesupport (= 7.2.2.1) + activejob (7.2.2.2) + activesupport (= 7.2.2.2) globalid (>= 0.3.6) - activemodel (7.2.2.1) - activesupport (= 7.2.2.1) - activerecord (7.2.2.1) - activemodel (= 7.2.2.1) - activesupport (= 7.2.2.1) + activemodel (7.2.2.2) + activesupport (= 7.2.2.2) + activerecord (7.2.2.2) + activemodel (= 7.2.2.2) + activesupport (= 7.2.2.2) timeout (>= 0.4.0) - activestorage (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activesupport (= 7.2.2.1) + activestorage (7.2.2.2) + actionpack (= 7.2.2.2) + activejob (= 7.2.2.2) + activerecord (= 7.2.2.2) + activesupport (= 7.2.2.2) marcel (~> 1.0) - activesupport (7.2.2.1) + activesupport (7.2.2.2) base64 benchmark (>= 0.3) bigdecimal @@ -111,10 +111,10 @@ GEM aws-sigv4 (~> 1.5) aws-sigv4 (1.10.1) aws-eventstream (~> 1, >= 1.0.2) - base64 (0.2.0) + base64 (0.3.0) bcrypt (3.1.20) - benchmark (0.4.0) - bigdecimal (3.1.9) + benchmark (0.4.1) + bigdecimal (3.2.2) bindex (0.8.1) bootsnap (1.18.4) msgpack (~> 1.2) @@ -133,7 +133,7 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) concurrent-ruby (1.3.5) - connection_pool (2.5.0) + connection_pool (2.5.3) crass (1.0.6) csv (3.3.2) database_cleaner (2.1.0) @@ -153,12 +153,11 @@ GEM devise (>= 4.9.0) diff-lcs (1.5.1) docile (1.4.1) - domain_name (0.6.20240107) dotenv (3.1.7) dotenv-rails (3.1.7) dotenv (= 3.1.7) railties (>= 6.1) - drb (2.2.1) + drb (2.2.3) erubi (1.13.1) et-orbi (1.2.11) tzinfo @@ -174,15 +173,11 @@ GEM fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) - gli (2.22.0) globalid (1.2.1) activesupport (>= 6.1) has_scope (0.7.2) actionpack (>= 4.1) activesupport (>= 4.1) - http-accept (1.7.0) - http-cookie (1.0.8) - domain_name (~> 0.5) http_accept_language (2.1.1) i18n (1.14.7) concurrent-ruby (~> 1.0) @@ -227,12 +222,7 @@ GEM letter_opener (1.7.0) launchy (~> 2.2) lint_roller (1.1.0) - localeapp (3.3.0) - gli - i18n (>= 0.7, < 2) - json (>= 1.7.7) - rest-client (>= 1.8.0) - logger (1.6.6) + logger (1.7.0) loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -243,14 +233,11 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - mime-types (3.6.0) - logger - mime-types-data (~> 3.2015) - mime-types-data (3.2024.1203) mini_magick (4.13.2) mini_mime (1.1.5) minitest (5.25.5) msgpack (1.7.5) + multi_json (1.15.0) net-imap (0.5.7) date net-protocol @@ -260,12 +247,12 @@ GEM timeout net-smtp (0.5.1) net-protocol - netrc (0.11.0) nio4r (2.7.4) - nokogiri (1.18.8-arm64-darwin) + nokogiri (1.18.9-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-gnu) + nokogiri (1.18.9-x86_64-linux-gnu) racc (~> 1.4) + optimist (3.2.1) orm_adapter (0.5.0) parallel (1.26.3) parser (3.3.7.2) @@ -304,20 +291,20 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (7.2.2.1) - actioncable (= 7.2.2.1) - actionmailbox (= 7.2.2.1) - actionmailer (= 7.2.2.1) - actionpack (= 7.2.2.1) - actiontext (= 7.2.2.1) - actionview (= 7.2.2.1) - activejob (= 7.2.2.1) - activemodel (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + rails (7.2.2.2) + actioncable (= 7.2.2.2) + actionmailbox (= 7.2.2.2) + actionmailer (= 7.2.2.2) + actionpack (= 7.2.2.2) + actiontext (= 7.2.2.2) + actionview (= 7.2.2.2) + activejob (= 7.2.2.2) + activemodel (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) bundler (>= 1.15.0) - railties (= 7.2.2.1) + railties (= 7.2.2.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -332,9 +319,9 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.2.2.1) - actionpack (= 7.2.2.1) - activesupport (= 7.2.2.1) + railties (7.2.2.2) + actionpack (= 7.2.2.2) + activesupport (= 7.2.2.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -356,11 +343,6 @@ GEM responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rest-client (2.1.0) - http-accept (>= 1.7.0, < 2.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 4.0) - netrc (~> 0.8) rexml (3.4.1) rspec-core (3.13.2) rspec-support (~> 3.13.0) @@ -475,6 +457,9 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + web_translate_it (3.1.2) + multi_json + optimist (~> 3.0) webrick (1.9.1) websocket (1.2.11) websocket-driver (0.7.7) @@ -512,7 +497,6 @@ DEPENDENCIES json_translate (~> 4.0.0) kaminari (~> 1.2.1) letter_opener (~> 1.7.0) - localeapp (~> 3.3) pg (~> 1.4) pg_search (~> 2.3.5) prawn (~> 2.5.0) @@ -536,6 +520,7 @@ DEPENDENCIES simplecov (~> 0.22) terser (~> 1.2) web-console (~> 4.2) + web_translate_it (~> 3) BUNDLED WITH 2.4.10 diff --git a/README.md b/README.md index c397fbc0..a8b39b8d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # TimeOverflow [![Build Status](https://github.com/coopdevs/timeoverflow/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/coopdevs/timeoverflow/actions) -[![Maintainability](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/maintainability)](https://codeclimate.com/github/coopdevs/timeoverflow/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/test_coverage)](https://codeclimate.com/github/coopdevs/timeoverflow/test_coverage) +[![Maintainability](https://qlty.sh/gh/coopdevs/projects/timeoverflow/maintainability.svg)](https://qlty.sh/gh/coopdevs/projects/timeoverflow) +[![Code Coverage](https://qlty.sh/gh/coopdevs/projects/timeoverflow/coverage.svg)](https://qlty.sh/gh/coopdevs/projects/timeoverflow) #### www.timeoverflow.org diff --git a/app/views/statistics/global_activity.html.erb b/app/views/statistics/global_activity.html.erb index 8dc16fdc..4dc59ef6 100644 --- a/app/views/statistics/global_activity.html.erb +++ b/app/views/statistics/global_activity.html.erb @@ -6,19 +6,19 @@