commit
52226804d0
6 changed files with 3 additions and 8 deletions
1
Gemfile
1
Gemfile
|
@ -26,7 +26,6 @@ gem 'delayed_job_web'
|
||||||
gem 'devise' # Gestion des comptes utilisateurs
|
gem 'devise' # Gestion des comptes utilisateurs
|
||||||
gem 'devise-async'
|
gem 'devise-async'
|
||||||
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 'flipflop'
|
|
||||||
gem 'flipper'
|
gem 'flipper'
|
||||||
gem 'flipper-active_record'
|
gem 'flipper-active_record'
|
||||||
gem 'flipper-ui'
|
gem 'flipper-ui'
|
||||||
|
|
|
@ -220,8 +220,6 @@ GEM
|
||||||
faraday (0.15.4)
|
faraday (0.15.4)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ffi (1.9.25)
|
ffi (1.9.25)
|
||||||
flipflop (2.4.0)
|
|
||||||
activesupport (>= 4.0)
|
|
||||||
flipper (0.16.2)
|
flipper (0.16.2)
|
||||||
flipper-active_record (0.16.2)
|
flipper-active_record (0.16.2)
|
||||||
activerecord (>= 3.2, < 6)
|
activerecord (>= 3.2, < 6)
|
||||||
|
@ -733,7 +731,6 @@ DEPENDENCIES
|
||||||
devise-async
|
devise-async
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
factory_bot
|
factory_bot
|
||||||
flipflop
|
|
||||||
flipper
|
flipper
|
||||||
flipper-active_record
|
flipper-active_record
|
||||||
flipper-ui
|
flipper-ui
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
class Administrateur < ApplicationRecord
|
class Administrateur < ApplicationRecord
|
||||||
|
self.ignored_columns = ['features']
|
||||||
|
|
||||||
include EmailSanitizableConcern
|
include EmailSanitizableConcern
|
||||||
include ActiveRecord::SecureToken
|
include ActiveRecord::SecureToken
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Instructeur < ApplicationRecord
|
class Instructeur < ApplicationRecord
|
||||||
|
self.ignored_columns = ['features']
|
||||||
include EmailSanitizableConcern
|
include EmailSanitizableConcern
|
||||||
|
|
||||||
has_and_belongs_to_many :administrateurs
|
has_and_belongs_to_many :administrateurs
|
||||||
|
|
|
@ -31,7 +31,6 @@ class AdministrateurUsageStatisticsService
|
||||||
ds_created_at: administrateur.created_at,
|
ds_created_at: administrateur.created_at,
|
||||||
ds_active: administrateur.active,
|
ds_active: administrateur.active,
|
||||||
ds_id: administrateur.id,
|
ds_id: administrateur.id,
|
||||||
ds_features: administrateur.features.to_json,
|
|
||||||
nb_services: nb_services_by_administrateur_id[administrateur.id],
|
nb_services: nb_services_by_administrateur_id[administrateur.id],
|
||||||
nb_instructeurs: nb_instructeurs_by_administrateur_id[administrateur.id],
|
nb_instructeurs: nb_instructeurs_by_administrateur_id[administrateur.id],
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ describe AdministrateurUsageStatisticsService do
|
||||||
ds_created_at: Time.zone.now,
|
ds_created_at: Time.zone.now,
|
||||||
ds_active: false,
|
ds_active: false,
|
||||||
ds_id: administrateur.id,
|
ds_id: administrateur.id,
|
||||||
ds_features: "{}",
|
|
||||||
nb_services: 0,
|
nb_services: 0,
|
||||||
nb_instructeurs: 0,
|
nb_instructeurs: 0,
|
||||||
ds_nb_demarches_actives: 0,
|
ds_nb_demarches_actives: 0,
|
||||||
|
@ -43,7 +42,6 @@ describe AdministrateurUsageStatisticsService do
|
||||||
current_sign_in_at: Time.zone.local(2019, 3, 7),
|
current_sign_in_at: Time.zone.local(2019, 3, 7),
|
||||||
last_sign_in_at: Time.zone.local(2019, 2, 27),
|
last_sign_in_at: Time.zone.local(2019, 2, 27),
|
||||||
active: true,
|
active: true,
|
||||||
features: { holy_hand_grenade_of_antioch: true },
|
|
||||||
services: [create(:service)],
|
services: [create(:service)],
|
||||||
instructeurs: [create(:instructeur)])
|
instructeurs: [create(:instructeur)])
|
||||||
end
|
end
|
||||||
|
@ -56,7 +54,6 @@ describe AdministrateurUsageStatisticsService do
|
||||||
ds_created_at: Time.zone.now,
|
ds_created_at: Time.zone.now,
|
||||||
ds_active: true,
|
ds_active: true,
|
||||||
ds_id: administrateur.id,
|
ds_id: administrateur.id,
|
||||||
ds_features: { holy_hand_grenade_of_antioch: true }.to_json,
|
|
||||||
nb_services: 1,
|
nb_services: 1,
|
||||||
nb_instructeurs: 1
|
nb_instructeurs: 1
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue