super_auth 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/super_auth/version.rb +1 -1
- data/lib/super_auth.rb +6 -4
- data/super_auth.gemspec +35 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a2db33b2e48f7e542d54f3b5cef127f51c09fe19896b4ec6644a65ffa424c91
|
|
4
|
+
data.tar.gz: 87a7b993edea7bab1ca6c3298805f17e62ce0cd8b67de9114167cdb868316d7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62f14629c43e5dae082d3884803dae6559a91c58118479fc1fc6e4496dec27036c35cf8011e859b16f0e5a30d9c977244d2c39d005936a015796ddd1845b87ee
|
|
7
|
+
data.tar.gz: ee2cfaa0d1d3d4b8e3ba56130bc47cdbcb491982fac339bcde956a555b267dc8b39c82da284427f4b7e0baeb6382a5532766135d96922ecd1170079a0333c2f5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.3.3] - 2026-04-29
|
|
4
|
+
|
|
5
|
+
- Fix: detect PostgreSQL/SQLite/Mysql2 adapter subclasses (e.g. PostGIS, Makara) when bootstrapping the Sequel connection from ActiveRecord. Previously only the exact stock adapter classes were recognized, leaving `SuperAuth.db` unset for apps using a subclassed adapter.
|
|
6
|
+
|
|
3
7
|
## [0.3.2] - 2026-03-10
|
|
4
8
|
|
|
5
9
|
- Feature: Add `SuperAuth.missing_user_behavior` configuration option
|
data/Gemfile.lock
CHANGED
data/lib/super_auth/version.rb
CHANGED
data/lib/super_auth.rb
CHANGED
|
@@ -86,12 +86,14 @@ module SuperAuth
|
|
|
86
86
|
::ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
# Walk the ancestor chain so adapter subclasses (e.g. PostGIS, Makara)
|
|
90
|
+
# are recognized as their parent adapter type.
|
|
91
|
+
adapter_ancestors = ::ActiveRecord::Base.adapter_class.ancestors.map(&:to_s)
|
|
92
|
+
if adapter_ancestors.include?("ActiveRecord::ConnectionAdapters::SQLite3Adapter")
|
|
91
93
|
SuperAuth.db = Sequel.sqlite(**extensions)
|
|
92
|
-
|
|
94
|
+
elsif adapter_ancestors.include?("ActiveRecord::ConnectionAdapters::PostgreSQLAdapter")
|
|
93
95
|
SuperAuth.db = Sequel.postgres(**extensions)
|
|
94
|
-
|
|
96
|
+
elsif adapter_ancestors.include?("ActiveRecord::ConnectionAdapters::Mysql2Adapter")
|
|
95
97
|
SuperAuth.db = Sequel.mysql2(**extensions)
|
|
96
98
|
else
|
|
97
99
|
warn "[SuperAuth] WARNING: Unknown adapter: #{::ActiveRecord::Base.adapter_class}"
|
data/super_auth.gemspec
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require_relative "lib/super_auth/version"
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |spec|
|
|
4
|
+
spec.name = "super_auth"
|
|
5
|
+
spec.version = SuperAuth::VERSION
|
|
6
|
+
spec.authors = ["Jonathan Frias"]
|
|
7
|
+
spec.email = ["jonathan@gofrias.com"]
|
|
8
|
+
|
|
9
|
+
spec.summary = "Make Unauthenticated State Unrepresentable"
|
|
10
|
+
spec.description = "Simple, yet super powerful authorization for you application"
|
|
11
|
+
spec.homepage = "https://github.com/JonathanFrias/super_auth"
|
|
12
|
+
spec.license = "MIT"
|
|
13
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
14
|
+
|
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
|
+
spec.metadata["source_code_uri"] = "https://github.com/JonathanFrias/super_auth"
|
|
17
|
+
spec.metadata["changelog_uri"] = "https://github.com/JonathanFrias/super_auth/blob/main/CHANGELOG.md"
|
|
18
|
+
|
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
21
|
+
spec.files = Dir.chdir(__dir__) do
|
|
22
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
23
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
spec.bindir = "bin"
|
|
27
|
+
spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
|
|
28
|
+
spec.require_paths = ["lib"]
|
|
29
|
+
|
|
30
|
+
# Uncomment to register a new dependency of your gem
|
|
31
|
+
spec.add_dependency "sequel"
|
|
32
|
+
spec.add_development_dependency "sqlite3"
|
|
33
|
+
# For more information and examples about making a new gem, check out our
|
|
34
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
|
35
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: super_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Frias
|
|
@@ -100,6 +100,7 @@ files:
|
|
|
100
100
|
- lib/super_auth/user.rb
|
|
101
101
|
- lib/super_auth/version.rb
|
|
102
102
|
- lib/tasks/super_auth_tasks.rake
|
|
103
|
+
- super_auth.gemspec
|
|
103
104
|
- visualization.html
|
|
104
105
|
homepage: https://github.com/JonathanFrias/super_auth
|
|
105
106
|
licenses:
|