dialog-api 0.0.4 → 0.0.5

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: 9213073b6314b581df5759f5bbdf498dd304cc22
4
- data.tar.gz: f5946953b8f8e0fab87b81a4604f2b2f8a8149c4
3
+ metadata.gz: b070782d9b3a03d9802c08d2bc0d6179be343452
4
+ data.tar.gz: 8880abb6b81a843af5446ddbe1c30e7275accdfa
5
5
  SHA512:
6
- metadata.gz: 393ce237a39b860c5d5b1717081075ef51fe790341704d97554f8b2094547c4bf3c56f64104b91cc057f50c30eb1665486d099a6f8f01441efe5493cfeb6b5fa
7
- data.tar.gz: e3bea1991a7fc820d791d23eae1787cd1bbc890a9248b32636abda69d375fdb192415d8d254b8b96ff82669a8c055d2aab333c09d144352d712a39ef32f73796
6
+ metadata.gz: 6b3793f94963a49a91248c135309fa109850d3b226f66466cf82864ee1ffde7604d3130d57c6c3e5933c2d0de27ddb770ec941b50e7400afdac33e2a95d3713a
7
+ data.tar.gz: 791c8bca44aa713b8da1d10097085364843b8f02dc8a1716c19a7884b2369a90479968845d82e423de7f53646dc5bffc64c0fcf9f8120db14486aa6365420fd9
@@ -2,7 +2,7 @@ require 'dialog-api/version'
2
2
 
3
3
  module Dialog
4
4
  module Configuration
5
- VALID_OPTIONS_KEYS = [:api_endpoint, :api_token, :user_agent, :bot_id, :on_error].freeze
5
+ VALID_OPTIONS_KEYS = [:api_endpoint, :api_token, :user_agent, :bot_id, :on_error, :debug].freeze
6
6
 
7
7
  DEFAULT_API_ENDPOINT = "https://api.dialoganalytics.com/v1/"
8
8
  DEFAULT_API_TOKEN = nil
@@ -29,6 +29,7 @@ module Dialog
29
29
  self.user_agent = DEFAULT_USER_AGENT
30
30
  self.on_error = Proc.new {}
31
31
  self.bot_id = nil
32
+ self.debug = false
32
33
 
33
34
  return true
34
35
  end
@@ -37,6 +37,10 @@ module Dialog
37
37
 
38
38
  response = Http.headers(headers).send(method, path, params: params, json: body)
39
39
 
40
+ if debug
41
+ p response
42
+ end
43
+
40
44
  # Pass on errors when HTTP status included in 400 to 599
41
45
  if (400..599).include?(response.code)
42
46
  begin
@@ -1,3 +1,3 @@
1
1
  module Dialog
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dialog-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philippe Dionne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-20 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.5.2
64
+ rubygems_version: 2.6.8
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: A ruby client for the Dialog API.