slkecho 2.1.1 → 2.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
  SHA256:
3
- metadata.gz: 4316f376c8717965ab2c3518c054be6d983bc005d343803305bdb90f2bc0b963
4
- data.tar.gz: 11cf2ec4be6b49b6a4d4d566ac9c767036ae91871c3ebe39e4a760198f13e367
3
+ metadata.gz: 295daf68fcaa6ff59b760b56838278783ad0aa2faf9d0762d2f71224171f7651
4
+ data.tar.gz: 175739afc0d696ab3cee16032ab9f9559bb6dcaa2d4223f4be60875943d1870a
5
5
  SHA512:
6
- metadata.gz: 25a8acf5fd4f84c7d76b91ac9a44e99e780e398c0b878dac33352e621e5139dc09d9d13b041eaec04227b20c7996596799656b5cf367195d65aeb10b959507e2
7
- data.tar.gz: da7a9a3a06f06910e7660f5408c0a9c9a3b1d0f057c02ad88b5c9bc10ba96f559141b956659a6993b6b04c611a6fde5f0b26a06998c39ad9651270ad21d877f0
6
+ metadata.gz: cc03a7970e96f640c5ab1264100968d240189f018214443f79237ec9b4f67faea585c0416e29f14f5a743a75c54d41549ee209adbf746dba5c5c94f1188a535b
7
+ data.tar.gz: ba52052e096ee65b03d7d869205f51492b825ffaa2bd1aa298d77b79b2067f766923ce02eb4ba29834bd809ba3614e096c330595f0f6bda27ee9738155b0e838
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [v2.1.2] - 2024-03-05
4
+
5
+ - refactor: Use pattern matching
6
+ - chore: Add rubocop-rake
7
+
3
8
  ## [v2.1.1] - 2024-02-12
4
9
 
5
10
  - chore: Add ruby-lsp gem
@@ -25,16 +25,15 @@ module Slkecho
25
25
 
26
26
  def request(params)
27
27
  result = Slkecho::SlackRequest.send_request do
28
- @http.post(
29
- @uri.path,
30
- request_body(params).to_json,
31
- @headers
32
- )
28
+ @http.post(@uri.path, request_body(params).to_json, @headers)
33
29
  end
34
30
 
35
- raise Slkecho::SlackApiResultError, result[:error] unless result[:ok]
36
-
37
- true
31
+ case result
32
+ in { ok: true }
33
+ true
34
+ in { ok: false, error: error }
35
+ raise Slkecho::SlackApiResultError, error
36
+ end
38
37
  end
39
38
 
40
39
  def request_body(params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Slkecho
4
- VERSION = "2.1.1"
4
+ VERSION = "2.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slkecho
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - okonomi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-12 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Post message to Slack like echo command.
14
14
  email: