oneaccess 1.1.0 → 1.2.0

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: f9bf8a4f7ec45050532078a73f815abc1a2649f3
4
- data.tar.gz: d5906200a77db100de8d206d1ac1c6872c70ce52
3
+ metadata.gz: c40d4f0b9e451ae7913454d558de37997bb6ee8e
4
+ data.tar.gz: af37d616c60b5c93c709c7a2002d8c147a7de023
5
5
  SHA512:
6
- metadata.gz: adfb7fab327abaeee14fa4dd54851319abae5f79a17da4c7125b7d28e1e2cdf1ca203a7e326f4fb87821654a7ddbbe2ef9b91b9b3f41045f3a7254e447a5f6ac
7
- data.tar.gz: c831f84f10a65d5b7624631c6e470a607c05ef67b83f854bb177efe84368dcfc4493a8e12114bec8a2b2d865643b439958fcb311b459ebdcd26c15609d40f688
6
+ metadata.gz: abc576b91ce4b23ad091b487e9894bb2f169c191d2cfe296710c71bd1aa1da45bbc92837ec7ae7cede6f203fe118f9993e29c29f55591f6c1156ed4f58a058b8
7
+ data.tar.gz: 89b0ccd89e1996babc10fc10a650b533d1f169f979e47ffebf91245c9bfc7b4e0e08ecfa7f440c52db747c5ebe305240acc74d31dbb13a007643ba46ec151268
@@ -13,6 +13,7 @@ module ONEAccess
13
13
  attr_accessor :api_key
14
14
  attr_accessor :master_api_key
15
15
  attr_writer :logger
16
+ attr_accessor :log_requests
16
17
 
17
18
  def base_v1_1_url
18
19
  "#{base_url}#{DEFAULT_BASE_V1_1_PATH}"
@@ -47,14 +47,15 @@ module ONEAccess
47
47
  end
48
48
 
49
49
  def connection
50
- Faraday.new(url: Configuration.base_url,
51
- headers: auth_headers,
52
- request: { timeout: DEFAULT_TIMEOUT }) do |faraday|
50
+ parameters = { url: Configuration.base_url, headers: auth_headers, request: { timeout: DEFAULT_TIMEOUT } }
51
+ Faraday.new(parameters) do |faraday|
53
52
  faraday.response :raise_error
54
- faraday.response :logger, Configuration.logger, bodies: true do |logger|
55
- logger.filter(/(Api-Key)([\s:"]*)(.+)(\"{1})/, "[REMOVED]")
56
- end
57
53
  faraday.adapter(detect_adapter)
54
+ if Configuration.log_requests
55
+ faraday.response :logger, Configuration.logger, bodies: true do |logger|
56
+ logger.filter(/(Api-Key)([\s:"]*)(.+)(\"{1})/, "[REMOVED]")
57
+ end
58
+ end
58
59
  end
59
60
  end
60
61
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "oneaccess"
5
- s.version = "1.1.0"
6
- s.date = "2018-06-26"
5
+ s.version = "1.2.0"
6
+ s.date = "2018-07-03"
7
7
  s.summary = "ONEAccess API wrapper"
8
8
  s.description = "Easily communicate with ONEAccess API"
9
9
  s.homepage = "https://github.com/AlphaExchange/oneaccess-rb"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneaccess
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Correia Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler