collin-google_ajax_feed_api 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile.rb +1 -0
- data/lib/google_ajax_feed_api.rb +1 -1
- data/lib/google_ajax_feed_api/feed.rb +2 -2
- data/spec/feed_spec.rb +4 -0
- metadata +5 -5
data/Rakefile.rb
CHANGED
data/lib/google_ajax_feed_api.rb
CHANGED
@@ -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
|
-
|
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:
|
data/spec/feed_spec.rb
CHANGED
@@ -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.
|
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:
|
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/
|
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:
|