shep 0.1.0.pre.alpha0 → 0.2.1.pre.alpha0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/Rakefile +1 -0
  4. data/doc/Shep/Entity/Account.html +22 -37
  5. data/doc/Shep/Entity/Context.html +8 -9
  6. data/doc/Shep/Entity/CustomEmoji.html +11 -15
  7. data/doc/Shep/Entity/MediaAttachment.html +13 -19
  8. data/doc/Shep/Entity/Notification.html +11 -15
  9. data/doc/Shep/Entity/Status.html +34 -61
  10. data/doc/Shep/Entity/StatusSource.html +9 -11
  11. data/doc/Shep/Entity/Status_Application.html +11 -10
  12. data/doc/Shep/Entity/Status_Mention.html +10 -13
  13. data/doc/Shep/Entity/Status_Tag.html +8 -9
  14. data/doc/Shep/Entity.html +156 -141
  15. data/doc/Shep/Error/Caller.html +4 -4
  16. data/doc/Shep/Error/Http.html +22 -22
  17. data/doc/Shep/Error/RateLimit.html +176 -0
  18. data/doc/Shep/Error/Remote.html +3 -4
  19. data/doc/Shep/Error/Server.html +5 -4
  20. data/doc/Shep/Error/Type.html +10 -12
  21. data/doc/Shep/Error.html +8 -5
  22. data/doc/Shep/Session.html +1023 -572
  23. data/doc/Shep.html +20 -5
  24. data/doc/_index.html +10 -3
  25. data/doc/class_list.html +1 -1
  26. data/doc/file.README.html +52 -33
  27. data/doc/file_list.html +1 -1
  28. data/doc/index.html +117 -239
  29. data/doc/method_list.html +9 -1
  30. data/doc/top-level-namespace.html +2 -2
  31. data/lib/shep/entity_base.rb +6 -1
  32. data/lib/shep/exceptions.rb +8 -0
  33. data/lib/shep/session.rb +340 -145
  34. data/lib/shep/version.rb +4 -0
  35. data/lib/shep.rb +1 -1
  36. data/run_rake_test.example.sh +12 -5
  37. data/shep.gemspec +4 -2
  38. data/spec/session_reader_1_unauth_spec.rb +20 -17
  39. data/spec/session_reader_2_auth_spec.rb +17 -19
  40. data/spec/session_writer_spec.rb +4 -11
  41. data/spec/session_zzz_tricky_spec.rb +205 -0
  42. data/spec/spec_helper.rb +12 -3
  43. data/yard_helper.rb +11 -5
  44. metadata +12 -9
@@ -105,8 +105,8 @@
105
105
 
106
106
  <h2>Overview</h2><div class="docstring">
107
107
  <div class="discussion">
108
-
109
- <p>Error caused by using the interface incorrectly. <em>Not</em> the same as incorrect input data (usually)</p>
108
+ <p>Error caused by using the interface incorrectly. <em>Not</em> the same
109
+ as incorrect input data (usually)</p>
110
110
 
111
111
 
112
112
  </div>
@@ -137,9 +137,9 @@
137
137
  </div>
138
138
 
139
139
  <div id="footer">
140
- Generated on Sun Jun 4 13:40:30 2023 by
140
+ Generated on Thu Jun 15 10:09:19 2023 by
141
141
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
142
- 0.9.34 (ruby-3.1.0).
142
+ 0.9.34 (ruby-3.0.3).
143
143
  </div>
144
144
 
145
145
  </div>
@@ -107,10 +107,10 @@
107
107
 
108
108
  <h2>Overview</h2><div class="docstring">
109
109
  <div class="discussion">
110
-
111
- <p>Thrown when the HTTP library returns an error response.</p>
110
+ <p>Thrown when the HTTP library returns an error response.</p>
112
111
 
113
- <p>Basically the same meaning as Error::Server but also includes the response object for your perusal.</p>
112
+ <p>Basically the same meaning as Error::Server but also includes
113
+ the response object for your perusal.</p>
114
114
 
115
115
 
116
116
  </div>
