covid_19_updates 0.1.2 → 0.1.3

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: 2bc6389206b8ead069229e95ee7e6696336962cdfe3747d6106ffc42370a72ee
4
- data.tar.gz: 709fc65b06d47d24d2ce7f1f11482426c29ddaa9d8e8bb7823a142615e5daa38
3
+ metadata.gz: d351ae4b9bfeceb4552e10787e2e3f585611eb03d6e034b09046fce8b182a857
4
+ data.tar.gz: 5fec063284a1aae85936745af17ad51a9e215f122070796e2aa1091f02ae1958
5
5
  SHA512:
6
- metadata.gz: 8f2ccd963f760eb77a18d8e6162ea55656ca27cc5253d252ff8e6c1ce4b2b6979a076ddff48b80a6fc5597d23bd0be2f71cf829473df9d62e3418e83e051ec8a
7
- data.tar.gz: 921c4cad272d152cb6ace59d44092eea6a3c4049180d158c9d2dc1ee8fef1e4956e561b1c28421e3ff1799d462c032b427bb9338190b7be280518fdfbf9154cd
6
+ metadata.gz: 82bebd0c502c8c9c2c5125a025cdf423f7e9ebffe7664042b09cb11afafbbd75c6366833cd7d320311dc377a59ce0751a07edf642ff00b83cf0cebca5462d9e8
7
+ data.tar.gz: b90e11372b796534f99fef588e799baa568c645c3fde8f6dad5a35b820473cafaa4a1870fe70f3184e3aee77afed4724fe99a50b2902bc1e88f3c43310f7ed63
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- covid_19_updates (0.1.1)
4
+ covid_19_updates (0.1.3)
5
5
  colorize
6
6
  nokogiri
7
7
  thor (>= 1.0.1)
@@ -33,6 +33,13 @@ module Covid19Updates
33
33
 
34
34
  pick
35
35
 
36
+ if @pick.to_i > array.count-1 || @pick.to_i < array.count-1
37
+ puts
38
+ puts "Sorry, there is no story associated with this number.".light_green
39
+ puts
40
+ pick
41
+ end
42
+
36
43
  Scraper.fetch(array, @pick, 'cnbc')
37
44
 
38
45
  continue
@@ -52,6 +59,13 @@ module Covid19Updates
52
59
  end
53
60
 
54
61
  pick
62
+
63
+ if @pick.to_i > array.count-1 || @pick.to_i < array.count-1
64
+ puts
65
+ puts "Sorry, there is no story associated with this number.".light_green
66
+ puts
67
+ pick
68
+ end
55
69
 
56
70
  n = final[@pick.to_i - 1][:link].to_s
57
71
  node = Nokogiri::HTML(URI.open(n)).css('p')
@@ -69,6 +83,13 @@ module Covid19Updates
69
83
 
70
84
  pick
71
85
 
86
+ if @pick.to_i > array.count-1 || @pick.to_i < array.count-1
87
+ puts
88
+ puts "Sorry, there is no story associated with this number.".light_green
89
+ puts
90
+ pick
91
+ end
92
+
72
93
  Scraper.fetch(array, @pick, 'stat')
73
94
 
74
95
  continue
@@ -140,5 +161,7 @@ module Covid19Updates
140
161
  puts "#{index.succ}: #{news[:title]}"
141
162
  end
142
163
  end
164
+
143
165
  end
166
+
144
167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Covid19Updates
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covid_19_updates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Madden
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize