web_loader 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/web_loader/command.rb +6 -4
- data/lib/web_loader/version.rb +1 -1
- data/web_loader.iml +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 128484ee899230f9f654c1589e9132e2c8c65dc4f4d0063e963b84745cba85eb
|
4
|
+
data.tar.gz: fc0ba12028b10363d650758c416f6db5fa2ebc548573f71be05de87e9687f6d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37ed2b6b418122f39b504f276c230e13c7f95eee7d072f645612c90f71c849af6a33543b7cb4f3d97685d5e96b73d85c42fac0fb578766e947ae24d1ba6a60b
|
7
|
+
data.tar.gz: 2a3f21c1e98c700c354a14f0481351ee7d54df33ebe24d4e3f51dad92d5bc42de6102cfb49bcc04e65fbb2cc665a2da36a1c6cf657881427fcb48d4ed42333d8
|
data/Gemfile.lock
CHANGED
data/lib/web_loader/command.rb
CHANGED
@@ -31,11 +31,13 @@ module WebLoader
|
|
31
31
|
@binary = false
|
32
32
|
@verbose = false
|
33
33
|
@cache_limit = CACHE_LIMIT
|
34
|
+
@always_write_cache = false
|
34
35
|
end
|
35
36
|
|
36
37
|
attr_reader :load_cache_page
|
37
38
|
attr_accessor :use_cache, :cache_dir, :binary, :user_agent, :verbose
|
38
39
|
attr_accessor :cache_limit
|
40
|
+
attr_accessor :always_write_cache
|
39
41
|
|
40
42
|
def load_retry(url, retry_count = DEFAULT_RETRY)
|
41
43
|
load(url, DEFAULT_REDIRECT, retry_count)
|
@@ -88,10 +90,10 @@ module WebLoader
|
|
88
90
|
body = toutf8(body, encoding)
|
89
91
|
end
|
90
92
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
93
|
+
if @use_cache || @always_write_cache
|
94
|
+
log("Write cache: #{url}", @verbose)
|
95
|
+
Cache.write(@cache_dir, url, response.code, body)
|
96
|
+
end
|
95
97
|
result = body
|
96
98
|
when Net::HTTPRedirection
|
97
99
|
result = load(to_redirect_url(uri, response['location']), redirect_count - 1)
|
data/lib/web_loader/version.rb
CHANGED
data/web_loader.iml
CHANGED
@@ -11,21 +11,21 @@
|
|
11
11
|
<orderEntry type="inheritedJdk" />
|
12
12
|
<orderEntry type="sourceFolder" forTests="false" />
|
13
13
|
<orderEntry type="module-library">
|
14
|
-
<library name="minitest (v5.22.
|
14
|
+
<library name="minitest (v5.22.2) [path][gem]" type="rubylib">
|
15
15
|
<properties>
|
16
16
|
<option name="version" value="4" />
|
17
17
|
</properties>
|
18
18
|
<CLASSES>
|
19
|
-
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.
|
20
|
-
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.
|
19
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib" />
|
20
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/test" />
|
21
21
|
</CLASSES>
|
22
22
|
<JAVADOC />
|
23
23
|
<SOURCES>
|
24
|
-
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.
|
25
|
-
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.
|
24
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib" />
|
25
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/test" />
|
26
26
|
</SOURCES>
|
27
27
|
<excluded>
|
28
|
-
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.
|
28
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/test" />
|
29
29
|
</excluded>
|
30
30
|
</library>
|
31
31
|
</orderEntry>
|