@@ -118,10 +118,14 @@
118
118
  <div class="tags">
119
119
 
120
120
 
121
+ </div><div id="subclasses">
122
+ <h2>Direct Known Subclasses</h2>
123
+ <p class="children"><span class='object_link'><a href="RateLimit.html" title="Shep::Error::RateLimit (class)">RateLimit</a></span></p>
121
124
  </div>
122
125
 
123
126
 
124
127
 
128
+
125
129
  <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
126
130
  <ul class="summary">
127
131
 
@@ -147,8 +151,7 @@
147
151
 
148
152
 
149
153
 
150
- <span class="summary_desc"><div class='inline'>
151
- <p>Returns the value of attribute response.</p>
154
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute response.</p>
152
155
  </div></span>
153
156
 
154
157
  </li>
@@ -186,8 +189,7 @@
186
189
 
187
190
 
188
191
 
189
- <span class="summary_desc"><div class='inline'>
190
- <p>A new instance of Http.</p>
192
+ <span class="summary_desc"><div class='inline'><p>A new instance of Http.</p>
191
193
  </div></span>
192
194
 
193
195
  </li>
@@ -223,8 +225,7 @@
223
225
 
224
226
  </h3><div class="docstring">
225
227
  <div class="discussion">
226
-
227
- <p>Returns a new instance of Http.</p>
228
+ <p>Returns a new instance of Http.</p>
228
229
 
229
230
 
230
231
  </div>
@@ -238,18 +239,18 @@
238
239
  <pre class="lines">
239
240
 
240
241
 
241
- 40
242
- 41
243
- 42
244
242
  43
245
243
  44
246
244
  45
247
245
  46
248
246
  47
249
- 48</pre>
247
+ 48
248
+ 49
249
+ 50
250
+ 51</pre>
250
251
  </td>
251
252
  <td>
252
- <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 40</span>
253
+ <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 43</span>
253
254
 
254
255
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
255
256
  <span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HTTP Error </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
@@ -283,8 +284,7 @@
283
284
 
284
285
  </h3><div class="docstring">
285
286
  <div class="discussion">
286
-
287
- <p>Returns the value of attribute response.</p>
287
+ <p>Returns the value of attribute response.</p>
288
288
 
289
289
 
290
290
  </div>
@@ -298,12 +298,12 @@
298
298
  <pre class="lines">
299
299
 
300
300
 
301
- 39
302
- 40
303
- 41</pre>
301
+ 42
302
+ 43
303
+ 44</pre>
304
304
  </td>
305
305
  <td>
306
- <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 39</span>
306
+ <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 42</span>
307
307
 
308
308
  <span class='kw'>def</span> <span class='id identifier rubyid_response'>response</span>
309
309
  <span class='ivar'>@response</span>
@@ -319,9 +319,9 @@
319
319
  </div>
320
320
 
321
321
  <div id="footer">
322
- Generated on Sun Jun 4 13:40:30 2023 by
322
+ Generated on Thu Jun 15 10:09:20 2023 by
323
323
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
324
- 0.9.34 (ruby-3.1.0).
324
+ 0.9.34 (ruby-3.0.3).
325
325
  </div>
326
326
 
327
327
  </div>
