world_time_api 0.1.5 → 0.1.7
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 +4 -4
- data/CHANGELOG.md +18 -8
- data/README.md +13 -5
- data/doc/WorldTimeApi/Request.html +13 -5
- data/doc/WorldTimeApi.html +67 -16
- data/doc/_index.html +4 -4
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +32 -29
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +32 -29
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +5 -2
- data/doc/top-level-namespace.html +3 -3
- data/lib/world_time_api/error.rb +4 -3
- data/lib/world_time_api/request.rb +16 -5
- data/lib/world_time_api/response.rb +5 -4
- data/lib/world_time_api/version.rb +2 -3
- data/lib/world_time_api.rb +12 -7
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d7f259d98a22491f13839a70cbfa93a40af4b48b53f0209fbed8f3b6519b692
|
|
4
|
+
data.tar.gz: 11360314e9cc254373a284a53a2b0f5de0293a1fa72e9c5567a083c4d00a66c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b1e832dcac2c50e6bd6fcc86bc866b56b81aafba41b479c563a59049b9e43149742fff36063cd9fa0ed84d6ee67a5efa7d74435694e1ab42321a74da3fcdf78
|
|
7
|
+
data.tar.gz: 99a89a47cd75619c35b4e239f7b02132b75f3a6d6bfdc27f6861c0e567fb51d2c6182feafa068726bf24f72afb5f094261c636b10ce585896bc6cb6f38acedbd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
## [WorldTimeAPi]
|
|
2
2
|
|
|
3
|
-
## [0.1.
|
|
3
|
+
## [0.1.6] - 2025-11-20
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
* Add automatic retry mechanism (up to 3 attempts) for failed requests
|
|
6
|
+
* Add exponential backoff between retry attempts
|
|
7
|
+
* Add configurable max_retries parameter
|
|
6
8
|
|
|
7
|
-
## [0.1.
|
|
9
|
+
## [0.1.5] - 2023-02-12
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
* Previous improvements
|
|
10
12
|
|
|
11
|
-
## [0.1.
|
|
13
|
+
## [0.1.4] - 2023-02-12
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
* Refactor code
|
|
14
16
|
|
|
15
17
|
## [0.1.3] - 2023-02-12
|
|
16
18
|
|
|
17
19
|
* add new method :client_ip
|
|
18
20
|
|
|
19
|
-
## [0.1.
|
|
21
|
+
## [0.1.2] - 2023-02-06
|
|
20
22
|
|
|
21
|
-
*
|
|
23
|
+
* Fix response
|
|
24
|
+
|
|
25
|
+
## [0.1.1] - 2021-11-22
|
|
26
|
+
|
|
27
|
+
* add methods :time and :timezones
|
|
28
|
+
|
|
29
|
+
## [0.1.0] - 2021-11-22
|
|
30
|
+
|
|
31
|
+
* Initial release
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/world_time_api)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A Ruby wrapper for the World Time API.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -26,14 +26,22 @@ gem install world_time_api
|
|
|
26
26
|
|
|
27
27
|
## Usage
|
|
28
28
|
|
|
29
|
+
### List timezones
|
|
30
|
+
|
|
29
31
|
```ruby
|
|
30
|
-
WorldTimeApi::Timezones.call
|
|
32
|
+
WorldTimeApi::Timezones.call
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Get time by timezone
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
```ruby
|
|
38
|
+
WorldTimeApi::Time.call('Europe/London')
|
|
39
|
+
```
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
### Get time by IP address
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
```ruby
|
|
44
|
+
WorldTimeApi::ClientIp.call('12.215.42.19')
|
|
37
45
|
```
|
|
38
46
|
|
|
39
47
|
## Development
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: WorldTimeApi::Request
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
|
92
92
|
<div class="discussion">
|
|
93
93
|
|
|
94
|
-
<p>
|
|
94
|
+
<p>A module for making HTTP requests to the World Time API.</p>
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
</div>
|
|
@@ -119,6 +119,14 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
<div class="tags">
|
|
121
121
|
|
|
122
|
+
<div class="examples">
|
|
123
|
+
<h4 class="tag_title">Examples:</h4>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'>Call</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/timezone/Europe/London</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
|
|
122
130
|
<p class="tag_title">Returns:</p>
|
|
123
131
|
<ul class="return">
|
|
124
132
|
|
|
@@ -140,7 +148,7 @@
|
|
|
140
148
|
|
|
141
149
|
</div>
|
|
142
150
|
</dt>
|
|
143
|
-
<dd><pre class="code"><span class='
|
|
151
|
+
<dd><pre class="code"><span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_url'>url</span><span class='op'>|</span>
|
|
144
152
|
<span class='kw'>begin</span>
|
|
145
153
|
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
|
146
154
|
|
|
@@ -167,9 +175,9 @@
|
|
|
167
175
|
</div>
|
|
168
176
|
|
|
169
177
|
<div id="footer">
|
|
170
|
-
Generated on Thu
|
|
178
|
+
Generated on Thu Nov 20 18:24:43 2025 by
|
|
171
179
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
172
|
-
0.9.
|
|
180
|
+
0.9.37 (ruby-3.2.2).
|
|
173
181
|
</div>
|
|
174
182
|
|
|
175
183
|
</div>
|
data/doc/WorldTimeApi.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: WorldTimeApi
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<h2>Overview</h2><div class="docstring">
|
|
89
89
|
<div class="discussion">
|
|
90
90
|
|
|
91
|
-
<p>
|
|
91
|
+
<p>A Ruby wrapper for the World Time API.</p>
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
</div>
|
|
@@ -126,19 +126,27 @@
|
|
|
126
126
|
</div>
|
|
127
127
|
<div class="tags">
|
|
128
128
|
|
|
129
|
+
<div class="examples">
|
|
130
|
+
<h4 class="tag_title">Examples:</h4>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Timezones</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span></code></pre>
|
|
134
|
+
|
|
135
|
+
</div>
|
|
136
|
+
|
|
129
137
|
<p class="tag_title">Returns:</p>
|
|
130
138
|
<ul class="return">
|
|
131
139
|
|
|
132
140
|
<li>
|
|
133
141
|
|
|
134
142
|
|
|
135
|
-
<span class='type'>(<tt
|
|
143
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
136
144
|
|
|
137
145
|
|
|
138
146
|
|
|
139
147
|
—
|
|
140
148
|
<div class='inline'>
|
|
141
|
-
<p>
|
|
149
|
+
<p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
|
|
142
150
|
</div>
|
|
143
151
|
|
|
144
152
|
</li>
|
|
@@ -160,19 +168,27 @@
|
|
|
160
168
|
</div>
|
|
161
169
|
<div class="tags">
|
|
162
170
|
|
|
171
|
+
<div class="examples">
|
|
172
|
+
<h4 class="tag_title">Examples:</h4>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Europe/London</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
|
|
163
179
|
<p class="tag_title">Returns:</p>
|
|
164
180
|
<ul class="return">
|
|
165
181
|
|
|
166
182
|
<li>
|
|
167
183
|
|
|
168
184
|
|
|
169
|
-
<span class='type'>(<tt
|
|
185
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
170
186
|
|
|
171
187
|
|
|
172
188
|
|
|
173
189
|
—
|
|
174
190
|
<div class='inline'>
|
|
175
|
-
<p>
|
|
191
|
+
<p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
|
|
176
192
|
</div>
|
|
177
193
|
|
|
178
194
|
</li>
|
|
@@ -181,7 +197,7 @@
|
|
|
181
197
|
|
|
182
198
|
</div>
|
|
183
199
|
</dt>
|
|
184
|
-
<dd><pre class="code"><span class='tlambda'>-></span
|
|
200
|
+
<dd><pre class="code"><span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_timezone'>timezone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/timezone/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timezone'>timezone</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
|
|
185
201
|
|
|
186
202
|
<dt id="ClientIp-constant" class="">ClientIp =
|
|
187
203
|
<div class="docstring">
|
|
@@ -194,19 +210,27 @@
|
|
|
194
210
|
</div>
|
|
195
211
|
<div class="tags">
|
|
196
212
|
|
|
213
|
+
<div class="examples">
|
|
214
|
+
<h4 class="tag_title">Examples:</h4>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>ClientIp</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
|
218
|
+
|
|
219
|
+
</div>
|
|
220
|
+
|
|
197
221
|
<p class="tag_title">Returns:</p>
|
|
198
222
|
<ul class="return">
|
|
199
223
|
|
|
200
224
|
<li>
|
|
201
225
|
|
|
202
226
|
|
|
203
|
-
<span class='type'>(<tt
|
|
227
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
204
228
|
|
|
205
229
|
|
|
206
230
|
|
|
207
231
|
—
|
|
208
232
|
<div class='inline'>
|
|
209
|
-
<p>
|
|
233
|
+
<p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
|
|
210
234
|
</div>
|
|
211
235
|
|
|
212
236
|
</li>
|
|
@@ -215,7 +239,7 @@
|
|
|
215
239
|
|
|
216
240
|
</div>
|
|
217
241
|
</dt>
|
|
218
|
-
<dd><pre class="code"><span class='tlambda'>-></span
|
|
242
|
+
<dd><pre class="code"><span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/ip</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
|
|
219
243
|
|
|
220
244
|
<dt id="Error-constant" class="">Error =
|
|
221
245
|
<div class="docstring">
|
|
@@ -228,6 +252,14 @@
|
|
|
228
252
|
</div>
|
|
229
253
|
<div class="tags">
|
|
230
254
|
|
|
255
|
+
<div class="examples">
|
|
256
|
+
<h4 class="tag_title">Examples:</h4>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Invalid timezone</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
|
260
|
+
|
|
261
|
+
</div>
|
|
262
|
+
|
|
231
263
|
<p class="tag_title">Returns:</p>
|
|
232
264
|
<ul class="return">
|
|
233
265
|
|
|
@@ -249,12 +281,23 @@
|
|
|
249
281
|
|
|
250
282
|
</div>
|
|
251
283
|
</dt>
|
|
252
|
-
<dd><pre class="code"><span class='tlambda'>-></span
|
|
284
|
+
<dd><pre class="code"><span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='lbrace'>{</span> <span class='label'>error:</span> <span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span></pre></dd>
|
|
253
285
|
|
|
254
286
|
<dt id="VERSION-constant" class="">VERSION =
|
|
255
|
-
|
|
287
|
+
<div class="docstring">
|
|
288
|
+
<div class="discussion">
|
|
289
|
+
|
|
290
|
+
<p>The current version number of the WorldTimeApi gem.</p>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
<div class="tags">
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
</div>
|
|
256
299
|
</dt>
|
|
257
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.
|
|
300
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.5</span><span class='tstring_end'>"</span></span></pre></dd>
|
|
258
301
|
|
|
259
302
|
<dt id="Response-constant" class="">Response =
|
|
260
303
|
<div class="docstring">
|
|
@@ -267,6 +310,14 @@
|
|
|
267
310
|
</div>
|
|
268
311
|
<div class="tags">
|
|
269
312
|
|
|
313
|
+
<div class="examples">
|
|
314
|
+
<h4 class="tag_title">Examples:</h4>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='const'>HTTParty</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://worldtimeapi.org/api/timezone/Europe/London</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span></code></pre>
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
|
|
270
321
|
<p class="tag_title">Returns:</p>
|
|
271
322
|
<ul class="return">
|
|
272
323
|
|
|
@@ -288,7 +339,7 @@
|
|
|
288
339
|
|
|
289
340
|
</div>
|
|
290
341
|
</dt>
|
|
291
|
-
<dd><pre class="code"><span class='tlambda'>-></span
|
|
342
|
+
<dd><pre class="code"><span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='rbrace'>}</span></pre></dd>
|
|
292
343
|
|
|
293
344
|
</dl>
|
|
294
345
|
|
|
@@ -304,9 +355,9 @@
|
|
|
304
355
|
</div>
|
|
305
356
|
|
|
306
357
|
<div id="footer">
|
|
307
|
-
Generated on Thu
|
|
358
|
+
Generated on Thu Nov 20 18:24:43 2025 by
|
|
308
359
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
309
|
-
0.9.
|
|
360
|
+
0.9.37 (ruby-3.2.2).
|
|
310
361
|
</div>
|
|
311
362
|
|
|
312
363
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>
|
|
7
|
-
Documentation by YARD 0.9.
|
|
7
|
+
Documentation by YARD 0.9.37
|
|
8
8
|
|
|
9
9
|
</title>
|
|
10
10
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<div class="clear"></div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
|
-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.
|
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.37</h1>
|
|
56
56
|
<div id="listing">
|
|
57
57
|
<h1 class="alphaindex">Alphabetic Index</h1>
|
|
58
58
|
|
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
</div>
|
|
113
113
|
|
|
114
114
|
<div id="footer">
|
|
115
|
-
Generated on Thu
|
|
115
|
+
Generated on Thu Nov 20 18:24:43 2025 by
|
|
116
116
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
117
|
-
0.9.
|
|
117
|
+
0.9.37 (ruby-3.2.2).
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
</div>
|
data/doc/class_list.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
2
|
+
<html >
|
|
3
3
|
<head>
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -38,12 +38,15 @@
|
|
|
38
38
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div id="search">
|
|
41
|
+
<div id="search">
|
|
42
|
+
<label for="search-class">Search:</label>
|
|
43
|
+
<input id="search-class" type="text" />
|
|
44
|
+
</div>
|
|
42
45
|
</div>
|
|
43
46
|
|
|
44
47
|
<ul id="full_list" class="class">
|
|
45
48
|
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
|
46
|
-
<li id='object_WorldTimeApi' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_WorldTimeApi::Request' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span><small class='search_info'>WorldTimeApi</small></div></li></ul></li>
|
|
49
|
+
<li id='object_WorldTimeApi' class='even'><div class='item' style='padding-left:30px'><a tabindex='0' class='toggle' role='button' aria-label='WorldTimeApi child nodes' aria-expanded='false' aria-controls='object_WorldTimeApi'></a> <span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span><small class='search_info'>Top Level Namespace</small></div><div aria-labelledby='object_WorldTimeApi'><ul><li id='object_WorldTimeApi::Request' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span><small class='search_info'>WorldTimeApi</small></div></li></ul></div></li>
|
|
47
50
|
|
|
48
51
|
</ul>
|
|
49
52
|
</div>
|
data/doc/css/full_list.css
CHANGED
|
@@ -20,8 +20,8 @@ h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
|
|
|
20
20
|
#content.insearch #noresults { margin-left: 7px; }
|
|
21
21
|
li.collapsed ul { display: none; }
|
|
22
22
|
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
|
|
23
|
-
li.collapsed a.toggle {
|
|
24
|
-
li { color: #
|
|
23
|
+
li.collapsed a.toggle { cursor: default; background-position: top left; }
|
|
24
|
+
li { color: #666; cursor: pointer; }
|
|
25
25
|
li.deprecated { text-decoration: line-through; font-style: italic; }
|
|
26
26
|
li.odd { background: #f0f0f0; }
|
|
27
27
|
li.even { background: #fafafa; }
|
|
@@ -47,7 +47,7 @@ li small { display: block; font-size: 0.8em; }
|
|
|
47
47
|
li small:before { content: ""; }
|
|
48
48
|
li small:after { content: ""; }
|
|
49
49
|
li small.search_info { display: none; }
|
|
50
|
-
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #
|
|
50
|
+
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; }
|
|
51
51
|
#content.insearch #search { background-position: center right; }
|
|
52
52
|
#search input { width: 110px; }
|
|
53
53
|
|
data/doc/css/style.css
CHANGED
|
@@ -82,6 +82,11 @@ body {
|
|
|
82
82
|
#search { display: none; }
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
@media (max-width: 320px) {
|
|
86
|
+
body { height: 100%; overflow: hidden; overflow-wrap: break-word; }
|
|
87
|
+
#main { height: 100%; overflow: auto; }
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
#main img { max-width: 100%; }
|
|
86
91
|
h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
|
|
87
92
|
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
|
|
@@ -106,6 +111,7 @@ h2 small a {
|
|
|
106
111
|
position: relative;
|
|
107
112
|
padding: 2px 7px;
|
|
108
113
|
}
|
|
114
|
+
a { font-weight: 550; }
|
|
109
115
|
.clear { clear: both; }
|
|
110
116
|
.inline { display: inline; }
|
|
111
117
|
.inline p:first-child { display: inline; }
|
data/doc/file.README.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -57,67 +57,70 @@
|
|
|
57
57
|
<div class="clear"></div>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
|
-
<div id="content"><div id='filecontents'
|
|
60
|
+
<div id="content"><div id='filecontents'>
|
|
61
|
+
<h1 id="label-WorldTimeApi">WorldTimeApi</h1>
|
|
61
62
|
|
|
62
|
-
<p><a href="https://badge.fury.io/rb/world_time_api"><img src="https://badge.fury.io/rb/world_time_api.svg"
|
|
63
|
+
<p><a href="https://badge.fury.io/rb/world_time_api"><img src="https://badge.fury.io/rb/world_time_api.svg"></a></p>
|
|
63
64
|
|
|
64
|
-
<p>
|
|
65
|
+
<p>A Ruby wrapper for the World Time API.</p>
|
|
65
66
|
|
|
66
|
-
<h2 id="
|
|
67
|
+
<h2 id="label-Installation">Installation</h2>
|
|
67
68
|
|
|
68
69
|
<p>Add this line to your application’s Gemfile:</p>
|
|
69
70
|
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
</code></p>
|
|
71
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>world_time_api</span><span class='tstring_end'>'</span></span>
|
|
72
|
+
</code></pre>
|
|
73
73
|
|
|
74
74
|
<p>And then execute:</p>
|
|
75
75
|
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
</code></p>
|
|
76
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_install'>install</span>
|
|
77
|
+
</code></pre>
|
|
79
78
|
|
|
80
79
|
<p>Or install it yourself as:</p>
|
|
81
80
|
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
</code></p>
|
|
81
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_world_time_api'>world_time_api</span>
|
|
82
|
+
</code></pre>
|
|
85
83
|
|
|
86
|
-
<h2 id="
|
|
84
|
+
<h2 id="label-Usage">Usage</h2>
|
|
87
85
|
|
|
88
|
-
<
|
|
89
|
-
WorldTimeApi::Timezones.call # list timezones</p>
|
|
86
|
+
<h3 id="label-List+timezones">List timezones</h3>
|
|
90
87
|
|
|
91
|
-
<
|
|
88
|
+
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#Timezones-constant" title="WorldTimeApi::Timezones (constant)">Timezones</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
|
89
|
+
</code></pre>
|
|
92
90
|
|
|
93
|
-
<
|
|
91
|
+
<h3 id="label-Get+time+by+timezone">Get time by timezone</h3>
|
|
94
92
|
|
|
95
|
-
<
|
|
96
|
-
|
|
93
|
+
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#Time-constant" title="WorldTimeApi::Time (constant)">Time</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Europe/London</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
94
|
+
</code></pre>
|
|
97
95
|
|
|
98
|
-
<
|
|
96
|
+
<h3 id="label-Get+time+by+IP+address">Get time by IP address</h3>
|
|
97
|
+
|
|
98
|
+
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#ClientIp-constant" title="WorldTimeApi::ClientIp (constant)">ClientIp</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>12.215.42.19</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
99
|
+
</code></pre>
|
|
100
|
+
|
|
101
|
+
<h2 id="label-Development">Development</h2>
|
|
99
102
|
|
|
100
103
|
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
|
|
101
104
|
|
|
102
105
|
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and the created tag, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
|
103
106
|
|
|
104
|
-
<h2 id="
|
|
107
|
+
<h2 id="label-Contributing">Contributing</h2>
|
|
105
108
|
|
|
106
|
-
<p>Bug reports and pull requests are welcome on GitHub at https://github.com/nemuba/world_time_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
|
|
109
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/nemuba/world_time_api">github.com/nemuba/world_time_api</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the of conduct[https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md].</p>
|
|
107
110
|
|
|
108
|
-
<h2 id="
|
|
111
|
+
<h2 id="label-License">License</h2>
|
|
109
112
|
|
|
110
113
|
<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
|
|
111
114
|
|
|
112
|
-
<h2 id="
|
|
115
|
+
<h2 id="label-Code+of+Conduct">Code of Conduct</h2>
|
|
113
116
|
|
|
114
|
-
<p>Everyone interacting in the WorldTimeApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the
|
|
117
|
+
<p>Everyone interacting in the WorldTimeApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the of conduct[https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md].</p>
|
|
115
118
|
</div></div>
|
|
116
119
|
|
|
117
120
|
<div id="footer">
|
|
118
|
-
Generated on Thu
|
|
121
|
+
Generated on Thu Nov 20 18:24:43 2025 by
|
|
119
122
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
120
|
-
0.9.
|
|
123
|
+
0.9.37 (ruby-3.2.2).
|
|
121
124
|
</div>
|
|
122
125
|
|
|
123
126
|
</div>
|
data/doc/file_list.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
2
|
+
<html >
|
|
3
3
|
<head>
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div id="search">
|
|
41
|
+
<div id="search">
|
|
42
|
+
<label for="search-class">Search:</label>
|
|
43
|
+
<input id="search-class" type="text" />
|
|
44
|
+
</div>
|
|
42
45
|
</div>
|
|
43
46
|
|
|
44
47
|
<ul id="full_list" class="file">
|
data/doc/frames.html
CHANGED
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
-
<title>Documentation by YARD 0.9.
|
|
5
|
+
<title>Documentation by YARD 0.9.37</title>
|
|
6
6
|
</head>
|
|
7
7
|
<script type="text/javascript">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var mainUrl = 'index.html';
|
|
9
|
+
try {
|
|
10
|
+
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
|
|
11
|
+
var name = match ? match[1] : mainUrl;
|
|
12
|
+
var url = new URL(name, location.href);
|
|
13
|
+
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
|
|
14
|
+
} catch (e) {
|
|
15
|
+
window.top.location.replace(mainUrl);
|
|
16
|
+
}
|
|
12
17
|
</script>
|
|
13
18
|
<noscript>
|
|
14
19
|
<h1>Oops!</h1>
|