qismo 0.1.2 → 0.1.8
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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/qismo/response.rb +4 -5
- data/lib/qismo/version.rb +1 -1
- metadata +2 -4
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4eaffbee238679bb22787462d15da8eeba47b130485a197f25798f9972df663
|
|
4
|
+
data.tar.gz: 8503bd0773f35a80cc29d0e2ac28f4eebf0a77856f83f629452b2ee57c1e28bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d58a2a88592ff4d8cc65c50afeda3ec153ed1a2abc451827ae670c3eff5c0af8fdcecb837689eb2915de5ebd08c1216913b15c9ef14a75b93cbba4c3ee81f06
|
|
7
|
+
data.tar.gz: 4ef954fed64bd7e30ee7314524cccc6baa89709c0e3e279fb07df608e6927cb05aee7ef19e7e747c86e1dd499d68037b1d9ad2539ec9da7ab89f47e481a9839f
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/qismo/response.rb
CHANGED
|
@@ -74,9 +74,9 @@ module Qismo
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def parse_error(resp)
|
|
77
|
-
return nil if resp.status.ok?
|
|
77
|
+
return nil if resp.status.ok?
|
|
78
78
|
|
|
79
|
-
if resp.
|
|
79
|
+
if resp.code >= 500
|
|
80
80
|
return InternalServerError.new(
|
|
81
81
|
"Qiscus internal server error",
|
|
82
82
|
http_code: resp.code,
|
|
@@ -86,7 +86,7 @@ module Qismo
|
|
|
86
86
|
)
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
if resp.
|
|
89
|
+
if resp.code >= 400
|
|
90
90
|
code = resp.code
|
|
91
91
|
headers = safe_parse_json(resp.headers.to_h)
|
|
92
92
|
raw_body = resp.to_s
|
|
@@ -124,9 +124,8 @@ module Qismo
|
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
klass.message = error_message
|
|
127
|
-
klass.message = errors if klass.message.is_a?(String)
|
|
128
127
|
else
|
|
129
|
-
klass.message = klass.
|
|
128
|
+
klass.message = klass.http_raw_body
|
|
130
129
|
end
|
|
131
130
|
|
|
132
131
|
klass
|
data/lib/qismo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: qismo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nurcholis Art
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2022-
|
|
12
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: http
|
|
@@ -57,8 +57,6 @@ files:
|
|
|
57
57
|
- LICENSE.txt
|
|
58
58
|
- README.md
|
|
59
59
|
- Rakefile
|
|
60
|
-
- bin/console
|
|
61
|
-
- bin/setup
|
|
62
60
|
- lib/qismo.rb
|
|
63
61
|
- lib/qismo/client.rb
|
|
64
62
|
- lib/qismo/errors.rb
|
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "qismo"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start(__FILE__)
|