clerk-sdk-ruby 4.0.0 → 4.0.1
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/Gemfile.lock +1 -1
- data/README.md +16 -11
- data/apps/sinatra/config.ru +6 -0
- data/lib/clerk/configuration.rb +6 -0
- data/lib/clerk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0afe6493d39ec3b1273a7c15930cd38ccd9ea35eec5d46c9f3ca50c7212fab5
|
4
|
+
data.tar.gz: af49ba2bec123f277107c118fdf7576fece156a78de328c7351e3db8bc37e401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2440592868199c1c08ba259b2a32f3e551d17ceda2d8a7865b7bd8442e312b8cca7881280702e537a2b1952794c9e379fd71efd9a391f0c761f5cf57909809ba
|
7
|
+
data.tar.gz: 474c06a1094afb7d39d1e9e3ee727f070873ca58f470d457fc5bc586b3f611de928935ff50237a41cc13bb437f36f4846a604752c645b0788e7de1a115e656e6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -58,18 +58,18 @@ Here's a quick example:
|
|
58
58
|
```ruby
|
59
59
|
clerk = Clerk::SDK.new(api_key: "your_api_key")
|
60
60
|
# List all users
|
61
|
-
clerk.users.
|
61
|
+
clerk.users.get_user_list
|
62
62
|
# Get your first user
|
63
|
-
user = clerk.users.
|
63
|
+
user = clerk.users.get_user_list(limit: 1).first
|
64
64
|
# Extract their primary email address ID
|
65
65
|
email_id = user["primary_email_address_id"]
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
)
|
66
|
+
|
67
|
+
# Create an organization
|
68
|
+
p Clerk::SDK.organizations.create_organization({
|
69
|
+
create_organization_request: ClerkHttpClient::CreateOrganizationRequest.new({
|
70
|
+
name: 'example'
|
71
|
+
})
|
72
|
+
})
|
73
73
|
```
|
74
74
|
|
75
75
|
## Configuration
|
@@ -167,9 +167,14 @@ end
|
|
167
167
|
This gives your controller and views access to the following methods and more:
|
168
168
|
|
169
169
|
- `clerk.sdk.*`
|
170
|
-
- `clerk.session`
|
171
|
-
- `clerk.user`
|
172
170
|
- `clerk.user?`
|
171
|
+
- `clerk.user`: NOTE: This makes an additional request and attempts to cache it.
|
172
|
+
- `clerk.user_id`
|
173
|
+
- `clerk.organization?`
|
174
|
+
- `clerk.organization` NOTE: This makes an additional request and attempts to cache it.
|
175
|
+
- `clerk.organization_id`
|
176
|
+
- `clerk.organization_role`
|
177
|
+
- `clerk.organization_permissions`
|
173
178
|
|
174
179
|
### Skipping the Railtie
|
175
180
|
|
data/apps/sinatra/config.ru
CHANGED
data/lib/clerk/configuration.rb
CHANGED
@@ -6,6 +6,7 @@ module Clerk
|
|
6
6
|
class Configuration
|
7
7
|
attr_reader :cache_store
|
8
8
|
attr_reader :debug
|
9
|
+
attr_reader :logger
|
9
10
|
attr_reader :excluded_routes
|
10
11
|
attr_reader :publishable_key
|
11
12
|
attr_reader :secret_key
|
@@ -74,5 +75,10 @@ module Clerk
|
|
74
75
|
ClerkHttpClient::Configuration.default.access_token = sk
|
75
76
|
@secret_key = sk
|
76
77
|
end
|
78
|
+
|
79
|
+
def logger=(logger)
|
80
|
+
ClerkHttpClient::Configuration.default.logger = logger
|
81
|
+
@logger = logger
|
82
|
+
end
|
77
83
|
end
|
78
84
|
end
|
data/lib/clerk/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clerk-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clerk
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-02-14 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: faraday
|