opsask 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/lib/opsask/app.rb +4 -1
- data/lib/opsask/helpers.rb +12 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c2a167cc4d6b88c15b8a6f564cd1fb7efe217b3
|
4
|
+
data.tar.gz: 05219406e6467a1ae5392053fd76433e00399860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f9a919aa7ab24df80ec98f0cfba0f1c93ff3ef36ce995193bd3971ad5d96a5647f5ec2d0d21d5740d08f842c632e56fb0ceed4050e5e747ce1050d9cdbe599a
|
7
|
+
data.tar.gz: ace1363e142fd393f4e927c8440970d69673daeff6a3c2ae817946219d0f28b4641a5e496473abe8205447ee501f40823015573285f5f8ebf2870b83f44c4da9
|
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/lib/opsask/app.rb
CHANGED
@@ -52,8 +52,11 @@ module OpsAsk
|
|
52
52
|
end
|
53
53
|
|
54
54
|
get '/days/:n' do
|
55
|
+
n, m = params[:n].split('+', 2)
|
56
|
+
n = n.to_i
|
57
|
+
m = m.nil? ? 0 : m.to_i
|
55
58
|
erb :days, locals: {
|
56
|
-
jiras_by_day: issues_for_days(
|
59
|
+
jiras_by_day: issues_for_days(n, m),
|
57
60
|
untracked_jiras: untracked_issues,
|
58
61
|
stragglers: straggling_issues
|
59
62
|
}
|
data/lib/opsask/helpers.rb
CHANGED
@@ -291,9 +291,10 @@ module OpsAsk
|
|
291
291
|
Time.new.to_date.strftime('%Y-%m-%d') == date
|
292
292
|
end
|
293
293
|
|
294
|
-
def issues_for_days n
|
294
|
+
def issues_for_days n, start=0
|
295
295
|
now = Time.new.to_date
|
296
|
-
|
296
|
+
last = start + n
|
297
|
+
start.upto(last-1).inject({}) do |h,i|
|
297
298
|
date = (now + i).strftime('%Y-%m-%d')
|
298
299
|
h[date] = jiras_for(date).sort_by do |jira|
|
299
300
|
sorting_key_for(jira)
|
@@ -321,12 +322,16 @@ module OpsAsk
|
|
321
322
|
|
322
323
|
def date_for_new_jiras really=false
|
323
324
|
if now.hour < settings.config[:cutoff_hour] || its_the_weekend?
|
324
|
-
return today
|
325
|
-
return tomorrow if room_for_new_jiras_for? tomorrow, really
|
326
|
-
else
|
327
|
-
return tomorrow if room_for_new_jiras_for? tomorrow, really
|
325
|
+
return today if room_for_new_jiras_for? today, really
|
328
326
|
end
|
329
|
-
return
|
327
|
+
return tomorrow if room_for_new_jiras_for? tomorrow, really
|
328
|
+
|
329
|
+
# # Remove the two-day limit [OPS-1862]
|
330
|
+
# n = 1 # day, i.e. tomorrow
|
331
|
+
# loop do
|
332
|
+
# next_day = today n * one_day
|
333
|
+
# return next_day if room_for_new_jiras_for? next_day, really
|
334
|
+
# end
|
330
335
|
end
|
331
336
|
|
332
337
|
def room_for_new_jiras? really=false
|
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.2.
|
4
|
+
version: 2.2.3
|
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-06
|
11
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|