agris 0.4.9 → 0.4.10

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
  SHA1:
3
- metadata.gz: b92f849836b867ec0496f3a2ba78eb164629c5b8
4
- data.tar.gz: 2cd4c02d9649a97a632b097d576f43453362d5ba
3
+ metadata.gz: acbb4d3729fe7cee9f14802aa26851c60758695c
4
+ data.tar.gz: 2de9591d6d5558d119c53210eaa3d6868e7c1792
5
5
  SHA512:
6
- metadata.gz: cbdc9d3e7515349374a3fcb6477818bfcb1d6549cebc1057bd3813343ad509eb2ebec4d8e652038524d37e9fc79509c26fedf4b7955d7d0c5817414ba138a465
7
- data.tar.gz: 14169083bfa4139d8c2c33a10aec244c856f9ef6ab38447433f2e79ad3501b60bf067e7da11e99559663fe036b5ea9a844045dac79dad8d4734681b386373cec
6
+ metadata.gz: eeb678465c2a58a7194a02ed9d740c982ef392c5935baeb55ad2162c1411b7be424a1d657f82c4b2acbbabbfa879c24519463f4554282ca0f218f94b6da202dc
7
+ data.tar.gz: 460386f7e225998d81063d5f1a7d84fc063685f5a0e689bc53be3d7132fb714649f82f5cffb06cb7aed5c3af5136b96d56456f02845baafb9da02c96349dd597
data/lib/agris.rb CHANGED
@@ -14,6 +14,7 @@ module Agris
14
14
  attr_accessor :credentials,
15
15
  :context,
16
16
  :logger,
17
+ :log_level,
17
18
  :proxy_url,
18
19
  :request_type,
19
20
  :user_agent
data/lib/agris/client.rb CHANGED
@@ -22,11 +22,12 @@ module Agris
22
22
  )
23
23
  @context = context
24
24
  @logger = options[:logger] || Agris.logger
25
+ @log_level = options[:log_level] || Agris.log_level
25
26
  @request_type = options[:request_type] || Agris.request_type
26
27
  @proxy_url = options.fetch(:proxy_url, Agris.proxy_url)
27
28
  @dataset = dataset || Agris.context.default_dataset
28
29
  @request = @request_type.new(
29
- @context.base_url, credentials, @logger, @proxy_url
30
+ @context.base_url, credentials, @logger, @log_level, @proxy_url
30
31
  )
31
32
  end
32
33
 
@@ -4,10 +4,11 @@ require 'savon'
4
4
 
5
5
  module Agris
6
6
  class SavonRequest
7
- def initialize(base_url, credentials, logger, proxy_url = nil)
7
+ def initialize(base_url, credentials, logger, log_level, proxy_url = nil)
8
8
  @base_url = base_url
9
9
  @credentials = credentials
10
10
  @logger = logger
11
+ @log_level = log_level
11
12
  @proxy_url = proxy_url
12
13
  end
13
14
 
@@ -45,7 +46,7 @@ module Agris
45
46
  raise_errors: false,
46
47
  logger: @logger,
47
48
  log: true,
48
- log_level: :debug
49
+ log_level: @log_level || :debug
49
50
  }
50
51
  options = options.merge(proxy: @proxy_url) unless @proxy_url.to_s == ''
51
52
  options = @credentials.apply(options)
data/lib/agris/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Agris
3
- VERSION = '0.4.9'
3
+ VERSION = '0.4.10'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Gray
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-11-10 00:00:00.000000000 Z
12
+ date: 2021-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon