studio-engine 0.5.5 → 0.5.6
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 +7 -0
- data/app/controllers/concerns/studio/error_handling.rb +1 -1
- data/app/models/session_context.rb +2 -0
- data/lib/studio/version.rb +1 -1
- data/lib/studio.rb +14 -0
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7dde49831782823962437f0efab2c8334fe0efc4376873ee9b9c4c2486aa4d1f
|
|
4
|
+
data.tar.gz: c9cb4750ad4298869623db8a98e93662b101a1b2ce055fb779d15a3095ba1529
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb82ea299130783431b2dfea4fac8ddece0728b7f49d6ea15c1cff49d819fb6687a5a03f4eb80d4a0f8cb590cf78e45ccb1cdec410bc042ba6caed95bdde24b0
|
|
7
|
+
data.tar.gz: e93039393ac8e344f7eef097ce55629f41cdefdb8f48be418ad3f8a7228e1c01363a3646ecd23708cffa182d3e905e17a8c1b2f8eccbfe6b97a3c9ef203a855b
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
6
6
|
|
|
7
7
|
No entries yet.
|
|
8
8
|
|
|
9
|
+
## v0.5.6 (2026-06-14)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`Studio.wallet_address_method` / `Studio.user_wallet_address(user)`** —
|
|
13
|
+
shared wallet-address adapter for SSO/session awareness. Defaults support
|
|
14
|
+
`wallet_address` and `solana_address`; apps can configure another method.
|
|
15
|
+
|
|
9
16
|
## v0.5.5 (2026-06-14)
|
|
10
17
|
|
|
11
18
|
### Added
|
|
@@ -49,7 +49,7 @@ module Studio
|
|
|
49
49
|
session[:sso_name] = user.try(:name)
|
|
50
50
|
session[:sso_provider] = user.provider
|
|
51
51
|
session[:sso_uid] = user.uid
|
|
52
|
-
session[:sso_wallet] =
|
|
52
|
+
session[:sso_wallet] = Studio.user_wallet_address(user)
|
|
53
53
|
session[:sso_source] = Studio.app_name
|
|
54
54
|
session[:sso_logo] = Studio.sso_logo
|
|
55
55
|
end
|
|
@@ -63,6 +63,8 @@ class SessionContext
|
|
|
63
63
|
|
|
64
64
|
# Primary wallet address (web3 preferred), or nil when logged out / wallet-less.
|
|
65
65
|
def address
|
|
66
|
+
return Studio.user_wallet_address(user) if defined?(Studio) && Studio.respond_to?(:user_wallet_address)
|
|
67
|
+
|
|
66
68
|
return nil unless user.respond_to?(:solana_address)
|
|
67
69
|
user.solana_address
|
|
68
70
|
end
|
data/lib/studio/version.rb
CHANGED
data/lib/studio.rb
CHANGED
|
@@ -16,6 +16,7 @@ module Studio
|
|
|
16
16
|
mattr_accessor :configure_new_user, default: ->(user) {}
|
|
17
17
|
mattr_accessor :configure_sso_user, default: ->(user) {}
|
|
18
18
|
mattr_accessor :sso_logo, default: nil
|
|
19
|
+
mattr_accessor :wallet_address_method, default: nil
|
|
19
20
|
mattr_accessor :theme_logos, default: []
|
|
20
21
|
|
|
21
22
|
# ---- Authentication ------------------------------------------------------
|
|
@@ -99,6 +100,19 @@ module Studio
|
|
|
99
100
|
env_truthy?(ENV["LOCAL_EMAIL_CAPTURE"]) || env_truthy?(ENV["AGENT_WORKTREE"])
|
|
100
101
|
end
|
|
101
102
|
|
|
103
|
+
def self.user_wallet_address(user)
|
|
104
|
+
return nil unless user
|
|
105
|
+
|
|
106
|
+
[wallet_address_method, :wallet_address, :solana_address].compact.each do |method|
|
|
107
|
+
next unless user.respond_to?(method)
|
|
108
|
+
|
|
109
|
+
value = user.public_send(method)
|
|
110
|
+
return value if value && !(value.respond_to?(:empty?) && value.empty?)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
nil
|
|
114
|
+
end
|
|
115
|
+
|
|
102
116
|
# Verifies that the host app's User model satisfies the engine's expected
|
|
103
117
|
# contract. Raises Studio::UserContractError with a clear pointer to
|
|
104
118
|
# docs/USER_CONTRACT.md if anything required is missing. Called from
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: studio-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex McRitchie
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -227,7 +226,6 @@ metadata:
|
|
|
227
226
|
source_code_uri: https://github.com/amcritchie/studio-engine/tree/main
|
|
228
227
|
bug_tracker_uri: https://github.com/amcritchie/studio-engine/issues
|
|
229
228
|
changelog_uri: https://github.com/amcritchie/studio-engine/blob/main/CHANGELOG.md
|
|
230
|
-
post_install_message:
|
|
231
229
|
rdoc_options: []
|
|
232
230
|
require_paths:
|
|
233
231
|
- lib
|
|
@@ -242,8 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
242
240
|
- !ruby/object:Gem::Version
|
|
243
241
|
version: '0'
|
|
244
242
|
requirements: []
|
|
245
|
-
rubygems_version:
|
|
246
|
-
signing_key:
|
|
243
|
+
rubygems_version: 4.0.9
|
|
247
244
|
specification_version: 4
|
|
248
245
|
summary: Shared Rails engine providing auth, SSO, error logging, theming, and S3-backed
|
|
249
246
|
image caching
|