trestle-auth 0.4.3 → 0.5.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b08d828b994e12b0bad65b7beb577501294a3f531755e068259a44b92241b9d3
4
- data.tar.gz: 777c3c03a915bf990fdc24fffc950e920f4fff9c0832ec4aa3f5a48468615174
3
+ metadata.gz: 4bf9bdc4d138b38fa4ad97bcfd868b5a10eded1259fc61d781f3c06ba5d0d442
4
+ data.tar.gz: 720f210a517b3cd1a90218fedc6c6a962ff92e39d683f6ed3f8f5e83b88a8958
5
5
  SHA512:
6
- metadata.gz: 3043e2d73c00181ce0d4b88eb6269e0ccb2bfc0ec52c21b9a335b280aceeac03abcd67703c7763f7ddbe06f04f11ff87970607fad7ddf6677ae401d242ff2061
7
- data.tar.gz: 456ac4bf79afb1c5dcda966351387f1bb007bfac0e0d717ecb3478619d0936bdd8851cccccf740cb3e039c78f1f1b85fca32c42a172e80a65dcb7049f4f5fe34
6
+ metadata.gz: d31ce0625a8e8f2ab7c0e2d4f3da94f7c4409efcb4e6b2ed34ff22db00cbd4e9e7a47f830e41dbfd1801412d0531015aebfc6d5d8975f78a0e589f643bf77373
7
+ data.tar.gz: e2f83f7ffa3652879224c87230a1fbfa9e6f6cf104f9607f8e606c2cc8e2b3d29560f46ec4811eeccb54d1de71c2a91d9941d676409ebb8102f7360e9fa29687
@@ -0,0 +1,50 @@
1
+ name: RSpec
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ strategy:
8
+ fail-fast: false
9
+ matrix:
10
+ gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
11
+ ruby: [ '2.7' ]
12
+ include:
13
+ - gemfile: rails-6.1
14
+ ruby: '3.0'
15
+ - gemfile: rails-7.0
16
+ ruby: '2.7'
17
+ - gemfile: rails-7.0
18
+ ruby: '3.0'
19
+ - gemfile: rails-7.1
20
+ ruby: '3.2'
21
+ runs-on: ubuntu-latest
22
+ env:
23
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Install Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ bundler-cache: true
32
+
33
+ - name: Run Specs
34
+ run: bundle exec rake
35
+
36
+ - name: Coveralls Parallel
37
+ uses: coverallsapp/github-action@v2
38
+ with:
39
+ flag-name: run-${{ join(matrix.*, '-') }}
40
+ parallel: true
41
+
42
+ finish:
43
+ needs: test
44
+ if: ${{ always() }}
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - name: Coveralls Finished
48
+ uses: coverallsapp/github-action@v2
49
+ with:
50
+ parallel-finished: true
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
+ /gemfiles/*.lock
4
5
  /_yardoc/
5
6
  /coverage/
6
7
  /doc/
@@ -12,3 +13,5 @@
12
13
  /spec/dummy/*.sqlite3-journal
13
14
  /spec/dummy/log/*.log
14
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
@@ -4,15 +4,16 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :test do
7
- gem "coveralls", require: false
7
+ gem "rspec-rails"
8
8
 
9
+ gem "coveralls_reborn", require: false
9
10
  gem "capybara"
11
+
10
12
  gem "sqlite3", "~> 1.4"
11
13
  gem "devise"
12
14
  end
13
15
 
14
- gem "sassc-rails"
15
-
16
- gem "rake", "~> 12.0"
16
+ gem "rails", "~> 7.1.0"
17
+ gem "sprockets-rails"
17
18
 
18
19
  gem "trestle", github: "TrestleAdmin/trestle"
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
@@ -1 +1 @@
1
- .auth-body{display:flex;color:#fff}.auth-body .container{margin:auto;width:320px}.auth-header{text-align:center;margin-bottom:20px}.auth-header h1{display:flex;align-items:center;justify-content:center;font-size:1.75rem;font-weight:500;text-shadow:rgba(0,0,0,.5) 0 1px 1px;padding:.75rem 1rem}.auth-header img{max-width:80%;max-height:100%}.auth-header span{margin-left:10px}.login-form .form-control,.login-form .input-group-text{background:hsla(0,0%,100%,.1);border:0}.login-form .form-control{color:#fff;font-size:1.1rem;padding:1.75rem .75rem}.login-form .form-control:focus{outline-color:transparent;outline-style:none;box-shadow:none}.login-form .form-control::-webkit-input-placeholder{color:hsla(0,0%,100%,.5)}.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-prepend{margin-right:0}.login-form .input-group-text{color:hsla(0,0%,100%,.5);padding:.375rem .25rem .375rem 1rem}.login-form .btn-primary{box-shadow:0 0 2px rgba(0,0,0,.1);padding-top:.75rem;padding-bottom:.75rem}.login-form .alert-danger{background-color:rgba(222,116,113,.75)}.login-form .remember-me{font-size:.95rem;line-height:1.5;padding-left:0}.login-form .remember-me .custom-control-label{display:block;cursor:pointer;background:rgba(0,0,0,.075);color:hsla(0,0%,100%,.75);border-radius:.25rem;padding:.75em 1.5em .75em 3.25em}.login-form .remember-me .custom-control-label:hover{background:rgba(0,0,0,.125)}.login-form .remember-me .custom-control-label:after,.login-form .remember-me .custom-control-label:before{top:.925em;left:1.1em}
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:1.1rem;padding:1rem .75rem}.login-form .form-control:focus{box-shadow:none;outline-color:transparent;outline-style:none}.login-form .form-control::-webkit-input-placeholder{color:hsla(0,0%,100%,.5)}.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:.375rem .25rem .375rem 1rem}.login-form .btn-primary{box-shadow:0 0 2px rgba(0,0,0,.1);padding-bottom:.75rem;padding-top:.75rem}.login-form .alert-danger{background-color:hsla(2,62%,66%,.75)}.login-form .remember-me{font-size:.95rem;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:.25rem;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{order:99;padding:2px 0;display:flex;align-items:center}.userbox>a{color:#333;display:block;padding:2px 0;font-weight:400;line-height:40px}.userbox>a:focus,.userbox>a:hover{text-decoration:none}.userbox .avatar{vertical-align:top;margin-left:6px}.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: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}}
@@ -5,26 +5,29 @@
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/custom", 'data-turbo-track': 'reload' %>
22
+
23
+ <%= stylesheet_link_tag "trestle/auth", 'data-turbo-track': 'reload' %>
24
+
25
+ <%= render "trestle/theme" %>
23
26
 
24
27
  <%= hook "auth.head" %>
25
28
  </head>
26
29
 
27
- <body class="auth-body theme-bg-dark">
30
+ <body class="auth-body theme-bg">
28
31
  <main class="container">
29
32
  <%= yield %>
30
33
  </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>
@@ -11,5 +11,9 @@
11
11
  </div>
12
12
  <% end -%>
13
13
 
14
+ <%= hook("auth.login.form.before") %>
15
+
14
16
  <%= render "form", f: f %>
17
+
18
+ <%= hook("auth.login.form.after") %>
15
19
  <% end %>
@@ -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
10
  font-size: 1.1rem;
10
11
 
11
- padding: 1.75rem 0.75rem;
12
+ padding: 1rem 0.75rem;
12
13
 
13
14
  &:focus {
14
15
  outline-color: transparent;
@@ -29,10 +30,6 @@
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
35
  padding: 0.375rem 0.25rem 0.375rem 1rem;
@@ -55,7 +52,12 @@
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
  }
@@ -1,17 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
- gem "coveralls", require: false
5
- gem "capybara"
4
+ gem "rspec-rails"
6
5
 
7
- gem "sqlite3", "~> 1.3.13"
8
- gem "devise"
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
9
8
  end
10
9
 
11
10
  gem "rails", "~> 5.2.0"
12
- gem "sassc-rails"
13
-
14
- gem "rake", "~> 12.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.3.13"
13
+ gem "devise"
15
14
 
16
15
  gem "trestle", github: "TrestleAdmin/trestle"
17
16
 
@@ -1,17 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
- gem "coveralls", require: false
4
+ gem "rspec-rails"
5
5
 
6
+ gem "coveralls_reborn", require: false
6
7
  gem "capybara"
7
- gem "sqlite3", "~> 1.4"
8
- gem "devise"
9
8
  end
10
9
 
11
10
  gem "rails", "~> 6.0.0"
12
- gem "sassc-rails"
13
-
14
- gem "rake", "~> 12.0"
11
+ gem "sprockets-rails"
12
+ gem "sqlite3", "~> 1.4"
13
+ gem "devise"
15
14
 
16
15
  gem "trestle", github: "TrestleAdmin/trestle"
17
16
 
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem "rspec-rails", "~> 5.0"
5
+
6
+ gem "coveralls_reborn", require: false
7
+ gem "capybara"
8
+ end
9
+
10
+ gem "rails", "~> 6.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.0.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.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: "../"
@@ -1,5 +1,5 @@
1
1
  module Trestle
2
2
  module Auth
3
- VERSION = "0.4.3"
3
+ VERSION = "0.5.0.pre"
4
4
  end
5
5
  end
data/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "trestle-auth",
3
- "version": "0.3.0",
3
+ "version": "0.5.0.pre",
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",
@@ -15,15 +15,15 @@
15
15
  "trestle": "https://github.com/TrestleAdmin/trestle.git"
16
16
  },
17
17
  "devDependencies": {
18
- "autoprefixer": "^9.6.1",
19
- "css-loader": "^3.2.0",
20
- "mini-css-extract-plugin": "^0.8.0",
21
- "node-sass": "^4.12.0",
22
- "optimize-css-assets-webpack-plugin": "^5.0.3",
23
- "postcss-loader": "^3.0.0",
24
- "sass-loader": "^8.0.0",
25
- "webpack": "^4.40.2",
26
- "webpack-cli": "^3.3.9",
27
- "webpack-fix-style-only-entries": "^0.4.0"
18
+ "autoprefixer": "^10.2.6",
19
+ "css-loader": "^5.2.6",
20
+ "css-minimizer-webpack-plugin": "^3.0.2",
21
+ "mini-css-extract-plugin": "^2.0.0",
22
+ "node-sass": "^7.0.0",
23
+ "postcss-loader": "^6.1.1",
24
+ "sass-loader": "^12.1.0",
25
+ "webpack": "^5.42.0",
26
+ "webpack-cli": "^4.7.2",
27
+ "webpack-remove-empty-scripts": "^0.7.1"
28
28
  }
29
29
  }
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)/}) }
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
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.pre"
25
25
  spec.add_dependency "bcrypt", "~> 3.1.7"
26
26
 
27
- spec.add_development_dependency "rspec-rails", "~> 3.0"
28
- spec.add_development_dependency "show_me_the_cookies", "~> 5.0"
27
+ spec.add_development_dependency "rspec-rails"
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
@@ -1,10 +1,11 @@
1
1
  const path = require('path');
2
2
 
3
+ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
3
4
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
- const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
5
- const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
5
+ const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
6
6
 
7
7
  module.exports = {
8
+ mode: 'production',
8
9
  entry: {
9
10
  bundle: path.resolve(__dirname, 'frontend/index.scss'),
10
11
  userbox: path.resolve(__dirname, 'frontend/userbox.scss')
@@ -13,18 +14,8 @@ module.exports = {
13
14
  path: path.resolve(__dirname, 'app/assets/bundle/trestle/auth')
14
15
  },
15
16
  optimization: {
16
- splitChunks: {
17
- cacheGroups: {
18
- styles: {
19
- name: 'bundle',
20
- test: /\.css$/,
21
- chunks: 'all',
22
- enforce: true
23
- }
24
- }
25
- },
26
17
  minimizer: [
27
- new OptimizeCSSAssetsPlugin({})
18
+ new CssMinimizerPlugin({})
28
19
  ]
29
20
  },
30
21
  module: {
@@ -34,14 +25,23 @@ module.exports = {
34
25
  use: [
35
26
  { loader: MiniCssExtractPlugin.loader },
36
27
  { loader: 'css-loader' },
37
- { loader: 'postcss-loader', options: { plugins: [ require('autoprefixer') ] } },
28
+ {
29
+ loader: 'postcss-loader',
30
+ options: {
31
+ postcssOptions: {
32
+ plugins: [
33
+ ['autoprefixer', {}]
34
+ ]
35
+ }
36
+ }
37
+ },
38
38
  { loader: 'sass-loader' }
39
39
  ]
40
40
  }
41
41
  ]
42
42
  },
43
43
  plugins: [
44
- new FixStyleOnlyEntriesPlugin(),
44
+ new RemoveEmptyScriptsPlugin(),
45
45
  new MiniCssExtractPlugin({
46
46
  filename: '[name].css'
47
47
  })