Merge pull request #5932 from betagouv/sprockets-4

Mise à jour vers le processeur d'assets Sprockets v4 (#5932)
This commit is contained in:
Pierre de La Morinerie 2021-02-24 17:56:48 +01:00 committed by GitHub
commit 28722b002b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 63 deletions

View file

@ -74,7 +74,6 @@ gem 'sib-api-v3-sdk'
gem 'skylight' gem 'skylight'
gem 'smart_listing' gem 'smart_listing'
gem 'spreadsheet_architect' gem 'spreadsheet_architect'
gem 'sprockets', '< 4'
gem 'typhoeus' gem 'typhoeus'
gem 'warden' gem 'warden'
gem 'webpacker' gem 'webpacker'
@ -112,7 +111,6 @@ group :development do
gem 'rubocop-rspec-focused', require: false gem 'rubocop-rspec-focused', require: false
gem 'scss_lint', require: false gem 'scss_lint', require: false
gem 'web-console' gem 'web-console'
gem 'xray-rails'
end end
group :development, :test do group :development, :test do

View file

@ -730,7 +730,7 @@ GEM
spring (2.1.1) spring (2.1.1)
spring-commands-rspec (1.0.4) spring-commands-rspec (1.0.4)
spring (>= 0.9.1) spring (>= 0.9.1)
sprockets (3.7.2) sprockets (4.0.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.2.2) sprockets-rails (3.2.2)
@ -799,8 +799,6 @@ GEM
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
xray-rails (0.3.2)
rails (>= 3.1.0)
zeitwerk (2.4.2) zeitwerk (2.4.2)
zip_tricks (5.5.0) zip_tricks (5.5.0)
zipline (1.3.0) zipline (1.3.0)
@ -918,7 +916,6 @@ DEPENDENCIES
spreadsheet_architect spreadsheet_architect
spring spring
spring-commands-rspec spring-commands-rspec
sprockets (< 4)
timecop timecop
typhoeus typhoeus
vcr vcr
@ -927,7 +924,6 @@ DEPENDENCIES
webdrivers (~> 4.0) webdrivers (~> 4.0)
webmock webmock
webpacker webpacker
xray-rails
zipline zipline
zxcvbn-ruby zxcvbn-ruby

View file

@ -0,0 +1,5 @@
//= link application.css
//= link_tree ../images
//= link_tree ../fonts
//= link administrate/application.css
//= link administrate/application.js

View file

@ -5,4 +5,3 @@
// = require ./fonts // = require ./fonts
// = require leaflet // = require leaflet
// = require_tree . // = require_tree .
// = stub ./print.scss

View file

@ -1,63 +1,65 @@
@import "colors"; @import "colors";
@import "fonts"; @import "fonts";
.new-header, @media print {
.sub-header, .new-header,
footer { .sub-header,
display: none; footer {
} display: none;
.print-header {
display: block;
margin-top: 30px;
font-size: 30px;
line-height: 50px;
font-weight: bold;
}
body {
font-family: "Muli";
}
.subtitle {
margin-top: -20px;
color: $dark-grey;
}
th,
td {
vertical-align: top;
}
th {
text-align: left;
&.header-section {
padding-top: 1.2em;
font-size: 1.2em;
} }
}
.messagerie { .print-header {
.messages-list { display: block;
list-style: none; margin-top: 30px;
padding-left: 0; font-size: 30px;
max-height: none; line-height: 50px;
font-weight: bold;
}
h2 { body {
font-size: 110%; font-family: "Muli";
} }
.person-icon { .subtitle {
display: none; margin-top: -20px;
color: $dark-grey;
}
th,
td {
vertical-align: top;
}
th {
text-align: left;
&.header-section {
padding-top: 1.2em;
font-size: 1.2em;
} }
} }
}
.message { .messagerie {
margin-bottom: 40px; .messages-list {
} list-style: none;
padding-left: 0;
max-height: none;
.updated-at { h2 {
display: none; font-size: 110%;
}
.person-icon {
display: none;
}
}
}
.message {
margin-bottom: 40px;
}
.updated-at {
display: none;
}
} }

View file

@ -20,7 +20,6 @@
= preload_link_tag(asset_url("Muli-Bold.woff2")) = preload_link_tag(asset_url("Muli-Bold.woff2"))
= stylesheet_link_tag 'application', media: 'all' = stylesheet_link_tag 'application', media: 'all'
= stylesheet_link_tag 'print', media: 'print'
= Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce) = Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce)

View file

@ -10,5 +10,6 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules', '@reach
Rails.application.config.assets.paths << Rails.root.join('node_modules', '@mapbox', 'mapbox-gl-draw', 'dist') Rails.application.config.assets.paths << Rails.root.join('node_modules', '@mapbox', 'mapbox-gl-draw', 'dist')
# Precompile additional assets. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in the app/assets
Rails.application.config.assets.precompile += ['print.css'] # folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )

View file

@ -3,5 +3,5 @@ Sentry.init do |config|
config.send_default_pii = false config.send_default_pii = false
config.enabled_environments = ['production'] config.enabled_environments = ['production']
config.breadcrumbs_logger = [:active_support_logger] config.breadcrumbs_logger = [:active_support_logger]
config.traces_sample_rate = 0.001 config.traces_sample_rate = ENV['SENTRY_ENABLED'] == 'enabled' ? 0.001 : nil
end end