@@ -0,0 +1,176 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: Shep::Error::RateLimit
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Shep::Error::RateLimit";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Shep.html" title="Shep (module)">Shep</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Error.html" title="Shep::Error (class)">Error</a></span></span>
41
+ &raquo;
42
+ <span class="title">RateLimit</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: Shep::Error::RateLimit
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Http.html" title="Shep::Error::Http (class)">Http</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">RuntimeError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="../Error.html" title="Shep::Error (class)">Shep::Error</a></span></li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Server.html" title="Shep::Error::Server (class)">Server</a></span></li>
82
+
83
+ <li class="next"><span class='object_link'><a href="Http.html" title="Shep::Error::Http (class)">Http</a></span></li>
84
+
85
+ <li class="next">Shep::Error::RateLimit</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+ </dl>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ <dl>
104
+ <dt>Defined in:</dt>
105
+ <dd>lib/shep/exceptions.rb</dd>
106
+ </dl>
107
+
108
+ </div>
109
+
110
+ <h2>Overview</h2><div class="docstring">
111
+ <div class="discussion">
112
+ <p>Thrown when the HTTP operation fails because a rate limit was
113
+ reached. <code>Session.rate_limit</code> will <strong>probably</strong> return the
114
+ correct reset time, but no promises at this time.</p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ <div class="tags">
120
+
121
+
122
+ </div>
123
+
124
+
125
+
126
+
127
+
128
+ <h2>Instance Attribute Summary</h2>
129
+
130
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Http.html" title="Shep::Error::Http (class)">Http</a></span></h3>
131
+ <p class="inherited"><span class='object_link'><a href="Http.html#response-instance_method" title="Shep::Error::Http#response (method)">#response</a></span></p>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <h2>Method Summary</h2>
142
+
143
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Http.html" title="Shep::Error::Http (class)">Http</a></span></h3>
144
+ <p class="inherited"><span class='object_link'><a href="Http.html#initialize-instance_method" title="Shep::Error::Http#initialize (method)">#initialize</a></span></p>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <div id="constructor_details" class="method_details_list">
159
+ <h2>Constructor Details</h2>
160
+
161
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Http.html#initialize-instance_method" title="Shep::Error::Http#initialize (method)">Shep::Error::Http</a></span></p>
162
+
163
+ </div>
164
+
165
+
166
+ </div>
167
+
168
+ <div id="footer">
169
+ Generated on Thu Jun 15 10:09:20 2023 by
170
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
171
+ 0.9.34 (ruby-3.0.3).
172
+ </div>
173
+
174
+ </div>
175
+ </body>
176
+ </html>
@@ -105,8 +105,7 @@
105
105
 
106
106
  <h2>Overview</h2><div class="docstring">
107
107
  <div class="discussion">
108
-
109
- <p>Error caused by network issues.</p>
108
+ <p>Error caused by network issues.</p>
110
109
 
111
110
 
112
111
  </div>
@@ -133,9 +132,9 @@
133
132
  </div>
134
133
 
135
134
  <div id="footer">
136
- Generated on Sun Jun 4 13:40:30 2023 by
135
+ Generated on Thu Jun 15 10:09:19 2023 by
137
136
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
138
- 0.9.34 (ruby-3.1.0).
137
+ 0.9.34 (ruby-3.0.3).
139
138
  </div>
140
139
 
141
140
  </div>
@@ -105,8 +105,9 @@
105
105
 
106
106
  <h2>Overview</h2><div class="docstring">
107
107
  <div class="discussion">
108
-
109
- <p>Thrown when the server doesn’t like what we did. (Different from Error::Remote because this assumes the server is working correctly.)</p>
108
+ <p>Thrown when the server doesn&#39;t like what we did. (Different
109
+ from Error::Remote because this assumes the server is working
110
+ correctly.)</p>
110
111
 
111
112
 
112
113
  </div>
@@ -137,9 +138,9 @@
137
138
  </div>
138
139
 
139
140
  <div id="footer">
140
- Generated on Sun Jun 4 13:40:30 2023 by
141
+ Generated on Thu Jun 15 10:09:19 2023 by
141
142
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
142
- 0.9.34 (ruby-3.1.0).
143
+ 0.9.34 (ruby-3.0.3).
143
144
  </div>
144
145
 
145
146
  </div>
@@ -107,8 +107,8 @@
107
107
 
108
108
  <h2>Overview</h2><div class="docstring">
109
109
  <div class="discussion">
110
-
111
- <p>Error caused by assigning a value of the wrong type to an <code>Entity</code> field.</p>
110
+ <p>Error caused by assigning a value of the wrong type to an
111
+ <code>Entity</code> field.</p>
112
112
 
113
113
 
114
114
  </div>
@@ -150,8 +150,7 @@
150
150
 
151
151
 
152
152
 
153
- <span class="summary_desc"><div class='inline'>
154
- <p>A new instance of Type.</p>
153
+ <span class="summary_desc"><div class='inline'><p>A new instance of Type.</p>
155
154
  </div></span>
