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 +4 -4
- data/.github/workflows/rspec.yml +50 -0
- data/.gitignore +3 -0
- data/.rspec +0 -1
- data/Gemfile +5 -4
- data/README.md +1 -1
- data/app/assets/bundle/trestle/auth/bundle.css +1 -1
- data/app/assets/bundle/trestle/auth/userbox.css +1 -1
- data/app/views/layouts/trestle/auth.html.erb +12 -9
- data/app/views/trestle/auth/_userbox.html.erb +2 -2
- data/app/views/trestle/auth/sessions/_form.html.erb +6 -10
- data/app/views/trestle/auth/sessions/new.html.erb +4 -0
- data/config/locales/vi.yml +15 -0
- data/frontend/_form.scss +9 -13
- data/gemfiles/rails-5.2.gemfile +6 -7
- data/gemfiles/rails-6.0.gemfile +5 -6
- data/gemfiles/rails-6.1.gemfile +17 -0
- data/gemfiles/rails-7.0.gemfile +17 -0
- data/gemfiles/rails-7.1.gemfile +17 -0
- data/lib/trestle/auth/version.rb +1 -1
- data/package.json +12 -12
- data/trestle-auth.gemspec +4 -4
- data/webpack.config.js +15 -15
- data/yarn.lock +1846 -3618
- metadata +17 -22
- data/.travis.yml +0 -22
- data/gemfiles/rails-4.2.gemfile +0 -18
- data/gemfiles/rails-5.0.gemfile +0 -18
- data/gemfiles/rails-5.1.gemfile +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bf9bdc4d138b38fa4ad97bcfd868b5a10eded1259fc61d781f3c06ba5d0d442
|
4
|
+
data.tar.gz: 720f210a517b3cd1a90218fedc6c6a962ff92e39d683f6ed3f8f5e83b88a8958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/.rspec
CHANGED
data/Gemfile
CHANGED
@@ -4,15 +4,16 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :test do
|
7
|
-
gem "
|
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 "
|
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
|
-
[![
|
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
|
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
|
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
|
-
|
9
|
-
|
10
|
-
|
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
|
-
<%=
|
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/
|
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
|
-
<%=
|
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
|
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: {
|
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-
|
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
|
-
<
|
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
|
-
<
|
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="
|
24
|
-
<%= f.check_box :remember_me, class: "
|
25
|
-
<%= f.label :remember_me, t("admin.auth.remember_me", default: "Remember me"), class: "
|
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
|
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
|
-
.
|
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:
|
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
|
-
.
|
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
|
}
|
data/gemfiles/rails-5.2.gemfile
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
5
|
-
gem "capybara"
|
4
|
+
gem "rspec-rails"
|
6
5
|
|
7
|
-
gem "
|
8
|
-
gem "
|
6
|
+
gem "coveralls_reborn", require: false
|
7
|
+
gem "capybara"
|
9
8
|
end
|
10
9
|
|
11
10
|
gem "rails", "~> 5.2.0"
|
12
|
-
gem "
|
13
|
-
|
14
|
-
gem "
|
11
|
+
gem "sprockets-rails"
|
12
|
+
gem "sqlite3", "~> 1.3.13"
|
13
|
+
gem "devise"
|
15
14
|
|
16
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
17
16
|
|
data/gemfiles/rails-6.0.gemfile
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
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 "
|
13
|
-
|
14
|
-
gem "
|
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: "../"
|
data/lib/trestle/auth/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "trestle-auth",
|
3
|
-
"version": "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": "^
|
19
|
-
"css-loader": "^
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"postcss-loader": "^
|
24
|
-
"sass-loader": "^
|
25
|
-
"webpack": "^
|
26
|
-
"webpack-cli": "^
|
27
|
-
"webpack-
|
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.
|
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"
|
28
|
-
spec.add_development_dependency "show_me_the_cookies", "~>
|
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
|
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
|
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
|
-
{
|
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
|
44
|
+
new RemoveEmptyScriptsPlugin(),
|
45
45
|
new MiniCssExtractPlugin({
|
46
46
|
filename: '[name].css'
|
47
47
|
})
|