lib_discord 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/lib_discord/client.rb +1 -1
- data/lib/lib_discord/resource.rb +3 -5
- data/lib/lib_discord/types.rb +5 -3
- data/lib/lib_discord/version.rb +1 -1
- data/lib/lib_discord.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee336f29f9c16524420b8b087cd245de9cc80f35ee27c1d0036c0983b2042d18
|
4
|
+
data.tar.gz: bca8789409c439b82d3bec3b69122c992672b89f35318ee91a1e173fd3ce8589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d3c5d14694598880a30b2b061079dedba3ce3911bc64b1c58f340ab8812e97651d25bff73b62c358ad7501203d6d3c1d0394c89f939c3e6a50cd6fbf6db6da7
|
7
|
+
data.tar.gz: b4c989d2ded1f3a95bd037f7ca111cb3258e54df90eac9de3342d4d348546ca2ef63a503dc1c35895f63af382669d3eb967eb5a4db80a8659cdaa09f166d31ec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## [0.1.2] - 2024-05-13
|
4
|
+
|
5
|
+
### chore
|
6
|
+
- sort modules alphabetically
|
7
|
+
- unified error raising style
|
8
|
+
- bump version to 0.1.2
|
9
|
+
|
10
|
+
### fix
|
11
|
+
- allow for loggers other than Logger descendants
|
12
|
+
- forgot how to raise errors :facepalm:
|
13
|
+
- arguments for ConstraintError
|
14
|
+
- use `#debug()` convenience method rather than `#add()`
|
15
|
+
|
3
16
|
## [0.1.1] - 2024-04-24
|
4
17
|
|
5
18
|
### chore
|
data/lib/lib_discord/client.rb
CHANGED
data/lib/lib_discord/resource.rb
CHANGED
@@ -113,11 +113,9 @@ module LibDiscord
|
|
113
113
|
body_parsed = begin
|
114
114
|
discord_response.parse
|
115
115
|
rescue HTTP::Error
|
116
|
-
@logger.
|
117
|
-
|
118
|
-
|
119
|
-
"lib_discord"
|
120
|
-
)
|
116
|
+
@logger.debug("lib_discord") do
|
117
|
+
"Could not parse response body with content-type `#{discord_response.headers["Content-Type"]}`."
|
118
|
+
end
|
121
119
|
|
122
120
|
nil
|
123
121
|
end
|
data/lib/lib_discord/types.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/types"
|
4
|
-
require "logger"
|
5
4
|
|
6
5
|
module LibDiscord
|
7
6
|
##
|
@@ -14,8 +13,11 @@ module LibDiscord
|
|
14
13
|
include Dry.Types()
|
15
14
|
|
16
15
|
##
|
17
|
-
# Check for
|
18
|
-
|
16
|
+
# Check for a +Logger+-compatible object. It must respond to +#debug()+,
|
17
|
+
# +#info()+, +#warn()+, +#error()+, and +#fatal()+.
|
18
|
+
Logger = Types.Interface(
|
19
|
+
:debug, :info, :warn, :error, :fatal
|
20
|
+
)
|
19
21
|
|
20
22
|
##
|
21
23
|
# Check Discord response headers.
|
data/lib/lib_discord/version.rb
CHANGED
data/lib/lib_discord.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lib_discord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-container
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
|
-
rubygems_version: 3.5.
|
173
|
+
rubygems_version: 3.5.10
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Unfancy Discord API Ruby-bindings
|