adeia 0.15.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/manifest.js +2 -0
  3. data/app/assets/javascripts/adeia/application.js +1 -1
  4. data/app/assets/javascripts/adeia/flash.js +10 -4
  5. data/app/assets/javascripts/adeia/nested_form.js +27 -23
  6. data/app/assets/stylesheets/adeia/application.css +1 -0
  7. data/app/models/adeia/permission.rb +2 -2
  8. data/app/views/adeia/permissions/_form.html.erb +2 -0
  9. data/app/views/layouts/adeia/_flash.html.erb +14 -6
  10. data/app/views/layouts/adeia/application.html.erb +2 -2
  11. data/config/initializers/assets.rb +2 -0
  12. data/db/migrate/20151003144041_create_adeia_elements.rb +1 -1
  13. data/db/migrate/20151003144208_create_adeia_permissions.rb +1 -1
  14. data/db/migrate/20151003144650_create_adeia_groups.rb +1 -1
  15. data/db/migrate/20151003144706_create_adeia_group_users.rb +1 -1
  16. data/db/migrate/20151003150524_create_adeia_tokens.rb +1 -1
  17. data/db/migrate/20151003150747_create_adeia_actions.rb +1 -1
  18. data/db/migrate/20151003150806_create_adeia_action_permissions.rb +1 -1
  19. data/lib/adeia/engine.rb +1 -1
  20. data/lib/adeia/version.rb +1 -1
  21. data/spec/controllers/articles_controller_spec.rb +4 -4
  22. data/spec/factories.rb +17 -17
  23. data/spec/spec_helper.rb +4 -4
  24. data/spec/test_app/app/assets/config/manifest.js +2 -0
  25. data/spec/test_app/app/views/layouts/application.html.erb +2 -3
  26. data/spec/test_app/db/development.sqlite3 +0 -0
  27. data/spec/test_app/db/test.sqlite3 +0 -0
  28. data/spec/test_app/log/development.log +128 -0
  29. data/spec/test_app/log/test.log +17382 -0
  30. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/17/17Ji1zysIV0QzenVJg2bTQM3byl-5t58mUNbYZrkhGM.cache +1 -0
  31. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/1H/1HyneLliGLAocm4KVeWzj5tKGWdomYfz7rWloxQlXRc.cache +2 -0
  32. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/3S/3S6PZldZhpcM_6P5jkehVOMAObIqw6X4V96E8TxtXrI.cache +1 -0
  33. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
  34. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/8J/8JOedZF9m0P656fHle8DWmmJffxhiciEo-B9Ta6NyG8.cache +2 -0
  35. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Ce/CeTW2Tz6RgeG2hf7-uErLmxz3EkjsHTdkzXg3Fi1wsU.cache +1 -0
  36. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/DV/DVjeqdOW-W_v2MIcd3abmUAMLCeHYjflCX-MKtsY69Y.cache +0 -0
  37. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Dm/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +3 -0
  38. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Ga/GaHD91faGavVSEA-G3DmnhO86dj1qpa4jMaWa5wYuik.cache +1 -0
  39. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/J8/J8sYsNeTeOEtCrjQG6MIkRMhzjK0hCeHqRAcKLMRdA4.cache +1 -0
  40. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/JV/JVKPOUqwQ9tWe3wZjV4EnluyjuedrH3z_UY3bDBBQSo.cache +1 -0
  41. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/L4/L43TzgSSg3pQOxwOobTjMowj7q--ZykjMJfC_C4LBGU.cache +1 -0
  42. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +2 -0
  43. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/VH/VHuK24wg04T1MJhF_Q_sbT9h4J9TgV2EwwSKlVX3gAc.cache +0 -0
  44. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/We/WeHv9UitJfw__MSd_icLUSVbJupRX9bulR_sbJY81vw.cache +0 -0
  45. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/ac/ac72wzy3oH2SnXEDa3_TOFPp8s2EyzZZjnMoqNgGLMg.cache +1 -0
  46. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/fn/fnArLcbUsmH-hs0ivYjpbsWCveny2dWKz98ANZsvklc.cache +0 -0
  47. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/gP/gP6amosF7TvInNt0I9O8LEhVNA2kCQ7kiQO8vk4ppHE.cache +0 -0
  48. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/kF/kFINDgg2Prb3IboJtWY8HcF5gamZVJvtra5H1YvZvBA.cache +0 -0
  49. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/mm/mmJkOfX8bMOx2AlGcwUB0Df0dHe2TkypLXAlxTAFIGM.cache +1 -0
  50. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/oc/occ60QAfY0sqlYomqa81jJ_HTYPL28bmOGnVF34j_V0.cache +2 -0
  51. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/py/pyGAJrY1mgvF3JKeIGd7oSFKe34ZIyP04fOnInQI9Pc.cache +2 -0
  52. data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/xE/xE7l4Z-MH0frwjsuXagYzccFMXvxR4c9vq_w4Rr3pjw.cache +1 -0
  53. metadata +109 -46
  54. data/spec/test_app/app/assets/javascripts/application.js +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2cce7ac69f418c14a7a73b1f5a676d0c54b4308b0b3566149c95cf59f911026
4
- data.tar.gz: 710d9f6cbd00457cc8767ee9acff213b84397c284d036cd54d96622ca309770b
3
+ metadata.gz: fc3818ab4c31e2b816d9e922c0b4c31790052c4afbe853164e4cefafed00421b
4
+ data.tar.gz: 17aa1f60f15b7712591da8c01fe6a57b4a0967c5483cdae86aad10d621f92886
5
5
  SHA512:
6
- metadata.gz: 82d84ce7607effa6e79f5cb697e7f1116fbca60b69d3dbfd999a115350a0a20f0e44da957029a4ecd2e341b1f5118c24f561d1ad5a8b070935f615d7e7c26386
7
- data.tar.gz: ab7b72fe85f4d4a4a0ed28fb8e4eb504e85ba07ba36303dd289dab409cb8cebccc4b793f3c00f3bc844c8b832674ffb32fd1846ddd073317bcfe5179134696d5
6
+ metadata.gz: a6980f26f072c7925947c45c1c0aed945a344a2c198a0682f5c6d442299f6e6fc8cbf3fc28d4341a82b53a79e64f61d35443d775eed1e9750d25cf4d2d1ec199
7
+ data.tar.gz: 134eb7cd2ad22cec00948a11b3995d599b2736f77bd841624a803c4814015b9038aaa8abb3b28bbb6b2341b8d9877e2017373dbded30d5e7cfdab4f2ed907168
@@ -0,0 +1,2 @@
1
+ //= link_directory ../stylesheets/adeia .css
2
+ //= linl_directory ../javascripts/adeia .js
@@ -10,5 +10,5 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
+ //= require ./flash.js
13
14
  //= require snaptable
