Skip to content

Commit

Permalink
Add DraftConnection support, fix docs (#19)
Browse files Browse the repository at this point in the history
In order to support IdP Link, we've added a method `promote_draft_connection` to the SSO module.
  • Loading branch information
Sam Bauch authored Mar 3, 2020
1 parent aca0f44 commit 82c659d
Show file tree
Hide file tree
Showing 27 changed files with 312 additions and 72 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
workos (0.1.0)
workos (0.1.1)
sorbet-runtime (~> 0.5)

GEM
Expand Down Expand Up @@ -56,7 +56,7 @@ GEM
simplecov-html (0.10.2)
sorbet (0.5.5181)
sorbet-static (= 0.5.5181)
sorbet-runtime (0.5.5182)
sorbet-runtime (0.5.5373)
sorbet-static (0.5.5181-universal-darwin-14)
unicode-display_width (1.6.0)
url (0.3.2)
Expand Down
8 changes: 4 additions & 4 deletions docs/WorkOS.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<h2>Overview</h2><div class="docstring">
<div class="discussion">

<p>typed: strict</p>
<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>


</div>
Expand Down Expand Up @@ -120,12 +120,12 @@ <h2>
<dt id="API_HOSTNAME-constant" class="">API_HOSTNAME =

</dt>
<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>
<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>

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

</dt>
<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>
<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>

</dl>

Expand Down Expand Up @@ -314,7 +314,7 @@ <h3 class="signature " id="key=-class_method">
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/WorkOS/APIError.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/WorkOS/AuditLog.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h3 class="signature first" id="create_event-class_method">
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/WorkOS/AuthenticationError.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
29 changes: 20 additions & 9 deletions docs/WorkOS/Base.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,18 @@

</div>

<h2>Overview</h2><div class="docstring">
<div class="discussion">

<p>The Base class handles setting and reading the WorkOS API Key for authentication</p>


</div>
</div>
<div class="tags">


</div>



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


13
14
15</pre>
15
16
17</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 13</span>
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 15</span>

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


7
8
9</pre>
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 7</span>
<pre class="code"><span class="info file"># File 'lib/workos/base.rb', line 9</span>

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

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
43 changes: 27 additions & 16 deletions docs/WorkOS/Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,18 @@

</div>

<h2>Overview</h2><div class="docstring">
<div class="discussion">

<p>A Net::HTTP based API client for interacting with the WorkOS API</p>


</div>
</div>
<div class="tags">


</div>



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


11
12
13
14
15
16
17
18</pre>
18
19</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 11</span>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 12</span>

<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
<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>
Expand Down Expand Up @@ -289,17 +300,17 @@ <h3 class="signature " id="execute_request-instance_method">
<pre class="lines">


21
22
23
24
25
26
27
28</pre>
28
29</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 21</span>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 22</span>

<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>
<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>
Expand Down Expand Up @@ -329,7 +340,6 @@ <h3 class="signature " id="handle_error_response-instance_method">
<pre class="lines">


53
54
55
56
Expand Down Expand Up @@ -358,10 +368,11 @@ <h3 class="signature " id="handle_error_response-instance_method">
79
80
81
82</pre>
82
83</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 53</span>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 54</span>

<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>
<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>
Expand Down Expand Up @@ -413,15 +424,15 @@ <h3 class="signature " id="post_request-instance_method">
<pre class="lines">


31
32
33
34
35
36</pre>
36
37</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 31</span>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 32</span>

<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>
<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>
Expand Down Expand Up @@ -449,7 +460,6 @@ <h3 class="signature " id="user_agent-instance_method">
<pre class="lines">


39
40
41
42
Expand All @@ -458,10 +468,11 @@ <h3 class="signature " id="user_agent-instance_method">
45
46
47
48</pre>
48
49</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 39</span>
<pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 40</span>

<span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
<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>
Expand All @@ -483,7 +494,7 @@ <h3 class="signature " id="user_agent-instance_method">
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/WorkOS/InvalidRequestError.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu Jan 30 09:12:47 2020 by
Generated on Mon Mar 2 13:26:48 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.22 (ruby-2.6.5).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/WorkOS/Profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ <h3 class="signature " id="to_json-instance_method">
</div>

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

0 comments on commit 82c659d

Please sign in to comment.