kovid 0.6.3 → 0.6.4

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: c21479be2e8fdc2c40fd9f38d37808bd3a3d13ec36080119896fa95cc291d127
4
- data.tar.gz: 94431cdc81ea6de25240aada27cdf680a4bd6a37a88e060ba51b6197cac015bd
3
+ metadata.gz: e96265776776cbca749c7c1651fd462883deeeefc52150afffbd444f1752bae3
4
+ data.tar.gz: 7721bcc8cf1e5d342b8808f020515d6167a7dee2b8a1bda04d1b56d3a0fd11ab
5
5
  SHA512:
6
- metadata.gz: 865a466405a2b6be0068781dc4f11f1573c761fc9bde7994ed32f28573842b95df4cbcbd609436e1c1713c05ac5564fb582755b35e7586af938df145b77e5bf4
7
- data.tar.gz: b477fc309bd688bc7195e90cb3e4bcfd201a37a38170abbb95aaa018d89e9afa18bae3e35a1dddf7211adab8f00d483c13984597f837bb4a98cdeca9a1c3d00c
6
+ metadata.gz: dd21b726c0a68398e565c470477da359f05e23b7b356dd95e1f18232168caa922262974db6aa5c2ddc7fc6223c6fae31ed824a8b41d61c73627d0fc5013a740e
7
+ data.tar.gz: 81a35f27819d5f6eeadb699bcc0ab9a73ab61cb8f3fb0f4d487d3fa13bbc333afb1138d99f413e6b30bab437144513a4fc461dc924f3f94dc9d9ec0c4def0445
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kovid (0.6.2)
4
+ kovid (0.6.3)
5
5
  ascii_charts (~> 0.9.1)
6
6
  rainbow (~> 3.0)
7
7
  terminal-table (~> 1.8)
data/lib/kovid/request.rb CHANGED
@@ -69,26 +69,24 @@ module Kovid
69
69
 
70
70
  def by_country(country_name)
71
71
  response = fetch_country(country_name)
72
- Kovid::Tablelize.country_table(response)
73
72
 
74
- # if response.values.first.include?('not found')
75
- # not_found(country_name)
76
- # else
77
- # Kovid::Tablelize.country_table(response)
78
- # end
73
+ if response.key?('message')
74
+ not_found(country_name)
75
+ else
76
+ Kovid::Tablelize.country_table(response)
77
+ end
79
78
  rescue JSON::ParserError
80
79
  puts SERVER_DOWN
81
80
  end
82
81
 
83
82
  def by_country_full(country_name)
84
83
  response = fetch_country(country_name)
85
- Kovid::Tablelize.full_country_table(response)
86
84
 
87
- # if response.values.first.include?('not found')
88
- # not_found(country_name)
89
- # else
90
- # Kovid::Tablelize.full_country_table(response)
91
- # end
85
+ if response.key?('message')
86
+ not_found(country_name)
87
+ else
88
+ Kovid::Tablelize.full_country_table(response)
89
+ end
92
90
  rescue JSON::ParserError
93
91
  puts SERVER_DOWN
94
92
  end
data/lib/kovid/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kovid
4
- VERSION = '0.6.3'
4
+ VERSION = '0.6.4'
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.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Hayford