google_reader 1.0.1 → 1.0.2

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.
data/README.textile CHANGED
@@ -28,11 +28,12 @@ p item.author_unknown?
28
28
  p item.author
29
29
  p item.source
30
30
  p item.liking_users
31
+ p item.summary
31
32
  </code></pre>
32
33
 
33
34
  h2. Ruby Library
34
35
 
35
- google_reader's specifications are certified to run on MRI 1.9.2 and JRuby 1.6.0 (in 1.8 mode).
36
+ google_reader's specifications are certified to run on MRI 1.9.2, MRI 1.8.7, REE 1.8.7-2011-03, Rubinius head (2011/05/03) and JRuby 1.6.0 (in 1.8 mode).
36
37
 
37
38
  h2. LICENSE
38
39
 
@@ -32,6 +32,13 @@ module GoogleReader
32
32
  end
33
33
  end
34
34
 
35
+ def summary
36
+ node = @entry.search("summary")
37
+ return nil unless node
38
+ return nil if node.respond_to?(:null?) && node.null?
39
+ node.text
40
+ end
41
+
35
42
  def published_at
36
43
  Time.parse(@entry.search("published").first.text)
37
44
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleReader
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/spec/entry_spec.rb CHANGED
@@ -29,6 +29,11 @@ describe GoogleReader::Entry, "where the author is known, and the updated timest
29
29
  subject.source.title.should == "select * from depesz where 1 < 41 and 1 > 41 and \"public\".sometable = 'asdf';"
30
30
  end
31
31
 
32
+ it "should HTML unescape the summary's content" do
33
+ unescaped_summary = %(Today, on Stack Overflow there was interesting question. Generally, given table that looks like this: room | people | price | hotel 1 | 1 | 200 | A 2 | 2 | 99 | A 3 | 3 | 95 | A 4 | 1 | 90 | B 5 | 6 | 300 [...]<img src="http://feeds.feedburner.com/~r/depesz/~4/5LKjrsu7JnQ" height="1" width="1">)
34
+ subject.summary.should == unescaped_summary
35
+ end
36
+
32
37
  it { subject.published_at.should == Time.utc(2011, 4, 27, 13, 28, 53) }
33
38
  it { subject.updated_at.should == Time.utc(2011, 4, 28, 14, 28, 53) }
34
39
  it { subject.href.should == "http://www.depesz.com/index.php/2011/04/27/find-cheapest-combination-of-rooms-in-hotels/" }
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_reader
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
5
+ version: 1.0.2
11
6
  platform: ruby
12
7
  authors:
13
8
  - "Fran\xC3\xA7ois Beausoleil"
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-05-03 00:00:00 -04:00
13
+ date: 2011-05-04 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ~>
28
23
  - !ruby/object:Gem::Version
29
- hash: 13
30
- segments:
31
- - 1
32
- - 6
33
- - 1
34
24
  version: 1.6.1
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ~>
44
34
  - !ruby/object:Gem::Version
45
- hash: 15
46
- segments:
47
- - 1
48
- - 4
49
- - 4
50
35
  version: 1.4.4
51
36
  type: :runtime
52
37
  version_requirements: *id002
@@ -58,9 +43,6 @@ dependencies:
58
43
  requirements:
59
44
  - - ">="
60
45
  - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 0
64
46
  version: "0"
65
47
  type: :development
66
48
  version_requirements: *id003
@@ -106,18 +88,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
88
  requirements:
107
89
  - - ">="
108
90
  - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 0
112
91
  version: "0"
113
92
  required_rubygems_version: !ruby/object:Gem::Requirement
114
93
  none: false
115
94
  requirements:
116
95
  - - ">="
117
96
  - !ruby/object:Gem::Version
118
- hash: 3
119
- segments:
120
- - 0
121
97
  version: "0"
122
98
  requirements: []
123
99