gotascii-crags 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/crags.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{crags}
3
- s.version = "1.2.5"
3
+ s.version = "1.2.6"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Justin Marney"]
@@ -48,8 +48,12 @@ module Crags
48
48
  {:title => title, :url => url, :date => date}
49
49
  end
50
50
 
51
+ def search_location_link(keyword, loc, category = 'sss')
52
+ "http://#{loc}/search/#{category}?query=#{keyword}"
53
+ end
54
+
51
55
  def search_location(keyword, loc, category = 'sss', &block)
52
- doc = fetch_doc("http://#{loc}/search/#{category}?query=#{keyword}&format=rss")
56
+ doc = fetch_doc("#{search_location_link(keyword, loc, category)}&format=rss")
53
57
  items(doc).collect do |item|
54
58
  yield item if block_given?
55
59
  item
data/lib/crags.rb CHANGED
@@ -3,7 +3,7 @@ require 'curb'
3
3
  require 'hpricot'
4
4
 
5
5
  module Crags
6
- VERSION = '1.2.5'
6
+ VERSION = '1.2.6'
7
7
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
8
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotascii-crags
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Marney