top-headlines 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69a64c2e0e854732484489a18aa7216dc5624a38
4
- data.tar.gz: d45aef0a56a7ca1419d04419bf3951268e2305f1
3
+ metadata.gz: 18a04861f9e8ec16bdb8cad13363f477d9181829
4
+ data.tar.gz: 91b075f928689b14a9db065a9eb089daf91d34d8
5
5
  SHA512:
6
- metadata.gz: 65307c1c2b1f22140ee7fb7736a6b5fcdde3025749198f351d83f1433d8fbe8ddf33123eb9fc0827b3825a76e07526db7d0a04dd3edd665929097018a7d5296c
7
- data.tar.gz: 854da69febe17708f6bde650e4e3f5e6bbf0d18db8bb4c48e8f7b0f56623d2e663120f68b9030fe14bfc3129ae78a81dcd930901684c3334d779a778a3a1213c
6
+ metadata.gz: e2f354b01e0f05ebde920e3d1e8526acdc1ed5ff284e61e6080b56fa3c36e59a84a0865cb019e7e26280d56bf29e07fdc2400eb8695c18b38053d05266ed19d6
7
+ data.tar.gz: d6d6274abf21b0c6965766d4f5fed656080ab6fc3636e98c58026224a5278ab7bd6c258579b0ee5136a6e94faf654d796d00f3f226a8005e434bff9d0c0d10ef
@@ -94,7 +94,7 @@ class TopHeadlines::CLI
94
94
  print "\nYOUR SELECTION: "
95
95
  @num = gets.strip.upcase
96
96
 
97
- while @num[-1].to_i.between?(1,5) && !num_included_in_menu_if_statements
97
+ while @num[-1].to_i.between?(1,5) && !num_included_in_menu_if_statement
98
98
  source = @num[0...-1].strip.upcase
99
99
  headline = @num.strip[-1].to_i
100
100
 
@@ -106,7 +106,7 @@ class TopHeadlines::CLI
106
106
  @num = gets.strip.upcase
107
107
  end
108
108
 
109
- num_included_in_menu_if_statements ? @input = @num : invalid_entry
109
+ num_included_in_menu_if_statement ? @input = @num : invalid_entry
110
110
  menu_if_statement
111
111
  end
112
112
 
@@ -115,7 +115,7 @@ class TopHeadlines::CLI
115
115
  print "\nYOUR SELECTION: "
116
116
  @num = gets.strip.upcase
117
117
 
118
- while @num.to_i.between?(1,5) && !num_included_in_menu_if_statements
118
+ while @num.to_i.between?(1,5) && !num_included_in_menu_if_statement
119
119
  open_url(@input, @num)
120
120
 
121
121
  sleep(1)
@@ -123,10 +123,10 @@ class TopHeadlines::CLI
123
123
  print "\nYOUR SELECTION: "
124
124
  @num = gets.strip.upcase
125
125
 
126
- @input = @num if num_included_in_menu_if_statements
126
+ @input = @num if num_included_in_menu_if_statement
127
127
  end
128
128
 
129
- num_included_in_menu_if_statements ? @input = @num : invalid_entry
129
+ num_included_in_menu_if_statement ? @input = @num : invalid_entry
130
130
  menu_if_statement
131
131
  end
132
132
 
@@ -140,7 +140,7 @@ class TopHeadlines::CLI
140
140
  url != nil ? system("open", url) : invalid_entry
141
141
  end
142
142
 
143
- def num_included_in_menu_if_statements
143
+ def num_included_in_menu_if_statement
144
144
  @num == "EXIT" || @num == "ALL" || @num == "SOURCES" || source_includes?(@num)
145
145
  end
146
146
 
@@ -3,8 +3,8 @@ class TopHeadlines::Source
3
3
  SOURCES = {
4
4
  "CNN" => {
5
5
  url: "http://www.cnn.com/",
6
- headlines_selector: "div.column.zn__column--idx-1 span.cd__headline-text",
7
- urls_selector: "div.column.zn__column--idx-1",
6
+ headlines_selector: ".cd__headline",
7
+ urls_selector: ".cd__headline",
8
8
  child_selector: "a"
9
9
  },
10
10
  "MSNBC" => {
@@ -1,3 +1,3 @@
1
1
  module TopHeadlines
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -6,7 +6,7 @@ require 'top-headlines/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "top-headlines"
8
8
  spec.version = TopHeadlines::VERSION
9
- spec.authors = ["zachnewburgh"]
9
+ spec.authors = ["Zach Newburgh"]
10
10
  spec.email = ["zach.newburgh@gmail.com"]
11
11
 
12
12
  spec.summary = %q{This gem allows users to view the top headlines from major news sources. Users can open the headlines in the browser directly from the command line for articles from AP, BBC, Bloomberg, CNN, Daily Beast, FiveThirtyEight, Forbes, Fox News, Guardian, Huffington Post, MSNBC, New York Times, Politico, Wall Street Journal, Washington Post, and Yahoo News.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top-headlines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - zachnewburgh
7
+ - Zach Newburgh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.4.5.1
128
+ rubygems_version: 2.4.8
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: This gem allows users to view the top headlines from major news sources.