npr_cli_news_reader 0.1.5 → 0.1.6
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/npr_cli_news_reader/run.rb +21 -0
- data/lib/npr_cli_news_reader/version.rb +1 -1
- data/lib/npr_cli_news_reader.rb +5 -1
- metadata +2 -2
- data/npr_cli_news_reader-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3d1494149abc549590a196cb173c462d6d1a02b6d37589b9acf16fe3b9284dd
|
4
|
+
data.tar.gz: 7e1bc074a9ca00e9a390ad62cf303ba46d1891ff81e15d8cc276973474ca1d2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73ca5aa455e9ae2889e1e097ef2aa8854afd9acbce2f9fe0f379b0f279de17db3fe07f35b797a9af6ee8bb03ee0313813cecdbeb4ebaeaea4faec841257b6ef
|
7
|
+
data.tar.gz: 4e9f31ed6618a465b7357dfb079cfefb48d812ebc7d5a087d913aa4414cdb0343519ad73a89550ee75c0658f7b15ac6cf1937ce03dcc81d12a04c81a20b93120
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
class NprCliNewsReader::Run
|
2
|
+
def self.start
|
3
|
+
cli = NprCliNewsReader::CLI.new
|
4
|
+
while !cli.done
|
5
|
+
cli.greeting
|
6
|
+
cli.display_article_categories
|
7
|
+
puts "Which category would you like to see news articles for?"
|
8
|
+
puts "(Enter the # associated with the category)"
|
9
|
+
category_input = gets.strip
|
10
|
+
cli.handle_category_input(category_input)
|
11
|
+
puts "Which article would you like to read?"
|
12
|
+
puts "(Enter the number associated with the article):"
|
13
|
+
selected_article = gets.strip
|
14
|
+
cli.handle_article_input(selected_article)
|
15
|
+
puts "Would you like to go back to the category selection or exit the program?"
|
16
|
+
puts "(enter home or exit)"
|
17
|
+
end_of_program_input = gets.strip.downcase
|
18
|
+
cli.restart_or_exit(end_of_program_input)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/npr_cli_news_reader.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
require_relative './npr_cli_news_reader/article'
|
2
|
+
require_relative './npr_cli_news_reader/cli'
|
3
|
+
require_relative './npr_cli_news_reader/run'
|
4
|
+
require_relative './npr_cli_news_reader/scraper'
|
1
5
|
require 'open-uri'
|
2
6
|
require 'nokogiri'
|
3
7
|
require 'rainbow'
|
4
|
-
|
8
|
+
|
5
9
|
|
6
10
|
module NprCliNewsReader
|
7
11
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: npr_cli_news_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'Jake Garcia'"
|
@@ -104,9 +104,9 @@ files:
|
|
104
104
|
- lib/npr_cli_news_reader.rb
|
105
105
|
- lib/npr_cli_news_reader/article.rb
|
106
106
|
- lib/npr_cli_news_reader/cli.rb
|
107
|
+
- lib/npr_cli_news_reader/run.rb
|
107
108
|
- lib/npr_cli_news_reader/scraper.rb
|
108
109
|
- lib/npr_cli_news_reader/version.rb
|
109
|
-
- npr_cli_news_reader-0.1.0.gem
|
110
110
|
- npr_cli_news_reader.gemspec
|
111
111
|
homepage: https://github.com/jgarcia4444/npr_cli_news_reader.git
|
112
112
|
licenses:
|
Binary file
|