Skip to content

Commit

Permalink
Merge branch 'main' into authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed May 20, 2024
2 parents 697666c + 6750252 commit 121cad6
Show file tree
Hide file tree
Showing 25 changed files with 1,416 additions and 1,208 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: RSpec

on: [push, pull_request]

jobs:
test:
strategy:
fail-fast: false
matrix:
gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
ruby: [ '2.7' ]
include:
- gemfile: rails-6.1
ruby: '3.0'
- gemfile: rails-7.0
ruby: '2.7'
- gemfile: rails-7.0
ruby: '3.0'
- gemfile: rails-7.1
ruby: '3.2'
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
/spec/dummy/*.sqlite3-journal
/spec/dummy/log/*.log
/spec/dummy/tmp/*
*.sqlite3-shm
*.sqlite3-wal
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--require spec_helper
--format documentation
--color
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ source 'https://rubygems.org'
gemspec

group :test do
gem "rspec-rails", "~> 5.0"
gem "rspec-rails"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.4"
end

gem "rails", "~> 7.1.0"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Trestle Authentication & Authorization (trestle-auth)

[![RubyGem](https://img.shields.io/gem/v/trestle-auth.svg?style=flat&colorB=4065a9)](https://rubygems.org/gems/trestle-auth)
[![Travis](https://img.shields.io/travis/TrestleAdmin/trestle-auth.svg?style=flat)](https://travis-ci.org/TrestleAdmin/trestle-auth)
[![Build Status](https://img.shields.io/github/actions/workflow/status/TrestleAdmin/trestle-auth/rspec.yml?style=flat)](https://github.com/TrestleAdmin/trestle-auth/actions)
[![Coveralls](https://img.shields.io/coveralls/TrestleAdmin/trestle-auth.svg?style=flat)](https://coveralls.io/github/TrestleAdmin/trestle-auth)

> Authentication & authorization plugin for the Trestle admin framework
Expand Down
2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/auth/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/auth/userbox.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/views/trestle/auth/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@
</div>
<% end -%>

<%= hook("auth.login.form.before") %>

<%= render "form", f: f %>

<%= hook("auth.login.form.after") %>
<% end %>
15 changes: 15 additions & 0 deletions config/locales/vi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
vi:
admin:
auth:
my_account: "Tài Khoản Của Tôi"
login: "Đăng Nhập"
logout: "Đăng Xuất"
error: "Thông tin đăng nhập không hợp lệ!"
remember_me: "Ghi nhớ phiên đăng nhập"

auth/account:
titles:
edit: "Tài Khoản Của Tôi"

breadcrumbs:
index: "Tài Khoản Của Tôi"
23 changes: 0 additions & 23 deletions gemfiles/rails-5.1.gemfile

This file was deleted.

10 changes: 4 additions & 6 deletions gemfiles/rails-5.2.gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
source 'https://rubygems.org'

group :test do
gem "rspec-rails", "~> 5.0"
gem "rspec-rails"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.3.13"
end

gem "rails", "~> 5.2.0"

gem "sqlite3", "~> 1.3.13"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"

gemspec path: "../"
10 changes: 5 additions & 5 deletions gemfiles/rails-6.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
source 'https://rubygems.org'

group :test do
gem "coveralls", require: false
gem "capybara"
gem "rspec-rails"

gem "sqlite3", "~> 1.4"
gem "coveralls_reborn", require: false
gem "capybara"
end

gem "rails", "~> 6.0.0"

gem "sqlite3", "~> 1.4"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"

gemspec path: "../"
9 changes: 3 additions & 6 deletions gemfiles/rails-6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@ source 'https://rubygems.org'
group :test do
gem "rspec-rails", "~> 5.0"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.4"
gem "devise"
end

gem "rails", "~> 6.1.0"

gem "sqlite3", "~> 1.4"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"

gemspec path: "../"
11 changes: 4 additions & 7 deletions gemfiles/rails-7.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
source 'https://rubygems.org'

group :test do
gem "rspec-rails", "~> 5.0"
gem "rspec-rails"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.4"
gem "devise"
end

gem "rails", "~> 7.0.0"

gem "sqlite3", "~> 1.4"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"

gemspec path: "../"
12 changes: 5 additions & 7 deletions gemfiles/rails-5.0.gemfile → gemfiles/rails-7.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
source 'https://rubygems.org'

group :test do
gem "rspec-rails", "~> 4.1.2"
gem "rspec-rails"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.3.13"
end

gem "rails", "~> 5.0.0"
gem "rails", "~> 7.1.0"

gem "sqlite3", "~> 1.4"
gem "sassc-rails"

gem "devise"
gem "cancancan"
gem "pundit"

gem "rake", "~> 12.0"

gem "trestle", github: "TrestleAdmin/trestle"

gemspec path: "../"
2 changes: 1 addition & 1 deletion lib/trestle/auth/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Trestle
module Auth
VERSION = "0.4.3"
VERSION = "0.4.4"
end
end
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trestle-auth",
"version": "0.3.0",
"version": "0.4.4",
"description": "Authentication plugin for the Trestle admin framework",
"repository": "https://github.com/TrestleAdmin/trestle-auth.git",
"author": "Sam Pohlenz <[email protected]>",
Expand All @@ -19,7 +19,7 @@
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^3.0.2",
"mini-css-extract-plugin": "^2.0.0",
"node-sass": "^6.0.1",
"node-sass": "^7.0.0",
"postcss-loader": "^6.1.1",
"sass-loader": "^12.1.0",
"webpack": "^5.42.0",
Expand Down
15 changes: 2 additions & 13 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
require "action_controller/railtie"
require "action_view/railtie"
require "sprockets/railtie"
require "action_mailer/railtie"
# require "active_job/railtie"
# require "active_storage/engine"
# require "action_mailer/railtie"
# require "action_cable/engine"
# require "rails/test_unit/railtie"

Expand All @@ -17,18 +17,7 @@
module Dummy
class Application < Rails::Application
# Initialize configuration defaults for current Rails version.
case Rails.version.split(".").first(2).join(".")
when '7.0'
config.load_defaults 7.0
when '6.1'
config.load_defaults 6.1
when '6.0'
config.load_defaults 6.0
when '5.2'
config.load_defaults 5.2
when '5.1'
config.load_defaults 5.1
end
config.load_defaults Rails::VERSION::STRING.to_f

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
Expand Down
Loading

0 comments on commit 121cad6

Please sign in to comment.