collin-google_ajax_feed_api 0.0.3 → 0.0.4

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.
@@ -17,6 +17,7 @@ namespace :spec do
17
17
 
18
18
  task :doc => :prepare do
19
19
  system "spec #{@specs} --format specdoc"
20
+ system "mv doc/* ../google_ajax_feed_api_docs -r"
20
21
  end
21
22
  end
22
23
 
@@ -9,7 +9,7 @@ $LOAD_PATH << File.dirname(__FILE__)
9
9
  module Google #:nodoc:
10
10
  module Ajax #:nodoc:
11
11
  class Feed
12
- Version = "0.0.3"
12
+ Version = "0.0.4"
13
13
  end
14
14
 
15
15
  require 'google_ajax_feed_api/feed'
@@ -40,8 +40,8 @@ module Google #:nodoc:
40
40
  # Use of Feed#new is strongly discouraged
41
41
  def lookup url
42
42
  http_response = JSON.parse open(api.lookup_query(url)).read
43
- url = http_response["responseData"]["url"]
44
- new url
43
+ response = http_response["responseData"]
44
+ new(response.nil? ? nil : response["url"])
45
45
  end
46
46
 
47
47
  def api #:nodoc:
@@ -20,6 +20,10 @@ describe Google::Ajax::Feed do
20
20
  it "looks up feeds" do
21
21
  GAF.lookup('http://ajaxian.com').should_not be_nil
22
22
  end
23
+
24
+ it "does not accept non-feeds" do
25
+ GAF.lookup('http://google.com').should_not be_valid
26
+ end
23
27
 
24
28
  it "validates feeds" do
25
29
  GAF.new(nil).should_not be_valid
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collin-google_ajax_feed_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin Miller
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-22 00:00:00 -08:00
12
+ date: 2009-01-11 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -63,13 +63,13 @@ files:
63
63
  - lib/google_ajax_feed_api/api.rb
64
64
  - lib/google_ajax_feed_api/api
65
65
  - lib/google_ajax_feed_api/api/one_zero.rb
66
- - lib/google_ajax_feed_api/feed.rb
67
66
  - lib/google_ajax_feed_api/entry.rb
67
+ - lib/google_ajax_feed_api/feed.rb
68
68
  - lib/google_ajax_feed_api.rb
69
- - spec/helper.rb
69
+ - spec/api_spec.rb
70
70
  - spec/entry_spec.rb
71
+ - spec/helper.rb
71
72
  - spec/feed_spec.rb
72
- - spec/api_spec.rb
73
73
  has_rdoc: true
74
74
  homepage: http://github.com/collin/fold
75
75
  post_install_message: