UrgentcareCLI 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a14a0119b6b23342e667a36ec24f7fa392101ccd0bf4c0301c559fd47f596a13
4
- data.tar.gz: 6e0de22214194db170cdf8a1380edd1843da5dbc3e0f6aff7539cd508a79bba2
3
+ metadata.gz: 26f2033e979bb723f34e46885c88c70eeb517b8bd0992c3609bc98516c17fe39
4
+ data.tar.gz: 8398f8d94c51114848881172a45832f2d5b71348cfbc1240910667cb56204b18
5
5
  SHA512:
6
- metadata.gz: db7f73326afa9d948ffd554379bb90334c20fc622f42ad629746a9eafe8bb4477a8fea4c0946084ed27b4e6b932de84e72805f26b4557fcdda8f5e5e93d5e238
7
- data.tar.gz: ae6275370f573733cc5892d925062490be2ad4d1632681a35e87794f4b5fe5c7bc7ef497718dd0562b4489b1fc8abdad5f461f2a3d4f35c951b65b34551931c7
6
+ metadata.gz: fbe494a2eb548395e69933483d049d3fa66a3d5a8e8cf788b979300d7edf1cfdda2da0bd3b7e2096b551c615a6a8b5d51b835a437e00d0e7413aec8075076fd0
7
+ data.tar.gz: 1e31546791190fe8777cd5f56b4cd64c710ca15064cb530a97b521c253075e4d02ce3409dd99258656db226ec07178c1b4603a78f4367b8057f8141e4762f04d
@@ -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
- list
38
- end
37
+ list
38
+ end
39
39
 
40
40
  def list
41
- puts " "
42
- location = $stdin.gets.chomp
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
- puts "Invalid response"
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
- @offices.each_with_index do |office, i|
80
- puts "#{i + 1}. #{office.name}"
81
- end
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
- list
85
+ list
86
86
  end
87
87
 
88
88
  def loading_message
89
- puts " "
90
- puts "Retrieving data...."
91
- puts "Loading......"
92
- puts "............."
93
- puts " "
89
+ puts " "
90
+ puts "Retrieving data...."
91
+ puts "Loading......"
92
+ puts "............."
93
+ puts " "
94
94
  end
95
95
 
96
96
  end
@@ -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
- if office_details.css('a').length > 3
40
- @@url << office_details.css('a')[3][name="href"]
41
- else
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(office_details)
56
- @off.name = office_details.css('h2').text
57
- if office_details.css('a').length > 3
58
- @off.url = office_details.css('a')[3][name="href"]
59
- else
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
- iframe_info = Nokogiri::HTML(@js_doc.html)
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
@@ -1,3 +1,3 @@
1
1
  module Urgentcare
2
- VERSION = "0.2.2" #increment a version with each release
2
+ VERSION = "0.2.3" #increment a version with each release
3
3
  end #semantic versioning
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.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - PamelaTorres-Rocca
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
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
- - pfrieze@gmail.com
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.git
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.1.3
133
+ rubygems_version: 3.3.8
118
134
  signing_key:
119
135
  specification_version: 4
120
- summary: Current Urgent Care wait times in Massachusetts based on location.
136
+ summary: UrgentCareCLI Gem
121
137
  test_files: []