qiita_team_services 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4da9ccfe481121e812f461f312a74732edfeb956
4
- data.tar.gz: 16dcd0bf7ab843d2ab25cf2fcef6a0a3f9bb47eb
3
+ metadata.gz: 3704aa3fd1816af8903e4e9d6b1b4a30b212813a
4
+ data.tar.gz: 6da5d69f29bfe6624b92caeeb0ba44895a502837
5
5
  SHA512:
6
- metadata.gz: cead78f4002f9b6e63aa33528d1e32fb80da1cc2050a594023c74b3da4439c8c00503dea184e85bb10bac0f57d9ecb4bd5c0737e64e2ae4b12e52283c3fb9d36
7
- data.tar.gz: 77802d7473b8dd267a16af6caa0bc6397ea6c824af27f7e4a867715924b754850cfb039178cf82a45c16d0187dfb1ccf74653c7918171f997eb8c8a18be06c97
6
+ metadata.gz: 0fb982dedd4396887380e660d90b6fbc05938e41287f498507298a8851181cff4627d2179a68e5fdb09fe3ab7078deb0ec3da10fb8d7184617deb3c5dcc206f4
7
+ data.tar.gz: 3485b7c84bbcc067148714be6c0bedb40b74ec08fc56fb2a7f46aa2a9778a23448ba3dcc4e402f6ee34cf78bd5f50925034a6876d6219ac6c2b52374eef7c79f
data/.rubocop.yml CHANGED
@@ -21,7 +21,7 @@ Metrics/MethodLength:
21
21
  Max: 20
22
22
 
23
23
  Metrics/AbcSize:
24
- Max: 20
24
+ Max: 30
25
25
 
26
26
  Style/TrailingComma:
27
27
  EnforcedStyleForMultiline: comma
data/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ # 0.3.5
2
+
3
+ - Add link to comments.
4
+
5
+ # 0.3.4
6
+
7
+ - Fix Slack hooks messages format.
8
+
9
+ # 0.3.3
10
+
11
+ - Add some validations to Slack hooks.
12
+ - Refactoring.
13
+
14
+ # 0.3.2
15
+
16
+ - Fix translation missing.
17
+
18
+ # 0.3.1
19
+
20
+ - Fix slack message markup.
21
+
22
+ # 0.3.0
23
+
24
+ - Divide comment events by its associated resources.
25
+
1
26
  # 0.2.0
2
27
 
3
28
  - Add `Hooks::Webhook`.
@@ -93,9 +93,10 @@ module Qiita::Team::Services
93
93
  def item_comment_created(event)
94
94
  fallback =
95
95
  if event.item.coediting?
96
- "New comment on #{item_link(event.item)}"
96
+ "New #{comment_link(event.comment)} on #{item_link(event.item)}"
97
97
  else
98
- "New comment on #{user_link(event.item.user)}'s #{item_link(event.item)}"
98
+ "New #{comment_link(event.comment)} on #{user_link(event.item.user)}'s " \
99
+ "#{item_link(event.item)}"
99
100
  end
100
101
  send_message(
101
102
  attachments: [
@@ -124,7 +125,7 @@ module Qiita::Team::Services
124
125
  # @raise [Qiita::Team::Services::DeliveryError]
125
126
  def item_comment_destroyed(event)
126
127
  send_message(
127
- text: "#{user_link(event.user)} deleted a comemnt on #{item_link(event.item)}",
128
+ text: "#{user_link(event.user)} deleted a comment on #{item_link(event.item)}",
128
129
  )
129
130
  end
130
131
 
@@ -132,7 +133,7 @@ module Qiita::Team::Services
132
133
  # @return [void]
133
134
  # @raise [Qiita::Team::Services::DeliveryError]
134
135
  def project_comment_created(event)
135
- fallback = "New comment on #{project_link(event.project)}"
136
+ fallback = "New #{comment_link(event.comment)} on #{project_link(event.project)}"
136
137
  send_message(
137
138
  attachments: [
138
139
  fallback: fallback,
@@ -1,3 +1,3 @@
1
1
  module Qiita::Team::Services
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita_team_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuku Takahashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel-url_validator