columbus 0.1.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.
@@ -0,0 +1,11 @@
1
+ HTTP/1.0 302 Moved Temporarily
2
+ Date: Thu, 26 Mar 2009 01:18:38 GMT
3
+ Server: Apache
4
+ X-FB-Host: chi-write6
5
+ Location: http://feeds2.feedburner.com/railstips
6
+ Content-Length: 0
7
+ P3P: CP="ALL DSP COR NID CUR OUR NOR"
8
+ Keep-Alive: timeout=30, max=100
9
+ Connection: keep-alive
10
+ Content-Type: text/plain; charset=UTF-8
11
+
@@ -0,0 +1,40 @@
1
+ require 'test_helper'
2
+
3
+ class LinkTest < Test::Unit::TestCase
4
+ context "Initialization" do
5
+ setup do
6
+ @link = Columbus::Link.new('http://railstips.org', 'http://feeds.feedburner.com/railstips', 'Railstips')
7
+ end
8
+
9
+ should "accept a url" do
10
+ @link.url.should == 'http://railstips.org'
11
+ end
12
+
13
+ should "accept an href" do
14
+ @link.href.should == 'http://feeds.feedburner.com/railstips'
15
+ end
16
+
17
+ should "accept a title" do
18
+ @link.title.should == 'Railstips'
19
+ end
20
+ end
21
+
22
+ should "have clean_title" do
23
+ link = Columbus::Link.new
24
+ link.title = " Foo\n"
25
+ link.clean_title.should == "Foo"
26
+ end
27
+
28
+ context "absolute url" do
29
+ should "be href if href is absolute" do
30
+ link = Columbus::Link.new('http://railstips.org', 'http://railstips.org/feed/atom.xml')
31
+ link.absolute_url.should == 'http://railstips.org/feed/atom.xml'
32
+ end
33
+
34
+ should "be url plus href if href is root relative" do
35
+ link = Columbus::Link.new('http://railstips.org', '/feed/atom.xml')
36
+ link.absolute_url.should == 'http://railstips.org/feed/atom.xml'
37
+ end
38
+ end
39
+
40
+ end
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+ require 'matchy'
5
+ require 'fakeweb'
6
+
7
+ FakeWeb.allow_net_connect = false
8
+
9
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
10
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
11
+ require 'columbus'
12
+
13
+ class Test::Unit::TestCase
14
+ def fixture_file(file)
15
+ File.read(File.join(File.dirname(__FILE__), 'fixtures', file))
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: columbus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - John Nunemaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-04-02 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: nunemaker@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.rdoc
24
+ - LICENSE
25
+ files:
26
+ - README.rdoc
27
+ - VERSION.yml
28
+ - lib/columbus/feed.rb
29
+ - lib/columbus/link.rb
30
+ - lib/columbus/redirect_follower.rb
31
+ - lib/columbus.rb
32
+ - test/columbus_test.rb
33
+ - test/feed_test.rb
34
+ - test/fixtures/railsquicktips.html
35
+ - test/fixtures/railstips.html
36
+ - test/fixtures/railstips_feedburner.html
37
+ - test/fixtures/railstips_redirect
38
+ - test/link_test.rb
39
+ - test/test_helper.rb
40
+ - LICENSE
41
+ has_rdoc: true
42
+ homepage: http://github.com/jnunemaker/columbus
43
+ licenses: []
44
+
45
+ post_install_message:
46
+ rdoc_options:
47
+ - --inline-source
48
+ - --charset=UTF-8
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: "0"
56
+ version:
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: "0"
62
+ version:
63
+ requirements: []
64
+
65
+ rubyforge_project: columbus
66
+ rubygems_version: 1.3.5
67
+ signing_key:
68
+ specification_version: 2
69
+ summary: Autodiscovers feeds from urls
70
+ test_files: []
71
+