get_response 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: d9da541994de430a3934c8e1c8c2a363b3dc8b71
4
- data.tar.gz: 6e5e5323026bbfbb115d261f2da828b2deb0ae76
3
+ metadata.gz: d7f7e3027c93e34d83b9558aa6f13acc2bc3cadf
4
+ data.tar.gz: 162eb858863593b8be888aa0c81c4980eaaf8d6f
5
5
  SHA512:
6
- metadata.gz: 648f43ce4d0307c7df72fa693067ff70f14d5c696fcef4f530c29c7fb30a74d554eb744171479da23346bd5e2d91f96ceba10387db998d109bae871f38c52e0f
7
- data.tar.gz: 57511ab167f8f272d782cc9f55b152a9faa30be1821f93cf76daf75862a4a301dd33efa20c5b226c87cb2343697ca60c81f25c64bb46a37936d85cb53fb30616
6
+ metadata.gz: f97083f2f3f3aeee8de56acbd25487889878cc56015c26524ee3b5a9ab231955fe2ffc38685c7ede1722021ca37a67b576c4c5d748637646b1375fb9ca9c24ef
7
+ data.tar.gz: 1b9648c77ee5192c01f03f1dc7f1c4876212a963eb15e16bd8629385606046fede62aabded0e66337417b064c4e5fe3a4e66bac11e22db351fb976e516dc370f
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Add this line to your application's Gemfile:
6
6
 
7
7
  ```ruby
8
- gem 'getresponse_ruby'
8
+ gem 'get_response'
9
9
  ```
10
10
 
11
11
  And then execute:
@@ -14,7 +14,7 @@ And then execute:
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install getresponse_ruby
17
+ $ gem install get_response
18
18
 
19
19
  ## Usage
20
20
 
@@ -27,9 +27,14 @@ module GetResponse
27
27
  @connection ||= Faraday.new(url: api_endpoint) do |faraday|
28
28
  faraday.request :url_encoded
29
29
  faraday.adapter Faraday.default_adapter
30
+ faraday.response :logger, GetResponse.config.logger if verbose?
30
31
  end
31
32
  end
32
33
 
34
+ def verbose?
35
+ GetResponse.config.verbose
36
+ end
37
+
33
38
  def api_endpoint
34
39
  GetResponse.config.api_endpoint || DEFAULT_API_ENDPOINT
35
40
  end
@@ -1,3 +1,3 @@
1
1
  module GetResponse
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/get_response.rb CHANGED
@@ -3,11 +3,13 @@ require "get_response/version"
3
3
  require "get_response/request"
4
4
  require "get_response/api"
5
5
  require "get_response/response"
6
+ require 'logger'
6
7
 
7
8
  module GetResponse
8
9
  class << self
9
10
  def configure
10
11
  yield(configuration)
12
+ configuration.logger ||= Logger.new(STDOUT)
11
13
  end
12
14
 
13
15
  def configuration
@@ -17,6 +19,6 @@ module GetResponse
17
19
  end
18
20
 
19
21
  class Config
20
- attr_accessor :api_key, :verbose, :api_endpoint, :domain_header, :api_version
22
+ attr_accessor :api_key, :verbose, :api_endpoint, :domain_header, :api_version, :logger
21
23
  end
22
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faizal Zakaria
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2017-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler