opsask 2.3.7 → 2.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/opsask/helpers.rb +11 -0
- data/opsask.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdf721149b07f29d14acb1c3b11eb104ae2798fc
|
4
|
+
data.tar.gz: 56f45d3c535362be0ae2367e49b33520d8f47e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0e216dc3b56b9b69c55811369d30af0ca7784bb52e65d4c4abe40327f1ecbe91471a843e86e47cedfd082fe0532ddbc8a1922f4bced50e935655e33ecfdab6d
|
7
|
+
data.tar.gz: e3f6cf3e1b1fd895fdfc77ab7c9ed470f393b86d25193dad7342a254dab27834dcd6ec8d3e9e676b5e3eef4ae9508859f6ecc6c8ca6a144f303dc565b6547017
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.8
|
data/lib/opsask/helpers.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'time'
|
3
|
+
require 'holidays'
|
4
|
+
|
1
5
|
module OpsAsk
|
2
6
|
module Helpers
|
3
7
|
def logged_in?
|
@@ -313,9 +317,16 @@ module OpsAsk
|
|
313
317
|
now.saturday? || now.sunday?
|
314
318
|
end
|
315
319
|
|
320
|
+
def holiday? date
|
321
|
+
date = date.split('-',3).map(&:to_i)
|
322
|
+
date = Date.civil *date
|
323
|
+
Holidays.on(date, :us).any?
|
324
|
+
end
|
325
|
+
|
316
326
|
def room_for_new_jiras_for? date, really=false
|
317
327
|
return true if params[:force]
|
318
328
|
return false if params[:full]
|
329
|
+
return false if holiday? date
|
319
330
|
return true if ops? && !really
|
320
331
|
jira_count_for(date, really) < settings.config[:queue_size]
|
321
332
|
end
|
data/opsask.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_runtime_dependency 'rack-flash3', '~> 1'
|
22
22
|
s.add_runtime_dependency 'sinatra-partial', '~> 0.4'
|
23
23
|
s.add_runtime_dependency 'sclemmer-jira-ruby', '~> 0.1'
|
24
|
+
s.add_runtime_dependency 'holidays', '~> 2.2'
|
24
25
|
|
25
26
|
s.files = `git ls-files`.split("\n")
|
26
27
|
s.test_files = `git ls-files -- test/*`.split("\n")
|
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
|
+
version: 2.3.8
|
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-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: holidays
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.2'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.2'
|
125
139
|
description: Ask Ops for stuff.
|
126
140
|
email: sczizzo@gmail.com
|
127
141
|
executables:
|