better_auth-sinatra 0.7.0 → 0.8.0
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/lib/better_auth/sinatra/tasks.rb +1 -1
- data/lib/better_auth/sinatra/version.rb +1 -1
- data/lib/better_auth/sinatra.rb +4 -4
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c7447781067976bc4c48c8a826db7f10ea2a1b730da8d0ffe1a084e22c97357
|
|
4
|
+
data.tar.gz: 6471dbc15a2cd08755db616741081cc8aee613040153512796e86e1ce0df300f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09a9f4b4d5b0ef1491e1a20c653cf3a3aaa3a317f65a478b3f4c78d764be46d92faddf6c2c3a9690923fb84aced0b6d6e049496fb40f33309baed358200779d6'
|
|
7
|
+
data.tar.gz: 67e80a63f8e8db1564265a4f74581cb96c45a5af0bcf9283c27f769685f29a648dc62b8e51ade56bcd3dce3d84fc24dfadba748a5a05abfb6a0ccc81b5791cc4
|
|
@@ -23,7 +23,7 @@ namespace :better_auth do
|
|
|
23
23
|
desc "Create the Better Auth SQL migration"
|
|
24
24
|
task :migration do
|
|
25
25
|
BetterAuth::Sinatra.load_app_config
|
|
26
|
-
dialect = BetterAuth::Sinatra::Migration.normalize_dialect(
|
|
26
|
+
dialect = BetterAuth::Sinatra::Migration.normalize_dialect(BetterAuth::Env.get("BETTER_AUTH_DIALECT") || BetterAuth::Env.get("BETTER_AUTH_DATABASE_DIALECT") || "postgres")
|
|
27
27
|
config = BetterAuth::Sinatra.migration_configuration
|
|
28
28
|
path = BetterAuth::Sinatra::Migration.generate(config, dialect: dialect)
|
|
29
29
|
puts "create #{path}"
|
data/lib/better_auth/sinatra.rb
CHANGED
|
@@ -56,12 +56,12 @@ module BetterAuth
|
|
|
56
56
|
require "better_auth/sinatra"
|
|
57
57
|
|
|
58
58
|
BetterAuth::Sinatra.configure do |config|
|
|
59
|
-
config.secret =
|
|
60
|
-
config.base_url =
|
|
59
|
+
config.secret = BetterAuth::Env.fetch("BETTER_AUTH_SECRET", "change-me-sinatra-secret-12345678901234567890")
|
|
60
|
+
config.base_url = BetterAuth::Env.get("BETTER_AUTH_URL")
|
|
61
61
|
config.base_path = "/api/auth"
|
|
62
62
|
|
|
63
63
|
config.database = ->(options) do
|
|
64
|
-
case
|
|
64
|
+
case BetterAuth::Env.fetch("BETTER_AUTH_DATABASE_DIALECT", "postgres")
|
|
65
65
|
when "postgres", "postgresql"
|
|
66
66
|
BetterAuth::Adapters::Postgres.new(options, url: ENV.fetch("DATABASE_URL"))
|
|
67
67
|
when "mysql"
|
|
@@ -69,7 +69,7 @@ module BetterAuth
|
|
|
69
69
|
when "sqlite", "sqlite3"
|
|
70
70
|
BetterAuth::Adapters::SQLite.new(options, path: ENV.fetch("DATABASE_URL", "db/better_auth.sqlite3"))
|
|
71
71
|
else
|
|
72
|
-
raise "Unsupported BETTER_AUTH_DATABASE_DIALECT for better_auth-sinatra"
|
|
72
|
+
raise "Unsupported OPEN_AUTH_DATABASE_DIALECT or BETTER_AUTH_DATABASE_DIALECT for better_auth-sinatra"
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: better_auth-sinatra
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sebastian Sala
|
|
@@ -113,8 +113,9 @@ dependencies:
|
|
|
113
113
|
- - "~>"
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
115
|
version: '1.0'
|
|
116
|
-
description: Sinatra integration for Better Auth Ruby.
|
|
117
|
-
|
|
116
|
+
description: Sinatra integration for Better Auth Ruby. Better Auth Ruby is an independent
|
|
117
|
+
modern authentication framework for Ruby inspired by Better Auth. Provides mounting
|
|
118
|
+
helpers, request helpers, and SQL migration tasks.
|
|
118
119
|
email:
|
|
119
120
|
- sebastian.sala.tech@gmail.com
|
|
120
121
|
executables: []
|