opsask 2.1.8 → 2.1.9
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 +4 -4
- data/VERSION +1 -1
- data/lib/opsask/helpers.rb +21 -20
- data/public/css/style.css +7 -0
- data/views/index.erb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f3245625d9bf275d4572fdfc4fa5201a137e968
|
4
|
+
data.tar.gz: 8ac79891039bab1e396b2a98908012fb8e9a28ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14251899fadd6128bb20fbbb26ca1319e98a7799db5d34beb02949bbd352ef31531b30deaa94ab7704bd5f7c956d512ec8e59fb1d8238991217ef0e4dd8f65dc
|
7
|
+
data.tar.gz: 0440bde8b454f4a86213f0e66a94edd97c426f1db06a8c91188be647d33ef97e64356c36afcb84ffaa27f2f9346d3d27f1d87121c42b46ca427ba9af978ef63a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.9
|
data/lib/opsask/helpers.rb
CHANGED
@@ -247,21 +247,22 @@ module OpsAsk
|
|
247
247
|
todays_date.strftime 'Week of %-d %b'
|
248
248
|
end
|
249
249
|
|
250
|
-
def jiras_for date
|
250
|
+
def jiras_for date, really=false
|
251
251
|
return [] unless logged_in?
|
252
|
-
|
253
|
-
|
252
|
+
if !ops? || really
|
253
|
+
@jira_client.Issue.jql normalized_jql("due = #{date} and type != Change and labels in (OpsAsk) and labels not in (OpsOnly)"), max_results: 100
|
254
|
+
else
|
255
|
+
@jira_client.Issue.jql normalized_jql("due = #{date} and labels in (OpsAsk) and type != Change"), max_results: 100
|
254
256
|
end
|
255
|
-
return @jira_client.Issue.jql normalized_jql("due = #{date} and labels in (OpsAsk) and type != Change"), max_results: 100
|
256
257
|
end
|
257
258
|
|
258
|
-
def jira_count_for date
|
259
|
-
jiras_for(date).length
|
259
|
+
def jira_count_for date, really=false
|
260
|
+
jiras_for(date, really).length
|
260
261
|
end
|
261
262
|
|
262
|
-
def jira_count_for_today ; jira_count_for(today) end
|
263
|
+
def jira_count_for_today really=false ; jira_count_for(today, really) end
|
263
264
|
|
264
|
-
def jira_count_for_tomorrow ; jira_count_for(tomorrow) end
|
265
|
+
def jira_count_for_tomorrow really=false ; jira_count_for(tomorrow, really) end
|
265
266
|
|
266
267
|
def raw_classes_for jira
|
267
268
|
classes = [ jira.fields['resolution'].nil? ? 'open' : 'closed' ]
|
@@ -290,28 +291,28 @@ module OpsAsk
|
|
290
291
|
now.saturday? || now.sunday?
|
291
292
|
end
|
292
293
|
|
293
|
-
def room_for_new_jiras_for? date
|
294
|
-
return true
|
294
|
+
def room_for_new_jiras_for? date, really=false
|
295
|
+
return true if params[:force]
|
295
296
|
return false if params[:full]
|
296
|
-
return true
|
297
|
-
jira_count_for(date) < settings.config[:queue_size]
|
297
|
+
return true if ops? && !really
|
298
|
+
jira_count_for(date, really) < settings.config[:queue_size]
|
298
299
|
end
|
299
300
|
|
300
|
-
def date_for_new_jiras
|
301
|
+
def date_for_new_jiras really=false
|
301
302
|
if now.hour < settings.config[:cutoff_hour] || its_the_weekend?
|
302
|
-
return today
|
303
|
-
return tomorrow if room_for_new_jiras_for? tomorrow
|
303
|
+
return today if room_for_new_jiras_for? today, really
|
304
|
+
return tomorrow if room_for_new_jiras_for? tomorrow, really
|
304
305
|
else
|
305
|
-
return tomorrow if room_for_new_jiras_for? tomorrow
|
306
|
+
return tomorrow if room_for_new_jiras_for? tomorrow, really
|
306
307
|
end
|
307
308
|
return nil
|
308
309
|
end
|
309
310
|
|
310
|
-
def room_for_new_jiras?
|
311
|
-
return true
|
311
|
+
def room_for_new_jiras? really=false
|
312
|
+
return true if params[:force]
|
312
313
|
return false if params[:full]
|
313
|
-
return true
|
314
|
-
!date_for_new_jiras.nil?
|
314
|
+
return true if ops? && !really
|
315
|
+
!date_for_new_jiras(really).nil?
|
315
316
|
end
|
316
317
|
|
317
318
|
def validate_room_for_new_jiras
|
data/public/css/style.css
CHANGED
data/views/index.erb
CHANGED
@@ -18,7 +18,11 @@
|
|
18
18
|
<% end %>
|
19
19
|
|
20
20
|
<section id="ops-ask" class="small-4 columns">
|
21
|
-
<h2>Create JIRA
|
21
|
+
<h2>Create JIRA
|
22
|
+
<% unless logged_in? && ops? && room_for_new_jiras?(true) %>
|
23
|
+
<span id="opsonly-full" class="alert label radius">Full</span>
|
24
|
+
<% end %>
|
25
|
+
</h2>
|
22
26
|
<%= partial :form, locals: {
|
23
27
|
jiras_for_today: jiras_for_today,
|
24
28
|
jiras_for_tomorrow: jiras_for_tomorrow
|
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.1.
|
4
|
+
version: 2.1.9
|
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-
|
11
|
+
date: 2015-04-28 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.
|
209
|
+
rubygems_version: 2.4.5
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: Ask Ops for stuff
|