opsask 2.3.4 → 2.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: 8033a523637bfb87b0e5669277c47cb67c94c572
4
- data.tar.gz: 914baba2787613c969697d868f083cc5de0791a6
3
+ metadata.gz: d5d6588009c5833af32f2a82dff7ca2965b587f8
4
+ data.tar.gz: 72eeeff4f7d0ee2aa8411e2a7c0252dec0237d23
5
5
  SHA512:
6
- metadata.gz: 44aebe8bb2f69217a2c89623dd9051ebbf8701f02b8e2ec2b4f9c035f3997cb0637de15c683702eaa1db8a499525a2324837f4008da76786fa21f25e54653311
7
- data.tar.gz: c23e34baba316b3d278f9b09f54a17f08eee2513608c6adaca9385e8f1ee534799f42db66430413bbd562f2a90eb0250056b7dedb249683c7abd2d1485a60a6a
6
+ metadata.gz: 5867344f0fe15a9cbe2ff1a2a5408636e4632d1836f08218ec01bf142ef7018b404c837c3e499da73c5dc8a53f83201b27baa463bb8dd3ebb24b420ccc28bd8f
7
+ data.tar.gz: d1d19b78eff8af268d54cbeab74772c8915643ef6c01ffc6e747e4437a7c5d638fa88d139383daea25a4c06b38c0ea15f0cec0849142a89b8cb27841f45229fa
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.4
1
+ 2.3.5
data/public/js/opsask.js CHANGED
@@ -12,7 +12,7 @@
12
12
  var $this = $(this);
13
13
  setTimeout(function(){
14
14
  $this.slideUp();
15
- }, 2500);
15
+ }, 10000);
16
16
  });
17
17
 
18
18
  $.get('/room', function(dates){
@@ -20,16 +20,19 @@ USER, PASS = ARGV[0], ARGV[1]
20
20
 
21
21
  def ask_jira constraints=nil
22
22
  constraints = "AND #{constraints}" unless constraints.nil?
23
- return %Q| curl -sL \
23
+ jql = {
24
+ 'jql' => "project = Infrastructure #{constraints} ORDER BY created"
25
+ }
26
+ curl = %Q| curl -sL \
24
27
  -u "#{USER}:#{PASS}" \
25
28
  -XPOST "#{JIRA}/rest/api/latest/search" \
26
- -H "Content-Type: application/json" -d '{
27
- "jql": "project = Infrastructure #{constraints} ORDER BY created"
28
- }'
29
+ -H "Content-Type: application/json" -d '#{JSON.generate(jql)}'
29
30
  |
31
+ return curl
30
32
  end
31
33
 
32
34
  def inf_issues_where constraints=nil
35
+ # $stderr.puts constraints
33
36
  JSON::parse(`#{ask_jira constraints}`)['issues']
34
37
  end
35
38
 
@@ -47,17 +50,22 @@ end
47
50
  untracked_today = inf_issues_where('due = endOfDay() AND resolution = unresolved AND assignee = denimcores')
48
51
  tracked_today = inf_issues_where('due = endOfDay() AND resolution = unresolved AND assignee != denimcores')
49
52
  resolved_today = inf_issues_where('due = endOfDay() AND resolution != unresolved')
53
+ uncategorized = inf_issues_where('due = endOfDay() AND "Ops Work Category" is EMPTY')
50
54
  stragglers = inf_issues_where('due < startOfDay() AND labels in (OpsAsk) AND resolution = unresolved AND assignee != denimcores')
51
55
 
52
56
  exit if untracked_today.empty? \
53
57
  && tracked_today.empty? \
54
58
  && resolved_today.empty? \
59
+ && uncategorized.empty? \
55
60
  && stragglers.empty?
56
61
 
62
+ # $stderr.puts uncategorized.inspect
63
+
57
64
  write_out 'Untracked', untracked_today
58
65
  write_out 'Tracking', tracked_today
59
66
  write_out 'Resolved', resolved_today
60
67
  write_out 'Stragglers', stragglers
68
+ write_out 'Uncategorized', uncategorized
61
69
 
62
70
  num_untracked_today = untracked_today.length
63
71
  num_untracked = inf_issues_where('due < endOfDay() AND resolution = unresolved AND assignee = denimcores').length
@@ -70,4 +78,4 @@ elsif num_untracked > 1 && num_untracked_today == 0
70
78
  puts %Q|<b>There are <a href="#{UNTRACKED}">#{num_untracked} untracked issues</a> from the past</b>|
71
79
  elsif num_untracked > 1 && num_untracked_today > 0
72
80
  puts %Q|<b>There are <a href="#{UNTRACKED}">#{num_untracked} additional untracked issues</a> from the past</b>|
73
- end
81
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsask
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  requirements: []
208
208
  rubyforge_project:
209
- rubygems_version: 2.4.5
209
+ rubygems_version: 2.4.5.1
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: Ask Ops for stuff