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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25257053739d26c811dc6fe61337deb27582549fcade84cc94da4a2b841cc399
4
- data.tar.gz: 5f1fc1172b8252bf552caa9131e495065c5420d8773c9ce944843999c914df4f
3
+ metadata.gz: 128484ee899230f9f654c1589e9132e2c8c65dc4f4d0063e963b84745cba85eb
4
+ data.tar.gz: fc0ba12028b10363d650758c416f6db5fa2ebc548573f71be05de87e9687f6d9
5
5
  SHA512:
6
- metadata.gz: 31d4b8dc8fb95aaa1585e4009183b4a2ac4612aa3d4fe3cf65f8f369340bdf375a3ee410ca4e26d9471d31272f8fc40447e2adccd633b6f8a7000be23f87111e
7
- data.tar.gz: e4a6b5b6fee9a8a9f3a971c50fd1345a09674544c90e2ec063290e8cac067e38374f19f2395377cc84bbb8649f107dea64c6a9484dde9a67c5a9c3fa79aaece6
6
+ metadata.gz: e37ed2b6b418122f39b504f276c230e13c7f95eee7d072f645612c90f71c849af6a33543b7cb4f3d97685d5e96b73d85c42fac0fb578766e947ae24d1ba6a60b
7
+ data.tar.gz: 2a3f21c1e98c700c354a14f0481351ee7d54df33ebe24d4e3f51dad92d5bc42de6102cfb49bcc04e65fbb2cc665a2da36a1c6cf657881427fcb48d4ed42333d8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- web_loader (1.4.0)
4
+ web_loader (1.4.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- # if @use_cache
92
- log("Write cache: #{url}", @verbose)
93
- Cache.write(@cache_dir, url, response.code, body)
94
- # end
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebLoader
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.1"
5
5
  end
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.0) [path][gem]" type="rubylib">
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.0/lib" />
20
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.0/test" />
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.0/lib" />
25
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.0/test" />
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.0/test" />
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>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - src