jakal 0.1.94 → 0.1.95

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.
Files changed (2) hide show
  1. data/lib/jkl.rb +2 -8
  2. metadata +2 -2
data/lib/jkl.rb CHANGED
@@ -16,11 +16,8 @@ module Jkl
16
16
  end
17
17
  end
18
18
 
19
- def topix_links(keyphrase)
20
- url = YAML::load_file('config/config.yml')['topix'] ||
21
- "http://www.topix.net/rss/search/article?q="
19
+ def topix_links(keyphrase, url = "http://www.topix.net/rss/search/article?q=")
22
20
  links("#{url}#{keyphrase}")
23
- rescue Errno::ENOENT
24
21
  end
25
22
 
26
23
  def tags(key, link)
@@ -28,11 +25,8 @@ module Jkl
28
25
  Jkl::Extraction::tags(key, text)
29
26
  end
30
27
 
31
- def trends
32
- url = YAML::load_file('config/config.yml')['twitter'] ||
33
- "http://search.twitter.com/trends.json"
28
+ def trends(url = "http://search.twitter.com/trends.json")
34
29
  JSON.parse(Jkl::get_from(url))["trends"].map{|t| t["name"]}
35
- rescue Errno::ENOENT
36
30
  end
37
31
  end
38
32
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 94
9
- version: 0.1.94
8
+ - 95
9
+ version: 0.1.95
10
10
  platform: ruby
11
11
  authors:
12
12
  - sshingler