clerk-sdk-ruby 2.9.0.beta1 → 2.9.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bb75c4354d383821c456ef0e4a3da02d2dbb2404a89dddc6dab99190251c918
4
- data.tar.gz: aea4736f0e1c16d94c2f081c32218280d84015282054cbd9a42b7518ab5590d0
3
+ metadata.gz: 50c46c345c5f568169b85b66f259d9aa7757e52aec5c63eea939d2d2fed847dd
4
+ data.tar.gz: 35c2012c34e4c203df5869b94e36c71d2eea4b43a5a8de004ae89779f598e9ce
5
5
  SHA512:
6
- metadata.gz: 0b9b95ab6ba5d002b1a78eff6ad5af4a4c930ea4ae6ef553eab5a7965854a64624340b17ac1ac84348516920fc1b3aba880b459f2e2eb0e112d98018fefce043
7
- data.tar.gz: 0caf5c13e253ef08e89b998f68630d7e67574286effa2aa4e8a6490b550dfba0a6f8444e9171fb0b24e3d428d3b1d34c616840926bb0b29260088e7935834bf9
6
+ metadata.gz: 5f49c0f0de93238553f8e4b0fb09836c5872bc32b494bcfa15f2e904e7fe05940858e165428ede65c690b8bfed56d4a447f586c4ae36c647f85381b221db3757
7
+ data.tar.gz: daa821c730e84dcfb8283dc918af0c6e32e8dfbf7ea9d464667e350559ff5ca11cbf72b0b30eb25aefb4811806a23b999709097acae6098429b44f794c467aa1
data/.gitignore CHANGED
@@ -8,6 +8,8 @@
8
8
  /tmp/
9
9
 
10
10
  .byebug_history
11
+ .ruby-version
11
12
  *.gem
12
13
 
13
14
  .idea
15
+
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## unreleased
2
2
 
3
+ ## 2.9.0.beta3 - 2023-01-17
4
+
5
+ ## Changed
6
+
7
+ - internal: Change request payloads to `application/json` content type [https://github.com/clerkinc/clerk-sdk-ruby/pull/29]
8
+
9
+ ## 2.9.0.beta2 - 2023-01-05
10
+
11
+ - feat: Support setting the secret key (previously called Backend API key) using
12
+ the `CLERK_SECRET_KEY` environment variable [https://github.com/clerkinc/clerk-sdk-ruby/pull/28]
13
+
3
14
  ## 2.9.0.beta1 - 2022-12-23
4
15
 
5
16
  - fix: Make JWKS cache work across different SDK instances [https://github.com/clerkinc/clerk-sdk-ruby/pull/27]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clerk-sdk-ruby (2.8.0)
4
+ clerk-sdk-ruby (2.9.0.beta3)
5
5
  concurrent-ruby (~> 1.1)
6
6
  faraday (~> 1.4.1)
7
7
  jwt (~> 2.5)
@@ -24,8 +24,8 @@ GEM
24
24
  faraday-excon (1.1.0)
25
25
  faraday-net_http (1.0.1)
26
26
  faraday-net_http_persistent (1.2.0)
27
- jwt (2.5.0)
28
- minitest (5.16.3)
27
+ jwt (2.6.0)
28
+ minitest (5.17.0)
29
29
  multipart-post (2.2.3)
30
30
  rake (13.0.6)
31
31
  ruby2_keywords (0.0.5)
@@ -7,7 +7,7 @@ module Clerk
7
7
  end
8
8
 
9
9
  def update(changes = {})
10
- @client.request(:patch, @resource_path, body:changes)
10
+ @client.request(:patch, @resource_path, body: changes)
11
11
  end
12
12
  end
13
13
  end
data/lib/clerk/sdk.rb CHANGED
@@ -74,12 +74,14 @@ module Clerk
74
74
  end
75
75
  when :post
76
76
  @conn.post(path, body) do |req|
77
- req.body = body
77
+ req.body = body.to_json
78
+ req.headers[:content_type] = "application/json"
78
79
  req.options.timeout = timeout if timeout
79
80
  end
80
81
  when :patch
81
82
  @conn.patch(path, body) do |req|
82
- req.body = body
83
+ req.body = body.to_json
84
+ req.headers[:content_type] = "application/json"
83
85
  req.options.timeout = timeout if timeout
84
86
  end
85
87
  when :delete
data/lib/clerk/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clerk
4
- VERSION = "2.9.0.beta1"
4
+ VERSION = "2.9.0.beta3"
5
5
  end
data/lib/clerk.rb CHANGED
@@ -44,6 +44,12 @@ module Clerk
44
44
  def initialize
45
45
  @base_url = ENV.fetch("CLERK_API_BASE", PRODUCTION_BASE_URL)
46
46
  @api_key = ENV["CLERK_API_KEY"]
47
+
48
+ secret_key = ENV["CLERK_SECRET_KEY"]
49
+ if secret_key && !secret_key.empty?
50
+ @api_key = secret_key
51
+ end
52
+
47
53
  @excluded_routes = []
48
54
  end
49
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clerk-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0.beta1
4
+ version: 2.9.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clerk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: 1.3.1
149
149
  requirements: []
150
- rubygems_version: 3.2.5
150
+ rubygems_version: 3.3.7
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Clerk SDK for Ruby.