CLI_2 0.1.1 → 0.1.2
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/CLI_2-0.1.1.gem +0 -0
- data/CLI_2.gemspec +1 -1
- data/Gemfile +1 -1
- data/README.md +3 -6
- data/lib/CLI.rb +2 -2
- data/lib/CLI_2/version.rb +1 -1
- data/lib/Languages.rb +1 -0
- data/lib/Printer.rb +1 -1
- data/lib/UserInputExe.rb +3 -7
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c11305b83475bdef31ecae376e03c608efd443c4ef77b87f385a4f6f3d8c074
|
4
|
+
data.tar.gz: 460d40df4873cd0b647a1c7e956c9710a9804f08cea2723ab89dd489bfab26b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e94f5a9a968533d0dad99b648876d372bf515be6c5c4e6c992c5fac4bcfd0f92426035934526a20647eda13784822e460863edd7cfdb574b7f7042ec5b341b
|
7
|
+
data.tar.gz: f7e5b17f69455bdaa842108cd81579aab3ebbe91fb80fdf021da1f1d7e82b9d8f3cae36e41d207d9b8055a14ae02a8fd5c5ad2ffabef3fcd742305368ce23699
|
data/CLI_2-0.1.1.gem
ADDED
Binary file
|
data/CLI_2.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["'alekvuka@gmail.com'"]
|
11
11
|
|
12
12
|
spec.summary = %q{Write a short summary, because RubyGems requires one.}
|
13
|
-
spec.description = %q{
|
13
|
+
spec.description = %q{ The framework of the gem is in CLI, Scraper and Provider classes with a Printer module. The CLI class initiates the user interaction and is responsible for interpreting user input and initiating the Scraper class. The Scraper class is responsible fir scraping the given website and instantiating Provider objects. The provider class is responsible for Provider objects each instance of has instance variables that account for the Provider attributes, such as name, qualifications, etc. The Printer module is responsible for outputting messages to the user, it contains methods such as “Main Menu” and “Warning Message.”}
|
14
14
|
spec.homepage = "https://github.com/alekvuka/CLI_2"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# CLI2
|
2
2
|
|
3
|
-
|
3
|
+
CLI_2 scrapes provider's name, specialties, teams, languages and other attributes from a health clinic's website directory. CLI_2 organizes these attributes so that they can be easily interrogated by the user. The user can interact with the program though a CLI menu which displays the options on what information the user can gather from the collected data.
|
4
4
|
|
5
|
-
|
5
|
+
CLI_2 is designed to be easily modified so that you can use it as a template when collecting and organizing information from your specific health clinic's website.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -20,13 +20,10 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install CLI_2
|
22
22
|
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
23
|
|
27
24
|
## Development
|
28
25
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/
|
26
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/run` for an interactive prompt that will allow you to interact with the program.
|
30
27
|
|
31
28
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
29
|
|
data/lib/CLI.rb
CHANGED
@@ -15,7 +15,7 @@ class CLI
|
|
15
15
|
Scraper.scrape_page(clinic_url)
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
|
19
19
|
|
20
20
|
def start(clinic_url = "http://callen-lorde.org/meet-our-providers/")
|
21
21
|
|
@@ -49,7 +49,7 @@ class CLI
|
|
49
49
|
if user_input >= 1 && user_input <= 6
|
50
50
|
true
|
51
51
|
else
|
52
|
-
list_right_options
|
52
|
+
Printer::list_right_options
|
53
53
|
start
|
54
54
|
end
|
55
55
|
end
|
data/lib/CLI_2/version.rb
CHANGED
data/lib/Languages.rb
CHANGED
data/lib/Printer.rb
CHANGED
@@ -76,7 +76,7 @@ module Printer
|
|
76
76
|
if Teams.team_by_provider_name(provider_instance.name) != nil
|
77
77
|
puts "#{provider_instance.name}'s team: #{Teams.team_by_provider_name(provider_instance.name)}"
|
78
78
|
end
|
79
|
-
puts "#{provider_instance.name}'s
|
79
|
+
puts "#{provider_instance.name}'s specialties: #{Specialites.specialties_by_provider(provider_instance)}"
|
80
80
|
#puts "#{provider_instance.name}'s specialties: #{provider_instance.specialties}"
|
81
81
|
puts "#{provider_instance.name}'s languages: #{Languages.languages_by_provider(provider_instance)}"
|
82
82
|
puts "#{provider_instance.name}'s qualifications: #{provider_instance.qualifications}"
|
data/lib/UserInputExe.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module UserInputExe
|
2
2
|
|
3
|
+
|
4
|
+
|
3
5
|
def choice_1
|
4
6
|
Printer::print_from_arr_of_o(Providers.all)
|
5
7
|
end
|
@@ -7,9 +9,8 @@ module UserInputExe
|
|
7
9
|
|
8
10
|
|
9
11
|
def choice_2
|
10
|
-
|
11
|
-
user_input = Printer::get_provider_name
|
12
12
|
|
13
|
+
user_input = Printer::get_provider_name
|
13
14
|
req_provider = Providers.all.detect do |provider|
|
14
15
|
user_input == provider.name
|
15
16
|
end
|
@@ -28,7 +29,6 @@ module UserInputExe
|
|
28
29
|
def choice_3
|
29
30
|
|
30
31
|
instances_of_teams = Teams.all
|
31
|
-
|
32
32
|
Printer::print_from_arr_of_o(instances_of_teams)
|
33
33
|
|
34
34
|
user_input = Printer::get_choice_from_above
|
@@ -41,11 +41,9 @@ module UserInputExe
|
|
41
41
|
def choice_4
|
42
42
|
|
43
43
|
instances_of_specialties = Specialites.all
|
44
|
-
|
45
44
|
Printer::print_from_arr_of_o(instances_of_specialties)
|
46
45
|
|
47
46
|
user_input = Printer::get_choice_from_above
|
48
|
-
|
49
47
|
instances_of_specialties.each do |specialty|
|
50
48
|
if specialty.name == user_input
|
51
49
|
Printer::print_from_arr_of_o(specialty.providers)
|
@@ -59,11 +57,9 @@ module UserInputExe
|
|
59
57
|
def choice_5
|
60
58
|
|
61
59
|
instances_of_languages = Languages.all
|
62
|
-
|
63
60
|
Printer::print_from_arr_of_o(instances_of_languages)
|
64
61
|
|
65
62
|
user_input = Printer::get_choice_from_above
|
66
|
-
|
67
63
|
instances_of_languages.each do |language|
|
68
64
|
if language.name == user_input
|
69
65
|
Printer::print_from_arr_of_o(language.providers)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CLI_2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'ALEKSANDAR VUKASINOVIC'"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,7 +38,14 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
description: "
|
41
|
+
description: " The framework of the gem is in CLI, Scraper and Provider classes with
|
42
|
+
a Printer module. The CLI class initiates the user interaction and is responsible
|
43
|
+
for interpreting user input and initiating the Scraper class. The Scraper class
|
44
|
+
is responsible fir scraping the given website and instantiating Provider objects.
|
45
|
+
The provider class is responsible for Provider objects each instance of has instance
|
46
|
+
variables that account for the Provider attributes, such as name, qualifications,
|
47
|
+
etc. The Printer module is responsible for outputting messages to the user, it contains
|
48
|
+
methods such as “Main Menu” and “Warning Message.”"
|
42
49
|
email:
|
43
50
|
- "'alekvuka@gmail.com'"
|
44
51
|
executables:
|
@@ -48,6 +55,7 @@ extra_rdoc_files: []
|
|
48
55
|
files:
|
49
56
|
- ".gitignore"
|
50
57
|
- CLI_2-0.1.0.gem
|
58
|
+
- CLI_2-0.1.1.gem
|
51
59
|
- CLI_2.gemspec
|
52
60
|
- CODE_OF_CONDUCT.md
|
53
61
|
- Gemfile
|