slkecho 2.1.1 → 2.1.3

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: 54e8bdee7476e89d49e55997437e7af297af69ce77f54215d1105ff36e46940e
4
+ data.tar.gz: b54a41496162d4f326a6f97ac988765f0d024f2b6db6595860d45c102dd25a0a
5
5
  SHA512:
6
- metadata.gz: 25a8acf5fd4f84c7d76b91ac9a44e99e780e398c0b878dac33352e621e5139dc09d9d13b041eaec04227b20c7996596799656b5cf367195d65aeb10b959507e2
7
- data.tar.gz: da7a9a3a06f06910e7660f5408c0a9c9a3b1d0f057c02ad88b5c9bc10ba96f559141b956659a6993b6b04c611a6fde5f0b26a06998c39ad9651270ad21d877f0
6
+ metadata.gz: c4e6bc887a7b3d3d985a4983a4f938ba11125cdef5a8584dd5d1aedccb37f8e2fa00a72e7d0a7b900fbdd02cde80787d0b90fccd04f5ddff65924ed0205bd93c
7
+ data.tar.gz: 0c6e6dd5c5e3b2f7a9092da6ef6930954a71f6c9ea2e2f9f69ef5a7b8a746432a6d3bb36fc0a3eb5adc673ea2c3015c9f5dda27cc231710bee8f9431bf85bbdc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [v2.1.3] - 2024-03-15
4
+
5
+ - fix: Broken mention by email
6
+
7
+ ## [v2.1.2] - 2024-03-05
8
+
9
+ - refactor: Use pattern matching
10
+ - chore: Add rubocop-rake
11
+
3
12
  ## [v2.1.1] - 2024-02-12
4
13
 
5
14
  - chore: Add ruby-lsp gem
data/lib/slkecho/cli.rb CHANGED
@@ -20,7 +20,7 @@ module Slkecho
20
20
 
21
21
  def email_to_user_id(email)
22
22
  user = @slack_client.lookup_user_by_email(email: email)
23
- user["id"]
23
+ user[:id]
24
24
  end
25
25
 
26
26
  def post_message_params_from(options, user_id)
@@ -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.3"
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.3
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-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Post message to Slack like echo command.
14
14
  email: