npr_cli_news_reader 1.0.0 → 1.0.1

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: e84a560e21395d64e3d60fd172abbd040f48d58dbea05eb1a90c200a1610a646
4
- data.tar.gz: b610e35446bcc0e1d314ca3ff90b311f257e360132691e82aa30b17fea22ccc9
3
+ metadata.gz: 7f9fe53b4fbb374f83380c2ac051f87c6f135296d2349b9f7531985944103e0d
4
+ data.tar.gz: 133e4070287daf2f3da2baf347190afcb4ac5d220325376f757a58dac7fab936
5
5
  SHA512:
6
- metadata.gz: fb772892317dd365e4d5b8dd02067b45ab11a848b77a6dea48ba06ffb9c942ad6247bf64d268b7638e00b0dc619f8f94510f5d3803d05cbdf89da560b5bdba02
7
- data.tar.gz: 6a39af3d47cd75659cd36c72bf1e24b153e0318f0515b1dd2297d44b5e4210f488224fcb1463e2ca165cec7e285ef8c7caea2bc33422b547b4e683f5051ee84f
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 = open("#{@@base_url}/sections/#{selected_category}")
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|
@@ -1,3 +1,3 @@
1
1
  module NprCliNewsReader
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -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 category selection."}
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.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-03-31 00:00:00.000000000 Z
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 or return to the category selection."'
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: []