14
- //= require_tree .
@@ -1,5 +1,11 @@
1
- $(document).on("ready", function() {
2
- $('body').on("click", "#flash .close", function() {
3
- $('#flash').hide();
4
- });
1
+ document.addEventListener("DOMContentLoaded", (e) => {
2
+
3
+ const flash = document.querySelector("#flash")
4
+
5
+ if (flash != null) {
6
+ document.querySelector("#flash .close").addEventListener("click", () => {
7
+ flash.remove()
8
+ });
9
+ }
10
+
5
11
  });
@@ -1,26 +1,30 @@
1
- $(document).on("ready", function() {
2
-
3
- $(".add-fields").click(function(e) {
4
- e.preventDefault();
5
- var count = $(this).attr("data-count"), type = $(this).data("type"),
6
- lastFields = $("." + type + "-fields:last"), newFields = lastFields.clone();
7
- count++;
8
- newFields.find("input, select")
9
- .attr("name", function(i, val) { if(val) { return val.replace(/\d/, count) } })
10
- .attr("id", function(i, val) { if(val) { return val.replace(/\d/, count) } })
11
- .val([]);
12
- newFields.find("label").attr("for", function( i, val ) { return val.replace(/\d/, count) });
13
- newFields.insertAfter(lastFields);
14
- $(this).attr("data-count", count);
15
- newFields.show();
1
+ const addButton = document.querySelector(".add-fields")
2
+ addButton.addEventListener("click", (e) => {
3
+ e.preventDefault();
4
+ let count = Number(e.target.dataset.count) + 1;
5
+ const type = e.target.dataset.type;
6
+ const lastFields = document.querySelectorAll("." + type + "-fields");
7
+ const lastField = lastFields[lastFields.length - 1]
8
+ const newFields = lastField.cloneNode(true);
9
+ const label = newFields.querySelector("label");
10
+ label.setAttribute("for", label.getAttribute("for").replace(/\d/, count));
11
+ newFields.querySelectorAll("input, select").forEach(element => {
12
+ element.setAttribute("name", element.getAttribute("name").replace(/\d/, count));
13
+ element.setAttribute("id", element.getAttribute("id").replace(/\d/, count));
14
+ element.value = ""
16
15
  });
16
+ lastField.after(newFields);
17
+ newFields.style.display = "block";
18
+ e.target.dataset.count = Number(count) + 1;
19
+ })
17
20
 
18
- $(".fields-for").on("click", ".remove-fields", function(e) {
21
+ const fieldsFor = document.querySelector(".fields-for");
22
+ fieldsFor.addEventListener("click", (e) => {
23
+ if (e.target.classList.contains("remove-fields")) {
19
24
  e.preventDefault();
20
- var type = $(this).attr("data-type"),
21
- fields = $(this).parents("." + type + "-fields");
22
- fields.find("input[identifier=destroy]").val("1");
23
- fields.hide();
24
- });
25
-
26
- });
25
+ const type = e.target.dataset.type;
26
+ const fields = e.target.closest("." + type + "-fields");
27
+ fields.querySelector("input[identifier=destroy]").value = 1
28
+ fields.style.display = "none";
29
+ }
30
+ })
@@ -12,4 +12,5 @@
12
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
15
+ *= require snaptable
15
16
  */
@@ -77,8 +77,8 @@ class Adeia::Permission < ActiveRecord::Base
77
77
  end
78
78
 
79
79
  def presence_of_a_right
80
- unless read_right || update_right || destroy_right || actions.any?
81
- errors[:base] << I18n.t("errors.messages.right_required")
80
+ unless read_right || create_right || update_right || destroy_right || actions.any?
81
+ errors.add(:base, I18n.t("errors.messages.right_required"))
82
82
  end
83
83
  end
84
84
 
@@ -47,3 +47,5 @@
47
47
  <%= f.submit %>
48
48
 
49
49
  <% end %>
50
+
51
+ <%= javascript_include_tag "adeia/nested_form.js" %>
@@ -1,8 +1,16 @@
1
1
  <% if flash.any? %>
2
- <% flash.each do |key, value| %>
3
- <%= content_tag(:div, id: "flash", class: "flash-#{key}") do %>
4
- <%= value %>
5
- <span class="close"><%= t "application.close" %></span>
2
+ <div id="flash">
3
+ <% flash.each do |key, value| %>
4
+ <div class="flash-<%= key %>">
5
+ <div class="wrapper">
6
+ <span class="flash-content"><%= value.html_safe %></span>
7
+
8
+ <svg classs="close" width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.5;">
9
+ <path d="M0,100L100,0"/>
10
+ <path d="M0,0L100,100"/>
11
+ </svg>
12
+ </div>
13
+ </div>
6
14
  <% end %>
7
- <% end %>
8
- <% end %>
15
+ </div>
16
+ <% end %>
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Adeia</title>
5
- <%= stylesheet_link_tag 'adeia/application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'adeia/application', 'data-turbolinks-track' => true %>
5
+ <%= stylesheet_link_tag 'adeia/application', media: 'all' %>
6
+ <%= javascript_include_tag 'adeia/application' %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
@@ -0,0 +1,2 @@
1
+ # add the application file to the pipeline
2
+ Rails.application.config.assets.precompile += %w( adeia/application.css adeia/application.js adeia/nested_form.js)
@@ -1,4 +1,4 @@
1
- class CreateAdeiaElements < ActiveRecord::Migration
1
+ class CreateAdeiaElements < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_elements do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateAdeiaPermissions < ActiveRecord::Migration
1
+ class CreateAdeiaPermissions < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_permissions do |t|
4
4
  t.references :owner, polymorphic: true, index: true
@@ -1,4 +1,4 @@
1
- class CreateAdeiaGroups < ActiveRecord::Migration
1
+ class CreateAdeiaGroups < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_groups do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateAdeiaGroupUsers < ActiveRecord::Migration
1
+ class CreateAdeiaGroupUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_group_users do |t|
4
4
  t.references :adeia_group, index: true, foreign_key: true
@@ -1,4 +1,4 @@
1
- class CreateAdeiaTokens < ActiveRecord::Migration
1
+ class CreateAdeiaTokens < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_tokens do |t|
4
4
  t.string :token
@@ -1,4 +1,4 @@
1
- class CreateAdeiaActions < ActiveRecord::Migration
1
+ class CreateAdeiaActions < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_actions do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateAdeiaActionPermissions < ActiveRecord::Migration
1
+ class CreateAdeiaActionPermissions < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :adeia_action_permissions do |t|
4
4
  t.references :adeia_action, index: true, foreign_key: true
data/lib/adeia/engine.rb CHANGED
@@ -13,7 +13,7 @@ module Adeia
13
13
  g.test_framework :rspec
14
14
  g.assets false
15
15
  g.helper false
16
- g.factory_girl false
16
+ g.factory_bot false
17
17
  end
18
18
 
19
19
  initializer 'Adeia.requirements' do |app|
data/lib/adeia/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Adeia
2
- VERSION = "0.15.4"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -14,7 +14,7 @@ describe ArticlesController, :type => :controller do
14
14
 
15
15
  it "responds successfully" do
16
16
  get :index
17
- expect(response).to be_success
17
+ expect(response).to have_http_status(:success)
18
18
  end
19
19
 
20
20
  it "loads the records" do
@@ -82,7 +82,7 @@ describe ArticlesController, :type => :controller do
82
82
 
83
83
  it "responds successfully" do
84
84
  get :show, params: { id: @article.id }
85
- expect(response).to be_success
85
+ expect(response).to have_http_status(:success)
86
86
  end
87
87
 
88
88
  it "loads the record" do
@@ -97,7 +97,7 @@ describe ArticlesController, :type => :controller do
97
97
 
98
98
  it "responds successfully" do
99
99
  get :new
100
- expect(response).to be_success
100
+ expect(response).to have_http_status(:success)
101
101
  end
102
102
 
103
103
  end
@@ -110,7 +110,7 @@ describe ArticlesController, :type => :controller do
110
110
 
111
111
  it "responds successfully" do
112
112
  get :edit, params: { id: @article.id }
113
- expect(response).to be_success
113
+ expect(response).to have_http_status(:success)
114
114
  end
115
115
 
116
116
  it "loads the record" do
data/spec/factories.rb CHANGED
@@ -1,33 +1,33 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
 
3
3
  factory :token, class: "Adeia::Token" do
4
4
  token { SecureRandom.urlsafe_base64 }
5
- is_valid true
5
+ is_valid { true }
6
6
  exp_at { 1.month.from_now }
7
7
  end
8
8
 
9
9
  factory :permission, class: "Adeia::Permission" do
10
10
  transient do
11
- element_name 'admin/articles'
12
- group_name "admin"
13
- type_name 'all_entries'
14
- action 'share'
11
+ element_name { 'admin/articles' }
12
+ group_name { 'admin' }
13
+ type_name { 'all_entries' }
14
+ action { 'share' }
15
15
  end
16
16
  element { Adeia::Element.find_or_create_by(name: element_name) }
17
17
  owner { Adeia::Group.find_by_name(group_name) || create(:group, name: group_name) }
18
18
 
19
19
  permission_type { Adeia::Permission.permission_types[type_name] }
20
20
 
21
- resource_id nil
22
- read_right false
23
- create_right false
24
- update_right false
25
- destroy_right false
21
+ resource_id { nil }
22
+ read_right { false }
23
+ create_right { false }
24
+ update_right { false }
25
+ destroy_right { false }
26
26
  actions {[ Adeia::Action.find_or_create_by(name: action) ]}
27
27
  end
28
28
 
29
29
  factory :group, class: "Adeia::Group" do
30
- name "admin"
30
+ name { "admin" }
31
31
  end
32
32
 
33
33
  factory :user_group, class: "Adeia::GroupUser" do
@@ -38,14 +38,14 @@ FactoryGirl.define do
38
38
  ### Test App factories
39
39
 
40
40
  factory :user do
41
- name "admin"
42
- password "12341"
43
- password_confirmation "12341"
41
+ name { "admin" }
42
+ password { "12341" }
43
+ password_confirmation { "12341" }
44
44
  end
45
45
 
46
46
  factory :article do
47
- title "Des ours meurt chaque année"
48
- content "Chaque année, plus de 1000 ourse blancs meurt"
47
+ title { "Des ours meurt chaque année" }
48
+ content { "Chaque année, plus de 1000 ourse blancs meurt" }
49
49
  user { User.find_by_name("editor") || create(:user, name: "editor") }
50
50
  end
51
51
 
data/spec/spec_helper.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'factory_girl_rails'
1
+ require 'factory_bot_rails'
2
2
  require 'capybara/rspec'
3
3
  require 'rspec/active_model/mocks'
4
4
  require 'rails-controller-testing'
5
5
 
6
- FactoryGirl.definition_file_paths = [ File.join(File.dirname(__FILE__), '../spec/factories') ]
7
- FactoryGirl.find_definitions
6
+ FactoryBot.definition_file_paths = [ File.join(File.dirname(__FILE__), '../spec/factories') ]
7
+ FactoryBot.find_definitions
8
8
 
9
9
  RSpec.configure do |config|
10
10
 
@@ -16,6 +16,6 @@ RSpec.configure do |config|
16
16
  mocks.verify_partial_doubles = true
17
17
  end
18
18
 
19
- config.include FactoryGirl::Syntax::Methods
19
+ config.include FactoryBot::Syntax::Methods
20
20
 
21
21
  end
@@ -0,0 +1,2 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
@@ -1,9 +1,8 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
4
+ <title>Test App</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
7
6
  <%= csrf_meta_tags %>
8
7
  </head>
9
8
  <body>
File without changes
Binary file
@@ -244,3 +244,131 @@ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is depreca
244
244
  FROM sqlite_temp_master
245
245
  WHERE name='index_articles_on_user_id' AND type='index'
246
246
  
247
+ DEPRECATION WARNING: Initialization autoloaded the constant User.
248
+
249
+ Being able to do this is deprecated. Autoloading during initialization is going
250
+ to be an error condition in future versions of Rails.
251
+
252
+ Reloading does not reboot the application, and therefore code executed during
253
+ initialization does not run again. So, if you reload User, for example,
254
+ the expected changes won't be reflected in that stale Class object.
255
+
256
+ `config.autoloader` is set to `classic`. This autoloaded constant would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
257
+
258
+ In order to autoload safely at boot time, please wrap your code in a reloader
259
+ callback this way:
260
+
261
+ Rails.application.reloader.to_prepare do
262
+ # Autoload classes and modules needed at boot time here.
263
+ end
264
+
265
+ That block runs when the application boots, and every time there is a reload.
266
+ For historical reasons, it may run twice, so it has to be idempotent.
267
+
268
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
269
+ Rails autoloads and reloads.
270
+ (called from <top (required)> at /Users/khcr/Projets/GitHub/adeia/spec/test_app/config/environment.rb:5)
271
+ DEPRECATION WARNING: Initialization autoloaded the constant User.
272
+
273
+ Being able to do this is deprecated. Autoloading during initialization is going
274
+ to be an error condition in future versions of Rails.
275
+
276
+ Reloading does not reboot the application, and therefore code executed during
277
+ initialization does not run again. So, if you reload User, for example,
278
+ the expected changes won't be reflected in that stale Class object.
279
+
280
+ `config.autoloader` is set to `classic`. This autoloaded constant would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
281
+
282
+ In order to autoload safely at boot time, please wrap your code in a reloader
283
+ callback this way:
284
+
285
+ Rails.application.reloader.to_prepare do
286
+ # Autoload classes and modules needed at boot time here.
287
+ end
288
+
289
+ That block runs when the application boots, and every time there is a reload.
290
+ For historical reasons, it may run twice, so it has to be idempotent.
291
+
292
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
293
+ Rails autoloads and reloads.
294
+ (called from <top (required)> at /Users/khcr/Projets/GitHub/adeia/spec/test_app/config/environment.rb:5)
295
+  (1.0ms) SELECT sqlite_version(*)
296
+  (0.1ms) SELECT sqlite_version(*)
297
+  (0.1ms) SELECT sqlite_version(*)
298
+  (0.1ms) DROP TABLE IF EXISTS "adeia_action_permissions"
299
+  (1.4ms) CREATE TABLE "adeia_action_permissions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "adeia_action_id" integer, "adeia_permission_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
300
+  (1.2ms) CREATE INDEX "index_adeia_action_permissions_on_adeia_action_id" ON "adeia_action_permissions" ("adeia_action_id")
301
+  (0.9ms) CREATE INDEX "index_adeia_action_permissions_on_adeia_permission_id" ON "adeia_action_permissions" ("adeia_permission_id")
302
+  (0.1ms) DROP TABLE IF EXISTS "adeia_actions"
303
+  (1.1ms) CREATE TABLE "adeia_actions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
304
+  (0.1ms) DROP TABLE IF EXISTS "adeia_elements"
305
+  (0.9ms) CREATE TABLE "adeia_elements" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
306
+  (0.1ms) DROP TABLE IF EXISTS "adeia_group_users"
307
+  (1.0ms) CREATE TABLE "adeia_group_users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "adeia_group_id" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
308
+  (0.9ms) CREATE INDEX "index_adeia_group_users_on_adeia_group_id" ON "adeia_group_users" ("adeia_group_id")
309
+  (0.8ms) CREATE INDEX "index_adeia_group_users_on_user_id" ON "adeia_group_users" ("user_id")
310
+  (0.1ms) DROP TABLE IF EXISTS "adeia_groups"
311
+  (0.9ms) CREATE TABLE "adeia_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
312
+  (0.1ms) DROP TABLE IF EXISTS "adeia_permissions"
313
+  (0.9ms) CREATE TABLE "adeia_permissions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_type" varchar, "owner_id" integer, "adeia_element_id" integer, "permission_type" integer, "read_right" boolean DEFAULT 0, "create_right" boolean DEFAULT 0, "update_right" boolean DEFAULT 0, "destroy_right" boolean DEFAULT 0, "resource_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
314
+  (0.9ms) CREATE INDEX "index_adeia_permissions_on_adeia_element_id" ON "adeia_permissions" ("adeia_element_id")
315
+  (0.9ms) CREATE INDEX "index_adeia_permissions_on_owner_type_and_owner_id" ON "adeia_permissions" ("owner_type", "owner_id")
316
+  (0.1ms) DROP TABLE IF EXISTS "adeia_tokens"
317
+  (0.8ms) CREATE TABLE "adeia_tokens" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar, "is_valid" boolean, "adeia_permission_id" integer, "exp_at" date, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
318
+  (0.8ms) CREATE INDEX "index_adeia_tokens_on_adeia_permission_id" ON "adeia_tokens" ("adeia_permission_id")
319
+  (0.1ms) DROP TABLE IF EXISTS "articles"
320
+  (0.7ms) CREATE TABLE "articles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "content" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
321
+  (0.8ms) CREATE INDEX "index_articles_on_user_id" ON "articles" ("user_id")
322
+  (0.1ms) DROP TABLE IF EXISTS "users"
323
+  (0.9ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "password_digest" varchar, "remember_token" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
324
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
325
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
326
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20151012185726)
327
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES
328
+ (20151003144041),
329
+ (20151003144208),
330
+ (20151003144650),
331
+ (20151003144706),
332
+ (20151003150524),
333
+ (20151003150747),
334
+ (20151003150806),
335
+ (20151012185720);
336
+
337
+ 
338
+  (0.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
339
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
340
+ TRANSACTION (0.1ms) begin transaction
341
+ ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2021-11-06 22:37:21.369819"], ["updated_at", "2021-11-06 22:37:21.369819"]]
342
+ TRANSACTION (0.7ms) commit transaction
343
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
344
+ TRANSACTION (0.0ms) begin transaction
345
+ ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2021-11-06 22:37:21.374068"], ["key", "environment"]]
346
+ TRANSACTION (0.7ms) commit transaction
347
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "schema_sha1"], ["LIMIT", 1]]
348
+ TRANSACTION (0.0ms) begin transaction
349
+ ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "schema_sha1"], ["value", "7e7586b01ae1c3c8a6fe06c4e1a805cb35458b00"], ["created_at", "2021-11-06 22:37:21.377950"], ["updated_at", "2021-11-06 22:37:21.377950"]]
350
+ TRANSACTION (0.6ms) commit transaction
351
+ DEPRECATION WARNING: Initialization autoloaded the constant User.
352
+
353
+ Being able to do this is deprecated. Autoloading during initialization is going
354
+ to be an error condition in future versions of Rails.
355
+
356
+ Reloading does not reboot the application, and therefore code executed during
357
+ initialization does not run again. So, if you reload User, for example,
358
+ the expected changes won't be reflected in that stale Class object.
359
+
360
+ `config.autoloader` is set to `classic`. This autoloaded constant would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
361
+
362
+ In order to autoload safely at boot time, please wrap your code in a reloader
363
+ callback this way:
364
+
365
+ Rails.application.reloader.to_prepare do
366
+ # Autoload classes and modules needed at boot time here.
367
+ end
368
+
369
+ That block runs when the application boots, and every time there is a reload.
370
+ For historical reasons, it may run twice, so it has to be idempotent.
371
+
372
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
373
+ Rails autoloads and reloads.
374
+ (called from <top (required)> at /Users/khcr/Projets/GitHub/adeia/spec/test_app/config/environment.rb:5)