ruby-feedparser 0.9.3 → 0.9.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: feb0a565c28188688406869df9f99fa8ade5ca5b
4
+ data.tar.gz: c85f306c3e6b503d4b3bf589f2b4c94ac46f1bc2
5
+ SHA512:
6
+ metadata.gz: 45c841e5939b8c48d2d91263a7133674ae5ed54c3205466ecebf6d24aeb5336a5067dc748b245e3e9fcba3322f76404f5a6a76ecdf9f001baf04afc209d283b5
7
+ data.tar.gz: f75ad92e95cbf027d7f23fe4f62854782d952948f7fad0e15c058a8b4291431cca41eb03561b49642697999660c9865cbfcb93a9a627c6674ab4fc2a4ad648fa
@@ -1,22 +1,29 @@
1
- Ruby-Feedparser 0.7 (27/07/2009)
2
- ================================
1
+ # 0.9.4 (25/03/2016)
2
+
3
+ Bug fixes:
4
+
5
+ * feedparser: relax exception check for Magic errors; by Eric Wong
6
+ * Always sort author list to avoid unecessary invalidation of caches; by Sébastien Dailly
7
+
8
+ # 0.7 (27/07/2009)
9
+
3
10
  * Handled several creators per feed item
4
11
  * Fix bug with urls into tag attributes
5
12
  * Better item categories support
6
13
  * Reworked text output formatting
7
14
  * Ignore ­, as some blog software (dotclear2) misuse it.
8
15
 
9
- Ruby-Feedparser 0.6 (23/07/2008)
10
- ================================
11
- * Moved to_human_readable from class Fixnum to class Integer.
16
+ # 0.6 (23/07/2008)
17
+
18
+ * Moved `to_human_readable` from class Fixnum to class Integer.
12
19
  * Correctly parse http://www.tbray.org/ongoing/ongoing.atom. Thanks
13
20
  to Janico Greifenberg for reporting this.
14
21
  * String#html2text now takes an additional wrapto parameter, allowing
15
22
  to wrap the text to a specified number of chars. Thanks to
16
23
  Maxime Petazzoni for the patch.
17
24
 
18
- Ruby-Feedparser 0.5 (26/10/2007)
19
- ================================
25
+ # 0.5 (26/10/2007)
26
+
20
27
  * Fixed a bug with items with both non-escaped and escaped HTML. Reported,
21
28
  then patch provided by Gregory Hartman <gghartma@cs.cmu.edu>.
22
29
  * In Atom feeds, use the date provided in <updated>, and use it in
@@ -27,33 +34,33 @@ Ruby-Feedparser 0.5 (26/10/2007)
27
34
  * Make checks for HTML tags case-insensitive. Broke Dilbert feeds!!
28
35
  Reported by Michal Čihař. Closes gna bug #10199.
29
36
 
30
- Ruby-Feedparser 0.4 (01/05/2007)
31
- ================================
37
+ # 0.4 (01/05/2007)
38
+
32
39
  * Fixed a problem with html entities in the items' titles.
33
40
  * Date was not fetched for blogspot's atom feeds.
34
41
  Patch from Jason Ling <jason.ling@jeyel.com>.
35
42
  * Tests are now timezone-friendly. (closes GNA bug #8145).
36
43
  * Much nicer text output.
37
44
 
38
- Ruby-Feedparser 0.3 (01/12/2006)
39
- ================================
45
+ # 0.3 (01/12/2006)
46
+
40
47
  * Much nicer HTML output
41
48
  * Fixed a problem with some feeds with broken enclosures (without url)
42
- * Now automatically fixes non-absolute <a href> or <img src>
49
+ * Now automatically fixes non-absolute `<a href>` or `<img src>`
43
50
  * Fixed small parser bugs
44
51
  * Now displays enclosures in the text and html outputs. Ready for
45
52
  podcasting :-)
46
53
  * Now escape title, creator, subject and category internally. This minor
47
54
  fix avoids &amp; stuff in the titles, for example.
48
55
 
49
- Ruby-Feedparser 0.2 (05/06/2006)
50
- ================================
56
+ * 0.2 (05/06/2006)
57
+
51
58
  * Fixed a problem when parsing some ATOM feeds with <link> without type
52
59
  attribute. (Thanks Michal Cihar !)
53
60
  * FeedParser::Feed and FeedParser::FeedItem now have an xml attribute to
54
61
  get the related REXML::Element.
55
62
  * <enclosure/> support in RSS.
56
63
 
57
- Ruby-Feedparser 0.1 (24/11/2005)
58
- ================================
64
+ # 0.1 (24/11/2005)
65
+
59
66
  * first public release.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'find'
8
8
  PKG_NAME = 'ruby-feedparser'
9
9
  PKG_VERSION = `ruby -Ilib -rfeedparser/feedparser -e 'puts FeedParser::VERSION'`.strip
10
10
 
