kovid 0.5.5 → 0.5.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbc5646b9be503c0b26d29ed1c546a18f5bad793a792ec7b2f59cc2ad0ac7622
4
- data.tar.gz: a4a15e16634862590e3f62194b6f49cf1652f84fec6aec2b3f80c5649558aa1d
3
+ metadata.gz: bf1329621b1cb0ec7b1900242df099d14697d8d1c2f2b89420b98d18b1c3533f
4
+ data.tar.gz: 81737a2ab2d8bcd603e7ff77c8c9a6a19f11be5d6a3f57f299da5bfc0736d882
5
5
  SHA512:
6
- metadata.gz: 73a7a4c5a633f79e898f48e1fcbc5e4a7dde8145e0a94d704e43c5918ca46e01b880629bd527bbcc77c66a786cd67d6139de9f83fef166f6c836a5e70626d922
7
- data.tar.gz: f00ba753893b56d053b10972ea6091fcaf69f707f6425750bfee6ef00be27f1588a5f2aa5b473a958abeedf6b29a532689fdc86ca0a8c0923cce51da1e0c45d0
6
+ metadata.gz: 6821534f087785553145851c3a1682ab40ea9bf2710aa125689fdd816bd35bba8434b1fe0e1267693510c549902cfd5454d47cab7ea40deb5e7d467b224da4b4
7
+ data.tar.gz: e1bcc9b32f64421a996a235e7334f8f9de46ac3153a7854870c61bb302abd4acf369d32584fd7c3a72ce49db25c7d815ffbf2e7a0464925e455b381705d2bed3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kovid (0.5.4)
4
+ kovid (0.5.5)
5
5
  ascii_charts (~> 0.9.1)
6
6
  rainbow (~> 3.0)
7
7
  terminal-table (~> 1.8)
@@ -47,13 +47,15 @@ Gem::Specification.new do |spec|
47
47
 
48
48
  Stay safe!
49
49
  Emmanuel Hayford.
50
- https://emmanuelhayford.com/
50
+ https://emmanuelhayford.com
51
51
 
52
52
  Data Sources:
53
53
  * JHU CSSE GISand Data
54
- * https://www.worldometers.info/coronavirus/
54
+ * https://www.worldometers.info/coronavirus
55
55
 
56
- PS: I'm in search of a Rails/Ruby job. You can hire me (siawmensah@gmail.com).
56
+ PS: I'm in search of a Rails/Ruby job.
57
+
58
+ You can hire me (siawmensah@gmail.com).
57
59
  ============================================================================
58
60
  }
59
61
  end
@@ -131,7 +131,7 @@ module Kovid
131
131
 
132
132
  def data_source
133
133
  source = <<~TEXT
134
- Sources:
134
+ Sources: #{Time.now}
135
135
  * JHU CSSE GISand Data
136
136
  * https://www.worldometers.info/coronavirus/
137
137
  TEXT
@@ -8,4 +8,10 @@ module Kovid
8
8
  rows = [[message.to_s]]
9
9
  puts Terminal::Table.new title: '❗️', rows: rows
10
10
  end
11
+
12
+ # Parse date as "02 Apr, 20"
13
+ def dateman(date)
14
+ date_to_parse = Date.strptime(date, '%m/%d/%y').to_s
15
+ Date.parse(date_to_parse).strftime('%d %b, %y')
16
+ end
11
17
  end
@@ -278,8 +278,7 @@ module Kovid
278
278
  end
279
279
 
280
280
  stats.each_with_index do |val, index|
281
- date_to_parse = Date.strptime(dates[index], '%m/%d/%y').to_s
282
- val.unshift(Date.parse(date_to_parse).strftime('%d %b, %y'))
281
+ val.unshift(Kovid.dateman(dates[index]))
283
282
  end.each do |row|
284
283
  rows << row
285
284
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kovid
4
- VERSION = '0.5.5'
4
+ VERSION = '0.5.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kovid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Hayford
@@ -138,9 +138,9 @@ post_install_message: "\n ===================================================
138
138
  \ COVID-19 has devasted the world. But while we're fighting\n with the
139
139
  novel coronavirus, I think stats on the issue should be\n accessible.\n\n There
140
140
  isn't much we can do now besides following procedures and hoping\n for the
141
- best.\n\n Stay safe!\n Emmanuel Hayford.\n https://emmanuelhayford.com/\n\n
142
- \ Data Sources:\n * JHU CSSE GISand Data\n * https://www.worldometers.info/coronavirus/\n\n
143
- \ PS: I'm in search of a Rails/Ruby job. You can hire me (siawmensah@gmail.com).\n
141
+ best.\n\n Stay safe!\n Emmanuel Hayford.\n https://emmanuelhayford.com\n\n
142
+ \ Data Sources:\n * JHU CSSE GISand Data\n * https://www.worldometers.info/coronavirus\n\n
143
+ \ PS: I'm in search of a Rails/Ruby job.\n\n You can hire me (siawmensah@gmail.com).\n
144
144
  \ ============================================================================\n
145
145
  \ "
146
146
  rdoc_options: []