aboutsummaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/branding.rake2
-rw-r--r--lib/tasks/emojis.rake2
-rw-r--r--lib/tasks/mastodon.rake2
-rw-r--r--lib/tasks/repo.rake2
-rw-r--r--lib/tasks/statistics.rake2
5 files changed, 7 insertions, 3 deletions
diff --git a/lib/tasks/branding.rake b/lib/tasks/branding.rake
index 2eec7c9e1..142a6c7dd 100644
--- a/lib/tasks/branding.rake
+++ b/lib/tasks/branding.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
namespace :branding do
desc 'Generate necessary graphic assets for branding from source SVG files'
task generate: :environment do
diff --git a/lib/tasks/emojis.rake b/lib/tasks/emojis.rake
index d9db79940..c30fac8e1 100644
--- a/lib/tasks/emojis.rake
+++ b/lib/tasks/emojis.rake
@@ -69,7 +69,7 @@ namespace :emojis do
end
end
- existence_maps = grouped_codes.map { |c| c.index_with { |cc| File.exist?(Rails.root.join('public', 'emoji', codepoints_to_filename(cc) + '.svg')) } }
+ existence_maps = grouped_codes.map { |c| c.index_with { |cc| File.exist?(Rails.root.join('public', 'emoji', "#{codepoints_to_filename(cc)}.svg")) } }
map = {}
existence_maps.each do |group|
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index d652468b3..b5553dab6 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -399,11 +399,13 @@ namespace :mastodon do
prompt.say 'Running `RAILS_ENV=production rails assets:precompile` ...'
prompt.say "\n\n"
+ # rubocop:disable Metrics/BlockNesting
if !system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production' }), 'rails assets:precompile')
prompt.error 'That failed! Maybe you need swap space?'
else
prompt.say 'Done!'
end
+ # rubocop:enable Metrics/BlockNesting
end
end
diff --git a/lib/tasks/repo.rake b/lib/tasks/repo.rake
index 795b54c59..c8aafc1de 100644
--- a/lib/tasks/repo.rake
+++ b/lib/tasks/repo.rake
@@ -50,7 +50,7 @@ namespace :repo do
file.each_line do |line|
if line.start_with?('-')
new_line = line.gsub(/#([[:digit:]]+)*/) do |pull_request_reference|
- pull_request_number = pull_request_reference[1..-1]
+ pull_request_number = pull_request_reference[1..]
response = nil
loop do
diff --git a/lib/tasks/statistics.rake b/lib/tasks/statistics.rake
index 82f2b5416..a788b1c16 100644
--- a/lib/tasks/statistics.rake
+++ b/lib/tasks/statistics.rake
@@ -7,7 +7,7 @@ namespace :mastodon do
task :stats do
require 'rails/code_statistics'
[
- %w(App\ Libraries app/lib),
+ ['App Libraries', 'app/lib'],
%w(Presenters app/presenters),
%w(Services app/services),
%w(Validators app/validators),