11
- PKG_FILES = [ 'ChangeLog', 'README', 'COPYING', 'LICENSE', 'setup.rb', 'Rakefile']
11
+ PKG_FILES = [ 'ChangeLog.md', 'README', 'COPYING', 'LICENSE', 'setup.rb', 'Rakefile']
12
12
  Find.find('lib/', 'test/', 'tools/') do |f|
13
13
  if FileTest.directory?(f) and f =~ /\.svn/
14
14
  Find.prune
@@ -82,3 +82,10 @@ begin
82
82
  rescue LoadError
83
83
  puts "Will not generate gem."
84
84
  end
85
+
86
+ task :release => :repackage do
87
+ sh 'git', 'tag', 'v' + PKG_VERSION
88
+ sh 'git', 'push'
89
+ sh 'git', 'push', '--tags'
90
+ sh 'gem' 'push', Dir['pkg/*.gem']
91
+ end
@@ -9,7 +9,7 @@ require 'uri'
9
9
 
10
10
  module FeedParser
11
11
 
12
- VERSION = "0.9.3"
12
+ VERSION = "0.9.4"
13
13
 
14
14
  class UnknownFeedTypeException < RuntimeError
15
15
  end
@@ -18,7 +18,8 @@ module FeedParser
18
18
  encoding = nil
19
19
  begin
20
20
  encoding = Magic.guess_string_mime_encoding(str)
21
- rescue Magic::Exception
21
+ rescue => e
22
+ raise unless e.class.to_s =~ /\AMagic::(?:Exception|Error)\z/
22
23
  # this happens when magic does not find any content at all, e.g. with
23
24
  # strings that contain only whitespace. In these case it *should* be safe
24
25
  # to assume UTF-8
@@ -199,7 +200,8 @@ module FeedParser
199
200
  when 1
200
201
  return creators[0]
201
202
  else
202
- return creators[0...-1].join(", ")+" and "+creators[-1]
203
+ sorted_creators = creators.sort
204
+ return sorted_creators[0...-1].join(", ") + " and " + sorted_creators[-1]
203
205
  end
204
206
  end
205
207
 
@@ -119,6 +119,10 @@ class FeedParserTest < Test::Unit::TestCase
119
119
  assert_equal 'UTF-8', FeedParser.recode("áéíóú").encoding.name
120
120
  end
121
121
 
122
+ def test_recode_blank
123
+ assert_equal 'UTF-8', FeedParser.recode('').encoding.name
124
+ end
125
+
122
126
  def test_recode_iso88519
123
127
  assert_equal 'UTF-8', FeedParser.recode("áéíóú".encode('iso-8859-1')).encoding.name
124
128
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-feedparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
5
- prerelease:
4
+ version: 0.9.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Lucas Nussbaum
9
8
  autorequire: feedparser
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2016-03-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: magic
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: Ruby library to parse ATOM and RSS feeds
@@ -33,12 +30,12 @@ executables: []
33
30
  extensions: []
34
31
  extra_rdoc_files: []
35
32
  files:
36
- - ChangeLog
37
- - README
38
33
  - COPYING
34
+ - ChangeLog.md
39
35
  - LICENSE
40
- - setup.rb
36
+ - README
41
37
  - Rakefile
38
+ - lib/feedparser.rb
42
39
  - lib/feedparser/feedparser.rb
43
40
  - lib/feedparser/filesizes.rb
44
41
  - lib/feedparser/html-output.rb
@@ -47,7 +44,7 @@ files:
47
44
  - lib/feedparser/sgml-parser.rb
48
45
  - lib/feedparser/text-output.rb
49
46
  - lib/feedparser/textconverters.rb
50
- - lib/feedparser.rb
47
+ - setup.rb
51
48
  - test/tc_feed_parse.rb
52
49
  - test/tc_html2text_parser.rb
53
50
  - test/tc_htmloutput.rb
@@ -59,27 +56,26 @@ files:
59
56
  - tools/doctoweb.bash
60
57
  homepage:
61
58
  licenses: []
59
+ metadata: {}
62
60
  post_install_message:
63
61
  rdoc_options: []
64
62
  require_paths:
65
63
  - lib
66
64
  required_ruby_version: !ruby/object:Gem::Requirement
67
- none: false
68
65
  requirements:
69
- - - ! '>='
66
+ - - ">="
70
67
  - !ruby/object:Gem::Version
71
68
  version: '0'
72
69
  required_rubygems_version: !ruby/object:Gem::Requirement
73
- none: false
74
70
  requirements:
75
- - - ! '>='
71
+ - - ">="
76
72
  - !ruby/object:Gem::Version
77
73
  version: '0'
78
74
  requirements:
79
75
  - none
80
76
  rubyforge_project:
81
- rubygems_version: 1.8.23
77
+ rubygems_version: 2.5.1
82
78
  signing_key:
83
- specification_version: 3
79
+ specification_version: 4
84
80
  summary: Ruby library to parse ATOM and RSS feeds
85
81
  test_files: []