UrgentcareCLI 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/UrgentCare/Scraper.rb +5 -3
- data/lib/UrgentCare/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d08c3a8550ac9e5303232d496a6b848c5b55693e2156c1de8ddafb2287553baf
|
4
|
+
data.tar.gz: f1e3cd49f0e54c41d4918ada94e8b12ee9a2faa4fbd6856470247ad5bb3da242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb72119f5bdb980fd1351abff64b7fdc91b3f6230b335608c4c39a65a5f73934a5f41746fe8dbcba4c88cd2e74162e7ed35877db0a1fc6267f1d9cb553591397
|
7
|
+
data.tar.gz: ce10f3ef928361056eef160b2fc5d729c655ced8ce787646cdc486822c36fbbeea603e80f152c45805484b7d045b88bdd6984c7caf25aa4bf2a3c25fd6710d45
|
data/lib/UrgentCare/Scraper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'webdrivers'
|
2
|
+
|
1
3
|
class Urgentcare::Scraper
|
2
4
|
|
3
5
|
def initialize(office = Urgentcare::Office, scraper: Urgentcare::Scraper)
|
@@ -52,18 +54,18 @@ class Urgentcare::Scraper
|
|
52
54
|
@off = @office.new
|
53
55
|
@off.name = @office_details.css('h2').text
|
54
56
|
@off.url = @office_details.css('a')[2][name="href"]
|
55
|
-
@off.phone_number = @office_details.css('a[href]').text.gsub("Get
|
57
|
+
@off.phone_number = @office_details.css('a[href]').text.gsub("Get DirectionsSave Your Spot in Line", "")
|
56
58
|
end
|
57
59
|
|
58
60
|
def get_appttime_date #retrieve waittime and add to new office model
|
59
61
|
sleep(1);
|
60
62
|
iframe_info = Nokogiri::HTML(@js_doc.html)
|
61
|
-
if iframe_info.css('div.time-slots')
|
63
|
+
if !iframe_info.css('div.time-slots').empty?
|
62
64
|
@wait_day = iframe_info.css('div.d-flex.d-md-none.header').text
|
63
65
|
@wait_time = iframe_info.css('div.time-slot.selected').text
|
64
66
|
@office.all[$index].next_available = "#{@wait_day} #{@wait_time}"
|
65
67
|
else
|
66
|
-
@wait_time = "
|
68
|
+
@wait_time = "Walk-in only due to staffing shortages"
|
67
69
|
@office.all[$index].next_available = "#{@wait_time}"
|
68
70
|
end
|
69
71
|
end
|
data/lib/UrgentCare/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: UrgentcareCLI
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PamelaTorres-Rocca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.0.1
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: UrgentCareCLI Gem
|