wolf_core 0.1.84 → 0.1.86

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: '09d1efc3f70eb1c6b5a179f0952db9c57ba369d0fedb667c57d64826b8ffb2f4'
4
- data.tar.gz: 117693f64b32ffa1fd489608ee736c2cbb5d31836b68036fbcd720f2871ac97d
3
+ metadata.gz: 1c170f919a616c6b9c9cebf86529a032851af2ee339bec615a0f0a03bf765ca5
4
+ data.tar.gz: 01b4eb3917f471ad2f4af9a2335cfdfc5e601afc3489645dcff35e0b91e539e6
5
5
  SHA512:
6
- metadata.gz: ad4f312753754ef1cd8faede22b0bab951e2304be101211bd6d8525e839776eae5a5d8003269730785ef120e1ae7fd5ddec06c96c1a9fe7a1a5e2b7083488437
7
- data.tar.gz: 83fc2bca8152b0bd1a52c1f12283b11fbf0f618f6e8ac0583453005d47a4229253a162c9f31a4afe6f4dbd6268bab1b48c84e17db2b8d5722f76f51661f61f8c
6
+ metadata.gz: 01b7710e29eacde3b6e5e2c4c43c59436e0cdbc0138299c217115c0bff41adaa03c88c1f56cdfa2cd18dd75f1b9079c62037ecf69f5c6cfbe455d30b4dcd0648
7
+ data.tar.gz: b8e2dc9d4281d367fde490adbb74313e7e8aeecaa3ef14f66fa4ea46ddcf297f99f811dbe47a9820fc041932478e0456c1bd5a12344e4294b9f8d1f59be1973a
@@ -44,6 +44,25 @@ module WolfCore
44
44
 
45
45
  return address
46
46
  end
47
+
48
+ def parse_date(date_string)
49
+ return nil if date_string.nil?
50
+ date_string = date_string.strip
51
+ return nil if date_string.empty?
52
+ Date.parse(date_string).strftime('%Y-%m-%d') rescue nil
53
+ end
54
+
55
+ def split_name(full_name)
56
+ words = full_name.split(' ')
57
+
58
+ if words.length == 2
59
+ return { firstname: words[0], lastname: words[1] }
60
+ end
61
+
62
+ name = words[0..-2].join(' ')
63
+ lastname = words[-1]
64
+ return { firstname: name, lastname: lastname }
65
+ end
47
66
  end
48
67
  end
49
68
  end
@@ -11,5 +11,9 @@ module WolfCore
11
11
  last_ten_digits = cleaned_phone[-10, 10]
12
12
  last_ten_digits
13
13
  end
14
+
15
+ def remove_blank_spaces(str)
16
+ str&.gsub(/\s+/, '')
17
+ end
14
18
  end
15
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.84"
4
+ VERSION = "0.1.86"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.84
4
+ version: 0.1.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty