vaccine-finder 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vaccine-spotter.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6479103fcf0a8db9379bb2d6116f88b26ef59e2a5c322a23e419460229c6e89b
|
4
|
+
data.tar.gz: 942432a231a31a4042fffc67b10ade83c86363a3ab3db5c96869f6a999540670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 074ee43ad51a78eaa3416821f4da96d2b0fd8df93bc042152134b7cece7182dd205c84589afdb17a1d90d4001d7a0017041855263759c117beff9dfdebc3e711
|
7
|
+
data.tar.gz: a246516d2ed4cedc8856f70cbc89528fc4fb6d091cf71c07bf2dd38281d0d8c44fbf11b0bf541463d811716c3aad1681777a9ffe24414b1fbcabfc6a40625226
|
data/lib/vaccine-spotter.rb
CHANGED
@@ -26,7 +26,9 @@ if !config.exist?
|
|
26
26
|
puts "It looks like you don't have a configuration file yet. Would you like to create one?"
|
27
27
|
create_config = prompt.yes? "Create `~/.config/vaccine-finder.toml`?"
|
28
28
|
if create_config
|
29
|
-
set_state = prompt.ask("What state would you like to monitor? (Two-letter postal code, please)", required: true)
|
29
|
+
set_state = prompt.ask("What state would you like to monitor? (Two-letter postal code, please)", required: true) do |q|
|
30
|
+
q.modify :up, :remove
|
31
|
+
end
|
30
32
|
config.set(:state, value: set_state)
|
31
33
|
puts "Ok, time to set zip codes…"
|
32
34
|
if prompt.yes? "freemaptools.com has a really helpful tool for getting the zip codes around a radius. Would you like to open it?"
|
@@ -47,7 +49,7 @@ refresh_rate = config.read["refresh_rate"].to_i
|
|
47
49
|
|
48
50
|
puts
|
49
51
|
print pastel.bold "vaccinespotter.org CLI notifier thing"
|
50
|
-
print " v0.1.
|
52
|
+
print " v0.1.5"
|
51
53
|
puts pastel.dim ", by Jack MapelLentz (jltml.me)"
|
52
54
|
puts pastel.dim "This script uses the wonderful vaccinespotter.org, by Nick Muerdter (github.com/GUI)"
|
53
55
|
puts "Checking #{pastel.underline zips.length} zip codes in #{pastel.underline state} every #{pastel.underline refresh_rate} seconds"
|
@@ -70,7 +72,7 @@ loop do
|
|
70
72
|
|
71
73
|
parsed_json["features"].each_index do |i|
|
72
74
|
current = parsed_json["features"][i]["properties"]
|
73
|
-
if (current["appointments_available"] == true) and (zips.include?(current["postal_code"].to_i) == true) and (!excluded.include? current["id"].to_i) and (current["appointment_vaccine_types"]["pfizer"] == true or current["appointment_vaccine_types"]["unknown"] == true)
|
75
|
+
if (current["appointments_available"] == true) and (zips.include?(current["postal_code"].to_i) == true) and (!excluded.include? current["id"].to_i) # and (current["appointment_vaccine_types"]["pfizer"] == true or current["appointment_vaccine_types"]["unknown"] == true)
|
74
76
|
puts "- #{pastel.green.bold current["city"]} #{pastel.green.bold current["provider_brand_name"]}: #{current["url"]}"
|
75
77
|
puts " - #{current["appointment_vaccine_types"]} as of #{Time.parse(current["appointments_last_fetched"]).localtime.strftime("%H:%M:%S")}"
|
76
78
|
TerminalNotifier.notify("#{current["provider_brand_name"]} - #{current["city"]}", :title => "vaccine-spotter", :open => "#{current["url"]}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vaccine-finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack MapelLentz
|
@@ -205,7 +205,7 @@ extra_rdoc_files: []
|
|
205
205
|
files:
|
206
206
|
- bin/vaccine-finder
|
207
207
|
- lib/vaccine-spotter.rb
|
208
|
-
homepage: https://github.com/jltml/
|
208
|
+
homepage: https://github.com/jltml/vaccine-finder
|
209
209
|
licenses:
|
210
210
|
- MIT
|
211
211
|
metadata: {}
|