Dématérialiser et simplifier les démarches administratives
Find a file
gregoirenovel ccbf27a16a Update rubocop part in the README
We now need to run it with the -R flag so that
Rails cops are run
2017-07-20 18:28:21 +02:00
.circleci Add brakeman to the CI config 2017-07-20 18:28:20 +02:00
app Fix SQL injections 2017-07-20 18:22:14 +02:00
bin [Ref #288] Remove /bin from .gitignore, add binstubs 2017-05-12 17:40:22 +02:00
config [Fix #76] The develop branch is now dev 2017-07-05 14:41:00 +02:00
db Follow: follow must be uniq 2017-07-18 15:12:10 +02:00
doc [Ref #145] Don't use Procedure.archived anymore 2017-07-11 15:03:35 +02:00
lib Rake: add tasks to clean followed_dossiers 2017-07-18 15:00:00 +02:00
log First Commit 2015-08-10 11:05:06 +02:00
public Fix features tests 2016-11-15 11:01:58 +01:00
spec Fix SQL injections 2017-07-20 18:22:14 +02:00
vendor/assets [Fix #50, fix #239] Install chartkick the right way 2017-05-10 09:28:13 +02:00
.editorconfig Add a .editorconfig file 2017-04-04 17:32:36 +02:00
.gitignore [Ref #288] Remove /bin from .gitignore, add binstubs 2017-05-12 17:40:22 +02:00
.haml-lint.yml Detect implicit divs with haml-lint 2017-04-26 17:01:45 +02:00
.rspec First Commit 2015-08-10 11:05:06 +02:00
.rubocop.yml [Fix #592] Rubocop: add rule to forbid html_safe 2017-07-13 10:14:16 +02:00
.ruby-version Migrate to ruby 2.3.1 2016-11-07 11:23:21 +01:00
.scss-lint.yml Isolate new design stylesheets 2017-05-17 18:06:53 +02:00
config.ru Bootstrap Action Cable and Unicorn 2016-12-22 21:49:31 +01:00
Gemfile Add brakeman to the gemfile 2017-07-20 18:28:20 +02:00
Gemfile.lock Add brakeman to the gemfile 2017-07-20 18:28:20 +02:00
Guardfile Enable the Layout/EmptyLines cop 2017-06-13 10:35:20 +02:00
LICENSE.agpl-3.0.txt Add license 2017-04-03 11:05:37 +02:00
Rakefile Enable the Layout/EmptyLines cop 2017-06-13 10:35:20 +02:00
README.md Update rubocop part in the README 2017-07-20 18:28:21 +02:00

TPS - Téléprocédures Simplifiées

Context

Téléprocédures Simplifiées, ou TPS pour les intimes, est une plateforme 100 % web et 0 % email, conçue afin de répondre au besoin urgent de l'État d'appliquer la directive sur le 100 % démat' à l'horizon 2018 pour les procédures administratives.

Dépendances

Tous environnements

  • postgresql
  • redis

Développement

  • Mailcatcher : gem install mailcatcher

Tests

  • PhantomJS

Initialisation de l'environnement de développement

Afin d'initialiser l'environnement de développement, éxécutez la commande suivante :

bundle install

Création de la base de données

Les informations nécessaire à l'initialisation de la base doivent être pré-configurées à la main grâce à la procédure suivante :

su - postgres
psql
> create user tps_development with password 'tps_development' superuser;
> create user tps_test with password 'tps_test' superuser;
> \q

Afin de générer la BDD de l'application, il est nécessaire d'éxécuter les commandes suivantes :

rake db:create db:schema:load db:migrate
rake db:create db:schema:load db:migrate RAILS_ENV=test

Lancement de l'application

redis-server
sidekiq
mailcatcher -f
rails s

Exécution des tests (RSpec)

Pour exécuter les tests de l'application, plusieurs possibilités :

  • Lancer tous les tests

      rake spec
      rspec
    
  • Lancer un test en particulier

      rake spec SPEC=file_path/file_name_spec.rb:line_number
      rspec file_path/file_name_spec.rb:line_number
    
  • Lancer tous les tests d'un fichier

      rake spec SPEC=file_path/file_name_spec.rb
      rspec file_path/file_name_spec.rb
    

Linting

  • Faire tourner RuboCop : bundle exec rubocop -R
  • Faire tourner Brakeman : bundle exec brakeman -z
  • Linter les fichiers HAML : bundle exec haml-lint app/views/
  • Linter les fichiers SCSS : bundle exec scss-lint app/assets/stylesheets/

Régénérer les binstubs

bundle binstub railties --force
rake rails:update:bin