wolf_core 0.1.84 → 0.1.85

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: f1129562e8f85b5e66eba8a5255ed289435712e79b618f229f6dbc6e15404389
4
+ data.tar.gz: 295260b734fa99482e102b7e8a75e512a784a123137feec9f93e91f1d6b86708
5
5
  SHA512:
6
- metadata.gz: ad4f312753754ef1cd8faede22b0bab951e2304be101211bd6d8525e839776eae5a5d8003269730785ef120e1ae7fd5ddec06c96c1a9fe7a1a5e2b7083488437
7
- data.tar.gz: 83fc2bca8152b0bd1a52c1f12283b11fbf0f618f6e8ac0583453005d47a4229253a162c9f31a4afe6f4dbd6268bab1b48c84e17db2b8d5722f76f51661f61f8c
6
+ metadata.gz: 521812fbdf862762e57aa4968820735bbe67023514b9ef403564eeaecdbaa97bb65b2fd12116b952e90a6216b429f49f273740c761690d5a0509f9bca5eabbaf
7
+ data.tar.gz: 84045a7d72a27163717eea82cdce99d2f35c0a1fde5da263a0451e919894b2c3a13928ea5477fde9201191eba9ab332d2314779c57ad847b75f240b14d297c6a
@@ -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
@@ -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.85"
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.85
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-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty