hotels_of_haiti 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +53 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/hotels_of_haiti +7 -0
- data/bin/setup +8 -0
- data/config/environment.rb +9 -0
- data/hotels_of_haiti.gemspec +46 -0
- data/lib/hotels_of_haiti.rb +6 -0
- data/lib/hotels_of_haiti/cli.rb +53 -0
- data/lib/hotels_of_haiti/hotel.rb +64 -0
- data/lib/hotels_of_haiti/scraper.rb +68 -0
- data/lib/hotels_of_haiti/version.rb +3 -0
- metadata +162 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 74be5b199ba4217a4d8e0547fe0dd1246a19ba5a00c3afe89057694bc0b32111
|
4
|
+
data.tar.gz: a919b973ae10ea681cb51d90ba82fbc58a93d7f9d7eac2459a47202fb042b9b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a8955a67b0b80d138cce3db8b717549692428b36851454af2b8ab9c7016215d6bd6cd850e26b80e4ee7b63cc1a337549d9ac0fe9d849b8888ab011869c6e531f
|
7
|
+
data.tar.gz: 00af2095e64c9b30ac63c00217d0e4ce31c37ffe86f8cbba06488bc204ad3685498e9b3466d168bd2d3c73b7c0f01a7636b7d5386c34f3baa6988128b1d50c9f
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at TODO: Write your email address. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
hotels_of_haiti (0.1.0)
|
5
|
+
nokogiri
|
6
|
+
terminal-table
|
7
|
+
tty-spinner
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
coderay (1.1.2)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
method_source (0.9.0)
|
15
|
+
mini_portile2 (2.3.0)
|
16
|
+
nokogiri (1.8.5-x64-mingw32)
|
17
|
+
mini_portile2 (~> 2.3.0)
|
18
|
+
pry (0.11.3)
|
19
|
+
coderay (~> 1.1.0)
|
20
|
+
method_source (~> 0.9.0)
|
21
|
+
rake (10.5.0)
|
22
|
+
rspec (3.8.0)
|
23
|
+
rspec-core (~> 3.8.0)
|
24
|
+
rspec-expectations (~> 3.8.0)
|
25
|
+
rspec-mocks (~> 3.8.0)
|
26
|
+
rspec-core (3.8.0)
|
27
|
+
rspec-support (~> 3.8.0)
|
28
|
+
rspec-expectations (3.8.2)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.8.0)
|
31
|
+
rspec-mocks (3.8.0)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.8.0)
|
34
|
+
rspec-support (3.8.0)
|
35
|
+
terminal-table (1.8.0)
|
36
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
37
|
+
tty-cursor (0.6.0)
|
38
|
+
tty-spinner (0.8.0)
|
39
|
+
tty-cursor (>= 0.5.0)
|
40
|
+
unicode-display_width (1.4.0)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
x64-mingw32
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
bundler (~> 1.16)
|
47
|
+
hotels_of_haiti!
|
48
|
+
pry
|
49
|
+
rake (~> 10.0)
|
50
|
+
rspec (~> 3.0)
|
51
|
+
|
52
|
+
BUNDLED WITH
|
53
|
+
1.16.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# HotelsOfHaiti
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/hotels_of_haiti`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'hotels_of_haiti'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install hotels_of_haiti
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
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
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hotels_of_haiti. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the HotelsOfHaiti project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hotels_of_haiti/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "hotels_of_haiti"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/hotels_of_haiti
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "hotels_of_haiti/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hotels_of_haiti"
|
8
|
+
spec.version = HotelsOfHaiti::VERSION
|
9
|
+
spec.authors = ["Gilbert Torchon"]
|
10
|
+
spec.email = ["gilbert@noukod.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{"A CLI ruby gem to display a list of hotels in haiti and details about them "}
|
13
|
+
spec.homepage = "https://github.com/GilTorch/hotels_of_haiti.git"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
+
|
21
|
+
# spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
23
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
24
|
+
else
|
25
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
26
|
+
"public gem pushes."
|
27
|
+
end
|
28
|
+
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
end
|
34
|
+
# spec.bindir = "exe"
|
35
|
+
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
+
spec.executables << "hotels_of_haiti"
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
spec.add_development_dependency "pry"
|
43
|
+
spec.add_dependency "nokogiri"
|
44
|
+
spec.add_dependency "terminal-table"
|
45
|
+
spec.add_dependency "tty-spinner"
|
46
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
class HotelsOfHaiti::CLI
|
2
|
+
def call
|
3
|
+
HotelsOfHaiti::Scraper.scrape_all
|
4
|
+
puts "Welcome to 'Hotels of Haiti'"
|
5
|
+
launch
|
6
|
+
end
|
7
|
+
|
8
|
+
def list_hotels
|
9
|
+
fields=["ID",'NAME']
|
10
|
+
table = Terminal::Table.new :title =>"LIST OF HOTELS",:headings =>fields, :rows => Hotel.hotels_to_array(@range,[:id,:name]), :style => {:width => 80, :padding_left => 3, :border_x => "=", :border_i => "x"}
|
11
|
+
puts table
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def launch
|
16
|
+
loop do
|
17
|
+
puts "How many hotels do you want to see?(Choose between 1 and #{Hotel.all.count})."
|
18
|
+
@range=gets.strip.to_i
|
19
|
+
break if @range!=0 && @range <= Hotel.all.count
|
20
|
+
end
|
21
|
+
list_hotels
|
22
|
+
show_hotel
|
23
|
+
puts "Do you which to go back to the hotel list?(type yes or no)"
|
24
|
+
input=gets.strip
|
25
|
+
|
26
|
+
if input.downcase=="yes"
|
27
|
+
launch
|
28
|
+
else
|
29
|
+
puts "Good bye!"
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
def show_hotel
|
35
|
+
input=nil
|
36
|
+
loop do
|
37
|
+
puts "Which hotel you want to see more detail about(Choose by ID)??"
|
38
|
+
input=gets.strip.to_i
|
39
|
+
break if input<=@range
|
40
|
+
end
|
41
|
+
found_hotel=Hotel.find_by_id(input-1)
|
42
|
+
puts "X-------------------------------------------------X"
|
43
|
+
puts " #{found_hotel.name} "
|
44
|
+
puts "X-------------------------------------------------X"
|
45
|
+
# puts "Name: #{found_hotel.name}"
|
46
|
+
puts "Address: #{found_hotel.address}"
|
47
|
+
puts "Phone: #{found_hotel.phone}"
|
48
|
+
puts "E-mail: #{found_hotel.email}"
|
49
|
+
puts "Website: #{found_hotel.website}"
|
50
|
+
puts "Pricing: #{found_hotel.pricing}"
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
class Hotel
|
2
|
+
@@all=[]
|
3
|
+
|
4
|
+
attr_accessor :name,:address,:phone,:email,:number_of_rooms,:website,:pricing
|
5
|
+
|
6
|
+
def initialize(name:,address:nil,phone:nil,email:nil,number_of_rooms:nil,website:nil,pricing:nil)
|
7
|
+
@name=name
|
8
|
+
@address=address
|
9
|
+
@phone=phone
|
10
|
+
@email=email
|
11
|
+
@number_of_rooms=number_of_rooms
|
12
|
+
@website=website
|
13
|
+
@pricing=pricing
|
14
|
+
@@all << self
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.all
|
18
|
+
@@all
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.hotels_to_hash
|
22
|
+
hotel_hashes=[]
|
23
|
+
@@all.each do |hotel|
|
24
|
+
hotel_hash={
|
25
|
+
name: hotel.name,
|
26
|
+
address:hotel.address,
|
27
|
+
phone:hotel.phone,
|
28
|
+
email:hotel.email,
|
29
|
+
number_of_rooms:hotel.number_of_rooms,
|
30
|
+
pricing:hotel.pricing
|
31
|
+
}
|
32
|
+
hotel_hashes << hotel_hash
|
33
|
+
end
|
34
|
+
hotel_hashes
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.hotels_to_array(range=@@all.count,fields=[:name,:address,:phone,:email,:number_of_rooms,:website,:pricing])
|
38
|
+
hotels_to_array=[]
|
39
|
+
hotel_to_hashes=self.hotels_to_hash
|
40
|
+
|
41
|
+
hotel_to_hashes.each_with_index do |hotel_hash,index|
|
42
|
+
if index > range - 1
|
43
|
+
break
|
44
|
+
end
|
45
|
+
|
46
|
+
if(fields.include? :id)
|
47
|
+
hotel_array=[index+1]
|
48
|
+
end
|
49
|
+
|
50
|
+
fields.each do |field|
|
51
|
+
if hotel_hash.keys.include? field
|
52
|
+
hotel_array << hotel_hash[field]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
hotels_to_array << hotel_array
|
56
|
+
end
|
57
|
+
hotels_to_array
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.find_by_id(id)
|
61
|
+
@@all[id]
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
class HotelsOfHaiti::Scraper
|
4
|
+
|
5
|
+
URL="https://www.haiti-reference.com/pages/plan/geographie-et-tourisme/tourisme-en-haiti/hotels-provinces/"
|
6
|
+
|
7
|
+
|
8
|
+
def self.scrape_all
|
9
|
+
spinner = TTY::Spinner.new(":spinner Scraping hotels ...")
|
10
|
+
spinner.auto_spin
|
11
|
+
|
12
|
+
docs = Nokogiri::HTML(open(URL))
|
13
|
+
main_node=docs.css(".entry-content")
|
14
|
+
# each 'h4' is associated with a 'table' to form a the hotel
|
15
|
+
hotel_names=main_node.css("h4")
|
16
|
+
hotel_infos_table=main_node.css("table")
|
17
|
+
hotel_index=0
|
18
|
+
|
19
|
+
max_to_scrape=hotel_names.count
|
20
|
+
|
21
|
+
loop do
|
22
|
+
hotel = {}
|
23
|
+
|
24
|
+
name = hotel_names[hotel_index].text
|
25
|
+
hotel[:name]=name
|
26
|
+
|
27
|
+
table=hotel_infos_table[hotel_index].css('tbody tr')
|
28
|
+
table.each do |row|
|
29
|
+
#binding.pry
|
30
|
+
row_cells= row.css('td')
|
31
|
+
case row_cells[0].css('b').text.downcase.delete(" ")
|
32
|
+
when "adresse:"
|
33
|
+
address=row_cells[1].text.gsub("\n","")
|
34
|
+
hotel[:address]=address
|
35
|
+
when "e-mail:"
|
36
|
+
if(row_cells[1].text!="")
|
37
|
+
hotel[:email]=row_cells[1].text
|
38
|
+
end
|
39
|
+
when "téléphone:"
|
40
|
+
if(row_cells[1].text!="")
|
41
|
+
hotel[:phone]=row_cells[1].text
|
42
|
+
end
|
43
|
+
when "téléphones:"
|
44
|
+
if(row_cells[1].text!="")
|
45
|
+
hotel[:phone]=row_cells[1].text
|
46
|
+
end
|
47
|
+
when "siteweb:"
|
48
|
+
if(row_cells[1].text!="")
|
49
|
+
hotel[:website]=row_cells[1].text
|
50
|
+
end
|
51
|
+
when "no.dechambres:"
|
52
|
+
if(row_cells[1].text!="")
|
53
|
+
hotel[:number_of_rooms]=row_cells[1].text
|
54
|
+
end
|
55
|
+
when "tarifs:"
|
56
|
+
if(row_cells[1].text!="" || row_cells[1].text != "Non disponible")
|
57
|
+
hotel[:pricing]=row_cells[1].text
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
hotel_instance=Hotel.new(hotel)
|
62
|
+
break if hotel_index == max_to_scrape-1
|
63
|
+
hotel_index+=1
|
64
|
+
end
|
65
|
+
spinner.stop('Done!')
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hotels_of_haiti
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Gilbert Torchon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-11-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: nokogiri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: terminal-table
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tty-spinner
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description:
|
112
|
+
email:
|
113
|
+
- gilbert@noukod.com
|
114
|
+
executables:
|
115
|
+
- hotels_of_haiti
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- bin/console
|
128
|
+
- bin/hotels_of_haiti
|
129
|
+
- bin/setup
|
130
|
+
- config/environment.rb
|
131
|
+
- hotels_of_haiti.gemspec
|
132
|
+
- lib/hotels_of_haiti.rb
|
133
|
+
- lib/hotels_of_haiti/cli.rb
|
134
|
+
- lib/hotels_of_haiti/hotel.rb
|
135
|
+
- lib/hotels_of_haiti/scraper.rb
|
136
|
+
- lib/hotels_of_haiti/version.rb
|
137
|
+
homepage: https://github.com/GilTorch/hotels_of_haiti.git
|
138
|
+
licenses:
|
139
|
+
- MIT
|
140
|
+
metadata: {}
|
141
|
+
post_install_message:
|
142
|
+
rdoc_options: []
|
143
|
+
require_paths:
|
144
|
+
- lib
|
145
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
requirements: []
|
156
|
+
rubyforge_project:
|
157
|
+
rubygems_version: 2.7.6
|
158
|
+
signing_key:
|
159
|
+
specification_version: 4
|
160
|
+
summary: '"A CLI ruby gem to display a list of hotels in haiti and details about them
|
161
|
+
"'
|
162
|
+
test_files: []
|