diff --git a/Gemfile.lock b/Gemfile.lock index a56a5b030..7dfedf787 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -451,7 +451,7 @@ GEM rdoc (6.14.2) erb psych (>= 4.0.0) - regexp_parser (2.11.0) + regexp_parser (2.11.1) reline (0.6.2) io-console (~> 0.5) rexml (3.4.1) @@ -501,7 +501,7 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.32.0) + rubocop-rails (2.33.1) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) @@ -939,7 +939,7 @@ CHECKSUMS rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e rbtree (0.4.6) sha256=14eea4469b24fd2472542e5f3eb105d6344c8ccf36f0b56d55fdcfeb4e0f10fc rdoc (6.14.2) sha256=9fdd44df130f856ae70cc9a264dfd659b9b40de369b16581f4ab746e42439226 - regexp_parser (2.11.0) sha256=d9dd78b475d18893ce3da55ea1a913499b75f26180a3463e9233d7e419c0cd40 + regexp_parser (2.11.1) sha256=5a5665b92d22e38c54481fda01050da7c5058ddbd5037ad91b6c9fc7432739ee reline (0.6.2) sha256=1dad26a6008872d59c8e05244b119347c9f2ddaf4a53dce97856cd5f30a02846 rexml (3.4.1) sha256=c74527a9a0a04b4ec31dbe0dc4ed6004b960af943d8db42e539edde3a871abca rouge (4.6.0) sha256=10198622df0ef919796da5686a9cc116a49280805e1ed4b851c97ef677eddd7a @@ -955,7 +955,7 @@ CHECKSUMS rubocop-capybara (2.22.1) sha256=ced88caef23efea53f46e098ff352f8fc1068c649606ca75cb74650970f51c0c rubocop-factory_bot (2.27.1) sha256=9d744b5916778c1848e5fe6777cc69855bd96548853554ec239ba9961b8573fe rubocop-performance (1.25.0) sha256=6f7d03568a770054117a78d0a8e191cefeffb703b382871ca7743831b1a52ec1 - rubocop-rails (2.32.0) sha256=9fcc623c8722fe71e835e99c4a18b740b5b0d3fb69915d7f0777f00794b30490 + rubocop-rails (2.33.1) sha256=84d778063480069f6e729fe9b253769eabd1522caf88d3cf039c72d8d356eed2 rubocop-rspec (3.6.0) sha256=c0e4205871776727e54dee9cc91af5fd74578001551ba40e1fe1a1ab4b404479 rubocop-rspec_rails (2.31.0) sha256=775375e18a26a1184a812ef3054b79d218e85601b9ae897f38f8be24dddf1f45 ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 diff --git a/app/helpers/statistics_helper.rb b/app/helpers/statistics_helper.rb index 60b68e46e..efa0ab4d7 100644 --- a/app/helpers/statistics_helper.rb +++ b/app/helpers/statistics_helper.rb @@ -184,7 +184,7 @@ def ranged_rfc_data(interval = 'year', from = DateTime.new(0), to = DateTime.now name: RequestForComment.model_name.human(count: :other), data: RequestForComment.in_range(from, to) .select(RequestForComment.sanitize_sql(['date_trunc(?, created_at) AS "key", count(id) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), }, { key: 'rfcs_solved', @@ -192,7 +192,7 @@ def ranged_rfc_data(interval = 'year', from = DateTime.new(0), to = DateTime.now data: RequestForComment.in_range(from, to) .where(solved: true) .select(RequestForComment.sanitize_sql(['date_trunc(?, created_at) AS "key", count(id) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), }, { key: 'rfcs_soft_solved', @@ -200,14 +200,14 @@ def ranged_rfc_data(interval = 'year', from = DateTime.new(0), to = DateTime.now data: RequestForComment.in_range(from, to).unsolved .where(full_score_reached: true) .select(RequestForComment.sanitize_sql(['date_trunc(?, created_at) AS "key", count(id) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), }, { key: 'rfcs_unsolved', name: t('statistics.entries.request_for_comments.percent_unsolved'), data: RequestForComment.in_range(from, to).unsolved .select(RequestForComment.sanitize_sql(['date_trunc(?, created_at) AS "key", count(id) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), }, ] end @@ -219,14 +219,14 @@ def ranged_user_data(interval = 'year', from = DateTime.new(0), to = DateTime.no name: t('statistics.entries.contributors.active'), data: Submission.where(created_at: from..to) .select(Submission.sanitize_sql(['date_trunc(?, created_at) AS "key", count(distinct CONCAT(contributor_type, contributor_id)) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), }, { key: 'submissions', name: t('statistics.entries.exercises.submissions'), data: Submission.where(created_at: from..to) .select(Submission.sanitize_sql(['date_trunc(?, created_at) AS "key", count(id) AS "value"', interval])) - .group('key').order('key'), + .group(:key).order(:key), axis: 'right', }, ]