npr_cli_news_reader 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/npr_cli_news_reader/scraper.rb +6 -1
- data/lib/npr_cli_news_reader/version.rb +1 -1
- data/npr_cli_news_reader.gemspec +1 -1
- data/to_do_notes.md +11 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f9fe53b4fbb374f83380c2ac051f87c6f135296d2349b9f7531985944103e0d
|
4
|
+
data.tar.gz: 133e4070287daf2f3da2baf347190afcb4ac5d220325376f757a58dac7fab936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846e3b8a82efe9a52a163654f7b9af178da26faa0685af08cb53cb5a9adc1882d640f7d014637f8e6eb6491243b704ee88a85af8a5f383a233caa08d1db54c1c
|
7
|
+
data.tar.gz: 6b3700ace56f81c2bc437a61359d4ad2c6a6efa9e942491148ce446c49fc7c9f67dc5242796c4181b6a412c69d5d2f74b8b792f09a87ce434cf5d15042d23758
|
@@ -6,7 +6,12 @@ class NprCliNewsReader::Scraper
|
|
6
6
|
if NprCliNewsReader::Article.all.detect {|article| article.category == selected_category}
|
7
7
|
return
|
8
8
|
else
|
9
|
-
html =
|
9
|
+
html = ""
|
10
|
+
if selected_category == "race & culture"
|
11
|
+
html = open("#{@@base_url}/sections/codeswitch")
|
12
|
+
else
|
13
|
+
html = open("#{@@base_url}/sections/#{selected_category}")
|
14
|
+
end
|
10
15
|
doc = Nokogiri::HTML(html)
|
11
16
|
articles = doc.css('article.item')
|
12
17
|
articles.each do |article|
|
data/npr_cli_news_reader.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["'bballwiz4@gmail.com'"]
|
11
11
|
|
12
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
|
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, return to the category selection, or return to the previous article selection."}
|
14
14
|
spec.homepage = "https://github.com/jgarcia4444/npr_cli_news_reader.git"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/to_do_notes.md
CHANGED
@@ -9,4 +9,15 @@ TO DO NOTES
|
|
9
9
|
- description
|
10
10
|
- usage
|
11
11
|
- installation process
|
12
|
+
|
13
|
+
Instructions when used as a gem
|
14
|
+
- in gemspec file
|
15
|
+
- spec.add_dependency "npr_cli_news_reader"
|
16
|
+
- fix TODO:'s in the gemspec
|
17
|
+
- from terminal in project directory
|
18
|
+
- ./bin/setup
|
19
|
+
- irb
|
20
|
+
- require 'npr_cli_news_reader'
|
21
|
+
- NprCliNewsReader::CLI.new.call
|
22
|
+
|
12
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: npr_cli_news_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'Jake Garcia'"
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,7 +84,8 @@ description: '"This Gem allows a user to choose from a list of news categories.
|
|
84
84
|
ClI then displays the articles from npr.org that are under the selected category.
|
85
85
|
Then the user can select a specific article. Once an article is selected then the
|
86
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
|
87
|
+
have a choice to exit the program, return to the category selection, or return to
|
88
|
+
the previous article selection."'
|
88
89
|
email:
|
89
90
|
- "'bballwiz4@gmail.com'"
|
90
91
|
executables: []
|