top_ten 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c941534084a04b5bb9118d51eaad56dcd7ffd397d151f919ab6c21317648c8ab
4
- data.tar.gz: c501729e3d7ab50c24744c454bd2f145a72dc50717797254830d202f8a51c531
3
+ metadata.gz: 6e5df68a11a7ef1f07cf98a3bdc2c44c1b2a893db6509448dc7721e8513ae5b7
4
+ data.tar.gz: ff005e034a0d0b7ba7f4c0982bcde4f41503e75af5d93929bed4ab36830c44d3
5
5
  SHA512:
6
- metadata.gz: 5f07505d555d772403efe108726abc647fa31d88bf7b44e8c50a72a22df0c271090151c697e790cd796452847799e6481030e897b66e7d7243913052ad8128d2
7
- data.tar.gz: 6a6abb8232498ad343aa39596581f046616a8027acdfeeaf439d9e2befe6f334c7b2a17fb44579301b45147d90c9f2013ae479d3255b3d2648a373b363992db5
6
+ metadata.gz: 1f4ac841d0b13a0c7a8d169bd41a8cfedea2aed7f6f8d71889749b30f2a14352ddc47a6a1a6d555a1a33cbb7ca6dfdf98a72adda1b3fc9eec31c9132996c7f4b
7
+ data.tar.gz: ae2809485fbdee53c879b436dc1f3403a7d3b96397c90c6078247a073ca677f0c29dbf37351476e67daa77d66b5b37119afe542e7f6e293d624aef04b7c7554e
data/bin/top_ten CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require './lib/top_ten'
3
+ require 'bundler/setup'
4
+ require './lib/top_ten.rb'
4
5
 
5
6
  TopTen::CLI.new.call
@@ -1,3 +1,3 @@
1
1
  module TopTen
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/top_ten.rb CHANGED
@@ -5,6 +5,7 @@ require_relative './top_ten/cli'
5
5
  require_relative './top_ten/top'
6
6
  require_relative './top_ten/scraper'
7
7
 
8
+ require 'require_all'
8
9
  require 'pry'
9
10
  require 'Nokogiri'
10
11
  require 'open-uri'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top_ten
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alavia
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.11.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: require_all
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.5.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.5.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: nokogiri
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -75,26 +89,12 @@ executables:
75
89
  extensions: []
76
90
  extra_rdoc_files: []
77
91
  files:
78
- - ".DS_Store"
79
- - ".gitignore"
80
- - CODE_OF_CONDUCT.md
81
- - Gemfile
82
- - Gemfile.lock
83
- - LICENSE.txt
84
- - README.md
85
- - Rakefile
86
- - bin/console
87
- - bin/setup
88
92
  - bin/top_ten
89
93
  - lib/top_ten.rb
90
94
  - lib/top_ten/cli.rb
91
95
  - lib/top_ten/scraper.rb
92
96
  - lib/top_ten/top.rb
93
97
  - lib/top_ten/version.rb
94
- - spec.md
95
- - top_ten-0.1.0.gem
96
- - top_ten-0.1.1.gem
97
- - top_ten.gemspec
98
98
  homepage: https://github.com/alavia/top_ten
99
99
  licenses:
100
100
  - MIT
data/.DS_Store DELETED
Binary file
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
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 alavia.yahya@gmail.com. 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 DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in top_ten.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,30 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- top_ten (0.1.2)
5
- nokogiri
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- coderay (1.1.0)
11
- method_source (0.9.0)
12
- mini_portile2 (2.3.0)
13
- nokogiri (1.8.2)
14
- mini_portile2 (~> 2.3.0)
15
- pry (0.11.3)
16
- coderay (~> 1.1.0)
17
- method_source (~> 0.9.0)
18
- rake (10.4.2)
19
-
20
- PLATFORMS
21
- ruby
22
-
23
- DEPENDENCIES
24
- bundler (~> 1.16)
25
- pry (~> 0.11.3)
26
- rake (~> 10.0)
27
- top_ten!
28
-
29
- BUNDLED WITH
30
- 1.16.1
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 Alavia
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 DELETED
@@ -1,41 +0,0 @@
1
- # TopTen
2
-
3
- Welcome! This gem will teach you about Lonely Planet's Best in Travel Top 10 Countries to Visit in 2018.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'top_ten'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install top_ten
20
-
21
- ## Usage
22
-
23
- Type ```$ top_ten``` after installing the gem to run the application.
24
-
25
- ## Development
26
-
27
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
-
29
- 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).
30
-
31
- ## Contributing
32
-
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/alavia/top_ten. 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.
34
-
35
- ## License
36
-
37
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
38
-
39
- ## Code of Conduct
40
-
41
- Everyone interacting in the TopTen project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/top_ten/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "top_ten"
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/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/spec.md DELETED
@@ -1,15 +0,0 @@
1
- # Specifications for the CLI Assessment
2
-
3
- Specs:
4
- - [x] Have a CLI for interfacing with the application
5
-
6
- A CLI class has been created which interacts with the user based on the user's input. When the bin file is run, a new CLI object is instantiated and calls the CLI 'call' method on that object. The 'call' method then runs the methods being called inside of it. Some of these methods use data from the other classes in the application. These other classes have been required by the environment (top_ten.rb), which has been required by the bin file.
7
- - [x] Pull data from an external source
8
-
9
- The scraper class uses Nokogiri to pull data from lonelyplanet.com. Then the ruby method 'collect' is used to iterate over the array and CSS selectors drill down to retrieve the necessary data.
10
- - [x] Implement both list and detail views
11
-
12
- When the program is executed, the list of countries is displayed to the user. Based on the user's input, the selected country's details will be displayed. The list can be displayed again when the user inputs 'list.'
13
-
14
-
15
-
data/top_ten-0.1.0.gem DELETED
Binary file
data/top_ten-0.1.1.gem DELETED
Binary file
data/top_ten.gemspec DELETED
@@ -1,32 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "top_ten/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "top_ten"
8
- spec.version = TopTen::VERSION
9
- spec.authors = ["Alavia"]
10
- spec.email = ["alavia.yahya@gmail.com"]
11
-
12
- spec.summary = "Scrapes Lonely Planet website to display top 10 countries to visit in 2018 with details about countries."
13
- spec.description = "This gem will teach you about Lonely Planet's Best in Travel Top 10 Countries to Visit in 2018."
14
- spec.homepage = "https://github.com/alavia/top_ten"
15
- spec.license = "MIT"
16
- spec.files = ["lib/top_ten/top.rb", "lib/top_ten/scraper.rb", "lib/top_ten/cli.rb", "lib/top_ten/version.rb", "lib/top_ten.rb"]
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
- f.match(%r{^(test|spec|features)/})
20
- end
21
- spec.bindir = "bin"
22
- spec.executables = ["top_ten"]
23
- spec.require_paths = ["lib"]
24
-
25
- spec.add_development_dependency "bundler", "~> 1.16"
26
- spec.add_development_dependency "rake", "~> 10.0"
27
- spec.add_development_dependency "pry", "~> 0.11.3"
28
-
29
- spec.add_dependency "nokogiri"
30
-
31
-
32
- end