commit
4171b28eca
21 changed files with 213 additions and 193 deletions
103
.github/workflows/ci.yml
vendored
Normal file
103
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
name: Continuous Integration
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: 'main'
|
||||||
|
pull_request:
|
||||||
|
branches: 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linters:
|
||||||
|
name: Linters
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- name: Find yarn cache location
|
||||||
|
id: yarn-cache
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- name: JS package cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
yarn install --pure-lockfile
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
run: |
|
||||||
|
bundle exec rake lint
|
||||||
|
|
||||||
|
tests:
|
||||||
|
name: Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: tps_test
|
||||||
|
POSTGRES_DB: tps_test
|
||||||
|
POSTGRES_PASSWORD: tps_test
|
||||||
|
ports: ["5432:5432"]
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
pattern:
|
||||||
|
- spec/controllers/*_spec.rb
|
||||||
|
- spec/controllers/[a-l]**/*_spec.rb
|
||||||
|
- spec/controllers/[m-z]**/*_spec.rb
|
||||||
|
- spec/features
|
||||||
|
- spec/helpers spec/lib spec/middlewares
|
||||||
|
- spec/mailers spec/jobs spec/policies
|
||||||
|
- spec/models
|
||||||
|
- spec/serializers spec/services
|
||||||
|
- spec/views
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- name: Find yarn cache location
|
||||||
|
id: yarn-cache
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- name: JS package cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
yarn install --pure-lockfile
|
||||||
|
|
||||||
|
- name: Setup test database
|
||||||
|
env:
|
||||||
|
RAILS_ENV: test
|
||||||
|
DATABASE_URL: "postgres://tps_test@localhost:5432/tps_test"
|
||||||
|
run: |
|
||||||
|
bundle exec rake db:create db:schema:load db:migrate
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: bundle exec rspec ${{ matrix.pattern }}
|
|
@ -12,6 +12,7 @@ AllCops:
|
||||||
- "db/migrate/20190730153555_recreate_structure.rb"
|
- "db/migrate/20190730153555_recreate_structure.rb"
|
||||||
- "bin/*"
|
- "bin/*"
|
||||||
- "node_modules/**/*"
|
- "node_modules/**/*"
|
||||||
|
- "vendor/**/*"
|
||||||
|
|
||||||
DS/Unscoped:
|
DS/Unscoped:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -19,7 +20,7 @@ DS/Unscoped:
|
||||||
DS/ApplicationName:
|
DS/ApplicationName:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Exclude:
|
Exclude:
|
||||||
- './config/application_name.rb'
|
- './config/initializers/01_application_name.rb'
|
||||||
- './lib/cops/application_name.rb'
|
- './lib/cops/application_name.rb'
|
||||||
- './lib/linters/application_name_linter.rb'
|
- './lib/linters/application_name_linter.rb'
|
||||||
- "./spec/**/*"
|
- "./spec/**/*"
|
||||||
|
|
10
Gemfile
10
Gemfile
|
@ -21,10 +21,9 @@ gem 'delayed_job_web'
|
||||||
gem 'devise' # Gestion des comptes utilisateurs
|
gem 'devise' # Gestion des comptes utilisateurs
|
||||||
gem 'devise-async'
|
gem 'devise-async'
|
||||||
gem 'devise-i18n'
|
gem 'devise-i18n'
|
||||||
gem 'devise-two-factor', github: 'bryanfagan/devise-two-factor'
|
gem 'devise-two-factor', github: 'jason-hobbs/devise-two-factor', branch: 'master' # Rails 6.1 compatibility: https://github.com/tinfoil/devise-two-factor/issues/183
|
||||||
gem 'discard'
|
gem 'discard'
|
||||||
gem 'dotenv-rails', require: 'dotenv/rails-now' # dotenv should always be loaded before rails
|
gem 'dotenv-rails', require: 'dotenv/rails-now' # dotenv should always be loaded before rails
|
||||||
gem 'ffi-geos', require: false
|
|
||||||
gem 'flipper'
|
gem 'flipper'
|
||||||
gem 'flipper-active_record'
|
gem 'flipper-active_record'
|
||||||
gem 'flipper-ui'
|
gem 'flipper-ui'
|
||||||
|
@ -46,6 +45,7 @@ gem 'image_processing'
|
||||||
gem 'json_schemer'
|
gem 'json_schemer'
|
||||||
gem 'jwt'
|
gem 'jwt'
|
||||||
gem 'kaminari', '1.2.1' # Pagination
|
gem 'kaminari', '1.2.1' # Pagination
|
||||||
|
gem 'listen' # Required by ActiveSupport::EventedFileUpdateChecker
|
||||||
gem 'lograge'
|
gem 'lograge'
|
||||||
gem 'logstash-event'
|
gem 'logstash-event'
|
||||||
gem 'mailjet'
|
gem 'mailjet'
|
||||||
|
@ -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'
|
||||||
|
@ -88,9 +87,6 @@ group :test do
|
||||||
gem 'capybara-selenium'
|
gem 'capybara-selenium'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'factory_bot'
|
gem 'factory_bot'
|
||||||
gem 'guard'
|
|
||||||
gem 'guard-livereload', require: false
|
|
||||||
gem 'guard-rspec', require: false
|
|
||||||
gem 'launchy'
|
gem 'launchy'
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
gem 'shoulda-matchers', require: false
|
gem 'shoulda-matchers', require: false
|
||||||
|
@ -112,7 +108,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
|
||||||
|
@ -122,7 +117,6 @@ group :development, :test do
|
||||||
gem 'pry-byebug' # Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
gem 'pry-byebug' # Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
gem 'rspec_junit_formatter', require: false
|
gem 'rspec_junit_formatter', require: false
|
||||||
gem 'rspec-rails'
|
gem 'rspec-rails'
|
||||||
gem 'ruby-debug-ide', require: false
|
|
||||||
gem 'simple_xlsx_reader'
|
gem 'simple_xlsx_reader'
|
||||||
gem 'spring' # Spring speeds up development by keeping your application running in the background
|
gem 'spring' # Spring speeds up development by keeping your application running in the background
|
||||||
gem 'spring-commands-rspec'
|
gem 'spring-commands-rspec'
|
||||||
|
|
68
Gemfile.lock
68
Gemfile.lock
|
@ -1,13 +1,14 @@
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/bryanfagan/devise-two-factor.git
|
remote: https://github.com/jason-hobbs/devise-two-factor.git
|
||||||
revision: 60038a699b1847266f6ce0a3457fdc2cd24715be
|
revision: e153f16ab86de01df034672dfffa321acd891c45
|
||||||
|
branch: master
|
||||||
specs:
|
specs:
|
||||||
devise-two-factor (3.1.1)
|
devise-two-factor (3.1.0)
|
||||||
activesupport (< 6.1)
|
activesupport (< 7.0)
|
||||||
attr_encrypted (>= 1.3, < 4, != 2)
|
attr_encrypted (>= 1.3, < 4, != 2)
|
||||||
devise (~> 4.0)
|
devise
|
||||||
railties (< 6.1)
|
railties (< 7.0)
|
||||||
rotp (~> 4.0)
|
rotp (~> 6)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/mina-deploy/mina.git
|
remote: https://github.com/mina-deploy/mina.git
|
||||||
|
@ -232,9 +233,6 @@ GEM
|
||||||
dumb_delegator (0.8.1)
|
dumb_delegator (0.8.1)
|
||||||
ecma-re-validator (0.3.0)
|
ecma-re-validator (0.3.0)
|
||||||
regexp_parser (~> 2.0)
|
regexp_parser (~> 2.0)
|
||||||
em-websocket (0.5.2)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
http_parser.rb (~> 0.6.0)
|
|
||||||
encryptor (3.0.0)
|
encryptor (3.0.0)
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
|
@ -243,7 +241,6 @@ GEM
|
||||||
tzinfo
|
tzinfo
|
||||||
ethon (0.12.0)
|
ethon (0.12.0)
|
||||||
ffi (>= 1.3.0)
|
ffi (>= 1.3.0)
|
||||||
eventmachine (1.2.7)
|
|
||||||
excon (0.79.0)
|
excon (0.79.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
factory_bot (6.1.0)
|
factory_bot (6.1.0)
|
||||||
|
@ -254,8 +251,6 @@ GEM
|
||||||
ruby2_keywords
|
ruby2_keywords
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.1)
|
||||||
ffi (1.14.2)
|
ffi (1.14.2)
|
||||||
ffi-geos (2.1.0)
|
|
||||||
ffi (>= 1.0.0)
|
|
||||||
flipper (0.20.3)
|
flipper (0.20.3)
|
||||||
flipper-active_record (0.20.3)
|
flipper-active_record (0.20.3)
|
||||||
activerecord (>= 5.0, < 7)
|
activerecord (>= 5.0, < 7)
|
||||||
|
@ -307,25 +302,6 @@ GEM
|
||||||
rails (>= 5.1.0)
|
rails (>= 5.1.0)
|
||||||
groupdate (5.2.2)
|
groupdate (5.2.2)
|
||||||
activesupport (>= 5)
|
activesupport (>= 5)
|
||||||
guard (2.16.2)
|
|
||||||
formatador (>= 0.2.4)
|
|
||||||
listen (>= 2.7, < 4.0)
|
|
||||||
lumberjack (>= 1.0.12, < 2.0)
|
|
||||||
nenv (~> 0.1)
|
|
||||||
notiffany (~> 0.0)
|
|
||||||
pry (>= 0.9.12)
|
|
||||||
shellany (~> 0.0)
|
|
||||||
thor (>= 0.18.1)
|
|
||||||
guard-compat (1.2.1)
|
|
||||||
guard-livereload (2.5.2)
|
|
||||||
em-websocket (~> 0.5)
|
|
||||||
guard (~> 2.8)
|
|
||||||
guard-compat (~> 1.0)
|
|
||||||
multi_json (~> 1.8)
|
|
||||||
guard-rspec (4.7.3)
|
|
||||||
guard (~> 2.1)
|
|
||||||
guard-compat (~> 1.1)
|
|
||||||
rspec (>= 2.99.0, < 4.0)
|
|
||||||
haml (5.2.1)
|
haml (5.2.1)
|
||||||
temple (>= 0.8.0)
|
temple (>= 0.8.0)
|
||||||
tilt
|
tilt
|
||||||
|
@ -357,7 +333,6 @@ GEM
|
||||||
http-cookie (1.0.3)
|
http-cookie (1.0.3)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
http_accept_language (2.1.1)
|
http_accept_language (2.1.1)
|
||||||
http_parser.rb (0.6.0)
|
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
i18n (1.8.9)
|
i18n (1.8.9)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
@ -425,7 +400,6 @@ GEM
|
||||||
loofah (2.9.0)
|
loofah (2.9.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
lumberjack (1.2.8)
|
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
mailjet (1.6.0)
|
mailjet (1.6.0)
|
||||||
|
@ -449,15 +423,11 @@ GEM
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
mustermann (1.1.1)
|
mustermann (1.1.1)
|
||||||
ruby2_keywords (~> 0.0.1)
|
ruby2_keywords (~> 0.0.1)
|
||||||
nenv (0.3.0)
|
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nio4r (2.5.5)
|
nio4r (2.5.5)
|
||||||
nokogiri (1.11.1)
|
nokogiri (1.11.1)
|
||||||
mini_portile2 (~> 2.5.0)
|
mini_portile2 (~> 2.5.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
notiffany (0.1.3)
|
|
||||||
nenv (~> 0.1)
|
|
||||||
shellany (~> 0.0)
|
|
||||||
open4 (1.3.4)
|
open4 (1.3.4)
|
||||||
openid_connect (1.2.0)
|
openid_connect (1.2.0)
|
||||||
activemodel
|
activemodel
|
||||||
|
@ -595,17 +565,12 @@ GEM
|
||||||
builder (>= 3.0)
|
builder (>= 3.0)
|
||||||
dry-inflector (~> 0.1)
|
dry-inflector (~> 0.1)
|
||||||
rubyzip (>= 1.0)
|
rubyzip (>= 1.0)
|
||||||
rotp (4.1.0)
|
rotp (6.2.0)
|
||||||
addressable (~> 2.5)
|
|
||||||
rouge (3.26.0)
|
rouge (3.26.0)
|
||||||
rqrcode (1.2.0)
|
rqrcode (1.2.0)
|
||||||
chunky_png (~> 1.0)
|
chunky_png (~> 1.0)
|
||||||
rqrcode_core (~> 0.2)
|
rqrcode_core (~> 0.2)
|
||||||
rqrcode_core (0.2.0)
|
rqrcode_core (0.2.0)
|
||||||
rspec (3.10.0)
|
|
||||||
rspec-core (~> 3.10.0)
|
|
||||||
rspec-expectations (~> 3.10.0)
|
|
||||||
rspec-mocks (~> 3.10.0)
|
|
||||||
rspec-core (3.10.1)
|
rspec-core (3.10.1)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-expectations (3.10.1)
|
rspec-expectations (3.10.1)
|
||||||
|
@ -654,8 +619,6 @@ GEM
|
||||||
rubocop-rails (~> 2.0)
|
rubocop-rails (~> 2.0)
|
||||||
rubocop-rspec-focused (1.0.0)
|
rubocop-rspec-focused (1.0.0)
|
||||||
rubocop (>= 0.51)
|
rubocop (>= 0.51)
|
||||||
ruby-debug-ide (0.7.2)
|
|
||||||
rake (>= 0.8.1)
|
|
||||||
ruby-graphviz (1.2.5)
|
ruby-graphviz (1.2.5)
|
||||||
rexml
|
rexml
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
|
@ -700,7 +663,6 @@ GEM
|
||||||
concurrent-ruby
|
concurrent-ruby
|
||||||
faraday
|
faraday
|
||||||
sexp_processor (4.15.2)
|
sexp_processor (4.15.2)
|
||||||
shellany (0.0.1)
|
|
||||||
shoulda-matchers (4.5.1)
|
shoulda-matchers (4.5.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
sib-api-v3-sdk (7.4.0)
|
sib-api-v3-sdk (7.4.0)
|
||||||
|
@ -730,7 +692,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 +761,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)
|
||||||
|
@ -845,7 +805,6 @@ DEPENDENCIES
|
||||||
discard
|
discard
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
factory_bot
|
factory_bot
|
||||||
ffi-geos
|
|
||||||
flipper
|
flipper
|
||||||
flipper-active_record
|
flipper-active_record
|
||||||
flipper-ui
|
flipper-ui
|
||||||
|
@ -859,9 +818,6 @@ DEPENDENCIES
|
||||||
graphql-schema_comparator
|
graphql-schema_comparator
|
||||||
graphql_playground-rails
|
graphql_playground-rails
|
||||||
groupdate
|
groupdate
|
||||||
guard
|
|
||||||
guard-livereload
|
|
||||||
guard-rspec
|
|
||||||
haml-lint
|
haml-lint
|
||||||
haml-rails
|
haml-rails
|
||||||
hashie
|
hashie
|
||||||
|
@ -874,6 +830,7 @@ DEPENDENCIES
|
||||||
kaminari (= 1.2.1)
|
kaminari (= 1.2.1)
|
||||||
launchy
|
launchy
|
||||||
letter_opener_web
|
letter_opener_web
|
||||||
|
listen
|
||||||
lograge
|
lograge
|
||||||
logstash-event
|
logstash-event
|
||||||
mailjet
|
mailjet
|
||||||
|
@ -902,7 +859,6 @@ DEPENDENCIES
|
||||||
rubocop
|
rubocop
|
||||||
rubocop-rails_config
|
rubocop-rails_config
|
||||||
rubocop-rspec-focused
|
rubocop-rspec-focused
|
||||||
ruby-debug-ide
|
|
||||||
ruby-saml-idp
|
ruby-saml-idp
|
||||||
sanitize-url
|
sanitize-url
|
||||||
sassc-rails
|
sassc-rails
|
||||||
|
@ -918,7 +874,6 @@ DEPENDENCIES
|
||||||
spreadsheet_architect
|
spreadsheet_architect
|
||||||
spring
|
spring
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
sprockets (< 4)
|
|
||||||
timecop
|
timecop
|
||||||
typhoeus
|
typhoeus
|
||||||
vcr
|
vcr
|
||||||
|
@ -927,7 +882,6 @@ DEPENDENCIES
|
||||||
webdrivers (~> 4.0)
|
webdrivers (~> 4.0)
|
||||||
webmock
|
webmock
|
||||||
webpacker
|
webpacker
|
||||||
xray-rails
|
|
||||||
zipline
|
zipline
|
||||||
zxcvbn-ruby
|
zxcvbn-ruby
|
||||||
|
|
||||||
|
|
5
app/assets/config/manifest.js
Normal file
5
app/assets/config/manifest.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
//= link application.css
|
||||||
|
//= link_tree ../images
|
||||||
|
//= link_tree ../fonts
|
||||||
|
//= link administrate/application.css
|
||||||
|
//= link administrate/application.js
|
|
@ -5,4 +5,3 @@
|
||||||
// = require ./fonts
|
// = require ./fonts
|
||||||
// = require leaflet
|
// = require leaflet
|
||||||
// = require_tree .
|
// = require_tree .
|
||||||
// = stub ./print.scss
|
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
# Note: this class is instanciated when being added as an interceptor
|
||||||
|
# during the app initialization.
|
||||||
|
#
|
||||||
|
# If you edit this file in development env, you will need to restart
|
||||||
|
# the app to see the changes.
|
||||||
|
|
||||||
class DynamicSmtpSettingsInterceptor
|
class DynamicSmtpSettingsInterceptor
|
||||||
def self.delivering_email(message)
|
def self.delivering_email(message)
|
||||||
if ENV['SENDINBLUE_BALANCING'] == 'enabled'
|
if ENV['SENDINBLUE_BALANCING'] == 'enabled'
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<%= email.subject %>
|
<%= email.subject %>
|
||||||
</td>
|
</td>
|
||||||
<td class="cell-data cell-data--string" style="text-align: center;">
|
<td class="cell-data cell-data--string" style="text-align: center;">
|
||||||
<%= l(email.date, format: '%d/%m/%y à %H:%M') %>
|
<%= l(email.date.is_a?(String) ? Time.zone.parse(email.date) : email.date, format: '%d/%m/%y à %H:%M') %>
|
||||||
</td>
|
</td>
|
||||||
<td class="cell-data cell-data--string" style="text-align: center;">
|
<td class="cell-data cell-data--string" style="text-align: center;">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -7,7 +7,6 @@ require 'rails/all'
|
||||||
Bundler.require(*Rails.groups)
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
Dotenv::Railtie.load
|
Dotenv::Railtie.load
|
||||||
require_relative 'application_name'
|
|
||||||
|
|
||||||
module TPS
|
module TPS
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# This file is named '01-application-name.rb' to load it before the other
|
||||||
|
# initializers, and thus make the APPLICATION_ constants available in
|
||||||
|
# the other initializers.
|
||||||
APPLICATION_NAME = ENV.fetch("APPLICATION_NAME", "demarches-simplifiees.fr")
|
APPLICATION_NAME = ENV.fetch("APPLICATION_NAME", "demarches-simplifiees.fr")
|
||||||
APPLICATION_SHORTNAME = ENV.fetch("APPLICATION_SHORTNAME", "d-s.fr")
|
APPLICATION_SHORTNAME = ENV.fetch("APPLICATION_SHORTNAME", "d-s.fr")
|
||||||
APPLICATION_BASE_URL = ENV.fetch("APPLICATION_BASE_URL", "https://www.demarches-simplifiees.fr")
|
APPLICATION_BASE_URL = ENV.fetch("APPLICATION_BASE_URL", "https://www.demarches-simplifiees.fr")
|
|
@ -11,20 +11,24 @@
|
||||||
# - but let's keep these for a while to make external integrators's life easier.
|
# - but let's keep these for a while to make external integrators's life easier.
|
||||||
# To keep some margin, let's say this file can be safely deleted in May 2021.)
|
# To keep some margin, let's say this file can be safely deleted in May 2021.)
|
||||||
|
|
||||||
require 'excon'
|
Rails.application.reloader.to_prepare do
|
||||||
|
if !defined?(ApiEntreprise)
|
||||||
|
require 'excon'
|
||||||
|
|
||||||
module ApiEntreprise
|
module ApiEntreprise
|
||||||
Job = APIEntreprise::Job
|
Job = APIEntreprise::Job
|
||||||
AssociationJob = APIEntreprise::AssociationJob
|
AssociationJob = APIEntreprise::AssociationJob
|
||||||
AttestationFiscaleJob = APIEntreprise::AttestationFiscaleJob
|
AttestationFiscaleJob = APIEntreprise::AttestationFiscaleJob
|
||||||
AttestationSocialeJob = APIEntreprise::AttestationSocialeJob
|
AttestationSocialeJob = APIEntreprise::AttestationSocialeJob
|
||||||
BilansBdfJob = APIEntreprise::BilansBdfJob
|
BilansBdfJob = APIEntreprise::BilansBdfJob
|
||||||
EffectifsAnnuelsJob = APIEntreprise::EffectifsAnnuelsJob
|
EffectifsAnnuelsJob = APIEntreprise::EffectifsAnnuelsJob
|
||||||
EffectifsJob = APIEntreprise::EffectifsJob
|
EffectifsJob = APIEntreprise::EffectifsJob
|
||||||
EntrepriseJob = APIEntreprise::EntrepriseJob
|
EntrepriseJob = APIEntreprise::EntrepriseJob
|
||||||
ExercicesJob = APIEntreprise::ExercicesJob
|
ExercicesJob = APIEntreprise::ExercicesJob
|
||||||
end
|
end
|
||||||
|
|
||||||
module Cron
|
module Cron
|
||||||
FixMissingAntivirusAnalysis = FixMissingAntivirusAnalysisJob
|
FixMissingAntivirusAnalysis = FixMissingAntivirusAnalysisJob
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 )
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
ActionMailer::Base.register_interceptor "DynamicSmtpSettingsInterceptor"
|
ActiveSupport.on_load(:action_mailer) do
|
||||||
|
ActionMailer::Base.register_interceptor "DynamicSmtpSettingsInterceptor"
|
||||||
|
end
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
task :lint do
|
task :lint do
|
||||||
sh "bundle exec rubocop"
|
sh "bundle exec rubocop --parallel"
|
||||||
sh "bundle exec haml-lint app/views/"
|
sh "bundle exec haml-lint app/views/"
|
||||||
sh "bundle exec scss-lint app/assets/stylesheets/"
|
sh "bundle exec scss-lint app/assets/stylesheets/"
|
||||||
sh "bundle exec brakeman --no-pager"
|
sh "bundle exec brakeman --no-pager"
|
||||||
|
|
|
@ -772,7 +772,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not delete the dossier' do
|
it 'does not delete the dossier' do
|
||||||
expect { dossier.reload }.not_to raise_error ActiveRecord::RecordNotFound
|
expect { dossier.reload }.not_to raise_error # A deleted dossier would raise an ActiveRecord::RecordNotFound
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not add a record into deleted_dossiers table' do
|
it 'does not add a record into deleted_dossiers table' do
|
||||||
|
|
|
@ -77,51 +77,6 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
trait :invalid_multi_polygon do
|
|
||||||
geometry do
|
|
||||||
{
|
|
||||||
"type": "MultiPolygon",
|
|
||||||
"coordinates": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[5.894422531127931, 48.22810341752755],
|
|
||||||
[5.893049240112306, 48.22427237832278],
|
|
||||||
[5.892534255981446, 48.22593062452037],
|
|
||||||
[5.892791748046875, 48.2260449843468],
|
|
||||||
[5.894422531127931, 48.229933066408215],
|
|
||||||
[5.894422531127931, 48.22810341752755]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[5.8950233459472665, 48.229933066408215],
|
|
||||||
[5.893478393554688, 48.228961073585126],
|
|
||||||
[5.892791748046875, 48.228903896961775],
|
|
||||||
[5.892705917358398, 48.230390468407535],
|
|
||||||
[5.8950233459472665, 48.229933066408215]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[5.893220901489259, 48.229246955743626],
|
|
||||||
[5.893392562866212, 48.22884672027457],
|
|
||||||
[5.892705917358398, 48.22878954352343],
|
|
||||||
[5.892019271850587, 48.22856083588024],
|
|
||||||
[5.892019271850587, 48.2277031731152],
|
|
||||||
[5.890989303588868, 48.22787470681807],
|
|
||||||
[5.889959335327149, 48.22787470681807],
|
|
||||||
[5.890560150146485, 48.22838930447709],
|
|
||||||
[5.890645980834962, 48.22878954352343],
|
|
||||||
[5.890989303588868, 48.229018250144584],
|
|
||||||
[5.892362594604493, 48.22930413198368],
|
|
||||||
[5.893220901489259, 48.229246955743626]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
trait :line_string do
|
trait :line_string do
|
||||||
geometry do
|
geometry do
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,12 +45,6 @@ RSpec.describe GeoArea, type: :model do
|
||||||
|
|
||||||
it { expect(geo_area.geometry).to eq(polygon) }
|
it { expect(geo_area.geometry).to eq(polygon) }
|
||||||
|
|
||||||
context 'invalid' do
|
|
||||||
let(:geo_area) { build(:geo_area, :invalid_multi_polygon) }
|
|
||||||
|
|
||||||
it { expect(geo_area.rgeo_geometry).to be_nil }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'polygon_with_extra_coordinate' do
|
context 'polygon_with_extra_coordinate' do
|
||||||
let(:geo_area) { build(:geo_area, :polygon_with_extra_coordinate) }
|
let(:geo_area) { build(:geo_area, :polygon_with_extra_coordinate) }
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#
|
#
|
||||||
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
||||||
|
|
||||||
require 'rspec'
|
|
||||||
require 'capybara/rspec'
|
require 'capybara/rspec'
|
||||||
require 'capybara-screenshot/rspec'
|
require 'capybara-screenshot/rspec'
|
||||||
require 'capybara/email/rspec'
|
require 'capybara/email/rspec'
|
||||||
|
|
Loading…
Reference in a new issue