npr_cli_news_reader 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/.gitignore +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +32 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/npr_cli_news_reader +24 -0
- data/bin/setup +8 -0
- data/lib/npr_cli_news_reader/article.rb +34 -0
- data/lib/npr_cli_news_reader/cli.rb +84 -0
- data/lib/npr_cli_news_reader/scraper.rb +35 -0
- data/lib/npr_cli_news_reader/version.rb +3 -0
- data/lib/npr_cli_news_reader.rb +12 -0
- data/npr_cli_news_reader.gemspec +44 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0282b5253c821956490204a4adf96a3f885e4704a29f24c5a3b727f587606ede'
|
4
|
+
data.tar.gz: 0c39ac6ce0f78180f918516a021a53b12c68424ced4feb289dca848c0bae2f54
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5e667fdd0f7f01947aa464738464ead24113fcf83a514341e7d40ab8c8be8087fd5b81c398cf40162f20f1aaa39deee9ecb7a2956f2077a4b2b946ae6590ea4d
|
7
|
+
data.tar.gz: d5a4690e13a8455aa6787d0ac23d55a46ff4012ccce8c02da0d3e5736496c6857b0c3ce70561f21a9e4d11019d3cbc9cf43273474b2a56e5b957c90ecfd77584
|
data/.gitignore
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 'bballwiz4@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
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
npr_cli_news_reader (0.1.0)
|
5
|
+
nokogiri
|
6
|
+
rainbow
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
coderay (1.1.2)
|
12
|
+
method_source (0.9.2)
|
13
|
+
mini_portile2 (2.4.0)
|
14
|
+
nokogiri (1.10.9)
|
15
|
+
mini_portile2 (~> 2.4.0)
|
16
|
+
pry (0.12.2)
|
17
|
+
coderay (~> 1.1.0)
|
18
|
+
method_source (~> 0.9.0)
|
19
|
+
rainbow (3.0.0)
|
20
|
+
rake (10.5.0)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
bundler (~> 2.0)
|
27
|
+
npr_cli_news_reader!
|
28
|
+
pry
|
29
|
+
rake (~> 10.0)
|
30
|
+
|
31
|
+
BUNDLED WITH
|
32
|
+
2.0.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 'Jake Garcia'
|
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,46 @@
|
|
1
|
+
# NprCliNewsReader
|
2
|
+
|
3
|
+
This Gem allows a user to choose from a list of news categories. The ClI then displays the articles from npr.org that are under the selected category. Then the user can select a specific article. Once an article is selected then the full article will be displayed. Once the user gets to the end of the article they have a choice to exit the program or return to the category selection.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'npr_cli_news_reader'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install npr_cli_news_reader
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
In Terminal enter:
|
24
|
+
|
25
|
+
ruby -Ilib ./bin/npr_cli_news_reader
|
26
|
+
|
27
|
+
This command will start up the CLI application
|
28
|
+
|
29
|
+
|
30
|
+
## Development
|
31
|
+
|
32
|
+
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.
|
33
|
+
|
34
|
+
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).
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/'jGarcia4444'/npr_cli_news_reader. 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.
|
39
|
+
|
40
|
+
## License
|
41
|
+
|
42
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
43
|
+
|
44
|
+
## Code of Conduct
|
45
|
+
|
46
|
+
Everyone interacting in the NprCliNewsReader project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/'jGarcia4444'/npr_cli_news_reader/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 "npr_cli_news_reader"
|
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__)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require_relative "../lib/npr_cli_news_reader"
|
4
|
+
|
5
|
+
cli = NprCliNewsReader::CLI.new
|
6
|
+
|
7
|
+
while !cli.done
|
8
|
+
cli.greeting
|
9
|
+
cli.display_article_categories
|
10
|
+
puts "Which category would you like to see news articles for?"
|
11
|
+
puts "(Enter the # associated with the category)"
|
12
|
+
category_input = gets.strip
|
13
|
+
cli.handle_category_input(category_input)
|
14
|
+
puts "Which article would you like to read?"
|
15
|
+
puts "(Enter the number associated with the article):"
|
16
|
+
selected_article = gets.strip
|
17
|
+
cli.handle_article_input(selected_article)
|
18
|
+
puts "Would you like to go back to the category selection or exit the program?"
|
19
|
+
puts "(enter home or exit)"
|
20
|
+
end_of_program_input = gets.strip.downcase
|
21
|
+
cli.restart_or_exit(end_of_program_input)
|
22
|
+
end
|
23
|
+
|
24
|
+
|
data/bin/setup
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
class NprCliNewsReader::Article
|
2
|
+
|
3
|
+
attr_accessor :category, :title, :short_description, :full_article, :article_url
|
4
|
+
|
5
|
+
@@all = []
|
6
|
+
|
7
|
+
def initialize(article_attributes)
|
8
|
+
article_attributes.each { |k, v| self.send("#{k}=", v.strip) }
|
9
|
+
@@all << self
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.all
|
13
|
+
@@all
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find_by_category(filter)
|
17
|
+
self.all.detect {|article| article.category == filter}
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.find_or_create_articles(filter)
|
21
|
+
if self.find_by_category(filter) == nil
|
22
|
+
NprCliNewsReader::Scraper.get_articles("/sections/#{filter}")
|
23
|
+
else
|
24
|
+
self.sort_articles(filter)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.sort_articles(filter)
|
29
|
+
self.all.select {|article| article.category == filter}
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
class NprCliNewsReader::CLI
|
2
|
+
|
3
|
+
attr_accessor :done, :selected_category
|
4
|
+
|
5
|
+
@sorted_articles = []
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@categories = ["National", "World", "Politics", "Business", "Health", "Science", "Technology", "Race & Culture"]
|
9
|
+
@done = false
|
10
|
+
end
|
11
|
+
|
12
|
+
def greeting
|
13
|
+
puts
|
14
|
+
puts "--------Hello fellow fact finder!--------"
|
15
|
+
puts
|
16
|
+
puts "---Welcome to the NPR CLI News Reader----"
|
17
|
+
puts
|
18
|
+
end
|
19
|
+
|
20
|
+
def display_article_categories
|
21
|
+
puts "----Article Categories----"
|
22
|
+
@categories.each_with_index {|category, i| puts "#{i + 1}.) #{Rainbow(category).bright}"}
|
23
|
+
end
|
24
|
+
|
25
|
+
def valid_input?(user_input, collection)
|
26
|
+
if user_input.to_i > 0 && user_input.to_i <= collection.size
|
27
|
+
return true
|
28
|
+
else
|
29
|
+
return false
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def handle_category_input(user_input)
|
34
|
+
if valid_input?(user_input, @categories)
|
35
|
+
categories_index = user_input.to_i - 1
|
36
|
+
@selected_category = @categories[categories_index].downcase
|
37
|
+
NprCliNewsReader::Article.find_or_create_articles(@selected_category)
|
38
|
+
@sorted_articles = NprCliNewsReader::Article.sort_articles(@selected_category)
|
39
|
+
display_articles
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def display_articles
|
44
|
+
puts "----- #{Rainbow(@sorted_articles.first.category.capitalize).bright} Category -----"
|
45
|
+
@sorted_articles.each_with_index do |article, i|
|
46
|
+
sleep(0.5)
|
47
|
+
puts "#{i + 1}). #{Rainbow(article.title).bright}"
|
48
|
+
puts "#{article.short_description}"
|
49
|
+
puts "-------------------"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def handle_article_input(user_input)
|
54
|
+
if valid_input?(user_input, @sorted_articles)
|
55
|
+
article_index = user_input.to_i - 1
|
56
|
+
selected_article = @sorted_articles[article_index]
|
57
|
+
puts 'Loading...'
|
58
|
+
full_article = NprCliNewsReader::Scraper.get_full_article(selected_article.article_url)
|
59
|
+
selected_article.full_article = full_article
|
60
|
+
sleep(2)
|
61
|
+
display_selected_article(selected_article)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def display_selected_article(article)
|
66
|
+
puts '-------------------'
|
67
|
+
puts Rainbow(article.title).bright
|
68
|
+
article.full_article.each { |text| puts "#{text}\n"}
|
69
|
+
puts '(END)'
|
70
|
+
end
|
71
|
+
|
72
|
+
def restart_or_exit(user_input)
|
73
|
+
if user_input == 'home'
|
74
|
+
puts "Redisplaying categories"
|
75
|
+
sleep(1)
|
76
|
+
elsif user_input == 'exit'
|
77
|
+
puts "Thanks for using NPR CLI News Reader."
|
78
|
+
puts "Goodbye!"
|
79
|
+
@done = true
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class NprCliNewsReader::Scraper
|
2
|
+
|
3
|
+
# Return an array of articles, all attributes set except for full_article
|
4
|
+
def self.get_articles(category_url)
|
5
|
+
html = open("https://www.npr.org#{category_url}")
|
6
|
+
doc = Nokogiri::HTML(html)
|
7
|
+
category = category_url.split("/")[2]
|
8
|
+
articles = doc.css("article.item")
|
9
|
+
self.get_and_set_article_attributes(articles, category)
|
10
|
+
end
|
11
|
+
|
12
|
+
#loop over article_nodes grabbing the relevant data for the Article attributes
|
13
|
+
def self.get_and_set_article_attributes(article_nodes, category)
|
14
|
+
article_nodes.each do |article|
|
15
|
+
anchor_tag = article.css('.teaser a')
|
16
|
+
article_attributes = {
|
17
|
+
category: category,
|
18
|
+
title: article.css('.title').text,
|
19
|
+
short_description: article.css('.teaser').text,
|
20
|
+
article_url: anchor_tag.attribute('href').to_s
|
21
|
+
}
|
22
|
+
NprCliNewsReader::Article.new(article_attributes)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_full_article(article_url)
|
27
|
+
html = open(article_url)
|
28
|
+
doc = Nokogiri::HTML(html)
|
29
|
+
full_article_container = doc.css('#storytext')
|
30
|
+
content = full_article_container.css('p')
|
31
|
+
text_array = content.map {|p_element| p_element.text.strip}
|
32
|
+
text_array
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require_relative "./npr_cli_news_reader/version"
|
2
|
+
require_relative "./npr_cli_news_reader/cli"
|
3
|
+
require_relative "./npr_cli_news_reader/scraper"
|
4
|
+
require_relative "./npr_cli_news_reader/article"
|
5
|
+
require 'open-uri'
|
6
|
+
require 'nokogiri'
|
7
|
+
require 'rainbow'
|
8
|
+
|
9
|
+
module NprCliNewsReader
|
10
|
+
class Error < StandardError; end
|
11
|
+
# Your code goes here...
|
12
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "npr_cli_news_reader/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "npr_cli_news_reader"
|
8
|
+
spec.version = NprCliNewsReader::VERSION
|
9
|
+
spec.authors = ["'Jake Garcia'"]
|
10
|
+
spec.email = ["'bballwiz4@gmail.com'"]
|
11
|
+
|
12
|
+
spec.summary = %q{"A CLI that allows users to read news articles from npr.org."}
|
13
|
+
spec.description = %q{"This Gem allows a user to choose from a list of news categories. The ClI then displays the articles from npr.org that are under the selected category. Then the user can select a specific article. Once an article is selected then the full article will be displayed. Once the user gets to the end of the article they have a choice to exit the program or return to the category selection."}
|
14
|
+
spec.homepage = "https://github.com/jgarcia4444/npr_cli_news_reader.git"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["allowed_push_host"] = 'https://RubyGems.org'
|
21
|
+
|
22
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
23
|
+
spec.metadata["source_code_uri"] = "https://github.com/jgarcia4444/npr_cli_news_reader.git"
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/jgarcia4444/npr_cli_news_reader.git"
|
25
|
+
else
|
26
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
27
|
+
"public gem pushes."
|
28
|
+
end
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = "exe"
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "pry"
|
42
|
+
spec.add_dependency "nokogiri"
|
43
|
+
spec.add_dependency "rainbow"
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: npr_cli_news_reader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- "'Jake Garcia'"
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-03-24 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: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
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: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
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: rainbow
|
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
|
+
description: '"This Gem allows a user to choose from a list of news categories. The
|
84
|
+
ClI then displays the articles from npr.org that are under the selected category.
|
85
|
+
Then the user can select a specific article. Once an article is selected then the
|
86
|
+
full article will be displayed. Once the user gets to the end of the article they
|
87
|
+
have a choice to exit the program or return to the category selection."'
|
88
|
+
email:
|
89
|
+
- "'bballwiz4@gmail.com'"
|
90
|
+
executables: []
|
91
|
+
extensions: []
|
92
|
+
extra_rdoc_files: []
|
93
|
+
files:
|
94
|
+
- ".gitignore"
|
95
|
+
- CODE_OF_CONDUCT.md
|
96
|
+
- Gemfile
|
97
|
+
- Gemfile.lock
|
98
|
+
- LICENSE.txt
|
99
|
+
- README.md
|
100
|
+
- Rakefile
|
101
|
+
- bin/console
|
102
|
+
- bin/npr_cli_news_reader
|
103
|
+
- bin/setup
|
104
|
+
- lib/npr_cli_news_reader.rb
|
105
|
+
- lib/npr_cli_news_reader/article.rb
|
106
|
+
- lib/npr_cli_news_reader/cli.rb
|
107
|
+
- lib/npr_cli_news_reader/scraper.rb
|
108
|
+
- lib/npr_cli_news_reader/version.rb
|
109
|
+
- npr_cli_news_reader.gemspec
|
110
|
+
homepage: https://github.com/jgarcia4444/npr_cli_news_reader.git
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata:
|
114
|
+
allowed_push_host: https://RubyGems.org
|
115
|
+
homepage_uri: https://github.com/jgarcia4444/npr_cli_news_reader.git
|
116
|
+
source_code_uri: https://github.com/jgarcia4444/npr_cli_news_reader.git
|
117
|
+
changelog_uri: https://github.com/jgarcia4444/npr_cli_news_reader.git
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubygems_version: 3.0.3
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: '"A CLI that allows users to read news articles from npr.org."'
|
137
|
+
test_files: []
|