Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Minor upstream change, our README is completely different. Kept ours. - `lib/tasks/assets.rake`: glitch-soc has extra code to deal with its theming system, upstream changed a line that exists in glitch-soc. Applied upstream changes.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace :assets do
|
||||
File.write(dest, html)
|
||||
end
|
||||
|
||||
render_static_page 'errors/500', layout: 'error', dest: Rails.root.join('public', 'assets', '500.html')
|
||||
render_static_page 'errors/500', layout: 'error', dest: Rails.public_path.join('assets', '500.html')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace :branding do
|
||||
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
|
||||
end
|
||||
|
||||
convert.run(input: favicons, output: Rails.root.join('public', 'favicon.ico'))
|
||||
convert.run(input: favicons, output: Rails.public_path.join('favicon.ico'))
|
||||
|
||||
apple_icon_sizes.each do |size|
|
||||
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png"))
|
||||
@@ -69,7 +69,7 @@ namespace :branding do
|
||||
task generate_app_badge: :environment do
|
||||
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '--stylesheet :stylesheet -w :size -h :size --keep-aspect-ratio :input -o :output')
|
||||
badge_source = Rails.root.join('app', 'javascript', 'images', 'logo-symbol-icon.svg')
|
||||
output_dest = Rails.root.join('public')
|
||||
output_dest = Rails.public_path
|
||||
stylesheet = Rails.root.join('lib', 'assets', 'wordmark.light.css')
|
||||
|
||||
rsvg_convert.run(stylesheet: stylesheet, input: badge_source, size: 192, output: output_dest.join('badge.png'))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
def gen_border(codepoint, color)
|
||||
input = Rails.root.join('public', 'emoji', "#{codepoint}.svg")
|
||||
dest = Rails.root.join('public', 'emoji', "#{codepoint}_border.svg")
|
||||
input = Rails.public_path.join('emoji', "#{codepoint}.svg")
|
||||
dest = Rails.public_path.join('emoji', "#{codepoint}_border.svg")
|
||||
doc = File.open(input) { |f| Nokogiri::XML(f) }
|
||||
svg = doc.at_css('svg')
|
||||
if svg.key?('viewBox')
|
||||
@@ -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.public_path.join('emoji', "#{codepoints_to_filename(cc)}.svg")) } }
|
||||
map = {}
|
||||
|
||||
existence_maps.each do |group|
|
||||
|
||||
@@ -463,10 +463,10 @@ namespace :mastodon do
|
||||
prompt.say 'Running `RAILS_ENV=production rails db:setup` ...'
|
||||
prompt.say "\n\n"
|
||||
|
||||
if !system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production', 'SAFETY_ASSURED' => '1' }), 'rails db:setup')
|
||||
prompt.error 'That failed! Perhaps your configuration is not right'
|
||||
else
|
||||
if system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production', 'SAFETY_ASSURED' => '1' }), 'rails db:setup')
|
||||
prompt.ok 'Done!'
|
||||
else
|
||||
prompt.error 'That failed! Perhaps your configuration is not right'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -479,10 +479,10 @@ namespace :mastodon do
|
||||
prompt.say 'Running `RAILS_ENV=production rails assets:precompile` ...'
|
||||
prompt.say "\n\n"
|
||||
|
||||
if !system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production' }), 'rails assets:precompile')
|
||||
prompt.error 'That failed! Maybe you need swap space?'
|
||||
else
|
||||
if system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production' }), 'rails assets:precompile')
|
||||
prompt.say 'Done!'
|
||||
else
|
||||
prompt.error 'That failed! Maybe you need swap space?'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user