adeia 0.15.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/manifest.js +2 -0
- data/app/assets/javascripts/adeia/application.js +1 -1
- data/app/assets/javascripts/adeia/flash.js +10 -4
- data/app/assets/javascripts/adeia/nested_form.js +27 -23
- data/app/assets/stylesheets/adeia/application.css +1 -0
- data/app/models/adeia/permission.rb +2 -2
- data/app/views/adeia/permissions/_form.html.erb +2 -0
- data/app/views/layouts/adeia/_flash.html.erb +14 -6
- data/app/views/layouts/adeia/application.html.erb +2 -2
- data/config/initializers/assets.rb +2 -0
- data/db/migrate/20151003144041_create_adeia_elements.rb +1 -1
- data/db/migrate/20151003144208_create_adeia_permissions.rb +1 -1
- data/db/migrate/20151003144650_create_adeia_groups.rb +1 -1
- data/db/migrate/20151003144706_create_adeia_group_users.rb +1 -1
- data/db/migrate/20151003150524_create_adeia_tokens.rb +1 -1
- data/db/migrate/20151003150747_create_adeia_actions.rb +1 -1
- data/db/migrate/20151003150806_create_adeia_action_permissions.rb +1 -1
- data/lib/adeia/engine.rb +1 -1
- data/lib/adeia/version.rb +1 -1
- data/spec/controllers/articles_controller_spec.rb +4 -4
- data/spec/factories.rb +17 -17
- data/spec/spec_helper.rb +4 -4
- data/spec/test_app/app/assets/config/manifest.js +2 -0
- data/spec/test_app/app/views/layouts/application.html.erb +2 -3
- data/spec/test_app/db/development.sqlite3 +0 -0
- data/spec/test_app/db/test.sqlite3 +0 -0
- data/spec/test_app/log/development.log +128 -0
- data/spec/test_app/log/test.log +17382 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/17/17Ji1zysIV0QzenVJg2bTQM3byl-5t58mUNbYZrkhGM.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/1H/1HyneLliGLAocm4KVeWzj5tKGWdomYfz7rWloxQlXRc.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/3S/3S6PZldZhpcM_6P5jkehVOMAObIqw6X4V96E8TxtXrI.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/8J/8JOedZF9m0P656fHle8DWmmJffxhiciEo-B9Ta6NyG8.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Ce/CeTW2Tz6RgeG2hf7-uErLmxz3EkjsHTdkzXg3Fi1wsU.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/DV/DVjeqdOW-W_v2MIcd3abmUAMLCeHYjflCX-MKtsY69Y.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Dm/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +3 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/Ga/GaHD91faGavVSEA-G3DmnhO86dj1qpa4jMaWa5wYuik.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/J8/J8sYsNeTeOEtCrjQG6MIkRMhzjK0hCeHqRAcKLMRdA4.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/JV/JVKPOUqwQ9tWe3wZjV4EnluyjuedrH3z_UY3bDBBQSo.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/L4/L43TzgSSg3pQOxwOobTjMowj7q--ZykjMJfC_C4LBGU.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/VH/VHuK24wg04T1MJhF_Q_sbT9h4J9TgV2EwwSKlVX3gAc.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/We/WeHv9UitJfw__MSd_icLUSVbJupRX9bulR_sbJY81vw.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/ac/ac72wzy3oH2SnXEDa3_TOFPp8s2EyzZZjnMoqNgGLMg.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/fn/fnArLcbUsmH-hs0ivYjpbsWCveny2dWKz98ANZsvklc.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/gP/gP6amosF7TvInNt0I9O8LEhVNA2kCQ7kiQO8vk4ppHE.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/kF/kFINDgg2Prb3IboJtWY8HcF5gamZVJvtra5H1YvZvBA.cache +0 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/mm/mmJkOfX8bMOx2AlGcwUB0Df0dHe2TkypLXAlxTAFIGM.cache +1 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/oc/occ60QAfY0sqlYomqa81jJ_HTYPL28bmOGnVF34j_V0.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/py/pyGAJrY1mgvF3JKeIGd7oSFKe34ZIyP04fOnInQI9Pc.cache +2 -0
- data/spec/test_app/tmp/cache/assets/sprockets/v4.0.0/xE/xE7l4Z-MH0frwjsuXagYzccFMXvxR4c9vq_w4Rr3pjw.cache +1 -0
- metadata +109 -46
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc3818ab4c31e2b816d9e922c0b4c31790052c4afbe853164e4cefafed00421b
|
4
|
+
data.tar.gz: 17aa1f60f15b7712591da8c01fe6a57b4a0967c5483cdae86aad10d621f92886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6980f26f072c7925947c45c1c0aed945a344a2c198a0682f5c6d442299f6e6fc8cbf3fc28d4341a82b53a79e64f61d35443d775eed1e9750d25cf4d2d1ec199
|
7
|
+
data.tar.gz: 134eb7cd2ad22cec00948a11b3995d599b2736f77bd841624a803c4814015b9038aaa8abb3b28bbb6b2341b8d9877e2017373dbded30d5e7cfdab4f2ed907168
|
@@ -1,5 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
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
|
-
|
21
|
-
|
22
|
-
fields.
|
23
|
-
fields.
|
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
|
+
})
|
@@ -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
|
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
|
|
@@ -1,8 +1,16 @@
|
|
1
1
|
<% if flash.any? %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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
|
6
|
-
<%= javascript_include_tag 'adeia/application'
|
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>
|
data/lib/adeia/engine.rb
CHANGED
data/lib/adeia/version.rb
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
-
|
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
|
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 '
|
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
|
-
|
7
|
-
|
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
|
19
|
+
config.include FactoryBot::Syntax::Methods
|
20
20
|
|
21
21
|
end
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>
|
5
|
-
<%= stylesheet_link_tag
|
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
|
[0m
|
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
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
296
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
297
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
298
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_action_permissions"[0m
|
299
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE 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)[0m
|
300
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_adeia_action_permissions_on_adeia_action_id" ON "adeia_action_permissions" ("adeia_action_id")[0m
|
301
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_adeia_action_permissions_on_adeia_permission_id" ON "adeia_action_permissions" ("adeia_permission_id")[0m
|
302
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_actions"[0m
|
303
|
+
[1m[35m (1.1ms)[0m [1m[35mCREATE TABLE "adeia_actions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
304
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_elements"[0m
|
305
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE TABLE "adeia_elements" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
306
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_group_users"[0m
|
307
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE 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)[0m
|
308
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_adeia_group_users_on_adeia_group_id" ON "adeia_group_users" ("adeia_group_id")[0m
|
309
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_adeia_group_users_on_user_id" ON "adeia_group_users" ("user_id")[0m
|
310
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_groups"[0m
|
311
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE TABLE "adeia_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
312
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_permissions"[0m
|
313
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE 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)[0m
|
314
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_adeia_permissions_on_adeia_element_id" ON "adeia_permissions" ("adeia_element_id")[0m
|
315
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_adeia_permissions_on_owner_type_and_owner_id" ON "adeia_permissions" ("owner_type", "owner_id")[0m
|
316
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "adeia_tokens"[0m
|
317
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE 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)[0m
|
318
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_adeia_tokens_on_adeia_permission_id" ON "adeia_tokens" ("adeia_permission_id")[0m
|
319
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "articles"[0m
|
320
|
+
[1m[35m (0.7ms)[0m [1m[35mCREATE 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)[0m
|
321
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_articles_on_user_id" ON "articles" ("user_id")[0m
|
322
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "users"[0m
|
323
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE 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)[0m
|
324
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
325
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
326
|
+
[1m[35m (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20151012185726)[0m
|
327
|
+
[1m[35m (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
328
|
+
(20151003144041),
|
329
|
+
(20151003144208),
|
330
|
+
(20151003144650),
|
331
|
+
(20151003144706),
|
332
|
+
(20151003150524),
|
333
|
+
(20151003150747),
|
334
|
+
(20151003150806),
|
335
|
+
(20151012185720);
|
336
|
+
|
337
|
+
[0m
|
338
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
339
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
340
|
+
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
341
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2021-11-06 22:37:21.369819"], ["updated_at", "2021-11-06 22:37:21.369819"]]
|
342
|
+
[1m[36mTRANSACTION (0.7ms)[0m [1m[36mcommit transaction[0m
|
343
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
344
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
345
|
+
[1m[36mActiveRecord::InternalMetadata Update (0.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ?[0m [["value", "test"], ["updated_at", "2021-11-06 22:37:21.374068"], ["key", "environment"]]
|
346
|
+
[1m[36mTRANSACTION (0.7ms)[0m [1m[36mcommit transaction[0m
|
347
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
348
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
349
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "schema_sha1"], ["value", "7e7586b01ae1c3c8a6fe06c4e1a805cb35458b00"], ["created_at", "2021-11-06 22:37:21.377950"], ["updated_at", "2021-11-06 22:37:21.377950"]]
|
350
|
+
[1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
|
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)
|