156
155
 
157
156
  </li>
@@ -187,8 +186,7 @@
187
186
 
188
187
  </h3><div class="docstring">
189
188
  <div class="discussion">
190
-
191
- <p>Returns a new instance of Type.</p>
189
+ <p>Returns a new instance of Type.</p>
192
190
 
193
191
 
194
192
  </div>
@@ -202,12 +200,12 @@
202
200
  <pre class="lines">
203
201
 
204
202
 
205
- 21
206
- 22
207
- 23</pre>
203
+ 24
204
+ 25
205
+ 26</pre>
208
206
  </td>
209
207
  <td>
210
- <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 21</span>
208
+ <pre class="code"><span class="info file"># File 'lib/shep/exceptions.rb', line 24</span>
211
209
 
212
210
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_boxdesc'>boxdesc</span><span class='comma'>,</span> <span class='id identifier rubyid_got'>got</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_want'>want</span><span class='rparen'>)</span>
213
211
  <span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_boxdesc'>boxdesc</span><span class='embexpr_end'>}</span><span class='tstring_content'> expects </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_want'>want</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>,</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>; got </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_got'>got</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
@@ -223,9 +221,9 @@
223
221
  </div>
224
222
 
225
223
  <div id="footer">
226
- Generated on Sun Jun 4 13:40:30 2023 by
224
+ Generated on Thu Jun 15 10:09:19 2023 by
227
225
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
228
- 0.9.34 (ruby-3.1.0).
226
+ 0.9.34 (ruby-3.0.3).
229
227
  </div>
230
228
 
231
229
  </div>
data/doc/Shep/Error.html CHANGED
@@ -103,8 +103,11 @@
103
103
 
104
104
  <h2>Overview</h2><div class="docstring">
105
105
  <div class="discussion">
106
-
107
- <p>Base class for exceptions originating from Shep. Use this to trap all Shep exceptions at once.</p>
106
+ <p>Base class for exceptions originating from Shep. Use this to trap
107
+ all Shep exceptions at once.</p>
108
+
109
+ <p>Note that Shep usually does not trap exceptions thrown by
110
+ Net::HTTP and friends; you will need to trap those separately.</p>
108
111
 
109
112
 
110
113
  </div>
@@ -122,7 +125,7 @@
122
125
 
123
126
 
124
127
 
125
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Error/Caller.html" title="Shep::Error::Caller (class)">Caller</a></span>, <span class='object_link'><a href="Error/Http.html" title="Shep::Error::Http (class)">Http</a></span>, <span class='object_link'><a href="Error/Remote.html" title="Shep::Error::Remote (class)">Remote</a></span>, <span class='object_link'><a href="Error/Server.html" title="Shep::Error::Server (class)">Server</a></span>, <span class='object_link'><a href="Error/Type.html" title="Shep::Error::Type (class)">Type</a></span>
128
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Error/Caller.html" title="Shep::Error::Caller (class)">Caller</a></span>, <span class='object_link'><a href="Error/Http.html" title="Shep::Error::Http (class)">Http</a></span>, <span class='object_link'><a href="Error/RateLimit.html" title="Shep::Error::RateLimit (class)">RateLimit</a></span>, <span class='object_link'><a href="Error/Remote.html" title="Shep::Error::Remote (class)">Remote</a></span>, <span class='object_link'><a href="Error/Server.html" title="Shep::Error::Server (class)">Server</a></span>, <span class='object_link'><a href="Error/Type.html" title="Shep::Error::Type (class)">Type</a></span>
126
129
 
127
130
 
128
131
  </p>
@@ -139,9 +142,9 @@
139
142
  </div>
140
143
 
141
144
  <div id="footer">
142
- Generated on Sun Jun 4 13:40:29 2023 by
145
+ Generated on Thu Jun 15 10:09:19 2023 by
143
146
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
144
- 0.9.34 (ruby-3.1.0).
147
+ 0.9.34 (ruby-3.0.3).
145
148
  </div>
146
149
 
147
150
  </div>