UrgentcareCLI 0.2.2 → 0.2.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 +4 -4
- data/lib/UrgentCare/CLI.rb +14 -14
- data/lib/UrgentCare/Scraper.rb +9 -16
- data/lib/UrgentCare/version.rb +1 -1
- metadata +26 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26f2033e979bb723f34e46885c88c70eeb517b8bd0992c3609bc98516c17fe39
|
4
|
+
data.tar.gz: 8398f8d94c51114848881172a45832f2d5b71348cfbc1240910667cb56204b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe494a2eb548395e69933483d049d3fa66a3d5a8e8cf788b979300d7edf1cfdda2da0bd3b7e2096b551c615a6a8b5d51b835a437e00d0e7413aec8075076fd0
|
7
|
+
data.tar.gz: 1e31546791190fe8777cd5f56b4cd64c710ca15064cb530a97b521c253075e4d02ce3409dd99258656db226ec07178c1b4603a78f4367b8057f8141e4762f04d
|
data/lib/UrgentCare/CLI.rb
CHANGED
@@ -34,12 +34,12 @@ class Urgentcare::CLI
|
|
34
34
|
@offices.each_with_index do |office, i|
|
35
35
|
puts "#{i + 1}. #{office.name}"
|
36
36
|
end
|
37
|
-
|
38
|
-
|
37
|
+
list
|
38
|
+
end
|
39
39
|
|
40
40
|
def list
|
41
|
-
|
42
|
-
|
41
|
+
puts " "
|
42
|
+
location = $stdin.gets.chomp
|
43
43
|
if location == "Exit" ||location == "exit"
|
44
44
|
puts "Thank you and Goodbye!"
|
45
45
|
elsif location != "Exit" || location != "exit"
|
@@ -49,7 +49,7 @@ class Urgentcare::CLI
|
|
49
49
|
@scraper.get_clinic_site
|
50
50
|
office_details
|
51
51
|
else
|
52
|
-
|
52
|
+
puts "Invalid response"
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -76,21 +76,21 @@ class Urgentcare::CLI
|
|
76
76
|
puts " "
|
77
77
|
puts "Would you like to select another office from the list?"
|
78
78
|
puts " "
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
@offices.each_with_index do |office, i|
|
80
|
+
puts "#{i + 1}. #{office.name}"
|
81
|
+
end
|
82
82
|
puts " "
|
83
83
|
puts "If not, please type exit."
|
84
84
|
puts " "
|
85
|
-
|
85
|
+
list
|
86
86
|
end
|
87
87
|
|
88
88
|
def loading_message
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
89
|
+
puts " "
|
90
|
+
puts "Retrieving data...."
|
91
|
+
puts "Loading......"
|
92
|
+
puts "............."
|
93
|
+
puts " "
|
94
94
|
end
|
95
95
|
|
96
96
|
end
|
data/lib/UrgentCare/Scraper.rb
CHANGED
@@ -36,13 +36,9 @@ class Urgentcare::Scraper
|
|
36
36
|
|
37
37
|
def office_url
|
38
38
|
@new_page.each do |office_details| #does not create additional objects. returns original object
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
@@url << office_details.css('a')[2][name="href"]
|
43
|
-
end
|
44
|
-
@off = @office.new
|
45
|
-
make_office(office_details)
|
39
|
+
@@url << office_details.css('a')[2][name="href"]
|
40
|
+
@office_details = office_details
|
41
|
+
make_office
|
46
42
|
end
|
47
43
|
end
|
48
44
|
|
@@ -52,19 +48,16 @@ class Urgentcare::Scraper
|
|
52
48
|
get_appttime_date
|
53
49
|
end
|
54
50
|
|
55
|
-
def make_office
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
@off.url = office_details.css('a')[2][name="href"]
|
61
|
-
end
|
62
|
-
@off.phone_number = office_details.css('a[href]').text.gsub("Get DirectionsBook Urgent Care Appointment", " ")
|
51
|
+
def make_office
|
52
|
+
@off = @office.new
|
53
|
+
@off.name = @office_details.css('h2').text
|
54
|
+
@off.url = @office_details.css('a')[2][name="href"]
|
55
|
+
@off.phone_number = @office_details.css('a[href]').text.gsub("Get DirectionsBook Urgent Care Appointment", " ")
|
63
56
|
end
|
64
57
|
|
65
58
|
def get_appttime_date #retrieve waittime and add to new office model
|
66
59
|
sleep(1);
|
67
|
-
|
60
|
+
iframe_info = Nokogiri::HTML(@js_doc.html)
|
68
61
|
if iframe_info.css('div.time-slots')
|
69
62
|
@wait_day = iframe_info.css('div.d-flex.d-md-none.header').text
|
70
63
|
@wait_time = iframe_info.css('div.time-slot.selected').text
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PamelaTorres-Rocca
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.11.3
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: gem-release
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: nokogiri
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,10 +94,11 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: 1.11.4
|
83
|
-
description:
|
97
|
+
description: Current Urgent Care wait times in Massachusetts based on location
|
84
98
|
email:
|
85
|
-
-
|
86
|
-
executables:
|
99
|
+
- pamela@torres-rocca.com
|
100
|
+
executables:
|
101
|
+
- Urgentcare
|
87
102
|
extensions: []
|
88
103
|
extra_rdoc_files: []
|
89
104
|
files:
|
@@ -95,10 +110,11 @@ files:
|
|
95
110
|
- lib/UrgentCare/Office.rb
|
96
111
|
- lib/UrgentCare/Scraper.rb
|
97
112
|
- lib/UrgentCare/version.rb
|
98
|
-
homepage: https://github.com/Pamela454/Pamela-cli-app
|
113
|
+
homepage: https://github.com/Pamela454/Pamela-cli-app
|
99
114
|
licenses:
|
100
115
|
- MIT
|
101
|
-
metadata:
|
116
|
+
metadata:
|
117
|
+
source_code_uri: https://github.com/Pamela454/Pamela-cli-app
|
102
118
|
post_install_message:
|
103
119
|
rdoc_options: []
|
104
120
|
require_paths:
|
@@ -114,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
130
|
- !ruby/object:Gem::Version
|
115
131
|
version: '0'
|
116
132
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.3.8
|
118
134
|
signing_key:
|
119
135
|
specification_version: 4
|
120
|
-
summary:
|
136
|
+
summary: UrgentCareCLI Gem
|
121
137
|
test_files: []
|