slacalculator 0.0.2
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 +7 -0
- data/lib/slacalculator.rb +38 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 1d293413f2caea320b496ce8468581b7c2adf70d
|
|
4
|
+
data.tar.gz: a726fa4cc1132bd66945153bfad2c8b35ff35b83
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 5cb19c1633d89b3dc20ea4d925b290784159ece53994ea5f330f2e4e897d3078885274ca9836f660f5e785bc950c0452d39f6c95f97ecaadf9da3c5231183282
|
|
7
|
+
data.tar.gz: c131cf3a4d2cbb082fa9f7351dadc0b8e8a82fea3ec448c3970b93c3e62d86b21677da39b836faede936baad318d387d43f86691a2612cfb8a52c07398522776
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module Slacalculator
|
|
2
|
+
|
|
3
|
+
class Sla
|
|
4
|
+
|
|
5
|
+
def self.assign
|
|
6
|
+
|
|
7
|
+
assign_time=Time.now
|
|
8
|
+
puts "Ticket assigned at #{assign_time}"
|
|
9
|
+
sla_endtime = assign_time+259200
|
|
10
|
+
@@sla_val = sla_endtime
|
|
11
|
+
assignedtime = assign_time
|
|
12
|
+
return assignedtime
|
|
13
|
+
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.calculate_sla
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
time_remaining = @@sla_val.to_i-Time.now.to_i
|
|
20
|
+
if time_remaining>0
|
|
21
|
+
#result = true
|
|
22
|
+
puts "Time remaining to breach SLA is #{time_remaining}"
|
|
23
|
+
return time_remaining
|
|
24
|
+
|
|
25
|
+
else
|
|
26
|
+
#result = false
|
|
27
|
+
value = "SLA is exceeded"
|
|
28
|
+
return value
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
#return result
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: slacalculator
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.2
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- sai malla
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: updated methods.
|
|
14
|
+
email: saimalla7@email.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/slacalculator.rb
|
|
20
|
+
homepage: http://rubygems.org/gems/slacalculator
|
|
21
|
+
licenses: []
|
|
22
|
+
metadata: {}
|
|
23
|
+
post_install_message:
|
|
24
|
+
rdoc_options: []
|
|
25
|
+
require_paths:
|
|
26
|
+
- lib
|
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
|
+
requirements:
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0'
|
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
requirements: []
|
|
38
|
+
rubyforge_project:
|
|
39
|
+
rubygems_version: 2.6.8
|
|
40
|
+
signing_key:
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: Calculate the SLA
|
|
43
|
+
test_files: []
|