Skip to content

Commit a989ee9

Browse files
committed
Merge latest 0.5.0 updates
2 parents 783f7b5 + e55a046 commit a989ee9

File tree

23 files changed

+696
-1787
lines changed

23 files changed

+696
-1787
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/rspec.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,27 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
11-
ruby: [ '2.7' ]
1210
include:
11+
- gemfile: rails-6.0
12+
ruby: '2.6'
13+
- gemfile: rails-6.1
14+
ruby: '2.6'
1315
- gemfile: rails-6.1
1416
ruby: '3.0'
1517
- gemfile: rails-7.0
1618
ruby: '2.7'
1719
- gemfile: rails-7.0
1820
ruby: '3.0'
21+
- gemfile: rails-7.0-propshaft
22+
ruby: '3.0'
1923
- gemfile: rails-7.1
20-
ruby: '3.2'
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'
2131
runs-on: ubuntu-latest
2232
env:
2333
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

Gemfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
source 'https://rubygems.org'
22

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
57

68
group :test do
79
gem "rspec-rails"
@@ -13,10 +15,12 @@ group :test do
1315
end
1416

1517
gem "rails", "~> 7.1.0"
16-
gem "sprockets-rails"
1718

1819
gem "devise"
1920
gem "cancancan"
2021
gem "pundit"
2122

2223
gem "trestle", github: "TrestleAdmin/trestle"
24+
25+
# Specify your gem's dependencies in trestle-auth.gemspec
26+
gemspec

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Trestle Authentication & Authorization (trestle-auth)
22

3-
[![RubyGem](https://img.shields.io/gem/v/trestle-auth.svg?style=flat&colorB=4065a9)](https://rubygems.org/gems/trestle-auth)
3+
[![RubyGem](https://img.shields.io/gem/v/trestle-auth?include_prereleases&color=%234d6bb2)](https://rubygems.org/gems/trestle-auth)
44
[![Build Status](https://img.shields.io/github/actions/workflow/status/TrestleAdmin/trestle-auth/rspec.yml?style=flat)](https://github.com/TrestleAdmin/trestle-auth/actions)
55
[![Coveralls](https://img.shields.io/coveralls/TrestleAdmin/trestle-auth.svg?style=flat)](https://coveralls.io/github/TrestleAdmin/trestle-auth)
66

app/assets/bundle/trestle/auth/bundle.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/assets/bundle/trestle/auth/login.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/bundle/trestle/auth/userbox.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link trestle/auth/login.css
2+
//= link trestle/auth/userbox.css
3+
//= link trestle/auth/custom.css

app/assets/stylesheets/trestle/auth.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/views/layouts/trestle/auth.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
<%= stylesheet_link_tag "trestle/admin", 'data-turbo-track': 'reload' %>
1919
<%= stylesheet_link_tag "trestle/icons/font-awesome", 'data-turbo-track': 'reload' if defined?(Sprockets) %>
2020

21-
<%= stylesheet_link_tag "trestle/custom", 'data-turbo-track': 'reload' %>
21+
<%= stylesheet_link_tag "trestle/auth/login", 'data-turbo-track': 'reload' %>
2222

23-
<%= stylesheet_link_tag "trestle/auth", 'data-turbo-track': 'reload' %>
23+
<%= stylesheet_link_tag "trestle/custom", 'data-turbo-track': 'reload' %>
24+
<%= stylesheet_link_tag "trestle/auth/custom", 'data-turbo-track': 'reload' %>
2425

2526
<%= render "trestle/theme" %>
2627

frontend/_form.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
.form-control {
99
color: $auth-form-control-color;
10-
font-size: 1.1rem;
10+
font-size: 1rem;
1111

12-
padding: 1rem 0.75rem;
12+
padding: 0.875rem 0.625rem;
1313

1414
&:focus {
1515
outline-color: transparent;
@@ -32,22 +32,22 @@
3232

3333
.input-group-text {
3434
color: $auth-form-control-icon-color;
35-
padding: 0.375rem 0.25rem 0.375rem 1rem;
35+
padding: 0.25rem 0.25rem 0.25rem 0.875rem;
3636
}
3737

3838
.btn-primary {
3939
box-shadow: rgba(black, 0.1) 0 0 2px;
4040

41-
padding-top: 0.75rem;
42-
padding-bottom: 0.75rem;
41+
padding-top: 0.625rem;
42+
padding-bottom: 0.625rem;
4343
}
4444

4545
.alert-danger {
4646
background-color: rgba($alert-danger-bg, 0.75);
4747
}
4848

4949
.remember-me {
50-
font-size: 0.95rem;
50+
font-size: 0.8125rem;
5151
line-height: 1.5;
5252

5353
padding-left: 0;

frontend/userbox.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.userbox {
44
order: 99;
5-
padding: 2px 0;
5+
padding: 0.125rem 0;
66

77
display: flex;
88
align-items: center;
@@ -11,7 +11,7 @@
1111
color: $body-color;
1212

1313
display: block;
14-
padding: 2px 0;
14+
padding: 0.125rem 0;
1515

1616
font-weight: normal;
1717
line-height: 40px;
@@ -23,7 +23,7 @@
2323

2424
.avatar {
2525
vertical-align: top;
26-
margin-left: 6px;
26+
margin-left: 0.375rem;
2727
}
2828

2929
.dropdown-toggle {

gemfiles/rails-7.0-propshaft.gemfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: "../"

gemfiles/rails-7.1-propshaft.gemfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: "../"

gemfiles/rails-7.2-propshaft.gemfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: "../"

gemfiles/rails-5.2.gemfile renamed to gemfiles/rails-7.2.gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ group :test do
77
gem "capybara"
88
end
99

10-
gem "rails", "~> 5.2.0"
10+
gem "rails", "~> 7.2.0.rc1"
1111
gem "sprockets-rails"
12-
gem "sqlite3", "~> 1.3.13"
12+
gem "sqlite3", "~> 1.4"
1313
gem "devise"
1414
gem "cancancan"
1515
gem "pundit"

lib/trestle/auth/engine.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
module Trestle
22
module Auth
33
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)
512

613
config.before_initialize do
714
Trestle::Engine.paths["app/helpers"].concat(paths["app/helpers"].existent)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trestle-auth",
3-
"version": "0.5.0.pre",
3+
"version": "0.5.0-authorization",
44
"description": "Authentication plugin for the Trestle admin framework",
55
"repository": "https://github.com/TrestleAdmin/trestle-auth.git",
66
"author": "Sam Pohlenz <sam@sampohlenz.com>",
@@ -19,8 +19,8 @@
1919
"css-loader": "^5.2.6",
2020
"css-minimizer-webpack-plugin": "^3.0.2",
2121
"mini-css-extract-plugin": "^2.0.0",
22-
"node-sass": "^7.0.0",
2322
"postcss-loader": "^6.1.1",
23+
"sass": "^1.77.6",
2424
"sass-loader": "^12.1.0",
2525
"webpack": "^5.42.0",
2626
"webpack-cli": "^4.7.2",

spec/dummy/config/application.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require "active_record/railtie"
66
require "action_controller/railtie"
77
require "action_view/railtie"
8-
require "sprockets/railtie"
98
require "action_mailer/railtie"
109
# require "active_job/railtie"
1110
# require "active_storage/engine"

trestle-auth.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Gem::Specification.new do |spec|
1616

1717
spec.require_paths = ["lib"]
1818

19-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
19+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
2020

2121
spec.metadata["homepage_uri"] = spec.homepage
2222
spec.metadata["source_code_uri"] = "https://github.com/TrestleAdmin/trestle-auth"
2323

24-
spec.add_dependency "trestle", "~> 0.10.0.pre"
24+
spec.add_dependency "trestle", "~> 0.10.0"
2525
spec.add_dependency "bcrypt", "~> 3.1.7"
2626

2727
spec.add_development_dependency "rspec-rails"

webpack.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
77
module.exports = {
88
mode: 'production',
99
entry: {
10-
bundle: path.resolve(__dirname, 'frontend/index.scss'),
10+
login: path.resolve(__dirname, 'frontend/index.scss'),
1111
userbox: path.resolve(__dirname, 'frontend/userbox.scss')
1212
},
1313
output: {
@@ -35,7 +35,14 @@ module.exports = {
3535
}
3636
}
3737
},
38-
{ loader: 'sass-loader' }
38+
{
39+
loader: 'sass-loader',
40+
options: {
41+
sassOptions: {
42+
quietDeps: true
43+
}
44+
}
45+
}
3946
]
4047
}
4148
]

0 commit comments

Comments
 (0)