rfeedreader 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Rfeedreader #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 11
5
+ TINY = 12
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/rfeedreader.rb CHANGED
@@ -14,15 +14,6 @@ module Rfeedreader
14
14
 
15
15
  class TextyHelper
16
16
 
17
- def TextyHelper.split_str(str, len = 10)
18
- # if str !~ /http:\/\//
19
- # fragment = /.{#{len}}/
20
- # str.split(/(\s+)/).map! { |word|
21
- # (/\s/ === word) ? word : word.gsub(fragment, '\0<wbr />')
22
- # }.join
23
- # end
24
- end
25
-
26
17
  def TextyHelper.clean(text, length)
27
18
  return text if text.empty?
28
19
 
@@ -222,7 +213,6 @@ module Rfeedreader
222
213
 
223
214
  TITLE_LENGTH = 45
224
215
  DESCRIPTION_LENGTH = 250
225
- WORD_LENGTH = 10
226
216
 
227
217
  def initialize(item, charset)
228
218
  @hpricot_item = item
@@ -268,10 +258,6 @@ module Rfeedreader
268
258
  truncate_length = DESCRIPTION_LENGTH
269
259
  truncate_length = Rfeedreader::DESCRIPTION_LENGTH if Rfeedreader.const_defined? "DESCRIPTION_LENGTH"
270
260
 
271
-
272
- word_length = WORD_LENGTH
273
- word_length = Rfeedreader::WORD_LENGTH if Rfeedreader.const_defined? "WORD_LENGTH"
274
-
275
261
  @description = TextyHelper.clean(@description, truncate_length)
276
262
  @description = TextyHelper.convertEncoding(@description, @charset)
277
263
 
@@ -282,7 +268,6 @@ module Rfeedreader
282
268
  @description.gsub!(/((https?):\/\/([^\/]+)\/(\S*))/, '[<a href=\'\1\'>link</a>]')
283
269
  @description.strip!
284
270
 
285
- @description = TextyHelper.split_str(@description, word_length)
286
271
  end
287
272
  end
288
273
 
@@ -368,10 +353,9 @@ module Rfeedreader
368
353
  return read_feed(uri, parse_entries=false)
369
354
  end
370
355
 
371
- def set_truncate_length(title = -1, description = -1, word_length = -1)
356
+ def set_truncate_length(title = -1, description = -1)
372
357
  const_set("TITLE_LENGTH", title)
373
358
  const_set("DESCRIPTION_LENGTH", description)
374
- const_set("WORD_LENGTH", word_length)
375
359
  end
376
360
 
377
361
  def open_doc(link)
@@ -244,7 +244,6 @@ class TestRfeedreader < Test::Unit::TestCase
244
244
  end
245
245
 
246
246
  def test_maria
247
- read_first "http://www.arfues.net/weblog/author/arnauh/feed"
248
- read_first "http://elsantacrucenio.com/index.php?option=com_rss&feed=rss0.91&no_html=1"
247
+ read_first "http://unamiradadesdeelsur.wordpress.com/"
249
248
  end
250
249
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rfeedreader
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.11
7
- date: 2008-03-05 00:00:00 +01:00
6
+ version: 1.0.12
7
+ date: 2008-03-12 00:00:00 +01:00
8
8
  summary: Feed parser to read feed and return first posts of this feed. Special parsing from sources like Flickr, Jumcut, Google video, ...
9
9
  require_paths:
10
10
  - lib