bobhr 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bob/models/time_off.rb +19 -1
- data/lib/bob/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7be7ee6eb8986610c73cb5b369e2ba00cdb23b1ab33762e470fe35f141ccb95e
|
4
|
+
data.tar.gz: '08f8d8c2aed85d5d59bb68b269e0edbbaaa6c0d89b15613b7ed16c0b492e331f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463751142a4aaf1dd4112d38ac2f5849ff6b0228336a220ec61294e608639189674d2ef844cbc8ac6d88d4a93b6898240aadc5d01038916a79984306e0d7b6e2
|
7
|
+
data.tar.gz: eea598bc6402bcf2c28ed741fcb574d395b4a617a6e1bd75194f0dd6449d22ea419b341122ac77e4753ee48d8e5904669763a71068986d6e3adb171c45354edc
|
data/lib/bob/models/time_off.rb
CHANGED
@@ -15,7 +15,25 @@ module Models
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def return_date
|
18
|
-
@return_date =
|
18
|
+
@return_date = parsed_end_date + 1.day
|
19
|
+
end
|
20
|
+
|
21
|
+
def multiple_days?
|
22
|
+
total_days_off > 1
|
23
|
+
end
|
24
|
+
|
25
|
+
def total_days_off
|
26
|
+
(start_date...end_date).count + 1
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def parsed_start_date
|
32
|
+
Date.parse(start_date)
|
33
|
+
end
|
34
|
+
|
35
|
+
def parsed_end_date
|
36
|
+
Date.parse(end_date)
|
19
37
|
end
|
20
38
|
end
|
21
39
|
end
|
data/lib/bob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobhr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lien Van Den Steen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
rubygems_version: 3.
|
126
|
+
rubygems_version: 3.2.31
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Ruby gem for Bob API
|