webcache 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -19
- data/lib/webcache/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8aa8d4fedb7deea8b440e70002a01a8d5a7bc70fd6f4ea487cbf8db18fdad54
|
4
|
+
data.tar.gz: 38a5bcd708f9f09db88b3f4ffa1622ac92e9eeea7be08db57a89d841db446fcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b16642f53af90f51903abe71e27b7019a2de8df23e69a3d78b5827a9bb3496c6bc0a9361c197ec2304e4e840d4d26dbad907e6bdadf8c9e501c1a1bd78921e80
|
7
|
+
data.tar.gz: c8c6300945a4057a8356073c0ccff91e09c69f8ae57279797bead0bc92578f181f475826061fd43c75d8848d0f4240efb5a0d108f34535a9b75283dd44dbb597
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
WebCache
|
2
|
-
==================================================
|
1
|
+
# WebCache
|
3
2
|
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/webcache.svg)](https://badge.fury.io/rb/webcache)
|
5
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/DannyBen/webcache/workflows/Test/badge.svg)](https://github.com/DannyBen/webcache/actions?query=workflow%3ATest)
|
6
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/022f555211d47d655988/maintainability)](https://codeclimate.com/github/DannyBen/webcache/maintainability)
|
7
6
|
|
8
7
|
---
|
@@ -11,8 +10,7 @@ Hassle-free caching for HTTP download.
|
|
11
10
|
|
12
11
|
---
|
13
12
|
|
14
|
-
Install
|
15
|
-
--------------------------------------------------
|
13
|
+
## Install
|
16
14
|
|
17
15
|
```
|
18
16
|
$ gem install webcache
|
@@ -24,8 +22,7 @@ Or with bundler:
|
|
24
22
|
gem 'webcache'
|
25
23
|
```
|
26
24
|
|
27
|
-
Usage
|
28
|
-
--------------------------------------------------
|
25
|
+
## Usage
|
29
26
|
|
30
27
|
WebCache can be used both as an instance, and as a static class.
|
31
28
|
|
@@ -147,8 +144,7 @@ cache = WebCache.new
|
|
147
144
|
response = cache.get 'http://example.com', force: true
|
148
145
|
```
|
149
146
|
|
150
|
-
Authentication
|
151
|
-
--------------------------------------------------
|
147
|
+
## Authentication
|
152
148
|
|
153
149
|
To configure an authentication header, use the `auth` option. Similarly to
|
154
150
|
the other options, this can be set directly on the static class, on instance
|
@@ -178,10 +174,7 @@ For other authentication headers, simply provide the header string:
|
|
178
174
|
cache = WebCache.new auth: "Bearer t0k3n"
|
179
175
|
```
|
180
176
|
|
181
|
-
|
182
|
-
|
183
|
-
Response Object
|
184
|
-
--------------------------------------------------
|
177
|
+
## Response Object
|
185
178
|
|
186
179
|
The response object holds these properties:
|
187
180
|
|
@@ -191,7 +184,6 @@ Contains the HTML content. In case of an error, this will include the
|
|
191
184
|
error message. The `#to_s` method of the response object also returns
|
192
185
|
the same content.
|
193
186
|
|
194
|
-
|
195
187
|
### `response.error`
|
196
188
|
|
197
189
|
In case of an error, this contains the error message, `nil` otherwise.
|
@@ -210,12 +202,17 @@ Contains the actual address of the page. This is useful when the request
|
|
210
202
|
is redirected. For example, `http://example.com` will set the
|
211
203
|
`base_uri` to `http://example.com/` (note the trailing slash).
|
212
204
|
|
213
|
-
|
214
|
-
---
|
205
|
+
## Related Projects
|
215
206
|
|
216
207
|
For a similar gem that provides general purpose caching, see the
|
217
|
-
[Lightly gem][
|
208
|
+
[Lightly gem][lightly].
|
209
|
+
|
210
|
+
## Contributing / Support
|
218
211
|
|
212
|
+
If you experience any issue, have a question or a suggestion, or if you wish
|
213
|
+
to contribute, feel free to [open an issue][issues].
|
214
|
+
|
215
|
+
---
|
219
216
|
|
220
|
-
[
|
221
|
-
[
|
217
|
+
[lightly]: https://github.com/DannyBen/lightly
|
218
|
+
[issues]: https://github.com/DannyBen/webcache/issues
|
data/lib/webcache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webcache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.0'
|
27
27
|
description: Easy to use file cache for web downloads
|
28
28
|
email: db@dannyben.com
|
29
29
|
executables: []
|
@@ -49,14 +49,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
49
|
requirements:
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 2.
|
52
|
+
version: 2.5.0
|
53
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
59
|
+
rubygems_version: 3.2.16
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: Hassle-free caching for HTTP download
|