gotascii-crags 1.2.6 → 1.2.7

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.6"
3
+ s.version = "1.2.7"
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"]
data/lib/crags.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  require 'rubygems'
2
2
  require 'curb'
3
3
  require 'hpricot'
4
+ require "erb"
4
5
 
5
6
  module Crags
6
- VERSION = '1.2.6'
7
+ VERSION = '1.2.7'
7
8
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
9
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
10
 
@@ -1,6 +1,7 @@
1
1
  module Crags
2
2
  module Searcher
3
3
  include Fetch
4
+ include ERB::Util
4
5
 
5
6
  def strip_http(url)
6
7
  url.gsub(/http\:\/\/(.*)(\/|(.html))/,'\1\3')
@@ -49,7 +50,7 @@ module Crags
49
50
  end
50
51
 
51
52
  def search_location_link(keyword, loc, category = 'sss')
52
- "http://#{loc}/search/#{category}?query=#{keyword}"
53
+ "http://#{loc}/search/#{category}?query=#{url_encode(keyword)}"
53
54
  end
54
55
 
55
56
  def search_location(keyword, loc, category = 'sss', &block)
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.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Marney