ZReviewTender 0.0.4 → 0.0.5

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: efd264d3712595b3055699ded3b674352f0ec587ae69905af583397e64712661
4
- data.tar.gz: 257ed3ced4b87bd043f879b16e21d55e0be1447e18be139725a080b9df25cf86
3
+ metadata.gz: 4905d8141a111bf59431bb91ae97e09b7a1b1d55c311c0ccda08b3ef0c9b6fc8
4
+ data.tar.gz: 346a8c5be0271f0be78bcfa0947333f7e2283988785d3ade883799fae38ed205
5
5
  SHA512:
6
- metadata.gz: b187b442517d24c7f4e4e509240907670bab76b15473c1744db5d82c3001e7a9cdde628d474b12f989d10ed062b74794b33d33a8ae9308430e6482f9d0ad20e7
7
- data.tar.gz: a276fa52b6f373c9a1d10ed47eb30d76f174e03930da2839f3e43e55798bd5bd922d0cb879d03f0e962f6f24b9bccca2d468216a69940db1e690ba5a68e429ca
6
+ metadata.gz: b4a3eba5f67873c14d40bf96ec20820a2ba4e985722f42132b1983bfa60b40eb475088be78c958d13e2c1be43bd03b8965509efcafb5adc01757333d0d44720a
7
+ data.tar.gz: db5d1acb0233c84fe06dbcb654dbda40ee97b25eb85f52d74dfd77ea7f34779f072ca25c4d2367b5500bf780a0ffbc5e49d7b8b592012e9f92387b96d032acc8
@@ -29,31 +29,31 @@ class SlackProcessor < Processor
29
29
  end
30
30
 
31
31
  def processReviews(reviews, platform)
32
- reviews.each_slice(10) do |reviewGroup|
32
+
33
+ # 1 review 1 message
34
+ reviews.each do |review|
33
35
  payload = Payload.new()
34
36
  payload.attachments = []
37
+
38
+ attachment = Payload::Attachment.new()
35
39
 
36
- reviewGroup.each do |review|
37
- attachment = Payload::Attachment.new()
38
-
39
- stars = "★" * review.rating + "☆" * (5 - review.rating)
40
- color = review.rating >= 4 ? "good" : (review.rating > 2 ? "warning" : "danger")
41
- date = Time.at(review.createdDateTimestamp).getlocal(timeZoneOffset)
42
-
43
- title = "#{stars}"
44
- if !review.title.nil?
45
- title = "#{review.title} - #{stars}"
46
- end
47
-
48
- attachment.color = color
49
- attachment.author_name = review.userName
50
- attachment.fallback = title
51
- attachment.title = title
52
- attachment.text = review.body
53
- attachment.footer = "#{platform} - #{review.platform} - #{review.appVersion} - #{review.territory} - <#{review.url}|#{date}>"
54
-
55
- payload.attachments.append(attachment)
40
+ stars = "★" * review.rating + "☆" * (5 - review.rating)
41
+ color = review.rating >= 4 ? "good" : (review.rating > 2 ? "warning" : "danger")
42
+ date = Time.at(review.createdDateTimestamp).getlocal(timeZoneOffset)
43
+
44
+ title = "#{stars}"
45
+ if !review.title.nil?
46
+ title = "#{review.title} - #{stars}"
56
47
  end
48
+
49
+ attachment.color = color
50
+ attachment.author_name = review.userName
51
+ attachment.fallback = title
52
+ attachment.title = title
53
+ attachment.text = review.body
54
+ attachment.footer = "#{platform} - #{review.platform} - #{review.appVersion} - #{review.territory} - <#{review.url}|#{date}>"
55
+
56
+ payload.attachments.append(attachment)
57
57
 
58
58
  result = request(payload)
59
59
  if !result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZReviewTender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi