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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e96eb9bb75d71f0a1b23b85ecfed8b8767d067f
4
- data.tar.gz: 1c197d41d5ab381ba6f81959893e0b024cb1e61f
3
+ metadata.gz: 5c2a167cc4d6b88c15b8a6f564cd1fb7efe217b3
4
+ data.tar.gz: 05219406e6467a1ae5392053fd76433e00399860
5
5
  SHA512:
6
- metadata.gz: 23096737f2e1bad101434c451e2dadaa56012eb4b4ef9981bd91c1340a20bf5e26e178bb298ebdb214ff6cb10d5fb5b1d8e8f74749d27b68c4b34800fa95f65f
7
- data.tar.gz: b089821ea91c8ac4e31ae4b2e6a9f8a568ff1b0037ab2044d89d5f850e96f7a1eb0cda46e27a4c18ba747da176a04f66348d4046f1afce66a91b75f0369a5bfb
6
+ metadata.gz: 9f9a919aa7ab24df80ec98f0cfba0f1c93ff3ef36ce995193bd3971ad5d96a5647f5ec2d0d21d5740d08f842c632e56fb0ceed4050e5e747ce1050d9cdbe599a
7
+ data.tar.gz: ace1363e142fd393f4e927c8440970d69673daeff6a3c2ae817946219d0f28b4641a5e496473abe8205447ee501f40823015573285f5f8ebf2870b83f44c4da9
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ pkg
14
14
  config.json
15
15
  .bundle
16
16
  .yardoc
17
+ etc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.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(params[:n].to_i),
59
+ jiras_by_day: issues_for_days(n, m),
57
60
  untracked_jiras: untracked_issues,
58
61
  stragglers: straggling_issues
59
62
  }
@@ -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
- 0.upto(n-1).inject({}) do |h,i|
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 if room_for_new_jiras_for? today, really
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 nil
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.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-02 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor