gotascii-crags 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/crags.gemspec CHANGED
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{crags}
3
- s.version = "1.0.2"
3
+ s.version = "1.1.0"
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"]
7
- s.date = %q{2009-01-30}
7
+ s.date = %q{2009-01-31}
8
8
  s.description = %q{A library to help search across multiple craigslist locations.}
9
9
  s.email = %q{gotascii@gmail.com}
10
10
  s.extra_rdoc_files = ["History.txt", "README.txt", "lib/js/client.html"]
@@ -17,17 +17,4 @@ Gem::Specification.new do |s|
17
17
  s.rubygems_version = %q{1.3.1}
18
18
  s.summary = %q{A library to help search across multiple craigslist locations}
19
19
  s.test_files = ["test/crags/fetch_test.rb", "test/crags/proxy_test.rb", "test/crags/runner_test.rb", "test/crags/searcher_test.rb"]
20
-
21
- if s.respond_to? :specification_version then
22
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
- s.specification_version = 2
24
-
25
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
- s.add_development_dependency(%q<bones>, [">= 2.1.1"])
27
- else
28
- s.add_dependency(%q<bones>, [">= 2.1.1"])
29
- end
30
- else
31
- s.add_dependency(%q<bones>, [">= 2.1.1"])
32
- end
33
20
  end
data/lib/crags.rb CHANGED
@@ -3,7 +3,7 @@ require 'curb'
3
3
  require 'hpricot'
4
4
 
5
5
  module Crags
6
- VERSION = '1.0.2'
6
+ VERSION = '1.1.0'
7
7
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
8
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
9
 
@@ -11,7 +11,7 @@ module Crags
11
11
  end
12
12
 
13
13
  def locations
14
- location_links.collect{|link| link["href"] }
14
+ location_links.collect{|link| link["href"].gsub(/http\:\/\/(.*)\//,'\1') }
15
15
  end
16
16
 
17
17
  def categories
@@ -21,7 +21,7 @@ context "Searcher with stubbed fetch doc" do
21
21
  specify "locations should return array of urls using a location link's href" do
22
22
  links = []
23
23
  2.times do |i|
24
- links << mock {|m| m.expects(:[]).with("href").returns("url#{i}") }
24
+ links << mock {|m| m.expects(:[]).with("href").returns("http://url#{i}/") }
25
25
  end
26
26
  stubs(:location_links).returns(links)
27
27
  locations.should == ["url0", "url1"]
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.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Marney
@@ -9,18 +9,10 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-30 00:00:00 -08:00
12
+ date: 2009-01-31 00:00:00 -08:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: bones
17
- version_requirement:
18
- version_requirements: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.1.1
23
- version:
14
+ dependencies: []
15
+
24
16
  description: A library to help search across multiple craigslist locations.
25
17
  email: gotascii@gmail.com
26
18
  executables: []