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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 667111230c44f37d6b581dc3bd9aeac82febef5738e36e1976646622e8085938
4
- data.tar.gz: 4a02834f63803a6c2264eb9329ad5e7c922d95d80b37047e63e8ad8412888275
3
+ metadata.gz: d0afe6493d39ec3b1273a7c15930cd38ccd9ea35eec5d46c9f3ca50c7212fab5
4
+ data.tar.gz: af49ba2bec123f277107c118fdf7576fece156a78de328c7351e3db8bc37e401
5
5
  SHA512:
6
- metadata.gz: fa8da41cc220134d1625b59af067f452d6117c2b8b4d7b14ce1682c383a2aef689abfbef6143723b9075eb74e776422fbfa98cfb8ab8a6c86e4a9387d5e6a28d
7
- data.tar.gz: 0ab40ea5599abfdeccead036121b4ff761d9a08dd0ad14c932a3feb50ad0d2eb6e1f502dd45255e96df2b18c79ed63cc977c4a4c965c56dc71620c3519e4956a
6
+ metadata.gz: 2440592868199c1c08ba259b2a32f3e551d17ceda2d8a7865b7bd8442e312b8cca7881280702e537a2b1952794c9e379fd71efd9a391f0c761f5cf57909809ba
7
+ data.tar.gz: 474c06a1094afb7d39d1e9e3ee727f070873ca58f470d457fc5bc586b3f611de928935ff50237a41cc13bb437f36f4846a604752c645b0788e7de1a115e656e6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clerk-sdk-ruby (4.0.0)
4
+ clerk-sdk-ruby (4.0.1)
5
5
  clerk-http-client (~> 2.0)
6
6
  concurrent-ruby (~> 1.1)
7
7
  faraday (>= 1.4.1, < 3.0)
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.all
61
+ clerk.users.get_user_list
62
62
  # Get your first user
63
- user = clerk.users.all(limit: 1).first
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
- # Send them a welcome email
67
- clerk.emails.create(
68
- email_address_id: email_id,
69
- from_email_name: "welcome",
70
- subject: "Welcome to MyApp",
71
- body: "Welcome to MyApp, #{user["first_name"]}",
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
 
@@ -1,2 +1,8 @@
1
1
  require_relative './app'
2
+
3
+ Clerk.configure do |config|
4
+ config.debug = true
5
+ config.logger = Logger.new($stdout)
6
+ end
7
+
2
8
  run App
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clerk
4
- VERSION = "4.0.0"
4
+ VERSION = "4.0.1"
5
5
  end
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.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-01-28 00:00:00.000000000 Z
10
+ date: 2025-02-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday