bobhr 0.5.0 → 0.5.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
  SHA256:
3
- metadata.gz: 7802322c3f4a72dbd2ce8b8c91a5e9a1505c4cb597ffc599c77316b4e40a1909
4
- data.tar.gz: a037d12cbce500ccbf53affc99eceb321481dafad72503e98681a11176b8b8b7
3
+ metadata.gz: 88c30a8019f27891863ec1dd5c4c0d33f87b34e4e05d0aae049f4d4f25c6630b
4
+ data.tar.gz: f7b8bfae6431f0020cf07e417e7de50f675e69c98c391cf4d34ca6c65696ff5a
5
5
  SHA512:
6
- metadata.gz: 2d9b871d2cb78cf68e75ca628b499237740950e95f0484c9ad1ee40ea909eccbbcad128f5730f728f01b95f832edb8e06b20cb693c27da6931bbc6ef54ab94d4
7
- data.tar.gz: b58cb07c4851cc7d8ce37a36ff13fa99def9122efffff45cbe13054db24c6a9a4dfd4690fa4e53256ba55bfaf621e7990996f5c6126777dd64302db672d2b3ef
6
+ metadata.gz: 6608fb37aa26b5978b9f0dcc0d4b52c7ff297800cccf59fb396fdd175d73ed7acd7b1c62687fa8dbcb0291e5f30b7fd845612902472decb8ef487a64c098ae35
7
+ data.tar.gz: dec4452da26aa0e1d8d70e31346af34a5657e4616bee663bfe178215126f4de56dfe73dda4727e03ad923ae0ec09b788cd229473af753d6f32a0ce0c3c2bafda
@@ -20,6 +20,8 @@ module Bob
20
20
  sftp.upload!(file_name, sftp_details[:remote_file_path])
21
21
  end
22
22
 
23
+ File.delete(file_name)
24
+
23
25
  true
24
26
  end
25
27
  end
@@ -15,7 +15,25 @@ module Models
15
15
  end
16
16
 
17
17
  def return_date
18
- @return_date = Date.parse(end_date) + 1.day
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/util.rb CHANGED
@@ -15,6 +15,7 @@ module Bob
15
15
  word = camel_cased_word.to_s.gsub(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')
16
16
  word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
17
17
  word.tr!('-', '_')
18
+ word.tr!(' ', '_')
18
19
  word.downcase!
19
20
  word
20
21
  end
data/lib/bob/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bob
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.3'
5
5
  end
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.0
4
+ version: 0.5.3
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-04 00:00:00.000000000 Z
11
+ date: 2022-03-14 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.3.7
126
+ rubygems_version: 3.2.31
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Ruby gem for Bob API