oktakit 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: 3adab52f184b5c0fba4fd028e4cdff2feab41de2
4
- data.tar.gz: c9a1251fb849eb6c7b411bc8d60b911cc6c5f37d
3
+ metadata.gz: adf0ea71def77c70beb44440f48cb88715139965
4
+ data.tar.gz: 40594318ff21d080472389671cbc1f1aa90aaac1
5
5
  SHA512:
6
- metadata.gz: 367d9245869de129a64f7da78e72b4927750489897fdd3607a4a61cb4f658158db91ab5a84428255a6d05cf8b6259ea986213ace723b0ac94022acc676c934bc
7
- data.tar.gz: 85facd5085b68c9f007cea04819b83469744175e33c78264129bc9614d5272487f03bee05f925a2488dfba59116d950edd3b414f5a555e3c026999480090dc45
6
+ metadata.gz: f25a78a4aecb0fa247a1e07b250617783dd7e0784981d4467555f5d9719c414f8a1fe76d5963742cf849bb9770f4af310ef2ccb1de591f879e622772ac9543c8
7
+ data.tar.gz: 5e0019a52d0ec4b1b6283d2a0511e93a5c78218669ff860de72788dd5baf61477b29b9a6c0813161002cc9bc5eba7074e2923dd86a465fc787c4cc4d665155ac
@@ -38,13 +38,6 @@ module Oktakit
38
38
  super(build_error_message)
39
39
  end
40
40
 
41
- # Documentation URL returned by the API for some errors
42
- #
43
- # @return [String]
44
- def documentation_url
45
- data[:documentation_url] if data.is_a? Hash
46
- end
47
-
48
41
  # Array of validation errors
49
42
  # @return [Array<Hash>] Error info
50
43
  def errors
@@ -78,27 +71,12 @@ module Oktakit
78
71
  def response_message
79
72
  case data
80
73
  when Hash
81
- data[:message]
74
+ data[:errorSummary]
82
75
  when String
83
76
  data
84
77
  end
85
78
  end
86
79
 
87
- def response_error
88
- "Error: #{data[:error]}" if data.is_a?(Hash) && data[:error]
89
- end
90
-
91
- def response_error_summary
92
- return nil unless data.is_a?(Hash) && !Array(data[:errors]).empty?
93
-
94
- summary = "\nError summary:\n"
95
- summary << data[:errors].map do |hash|
96
- hash.map { |k, v| " #{k}: #{v}" }
97
- end.join("\n")
98
-
99
- summary
100
- end
101
-
102
80
  def build_error_message
103
81
  return nil if @response.nil?
104
82
 
@@ -106,9 +84,6 @@ module Oktakit
106
84
  message << redact_url(@response[:url].to_s) + ': '
107
85
  message << "#{@response[:status]} - "
108
86
  message << response_message.to_s unless response_message.nil?
109
- message << response_error.to_s unless response_error.nil?
110
- message << response_error_summary.to_s unless response_error_summary.nil?
111
- message << " // See: #{documentation_url}" unless documentation_url.nil?
112
87
  message
113
88
  end
114
89
 
@@ -1,3 +1,3 @@
1
1
  module Oktakit
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oktakit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graeme Johnson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-07-15 00:00:00.000000000 Z
12
+ date: 2016-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sawyer