godmin 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/godmin/resolver.rb +2 -2
- data/lib/godmin/version.rb +1 -1
- data/test/dummy/app/controllers/secret_articles_controller.rb +3 -0
- data/test/dummy/app/controllers/secret_controller.rb +7 -0
- data/test/dummy/app/controllers/sessions_controller.rb +3 -0
- data/test/dummy/app/models/admin_user.rb +7 -0
- data/test/dummy/app/models/secret_article.rb +2 -0
- data/test/dummy/app/services/secret_article_service.rb +9 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/db/migrate/20150907133753_create_admin_users.rb +10 -0
- data/test/dummy/db/schema.rb +8 -1
- data/test/integration/sign_in_test.rb +17 -0
- data/test/lib/godmin/resolver_test.rb +4 -4
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bb2915931cb75703a3b3bffc12bb57a9b29cc97
|
4
|
+
data.tar.gz: 6c7247808002572bd0fe122615c82dde755be974
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93690b6ab331b871865ebd7a9af79626e7bec7d4f066476c6118c42769855e10da4d83ddaf3d38bc89b10c34f2cc6798231d0c5b6b9d8769271cdc7aee9239d9
|
7
|
+
data.tar.gz: 9f7fe59b58bc5032c4734cf9f0e734e4b9b301c76edf9ad0b52b92e55943b98b44c427ce0ba41624a88a8e01431a56a788197744726597dd1c47e55e7ea71b15
|
data/CHANGELOG.md
CHANGED
data/lib/godmin/resolver.rb
CHANGED
@@ -30,8 +30,8 @@ module Godmin
|
|
30
30
|
def template_paths(prefix)
|
31
31
|
[
|
32
32
|
File.join(@engine_wrapper.root, "app/views", resource_path_for_engine(prefix)),
|
33
|
-
File.join(Godmin::Engine.root, "app/views/godmin",
|
34
|
-
File.join(Godmin::Engine.root, "app/views/godmin",
|
33
|
+
File.join(Godmin::Engine.root, "app/views/godmin", default_path_for_godmin(prefix)),
|
34
|
+
File.join(Godmin::Engine.root, "app/views/godmin", resource_path_for_godmin(prefix))
|
35
35
|
]
|
36
36
|
end
|
37
37
|
|
data/lib/godmin/version.rb
CHANGED
data/test/dummy/config/routes.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,14 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20150907133753) do
|
15
|
+
|
16
|
+
create_table "admin_users", force: :cascade do |t|
|
17
|
+
t.string "email"
|
18
|
+
t.text "password_digest"
|
19
|
+
t.datetime "created_at", null: false
|
20
|
+
t.datetime "updated_at", null: false
|
21
|
+
end
|
15
22
|
|
16
23
|
create_table "articles", force: :cascade do |t|
|
17
24
|
t.string "title"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class SignInTest < ActionDispatch::IntegrationTest
|
4
|
+
def test_sign_in_and_out
|
5
|
+
AdminUser.create!(email: "admin@example.com", password: "password")
|
6
|
+
visit secret_articles_path
|
7
|
+
assert_not_equal secret_articles_path, current_path
|
8
|
+
fill_in "Email", with: "admin@example.com"
|
9
|
+
fill_in "Password", with: "password"
|
10
|
+
click_button "Sign in"
|
11
|
+
visit secret_articles_path
|
12
|
+
assert_equal secret_articles_path, current_path
|
13
|
+
click_link "Sign out"
|
14
|
+
visit secret_articles_path
|
15
|
+
assert_not_equal secret_articles_path, current_path
|
16
|
+
end
|
17
|
+
end
|
@@ -22,8 +22,8 @@ module Godmin
|
|
22
22
|
|
23
23
|
assert_equal [
|
24
24
|
File.join(@engine_wrapper_1.root, "app/views/resource"),
|
25
|
-
File.join(Godmin::Engine.root, "app/views/godmin/
|
26
|
-
File.join(Godmin::Engine.root, "app/views/godmin/
|
25
|
+
File.join(Godmin::Engine.root, "app/views/godmin/articles"),
|
26
|
+
File.join(Godmin::Engine.root, "app/views/godmin/resource")
|
27
27
|
], resolver.template_paths("articles")
|
28
28
|
end
|
29
29
|
|
@@ -32,8 +32,8 @@ module Godmin
|
|
32
32
|
|
33
33
|
assert_equal [
|
34
34
|
File.join(@engine_wrapper_2.root, "app/views/godmin/resolver_test/admin/resource"),
|
35
|
-
File.join(Godmin::Engine.root, "app/views/godmin/
|
36
|
-
File.join(Godmin::Engine.root, "app/views/godmin/
|
35
|
+
File.join(Godmin::Engine.root, "app/views/godmin/articles"),
|
36
|
+
File.join(Godmin::Engine.root, "app/views/godmin/resource")
|
37
37
|
], resolver.template_paths("godmin/resolver_test/admin/articles")
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: godmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ljungblad
|
@@ -361,11 +361,17 @@ files:
|
|
361
361
|
- test/dummy/app/controllers/application_controller.rb
|
362
362
|
- test/dummy/app/controllers/articles_controller.rb
|
363
363
|
- test/dummy/app/controllers/concerns/.keep
|
364
|
+
- test/dummy/app/controllers/secret_articles_controller.rb
|
365
|
+
- test/dummy/app/controllers/secret_controller.rb
|
366
|
+
- test/dummy/app/controllers/sessions_controller.rb
|
364
367
|
- test/dummy/app/helpers/application_helper.rb
|
365
368
|
- test/dummy/app/models/.keep
|
369
|
+
- test/dummy/app/models/admin_user.rb
|
366
370
|
- test/dummy/app/models/article.rb
|
367
371
|
- test/dummy/app/models/concerns/.keep
|
372
|
+
- test/dummy/app/models/secret_article.rb
|
368
373
|
- test/dummy/app/services/article_service.rb
|
374
|
+
- test/dummy/app/services/secret_article_service.rb
|
369
375
|
- test/dummy/app/views/articles/.keep
|
370
376
|
- test/dummy/app/views/articles/columns/.keep
|
371
377
|
- test/dummy/app/views/articles/filters/.keep
|
@@ -392,6 +398,7 @@ files:
|
|
392
398
|
- test/dummy/config/initializers/wrap_parameters.rb
|
393
399
|
- test/dummy/config/routes.rb
|
394
400
|
- test/dummy/db/migrate/20150717121532_create_articles.rb
|
401
|
+
- test/dummy/db/migrate/20150907133753_create_admin_users.rb
|
395
402
|
- test/dummy/db/schema.rb
|
396
403
|
- test/dummy/lib/assets/.keep
|
397
404
|
- test/dummy/log/.keep
|
@@ -405,6 +412,7 @@ files:
|
|
405
412
|
- test/integration/column_overriding_test.rb
|
406
413
|
- test/integration/filter_overriding_test.rb
|
407
414
|
- test/integration/partial_overriding_test.rb
|
415
|
+
- test/integration/sign_in_test.rb
|
408
416
|
- test/integration/template_overriding_test.rb
|
409
417
|
- test/integration/welcome_test.rb
|
410
418
|
- test/lib/godmin/engine_wrapper_test.rb
|
@@ -472,11 +480,17 @@ test_files:
|
|
472
480
|
- test/dummy/app/controllers/application_controller.rb
|
473
481
|
- test/dummy/app/controllers/articles_controller.rb
|
474
482
|
- test/dummy/app/controllers/concerns/.keep
|
483
|
+
- test/dummy/app/controllers/secret_articles_controller.rb
|
484
|
+
- test/dummy/app/controllers/secret_controller.rb
|
485
|
+
- test/dummy/app/controllers/sessions_controller.rb
|
475
486
|
- test/dummy/app/helpers/application_helper.rb
|
476
487
|
- test/dummy/app/models/.keep
|
488
|
+
- test/dummy/app/models/admin_user.rb
|
477
489
|
- test/dummy/app/models/article.rb
|
478
490
|
- test/dummy/app/models/concerns/.keep
|
491
|
+
- test/dummy/app/models/secret_article.rb
|
479
492
|
- test/dummy/app/services/article_service.rb
|
493
|
+
- test/dummy/app/services/secret_article_service.rb
|
480
494
|
- test/dummy/app/views/articles/.keep
|
481
495
|
- test/dummy/app/views/articles/columns/.keep
|
482
496
|
- test/dummy/app/views/articles/filters/.keep
|
@@ -503,6 +517,7 @@ test_files:
|
|
503
517
|
- test/dummy/config/initializers/wrap_parameters.rb
|
504
518
|
- test/dummy/config/routes.rb
|
505
519
|
- test/dummy/db/migrate/20150717121532_create_articles.rb
|
520
|
+
- test/dummy/db/migrate/20150907133753_create_admin_users.rb
|
506
521
|
- test/dummy/db/schema.rb
|
507
522
|
- test/dummy/lib/assets/.keep
|
508
523
|
- test/dummy/log/.keep
|
@@ -516,6 +531,7 @@ test_files:
|
|
516
531
|
- test/integration/column_overriding_test.rb
|
517
532
|
- test/integration/filter_overriding_test.rb
|
518
533
|
- test/integration/partial_overriding_test.rb
|
534
|
+
- test/integration/sign_in_test.rb
|
519
535
|
- test/integration/template_overriding_test.rb
|
520
536
|
- test/integration/welcome_test.rb
|
521
537
|
- test/lib/godmin/engine_wrapper_test.rb
|