nice_http 1.9.1 → 1.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f688f89208a9399e2ca324654d3dd3230ecb9c4f084e7df64d2354ca3c42115
4
- data.tar.gz: acb57ae8b78eba00ffabd3739820b23cf3fa71aa22054da6496732ec53c222d8
3
+ metadata.gz: c7de64c3605e9d44b0e7299f84074b3e9069e80e6010de64b70a163a85e1d70e
4
+ data.tar.gz: a444019a1b5dc40d026661e749cb9cfe64dc244fb9051891290ff9708830abb9
5
5
  SHA512:
6
- metadata.gz: fa146eb3df1800afdc97c38830cafe927ac52d210a8308f7e1e2ec089efbf86fe4ac6623130baf4b19f6672d445cc791cd6a808c573339c0e5194bfac0c0d854
7
- data.tar.gz: 6c0810b73dc0ff5fb28f1805073f35e887ef01d40ad2abf37d2544610413dc40911787647236ba83dc6c56ca60afb9708ac733d41bdccf6b74de0e7a9df3a132
6
+ metadata.gz: bfa9751148d760ba592c7e4d34bd868d21ec7844536e2b27513582585c22e902c92aef14a5ddb1d2dd5a88714ce73551bed49aaa62ee4b0e5ee958e4639c454e
7
+ data.tar.gz: e63e86a0d70e589fb749d672ae28e8151f8969a3c10e5e8a4188febafe0f0b6b49ed755298eff0b0486af9b98585629e9432c7dcd148840c742a86f868de1bc8
@@ -174,7 +174,8 @@ class NiceHttp
174
174
  else
175
175
  raise InfoMissing, :log
176
176
  end
177
- @logger.level = Logger::INFO
177
+ @log_file = log_filename
178
+ @logger.level = Logger::INFO
178
179
 
179
180
  if @host.to_s != "" and (@host.start_with?("http:") or @host.start_with?("https:"))
180
181
  uri = URI.parse(@host)
data/lib/nice_http.rb CHANGED
@@ -44,6 +44,7 @@ require_relative "nice_http/initialize"
44
44
  # :file, will be generated a log file with name: nice_http_YY-mm-dd-HHMMSS.log.
45
45
  # :file_run, will generate a log file with the name where the object was created and extension .log, fex: myfile.rb.log
46
46
  # String the path and file name where the logs will be stored.
47
+ # @attr [String] log_file path and file name where the logs will be stored. (only reader)
47
48
  # @attr [Symbol] log_headers. :all, :partial, :none (default :all) If :all will log all the headers. If :partial will log the last 10 characters. If :none no headers.
48
49
  # @attr [String] proxy_host the proxy host to be used
49
50
  # @attr [Integer] proxy_port the proxy port to be used
@@ -110,7 +111,7 @@ class NiceHttp
110
111
 
111
112
  reset!
112
113
 
113
- attr_reader :host, :port, :ssl, :timeout, :debug, :log, :log_path, :proxy_host, :proxy_port, :response, :num_redirects
114
+ attr_reader :host, :port, :ssl, :timeout, :debug, :log, :log_path, :proxy_host, :proxy_port, :response, :num_redirects, :log_file
114
115
  attr_accessor :headers, :cookies, :use_mocks, :auto_redirect, :logger, :values_for, :log_headers,
115
116
  :async_wait_seconds, :async_header, :async_completed, :async_resource, :async_status
116
117
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2022-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nice_hash