trestle-auth 0.4.4 → 0.5.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +26 -0
  3. data/.github/workflows/rspec.yml +60 -0
  4. data/.gitignore +2 -0
  5. data/.rspec +0 -1
  6. data/Gemfile +10 -8
  7. data/README.md +1 -1
  8. data/app/assets/bundle/trestle/auth/login.css +1 -0
  9. data/app/assets/bundle/trestle/auth/userbox.css +1 -1
  10. data/app/assets/sprockets/trestle/auth/manifest.js +3 -0
  11. data/app/views/layouts/trestle/auth.html.erb +13 -9
  12. data/app/views/trestle/auth/_userbox.html.erb +2 -2
  13. data/app/views/trestle/auth/sessions/_form.html.erb +6 -10
  14. data/config/locales/vi.yml +15 -0
  15. data/frontend/_form.scss +14 -18
  16. data/frontend/userbox.scss +3 -3
  17. data/gemfiles/rails-6.0.gemfile +5 -8
  18. data/gemfiles/rails-6.1.gemfile +4 -7
  19. data/gemfiles/rails-7.0-propshaft.gemfile +17 -0
  20. data/gemfiles/rails-7.0.gemfile +5 -8
  21. data/gemfiles/rails-7.1-propshaft.gemfile +17 -0
  22. data/gemfiles/rails-7.1.gemfile +17 -0
  23. data/gemfiles/rails-7.2-propshaft.gemfile +17 -0
  24. data/gemfiles/rails-7.2.gemfile +17 -0
  25. data/lib/trestle/auth/engine.rb +8 -1
  26. data/lib/trestle/auth/version.rb +1 -1
  27. data/package.json +3 -3
  28. data/trestle-auth.gemspec +4 -4
  29. data/webpack.config.js +9 -2
  30. data/yarn.lock +558 -1755
  31. metadata +24 -26
  32. data/.travis.yml +0 -29
  33. data/app/assets/bundle/trestle/auth/bundle.css +0 -1
  34. data/app/assets/stylesheets/trestle/auth.css +0 -2
  35. data/gemfiles/rails-5.0.gemfile +0 -20
  36. data/gemfiles/rails-5.1.gemfile +0 -20
  37. data/gemfiles/rails-5.2.gemfile +0 -20
  38. /data/app/assets/stylesheets/trestle/{_custom-auth.css → auth/custom.css} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f20f20a18e7d3b1ee6d2cd1249fd39f6062f53f6cbccef84fe4d511edcb6a537
4
- data.tar.gz: b091455c598714024772029a647c39db37d09280918de086304e59980b20be0a
3
+ metadata.gz: 144e61c6788c0348620a3eff6dbebfe6ceca99fe4f7ea25033ff6bdc63fcd948
4
+ data.tar.gz: 919a738389172b29a037ef7a3f981efd665f67a67ec22738cf625a49e6a14c48
5
5
  SHA512:
6
- metadata.gz: 51d20962a10869bd335dd768da2bfc84f90b339a7dc37f3756b117d4f316f815d6962be7556e82267b4f9d3a182b70fa711203aeb2535e831f13bf113cfc28d5
7
- data.tar.gz: dc9422562f26242e5ed5dd6d16b8a2e6655c96d3b8e57ebbad06c1d0aed7cb8a70a7d430791bb9acfeffe8ccd70c1ca0e1baccf9869ceebfe367b9256f04388d
6
+ metadata.gz: 00a63d8741775dbf8a5a3ecbf5cb0ad1e44ea22a218db17fa83b0340ed5416e19943ff0b341af8dbb37ded9cbcc3a129b744546aa93e9c25cc0cf83a4f8f6653
7
+ data.tar.gz: c9c42bde70ebb2afd0194b42b34c416870f77b782c6ee95b467cdcd2ea5760a775180714888857a47a1fdecbaa741a58f6d1a3d378f4d14c91033a5d02d082c0
@@ -0,0 +1,26 @@
1
+ name: Publish gem
2
+
3
+ on: workflow_dispatch
4
+
5
+ jobs:
6
+ push:
7
+ runs-on: ubuntu-latest
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write
12
+
13
+ # If you configured a GitHub environment on RubyGems, you must use it here.
14
+ environment: release
15
+
16
+ steps:
17
+ # Set up
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ bundler-cache: true
23
+ ruby-version: ruby
24
+
25
+ # Release
26
+ - uses: rubygems/release-gem@v1
@@ -0,0 +1,60 @@
1
+ name: RSpec
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ strategy:
8
+ fail-fast: false
9
+ matrix:
10
+ include:
11
+ - gemfile: rails-6.0
12
+ ruby: '2.6'
13
+ - gemfile: rails-6.1
14
+ ruby: '2.6'
15
+ - gemfile: rails-6.1
16
+ ruby: '3.0'
17
+ - gemfile: rails-7.0
18
+ ruby: '2.7'
19
+ - gemfile: rails-7.0
20
+ ruby: '3.0'
21
+ - gemfile: rails-7.0-propshaft
22
+ ruby: '3.0'
23
+ - gemfile: rails-7.1
24
+ ruby: '3.3'
25
+ - gemfile: rails-7.1-propshaft
26
+ ruby: '3.3'
27
+ - gemfile: rails-7.2
28
+ ruby: '3.3'
29
+ - gemfile: rails-7.2-propshaft
30
+ ruby: '3.3'
31
+ runs-on: ubuntu-latest
32
+ env:
33
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+
37
+ - name: Install Ruby
38
+ uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby }}
41
+ bundler-cache: true
42
+
43
+ - name: Run Specs
44
+ run: bundle exec rake
45
+
46
+ - name: Coveralls Parallel
47
+ uses: coverallsapp/github-action@v2
48
+ with:
49
+ flag-name: run-${{ join(matrix.*, '-') }}
50
+ parallel: true
51
+
52
+ finish:
53
+ needs: test
54
+ if: ${{ always() }}
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - name: Coveralls Finished
58
+ uses: coverallsapp/github-action@v2
59
+ with:
60
+ parallel-finished: true
data/.gitignore CHANGED
@@ -13,3 +13,5 @@
13
13
  /spec/dummy/*.sqlite3-journal
14
14
  /spec/dummy/log/*.log
15
15
  /spec/dummy/tmp/*
16
+ *.sqlite3-shm
17
+ *.sqlite3-wal
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --require spec_helper
2
1
  --format documentation
3
2
  --color
data/Gemfile CHANGED
@@ -1,20 +1,22 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in trestle-auth.gemspec
4
- gemspec
3
+ group :development, :test do
4
+ gem "sprockets-rails"
5
+ # gem "propshaft"
6
+ end
5
7
 
6
8
  group :test do
7
- gem "rspec-rails", "~> 5.0"
9
+ gem "rspec-rails"
8
10
 
9
- gem "coveralls", require: false
11
+ gem "coveralls_reborn", require: false
10
12
  gem "capybara"
11
13
 
12
14
  gem "sqlite3", "~> 1.4"
13
15
  gem "devise"
14
16
  end
15
17
 
16
- gem "sassc-rails"
17
-
18
- gem "rake", "~> 12.0"
19
-
18
+ gem "rails", "~> 7.1.0"
20
19
  gem "trestle", github: "TrestleAdmin/trestle"
20
+
21
+ # Specify your gem's dependencies in trestle-auth.gemspec
22
+ gemspec
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Trestle Authentication (trestle-auth)
2
2
 
3
3
  [![RubyGem](https://img.shields.io/gem/v/trestle-auth.svg?style=flat&colorB=4065a9)](https://rubygems.org/gems/trestle-auth)
4
- [![Travis](https://img.shields.io/travis/TrestleAdmin/trestle-auth.svg?style=flat)](https://travis-ci.org/TrestleAdmin/trestle-auth)
4
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/TrestleAdmin/trestle-auth/rspec.yml?style=flat)](https://github.com/TrestleAdmin/trestle-auth/actions)
5
5
  [![Coveralls](https://img.shields.io/coveralls/TrestleAdmin/trestle-auth.svg?style=flat)](https://coveralls.io/github/TrestleAdmin/trestle-auth)
6
6
 
7
7
  > Authentication plugin for the Trestle admin framework
@@ -0,0 +1 @@
1
+ .auth-body{color:#fff;display:flex}.auth-body .container{margin:auto;width:320px}.auth-header{margin-bottom:20px;text-align:center}.auth-header h1{align-items:center;display:flex;font-size:1.75rem;font-weight:500;justify-content:center;padding:.75rem 1rem;text-shadow:rgba(0,0,0,.5) 0 1px 1px}.auth-header img{max-height:100%;max-width:80%}.auth-header span{margin-left:10px}.login-form .input-group>*{background:hsla(0,0%,100%,.1);border:0;margin-left:0!important}.login-form .form-control{color:#fff;font-size:1rem;padding:.875rem .625rem}.login-form .form-control:focus{box-shadow:none;outline-color:transparent;outline-style:none}.login-form .form-control:-ms-input-placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control::placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control:-webkit-autofill{-webkit-text-fill-color:#fff}.login-form .form-control:-webkit-autofill,.login-form .form-control:-webkit-autofill:active,.login-form .form-control:-webkit-autofill:focus,.login-form .form-control:-webkit-autofill:hover{-webkit-transition:background-color 9999999s ease-in-out 0s;transition:background-color 9999999s ease-in-out 0s}.login-form .input-group-text{color:hsla(0,0%,100%,.5);padding:.25rem .25rem .25rem .875rem}.login-form .btn-primary{box-shadow:0 0 2px rgba(0,0,0,.1);padding-bottom:.625rem;padding-top:.625rem}.login-form .alert-danger{background-color:hsla(2,62%,66%,.75)}.login-form .remember-me{font-size:.8125rem;line-height:1.5;padding-left:0}.login-form .remember-me .form-check-input{margin-left:1em;margin-top:.825em}.login-form .remember-me .form-check-label{background:rgba(0,0,0,.075);border-radius:.375rem;color:hsla(0,0%,100%,.75);cursor:pointer;display:block;padding:.75em 1.5em .75em 3.25em}.login-form .remember-me .form-check-label:hover{background:rgba(0,0,0,.125)}
@@ -1 +1 @@
1
- .userbox{align-items:center;display:flex;order:99;padding:2px 0}.userbox>a{color:#333;display:block;font-weight:400;line-height:40px;padding:2px 0}.userbox>a:focus,.userbox>a:hover{text-decoration:none}.userbox .avatar{margin-left:6px;vertical-align:top}.userbox .dropdown-toggle:after{vertical-align:middle}@media (max-width:767.98px){.userbox{display:block;position:relative;z-index:5}.userbox .name{display:none}.userbox .avatar{border:1px solid hsla(0,0%,100%,.25);margin-left:0}}
1
+ .userbox{align-items:center;display:flex;order:99;padding:.125rem 0}.userbox>a{color:#333;display:block;font-weight:400;line-height:40px;padding:.125rem 0}.userbox>a:focus,.userbox>a:hover{text-decoration:none}.userbox .avatar{margin-left:.375rem;vertical-align:top}.userbox .dropdown-toggle:after{vertical-align:middle}@media(max-width:575.98px){.userbox{display:block;position:relative;z-index:5}.userbox .name{display:none}.userbox .avatar{border:1px solid hsla(0,0%,100%,.25);margin-left:0}}
@@ -0,0 +1,3 @@
1
+ //= link trestle/auth/login.css
2
+ //= link trestle/auth/userbox.css
3
+ //= link trestle/auth/custom.css
@@ -5,26 +5,30 @@
5
5
  <meta content='width=device-width, initial-scale=1' name='viewport'>
6
6
  <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
7
7
 
8
- <% if Trestle.config.turbolinks %>
9
- <meta content='no-cache' name='turbolinks-cache-control'>
10
- <% end %>
8
+ <meta name='turbo-cache-control' content='no-cache'>
9
+ <meta name="turbo-prefetch" content="false" />
10
+ <meta name="turbo-root" content="<%= Trestle.config.path %>">
11
11
 
12
12
  <%= csrf_meta_tags %>
13
13
 
14
14
  <title><%= Trestle.config.site_title %></title>
15
15
 
16
- <%= stylesheet_link_tag "trestle/admin", 'data-turbolinks-track': 'reload' %>
17
- <%= stylesheet_link_tag "trestle/theme", 'data-turbolinks-track': 'reload' if Trestle.config.theme %>
18
- <%= stylesheet_link_tag "trestle/custom", 'data-turbolinks-track': 'reload' %>
16
+ <%= favicon_link_tag Trestle.config.favicon if Trestle.config.favicon %>
19
17
 
20
- <%= stylesheet_link_tag "trestle/auth", 'data-turbolinks-track': 'reload' %>
18
+ <%= stylesheet_link_tag "trestle/admin", 'data-turbo-track': 'reload' %>
19
+ <%= stylesheet_link_tag "trestle/icons/font-awesome", 'data-turbo-track': 'reload' if defined?(Sprockets) %>
21
20
 
22
- <%= javascript_include_tag "turbolinks" if Trestle.config.turbolinks %>
21
+ <%= stylesheet_link_tag "trestle/auth/login", 'data-turbo-track': 'reload' %>
22
+
23
+ <%= stylesheet_link_tag "trestle/custom", 'data-turbo-track': 'reload' %>
24
+ <%= stylesheet_link_tag "trestle/auth/custom", 'data-turbo-track': 'reload' %>
25
+
26
+ <%= render "trestle/theme" %>
23
27
 
24
28
  <%= hook "auth.head" %>
25
29
  </head>
26
30
 
27
- <body class="auth-body theme-bg-dark">
31
+ <body class="auth-body theme-bg">
28
32
  <main class="container">
29
33
  <%= yield %>
30
34
  </main>
@@ -10,13 +10,13 @@
10
10
  <% end %>
11
11
 
12
12
  <% if show_dropdown %>
13
- <%= link_to content, "#", data: { toggle: 'dropdown' } %>
13
+ <%= link_to content, "#", data: { bs_toggle: 'dropdown', bs_offset: "0,7" } %>
14
14
  <% else %>
15
15
  <%= content %>
16
16
  <% end %>
17
17
 
18
18
  <% if show_dropdown -%>
19
- <ul class="dropdown-menu dropdown-menu-right">
19
+ <ul class="dropdown-menu dropdown-menu-end">
20
20
  <% if Trestle.config.auth.user_admin && user_admin = Trestle.lookup(Trestle.config.auth.user_admin) -%>
21
21
  <li><%= admin_link_to t("admin.auth.my_account", default: "My Account"), current_user, admin: user_admin, class: "dropdown-item" %></li>
22
22
  <% end -%>
@@ -1,17 +1,13 @@
1
1
  <div class="form-group">
2
2
  <div class="input-group">
3
- <div class="input-group-prepend">
4
- <span class="input-group-text"><i class="fa fa-user fa-fw"></i></span>
5
- </div>
3
+ <span class="input-group-text"><i class="fa fa-user fa-fw"></i></span>
6
4
  <%= f.text_field Trestle.config.auth.authenticate_with, placeholder: Trestle.config.auth.human_attribute_name(Trestle.config.auth.authenticate_with), class: "form-control" %>
7
5
  </div>
8
6
  </div>
9
7
 
10
8
  <div class="form-group">
11
9
  <div class="input-group">
12
- <div class="input-group-prepend">
13
- <span class="input-group-text"><i class="fa fa-lock fa-fw"></i></span>
14
- </div>
10
+ <span class="input-group-text"><i class="fa fa-lock fa-fw"></i></span>
15
11
  <%= f.password_field :password, placeholder: Trestle.config.auth.human_attribute_name(:password), class: "form-control" %>
16
12
  </div>
17
13
  </div>
@@ -20,13 +16,13 @@
20
16
 
21
17
  <% if Trestle.config.auth.remember.enabled %>
22
18
  <div class="form-group">
23
- <div class="custom-control custom-checkbox remember-me">
24
- <%= f.check_box :remember_me, class: "custom-control-input", include_hidden: false %>
25
- <%= f.label :remember_me, t("admin.auth.remember_me", default: "Remember me"), class: "custom-control-label" %>
19
+ <div class="form-check remember-me">
20
+ <%= f.check_box :remember_me, class: "form-check-input", include_hidden: false %>
21
+ <%= f.label :remember_me, t("admin.auth.remember_me", default: "Remember me"), class: "form-check-label" %>
26
22
  </div>
27
23
  </div>
28
24
  <% end %>
29
25
 
30
26
  <div class="form-group">
31
- <%= f.submit t("admin.auth.login", default: "Login"), class: "btn btn-primary btn-block btn-lg" %>
27
+ <%= f.submit t("admin.auth.login", default: "Login"), class: "btn btn-primary btn-lg d-block w-100" %>
32
28
  </div>
@@ -0,0 +1,15 @@
1
+ vi:
2
+ admin:
3
+ auth:
4
+ my_account: "Tài Khoản Của Tôi"
5
+ login: "Đăng Nhập"
6
+ logout: "Đăng Xuất"
7
+ error: "Thông tin đăng nhập không hợp lệ!"
8
+ remember_me: "Ghi nhớ phiên đăng nhập"
9
+
10
+ auth/account:
11
+ titles:
12
+ edit: "Tài Khoản Của Tôi"
13
+
14
+ breadcrumbs:
15
+ index: "Tài Khoản Của Tôi"
data/frontend/_form.scss CHANGED
@@ -1,14 +1,15 @@
1
1
  .login-form {
2
- .form-control, .input-group-text {
2
+ .input-group > * {
3
3
  background: $auth-form-control-bg;
4
4
  border: $auth-form-control-border;
5
+ margin-left: 0 !important;
5
6
  }
6
7
 
7
8
  .form-control {
8
9
  color: $auth-form-control-color;
9
- font-size: 1.1rem;
10
+ font-size: 1rem;
10
11
 
11
- padding: 1.75rem 0.75rem;
12
+ padding: 0.875rem 0.625rem;
12
13
 
13
14
  &:focus {
14
15
  outline-color: transparent;
@@ -29,20 +30,16 @@
29
30
  }
30
31
  }
31
32
 
32
- .input-group-prepend {
33
- margin-right: 0;
34
- }
35
-
36
33
  .input-group-text {
37
34
  color: $auth-form-control-icon-color;
38
- padding: 0.375rem 0.25rem 0.375rem 1rem;
35
+ padding: 0.25rem 0.25rem 0.25rem 0.875rem;
39
36
  }
40
37
 
41
38
  .btn-primary {
42
39
  box-shadow: rgba(black, 0.1) 0 0 2px;
43
40
 
44
- padding-top: 0.75rem;
45
- padding-bottom: 0.75rem;
41
+ padding-top: 0.625rem;
42
+ padding-bottom: 0.625rem;
46
43
  }
47
44
 
48
45
  .alert-danger {
@@ -50,12 +47,17 @@
50
47
  }
51
48
 
52
49
  .remember-me {
53
- font-size: 0.95rem;
50
+ font-size: 0.8125rem;
54
51
  line-height: 1.5;
55
52
 
56
53
  padding-left: 0;
57
54
 
58
- .custom-control-label {
55
+ .form-check-input {
56
+ margin-left: 1em;
57
+ margin-top: 0.825em;
58
+ }
59
+
60
+ .form-check-label {
59
61
  display: block;
60
62
  cursor: pointer;
61
63
 
@@ -68,12 +70,6 @@
68
70
  &:hover {
69
71
  background: opacify($auth-remember-me-bg, 0.05);
70
72
  }
71
-
72
- &::before,
73
- &::after {
74
- top: 0.175em + 0.75em;
75
- left: 1.1em;
76
- }
77
73
  }
78
74
  }
79
75
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  .userbox {
4
4
  order: 99;
5
- padding: 2px 0;
5
+ padding: 0.125rem 0;
6
6
 
7
7
  display: flex;
8
8
  align-items: center;
@@ -11,7 +11,7 @@
11
11
  color: $body-color;
12
12
 
13
13
  display: block;
14
- padding: 2px 0;
14
+ padding: 0.125rem 0;
15
15
 
16
16
  font-weight: normal;
17
17
  line-height: 40px;
@@ -23,7 +23,7 @@
23
23
 
24
24
  .avatar {
25
25
  vertical-align: top;
26
- margin-left: 6px;
26
+ margin-left: 0.375rem;
27
27
  }
28
28
 
29
29
  .dropdown-toggle {
@@ -1,19 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
- gem "rspec-rails", "~> 5.0"
4
+ gem "rspec-rails"
5
5
 
6
- gem "coveralls", require: false
6
+ gem "coveralls_reborn", require: false
7
7
  gem "capybara"
8
-
9
- gem "sqlite3", "~> 1.4"
10
- gem "devise"
11
8
  end
12
9
 
13
10
  gem "rails", "~> 6.0.0"
14
- gem "sassc-rails"
15
-
16
- gem "rake", "~> 12.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
17
14
 
18
15
  gem "trestle", github: "TrestleAdmin/trestle"
19
16
 
@@ -3,17 +3,14 @@ source 'https://rubygems.org'
3
3
  group :test do
4
4
  gem "rspec-rails", "~> 5.0"
5
5
 
6
- gem "coveralls", require: false
6
+ gem "coveralls_reborn", require: false
7
7
  gem "capybara"
8
-
9
- gem "sqlite3", "~> 1.4"
10
- gem "devise"
11
8
  end
12
9
 
13
10
  gem "rails", "~> 6.1.0"
14
- gem "sassc-rails"
15
-
16
- gem "rake", "~> 12.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
17
14
 
18
15
  gem "trestle", github: "TrestleAdmin/trestle"
19
16
 
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 7.0.0"
11
+ gem "propshaft"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
14
+
15
+ gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ gemspec path: "../"
@@ -1,19 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
- gem "rspec-rails", "~> 5.0"
4
+ gem "rspec-rails"
5
5
 
6
- gem "coveralls", require: false
6
+ gem "coveralls_reborn", require: false
7
7
  gem "capybara"
8
-
9
- gem "sqlite3", "~> 1.4"
10
- gem "devise"
11
8
  end
12
9
 
13
10
  gem "rails", "~> 7.0.0"
14
- gem "sassc-rails"
15
-
16
- gem "rake", "~> 12.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
17
14
 
18
15
  gem "trestle", github: "TrestleAdmin/trestle"
19
16
 
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 7.1.0"
11
+ gem "propshaft"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
14
+
15
+ gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 7.1.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
14
+
15
+ gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 7.2.0.rc1"
11
+ gem "propshaft"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
14
+
15
+ gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 7.2.0.rc1"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
14
+
15
+ gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ gemspec path: "../"
@@ -1,7 +1,14 @@
1
1
  module Trestle
2
2
  module Auth
3
3
  class Engine < ::Rails::Engine
4
- config.assets.precompile << "trestle/auth.css" << "trestle/auth/userbox.css"
4
+ initializer "trestle.sprockets" do |app|
5
+ # Sprockets manifest
6
+ config.assets.precompile << "trestle/auth/manifest.js"
7
+ end if defined?(Sprockets)
8
+
9
+ initializer "trestle.propshaft" do |app|
10
+ app.config.assets.excluded_paths << root.join("app/assets/sprockets")
11
+ end if defined?(Propshaft)
5
12
 
6
13
  config.before_initialize do
7
14
  Trestle::Engine.paths["app/helpers"].concat(paths["app/helpers"].existent)
@@ -1,5 +1,5 @@
1
1
  module Trestle
2
2
  module Auth
3
- VERSION = "0.4.4"
3
+ VERSION = "0.5.0.pre2"
4
4
  end
5
5
  end
data/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "trestle-auth",
3
- "version": "0.4.4",
3
+ "version": "0.5.0-pre2",
4
4
  "description": "Authentication plugin for the Trestle admin framework",
5
5
  "repository": "https://github.com/TrestleAdmin/trestle-auth.git",
6
6
  "author": "Sam Pohlenz <sam@sampohlenz.com>",
7
- "license": "LGPL-3.0",
7
+ "license": "LGPL-3.0-only",
8
8
  "private": true,
9
9
  "scripts": {
10
10
  "dev": "webpack --mode development",
@@ -19,8 +19,8 @@
19
19
  "css-loader": "^5.2.6",
20
20
  "css-minimizer-webpack-plugin": "^3.0.2",
21
21
  "mini-css-extract-plugin": "^2.0.0",
22
- "node-sass": "^7.0.0",
23
22
  "postcss-loader": "^6.1.1",
23
+ "sass": "^1.77.6",
24
24
  "sass-loader": "^12.1.0",
25
25
  "webpack": "^5.42.0",
26
26
  "webpack-cli": "^4.7.2",
data/trestle-auth.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = "Authentication plugin for the Trestle admin framework"
10
10
  spec.homepage = "https://www.trestle.io"
11
- spec.license = "LGPL-3.0"
11
+ spec.license = "LGPL-3.0-only"
12
12
 
13
13
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
14
14
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
@@ -16,15 +16,15 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
19
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
20
20
 
21
21
  spec.metadata["homepage_uri"] = spec.homepage
22
22
  spec.metadata["source_code_uri"] = "https://github.com/TrestleAdmin/trestle-auth"
23
23
 
24
- spec.add_dependency "trestle", "~> 0.9.0", ">= 0.9.3"
24
+ spec.add_dependency "trestle", "~> 0.10.0.pre2"
25
25
  spec.add_dependency "bcrypt", "~> 3.1.7"
26
26
 
27
27
  spec.add_development_dependency "rspec-rails"
28
- spec.add_development_dependency "show_me_the_cookies", "~> 5.0"
28
+ spec.add_development_dependency "show_me_the_cookies", "~> 6.0"
29
29
  spec.add_development_dependency "timecop", "~> 0.9.1"
30
30
  end
data/webpack.config.js CHANGED
@@ -7,7 +7,7 @@ const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
7
7
  module.exports = {
8
8
  mode: 'production',
9
9
  entry: {
10
- bundle: path.resolve(__dirname, 'frontend/index.scss'),
10
+ login: path.resolve(__dirname, 'frontend/index.scss'),
11
11
  userbox: path.resolve(__dirname, 'frontend/userbox.scss')
12
12
  },
13
13
  output: {
@@ -35,7 +35,14 @@ module.exports = {
35
35
  }
36
36
  }
37
37
  },
38
- { loader: 'sass-loader' }
38
+ {
39
+ loader: 'sass-loader',
40
+ options: {
41
+ sassOptions: {
42
+ quietDeps: true
43
+ }
44
+ }
45
+ }
39
46
  ]
40
47
  }
41
48
  ]