Skip to content

Commit 82c659d

Browse files
author
Sam Bauch
authored
Add DraftConnection support, fix docs (#19)
In order to support IdP Link, we've added a method `promote_draft_connection` to the SSO module.
1 parent aca0f44 commit 82c659d

27 files changed

+312
-72
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
workos (0.1.0)
4+
workos (0.1.1)
55
sorbet-runtime (~> 0.5)
66

77
GEM
@@ -56,7 +56,7 @@ GEM
5656
simplecov-html (0.10.2)
5757
sorbet (0.5.5181)
5858
sorbet-static (= 0.5.5181)
59-
sorbet-runtime (0.5.5182)
59+
sorbet-runtime (0.5.5373)
6060
sorbet-static (0.5.5181-universal-darwin-14)
6161
unicode-display_width (1.6.0)
6262
url (0.3.2)

docs/WorkOS.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<h2>Overview</h2><div class="docstring">
8989
<div class="discussion">
9090

91-
<p>typed: strict</p>
91+
<p>Use the WorkOS module to authenticate your requests to the WorkOS API. The gem will read your API key automatically from the ENV var `WORKOS_KEY`. Alternatively, you can set the key yourself with `WorkOS.key = [your api key]` somewhere in the load path of your application, such as an initializer.</p>
9292

9393

9494
</div>
@@ -120,12 +120,12 @@ <h2>
120120
<dt id="API_HOSTNAME-constant" class="">API_HOSTNAME =
121121

122122
</dt>
123-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api.workos.com</span><span class='tstring_end'>&#39;</span></span></pre></dd>
123+
<dd><pre class="code"><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>WORKOS_API_HOSTNAME</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api.workos.com</span><span class='tstring_end'>&#39;</span></span></pre></dd>
124124

125125
<dt id="VERSION-constant" class="">VERSION =
126126

127127
</dt>
128-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
128+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.1.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
129129

130130
</dl>
131131

@@ -314,7 +314,7 @@ <h3 class="signature " id="key=-class_method">
314314
</div>
315315

316316
<div id="footer">
317-
Generated on Thu Jan 30 09:12:47 2020 by
317+
Generated on Mon Mar 2 13:26:48 2020 by
318318
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
319319
0.9.22 (ruby-2.6.5).
320320
</div>

docs/WorkOS/APIError.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
150150
</div>
151151

152152
<div id="footer">
153-
Generated on Thu Jan 30 09:12:47 2020 by
153+
Generated on Mon Mar 2 13:26:48 2020 by
154154
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155155
0.9.22 (ruby-2.6.5).
156156
</div>

docs/WorkOS/AuditLog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ <h3 class="signature first" id="create_event-class_method">
225225
</div>
226226

227227
<div id="footer">
228-
Generated on Thu Jan 30 09:12:47 2020 by
228+
Generated on Mon Mar 2 13:26:48 2020 by
229229
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
230230
0.9.22 (ruby-2.6.5).
231231
</div>

docs/WorkOS/AuthenticationError.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
150150
</div>
151151

152152
<div id="footer">
153-
Generated on Thu Jan 30 09:12:47 2020 by
153+
Generated on Mon Mar 2 13:26:48 2020 by
154154
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155155
0.9.22 (ruby-2.6.5).
156156
</div>

docs/WorkOS/Base.html

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,18 @@
9393

9494
</div>
9595

96+
<h2>Overview</h2><div class="docstring">
97+
<div class="discussion">
98+
99+
<p>The Base class handles setting and reading the WorkOS API Key for authentication</p>
100+
96101

102+
</div>
103+
</div>
104+
<div class="tags">
105+
106+
107+
</div>
97108

98109

99110

@@ -197,12 +208,12 @@ <h3 class="signature first" id="key-class_method">
197208
<pre class="lines">
198209

199210

200-
13
201-
14
202-
15</pre>
211+
15
212+
16
213+
17</pre>
203214
</td>
204215
<td>
205-
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 13</span>
216+
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 15</span>
206217

207218
<span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span>
208219
<span class='ivar'>@key</span>
@@ -245,12 +256,12 @@ <h3 class="signature first" id="key-instance_method">
245256
<pre class="lines">
246257

247258

248-
7
249-
8
250-
9</pre>
259+
9
260+
10
261+
11</pre>
251262
</td>
252263
<td>
253-
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 7</span>
264+
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 9</span>
254265

255266
<span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span>
256267
<span class='ivar'>@key</span>
@@ -266,7 +277,7 @@ <h3 class="signature first" id="key-instance_method">
266277
</div>
267278

268279
<div id="footer">
269-
Generated on Thu Jan 30 09:12:47 2020 by
280+
Generated on Mon Mar 2 13:26:48 2020 by
270281
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
271282
0.9.22 (ruby-2.6.5).
272283
</div>

docs/WorkOS/Client.html

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,18 @@
9898

9999
</div>
100100

101+
<h2>Overview</h2><div class="docstring">
102+
<div class="discussion">
103+
104+
<p>A Net::HTTP based API client for interacting with the WorkOS API</p>
105+
101106

107+
</div>
108+
</div>
109+
<div class="tags">
110+
111+
112+
</div>
102113

103114

104115

@@ -249,17 +260,17 @@ <h3 class="signature first" id="client-instance_method">
249260
<pre class="lines">
250261

251262

252-
11
253263
12
254264
13
255265
14
256266
15
257267
16
258268
17
259-
18</pre>
269+
18
270+
19</pre>
260271
</td>
261272
<td>
262-
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 11</span>
273+
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 12</span>
263274

264275
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
265276
<span class='kw'>return</span> <span class='ivar'>@client</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span>
@@ -289,17 +300,17 @@ <h3 class="signature " id="execute_request-instance_method">
289300
<pre class="lines">
290301

291302

292-
21
293303
22
294304
23
295305
24
296306
25
297307
26
298308
27
299-
28</pre>
309+
28
310+
29</pre>
300311
</td>
301312
<td>
302-
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 21</span>
313+
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 22</span>
303314

304315
<span class='kw'>def</span> <span class='id identifier rubyid_execute_request'>execute_request</span><span class='lparen'>(</span><span class='label'>request:</span><span class='rparen'>)</span>
305316
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
@@ -329,7 +340,6 @@ <h3 class="signature " id="handle_error_response-instance_method">
329340
<pre class="lines">
330341

331342

332-
53
333343
54
334344
55
335345
56
@@ -358,10 +368,11 @@ <h3 class="signature " id="handle_error_response-instance_method">
358368
79
359369
80
360370
81
361-
82</pre>
371+
82
372+
83</pre>
362373
</td>
363374
<td>
364-
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 53</span>
375+
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 54</span>
365376

366377
<span class='kw'>def</span> <span class='id identifier rubyid_handle_error_response'>handle_error_response</span><span class='lparen'>(</span><span class='label'>response:</span><span class='rparen'>)</span>
367378
<span class='id identifier rubyid_http_status'>http_status</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
@@ -413,15 +424,15 @@ <h3 class="signature " id="post_request-instance_method">
413424
<pre class="lines">
414425

415426

416-
31
417427
32
418428
33
419429
34
420430
35
421-
36</pre>
431+
36
432+
37</pre>
422433
</td>
423434
<td>
424-
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 31</span>
435+
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 32</span>
425436

426437
<span class='kw'>def</span> <span class='id identifier rubyid_post_request'>post_request</span><span class='lparen'>(</span><span class='label'>path:</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
427438
<span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Post</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
@@ -449,7 +460,6 @@ <h3 class="signature " id="user_agent-instance_method">
449460
<pre class="lines">
450461

451462

452-
39
453463
40
454464
41
455465
42
@@ -458,10 +468,11 @@ <h3 class="signature " id="user_agent-instance_method">
458468
45
459469
46
460470
47
461-
48</pre>
471+
48
472+
49</pre>
462473
</td>
463474
<td>
464-
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 39</span>
475+
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 40</span>
465476

466477
<span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
467478
<span class='id identifier rubyid_engine'>engine</span> <span class='op'>=</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>RUBY_ENGINE</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='op'>::</span><span class='const'>RUBY_ENGINE</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Ruby</span><span class='tstring_end'>&#39;</span></span>
@@ -483,7 +494,7 @@ <h3 class="signature " id="user_agent-instance_method">
483494
</div>
484495

485496
<div id="footer">
486-
Generated on Thu Jan 30 09:12:47 2020 by
497+
Generated on Mon Mar 2 13:26:48 2020 by
487498
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
488499
0.9.22 (ruby-2.6.5).
489500
</div>

docs/WorkOS/InvalidRequestError.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
150150
</div>
151151

152152
<div id="footer">
153-
Generated on Thu Jan 30 09:12:47 2020 by
153+
Generated on Mon Mar 2 13:26:48 2020 by
154154
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155155
0.9.22 (ruby-2.6.5).
156156
</div>

docs/WorkOS/Profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ <h3 class="signature " id="to_json-instance_method">
778778
</div>
779779

780780
<div id="footer">
781-
Generated on Thu Jan 30 09:12:47 2020 by
781+
Generated on Mon Mar 2 13:26:48 2020 by
782782
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
783783
0.9.22 (ruby-2.6.5).
784784
</div>

0 commit comments

Comments
 (0)