slackiq 1.1.2 → 1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/slackiq.rb +46 -42
  3. data/lib/slackiq/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5092c615b9fbbf774293b758e3c2a560a2c261e2
4
- data.tar.gz: de6828473cb0164687851d79ce2a05fe9e34346c
3
+ metadata.gz: 9bfe2cf04aa0044f7335d018e07fbaf73ac1c219
4
+ data.tar.gz: 4b7d20a4a39f90953f71c415bd7d8a1b6f2dd9ec
5
5
  SHA512:
6
- metadata.gz: 3d4310fec4738dc931b043484fd1c694de6e7be2c34fb21e9c849155a0afb57d3052e10d782ca8e676f9f275a5b715ccc7503d45dd62113a4c211fdbca1a4d77
7
- data.tar.gz: 45ffdcf4ab9c35e7a5048296d883ac74349064cd11168b7d66f6f383a1f13a5a799cfdc5131a37b54c822d3585648fc32ee3488d32b266254bf9abf5355dfc0d
6
+ metadata.gz: 2d3883278536d90699d071e1b363af1499f5f98ffe1e1d148442a66459de5dc4705f83eab0fe5a4b54e145135f950b97cfd6abb210dff0691892b6396a2fbd20
7
+ data.tar.gz: 8813522e72aaa24517149ebc167b71dfb401e32768d038764dc2706c513e26b95b87d011861d5a979959cba2e759d60e1cca8ad0c068d4ffb1a26b5006497c99
@@ -34,6 +34,8 @@ module Slackiq
34
34
  end
35
35
 
36
36
  extra_fields = options.except(:webhook_name, :title, :description, :status)
37
+
38
+ fields = []
37
39
 
38
40
  if status
39
41
  created_at = status.created_at
@@ -57,50 +59,52 @@ module Slackiq
57
59
  failure_percentage = failure_percentage.round(decimal_places)
58
60
 
59
61
  description = status.description
62
+
63
+ fields += [
64
+ {
65
+ 'title' => 'Created',
66
+ 'value' => Slackiq::TimeHelper.format(created_at),
67
+ 'short' => true
68
+ },
69
+ {
70
+ 'title' => time_now_title,
71
+ 'value' => Slackiq::TimeHelper.format(time_now),
72
+ 'short' => true
73
+ },
74
+ {
75
+ 'title' => "Duration",
76
+ 'value' => duration,
77
+ 'short' => true
78
+ },
79
+ {
80
+ 'title' => "Total Jobs",
81
+ 'value' => total_jobs,
82
+ 'short' => true
83
+ },
84
+ {
85
+ 'title' => "Jobs Run",
86
+ 'value' => jobs_run,
87
+ 'short' => true
88
+ },
89
+ {
90
+ 'title' => "Completion %",
91
+ 'value' => "#{completion_percentage}%",
92
+ 'short' => true
93
+ },
94
+ {
95
+ 'title' => "Failures",
96
+ 'value' => status.failures,
97
+ 'short' => true
98
+ },
99
+ {
100
+ 'title' => "Failure %",
101
+ 'value' => "#{failure_percentage}%",
102
+ 'short' => true
103
+ },
104
+ ]
60
105
  end
61
106
 
62
- fields = [
63
- {
64
- 'title' => 'Created',
65
- 'value' => Slackiq::TimeHelper.format(created_at),
66
- 'short' => true
67
- },
68
- {
69
- 'title' => time_now_title,
70
- 'value' => Slackiq::TimeHelper.format(time_now),
71
- 'short' => true
72
- },
73
- {
74
- 'title' => "Duration",
75
- 'value' => duration,
76
- 'short' => true
77
- },
78
- {
79
- 'title' => "Total Jobs",
80
- 'value' => total_jobs,
81
- 'short' => true
82
- },
83
- {
84
- 'title' => "Jobs Run",
85
- 'value' => jobs_run,
86
- 'short' => true
87
- },
88
- {
89
- 'title' => "Completion %",
90
- 'value' => "#{completion_percentage}%",
91
- 'short' => true
92
- },
93
- {
94
- 'title' => "Failures",
95
- 'value' => status.failures,
96
- 'short' => true
97
- },
98
- {
99
- 'title' => "Failure %",
100
- 'value' => "#{failure_percentage}%",
101
- 'short' => true
102
- },
103
- ]
107
+
104
108
 
105
109
  # add extra fields
106
110
  fields += extra_fields.map do |title, value|
@@ -1,3 +1,3 @@
1
1
  module Slackiq
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slackiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lew
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-18 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty