ratom 0.6.3 → 0.6.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.
- data/.gitignore +4 -0
- data/History.txt +7 -0
- data/{License.txt → LICENSE} +0 -0
- data/{README.txt → README.rdoc} +1 -1
- data/Rakefile +58 -4
- data/VERSION.yml +5 -0
- data/lib/atom.rb +25 -10
- data/spec/atom_spec.rb +32 -0
- data/spec/fixtures/complex_single_entry.atom +1 -1
- data/spec/fixtures/entry_with_custom_extensions.atom +7 -0
- data/spec/fixtures/entry_with_simple_extensions.atom +30 -0
- data/spec/fixtures/entry_with_single_custom_extension.atom +6 -0
- data/spec/property.rb +31 -0
- metadata +53 -47
- data/Manifest.txt +0 -54
- data/config/hoe.rb +0 -72
- data/config/requirements.rb +0 -17
- data/lib/atom/version.rb +0 -15
- data/setup.rb +0 -1585
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/rspec.rake +0 -17
- data/tasks/website.rake +0 -17
- data/website/index.html +0 -11
- data/website/index.txt +0 -39
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.rhtml +0 -48
data/.gitignore
ADDED
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 0.6.4
|
2
|
+
|
3
|
+
* Remove Hoe dependency and converted to a Jeweler based project build.
|
4
|
+
* Fixed error when assigning nil to node['xml:lang'] [George Guimarães].
|
5
|
+
* Handle link@title. [Brian Dewey]
|
6
|
+
* SimpleExtensions#[] returns a namespace hash if localname is not given. [Daniel Vartanov]
|
7
|
+
|
1
8
|
== 0.6.3 2009-11-19
|
2
9
|
|
3
10
|
* Removed extraneous logging.
|
data/{License.txt → LICENSE}
RENAMED
File without changes
|
data/{README.txt → README.rdoc}
RENAMED
@@ -280,7 +280,7 @@ The source repository is accessible via GitHub:
|
|
280
280
|
|
281
281
|
== Contact Information
|
282
282
|
|
283
|
-
The project page is at http://
|
283
|
+
The project page is at http://github.com/seangeo/ratom. Please file any bugs or feedback
|
284
284
|
using the trackers and forums there.
|
285
285
|
|
286
286
|
== Authors and Contributors
|
data/Rakefile
CHANGED
@@ -1,4 +1,58 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "ratom"
|
8
|
+
gem.summary = %Q{Atom Syndication and Publication API}
|
9
|
+
gem.description = %Q{A fast Atom Syndication and Publication API based on libxml}
|
10
|
+
gem.email = "seangeo@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/seangeo/ratom"
|
12
|
+
gem.rubyforge_project = 'ratom'
|
13
|
+
gem.authors = ["Peerworks", "Sean Geoghegan"]
|
14
|
+
gem.add_development_dependency "rspec"
|
15
|
+
gem.add_dependency 'libxml-ruby', '>= 1.1.2'
|
16
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
|
+
end
|
18
|
+
Jeweler::GemcutterTasks.new
|
19
|
+
Jeweler::RubyforgeTasks.new do |rf|
|
20
|
+
rf.doc_task = 'rdoc'
|
21
|
+
end
|
22
|
+
rescue LoadError
|
23
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
require 'spec/rake/spectask'
|
28
|
+
Spec::Rake::SpecTask.new do |t|
|
29
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
30
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
31
|
+
end
|
32
|
+
|
33
|
+
begin
|
34
|
+
require 'rcov/rcovtask'
|
35
|
+
Rcov::RcovTask.new do |test|
|
36
|
+
test.libs << 'test'
|
37
|
+
test.pattern = 'test/**/test_*.rb'
|
38
|
+
test.verbose = true
|
39
|
+
end
|
40
|
+
rescue LoadError
|
41
|
+
task :rcov do
|
42
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
task :spec => :check_dependencies
|
47
|
+
|
48
|
+
task :default => :spec
|
49
|
+
|
50
|
+
require 'rake/rdoctask'
|
51
|
+
Rake::RDocTask.new do |rdoc|
|
52
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
53
|
+
|
54
|
+
rdoc.rdoc_dir = 'rdoc'
|
55
|
+
rdoc.title = "ratom #{version}"
|
56
|
+
rdoc.rdoc_files.include('README*')
|
57
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
58
|
+
end
|
data/VERSION.yml
ADDED
data/lib/atom.rb
CHANGED
@@ -31,19 +31,34 @@ module Atom # :nodoc:
|
|
31
31
|
#
|
32
32
|
module SimpleExtensions
|
33
33
|
attr_reader :simple_extensions
|
34
|
-
|
34
|
+
|
35
35
|
# Gets a simple extension value for a given namespace and local name.
|
36
36
|
#
|
37
37
|
# +ns+:: The namespace.
|
38
38
|
# +localname+:: The local name of the extension element.
|
39
39
|
#
|
40
|
-
def [](
|
41
|
-
|
42
|
-
|
40
|
+
def [](namespace, localname=nil)
|
41
|
+
@simple_extensions ||= {}
|
42
|
+
|
43
|
+
localname.nil? ? namespace_hash(namespace) : element_values(namespace, localname)
|
44
|
+
end
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
def namespace_hash(namespace)
|
49
|
+
namespace_keys = @simple_extensions.keys.select { |key| key =~ /^\{#{namespace},/ }
|
50
|
+
|
51
|
+
elements = {}
|
52
|
+
namespace_keys.each do |key|
|
53
|
+
attribute_name = key.match(/\{.*,(.*)\}/)[1]
|
54
|
+
elements[attribute_name] = @simple_extensions[key]
|
43
55
|
end
|
44
|
-
|
45
|
-
|
46
|
-
|
56
|
+
elements
|
57
|
+
end
|
58
|
+
|
59
|
+
def element_values(namespace, localname)
|
60
|
+
key = "{#{namespace},#{localname}}"
|
61
|
+
@simple_extensions[key] ||= ValueProxy.new
|
47
62
|
end
|
48
63
|
|
49
64
|
class ValueProxy < DelegateClass(Array)
|
@@ -282,7 +297,7 @@ module Atom # :nodoc:
|
|
282
297
|
def to_xml(nodeonly = true, name = 'content', namespace = nil, namespace_map = Atom::Xml::NamespaceMap.new)
|
283
298
|
node = XML::Node.new("#{namespace_map.prefix(Atom::NAMESPACE, name)}")
|
284
299
|
node['type'] = 'xhtml'
|
285
|
-
node['xml:lang'] = self.xml_lang
|
300
|
+
node['xml:lang'] = self.xml_lang.to_s
|
286
301
|
|
287
302
|
div = XML::Node.new('div')
|
288
303
|
div['xmlns'] = XHTML
|
@@ -678,7 +693,7 @@ module Atom # :nodoc:
|
|
678
693
|
end
|
679
694
|
|
680
695
|
include Xml::Parseable
|
681
|
-
attribute :href, :rel, :type, :length, :hreflang
|
696
|
+
attribute :href, :rel, :type, :length, :hreflang, :title
|
682
697
|
|
683
698
|
# Create a link.
|
684
699
|
#
|
@@ -693,7 +708,7 @@ module Atom # :nodoc:
|
|
693
708
|
raise ArgumentError, "Link created with node other than atom:link: #{o.name}"
|
694
709
|
end
|
695
710
|
when Hash
|
696
|
-
[:href, :rel, :type, :length, :hreflang].each do |attr|
|
711
|
+
[:href, :rel, :type, :length, :hreflang, :title].each do |attr|
|
697
712
|
self.send("#{attr}=", o[attr])
|
698
713
|
end
|
699
714
|
else
|
data/spec/atom_spec.rb
CHANGED
@@ -381,6 +381,10 @@ describe Atom do
|
|
381
381
|
it "should have 'http://example.org/2005/04/02/atom' string representation" do
|
382
382
|
@link.to_s.should == 'http://example.org/2005/04/02/atom'
|
383
383
|
end
|
384
|
+
|
385
|
+
it "should have title 'Alternate link'" do
|
386
|
+
@link.title.should == "Alternate link"
|
387
|
+
end
|
384
388
|
end
|
385
389
|
|
386
390
|
describe 'enclosure link' do
|
@@ -1046,6 +1050,29 @@ describe Atom do
|
|
1046
1050
|
it "should load simple extension 3 xml for entry" do
|
1047
1051
|
@entry["http://example.org/example3", 'simple3'].should == ['<ContinuityOfCareRecord xmlns="urn:astm-org:CCR">Simple Entry Value (NS2)</ContinuityOfCareRecord>']
|
1048
1052
|
end
|
1053
|
+
|
1054
|
+
describe "when only namespace is provided" do
|
1055
|
+
before :each do
|
1056
|
+
@example_elements = @entry["http://example.org/example"]
|
1057
|
+
@example2_elements = @entry['http://example2.org/example2']
|
1058
|
+
@example3_elements = @entry['http://example.org/example3']
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
it "should return namespace elements as a hash" do
|
1062
|
+
@example_elements.should == {
|
1063
|
+
'simple1' => ['Simple1 Entry Value'],
|
1064
|
+
'simple2' => ['Simple2', 'Simple2a']
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
@example2_elements.should == {
|
1068
|
+
'simple1' => ['Simple Entry Value (NS2)']
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
@example3_elements.should == {
|
1072
|
+
'simple3' => ['<ContinuityOfCareRecord xmlns="urn:astm-org:CCR">Simple Entry Value (NS2)</ContinuityOfCareRecord>']
|
1073
|
+
}
|
1074
|
+
end
|
1075
|
+
end
|
1049
1076
|
end
|
1050
1077
|
|
1051
1078
|
describe 'writing simple extensions' do
|
@@ -1232,6 +1259,11 @@ describe Atom do
|
|
1232
1259
|
txt.should == "<p>This is some text</p>"
|
1233
1260
|
txt.type.should == "xhtml"
|
1234
1261
|
end
|
1262
|
+
|
1263
|
+
it "should be renderable to xml" do
|
1264
|
+
txt = Atom::Content::Xhtml.new("<p>This is some text</p>")
|
1265
|
+
txt.to_xml.should_not raise_error("TypeError")
|
1266
|
+
end
|
1235
1267
|
end
|
1236
1268
|
|
1237
1269
|
describe 'Atom::Category initializer' do
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<category term="atom" scheme="http://example.org" label="Atom" />
|
16
16
|
<entry>
|
17
17
|
<title>Atom draft-07 snapshot</title>
|
18
|
-
<link rel="alternate" type="text/html"
|
18
|
+
<link rel="alternate" type="text/html" title="Alternate link"
|
19
19
|
href="http://example.org/2005/04/02/atom"/>
|
20
20
|
<link rel="enclosure" type="audio/mpeg" length="1337"
|
21
21
|
href="http://example.org/audio/ph34r_my_podcast.mp3"/>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:custom='http://custom.namespace'>
|
3
|
+
<id>https://custom.namespace/id/1</id>
|
4
|
+
<link rel='self' type='application/atom+xml' href='https://custom.namespace/id/1'/>
|
5
|
+
<custom:property name='foo' value='bar'/>
|
6
|
+
<custom:property name='baz' value='bat'/>
|
7
|
+
</entry>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:ex="http://example.org/example" xmlns:ex2="http://example2.org/example2" xmlns:ex3="http://example.org/example3">
|
3
|
+
|
4
|
+
<title>Example Feed</title>
|
5
|
+
<link href="http://example.org/"/>
|
6
|
+
<updated>2003-12-13T18:30:02Z</updated>
|
7
|
+
<author>
|
8
|
+
<name>John Doe</name>
|
9
|
+
</author>
|
10
|
+
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
|
11
|
+
<ex:simple1>Simple1 Value</ex:simple1>
|
12
|
+
<ex:simple-empty/>
|
13
|
+
<ex:title>Extension Title</ex:title>
|
14
|
+
|
15
|
+
<entry>
|
16
|
+
<title>Atom-Powered Robots Run Amok</title>
|
17
|
+
<link href="http://example.org/2003/12/13/atom03"/>
|
18
|
+
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
|
19
|
+
<content type="html">This <em>is</em> html.</content>
|
20
|
+
<updated>2003-12-13T18:30:02Z</updated>
|
21
|
+
<summary>Some text.</summary>
|
22
|
+
<ex:simple1>Simple1 Entry Value</ex:simple1>
|
23
|
+
<ex:simple2>Simple2</ex:simple2>
|
24
|
+
<ex:simple2>Simple2a</ex:simple2>
|
25
|
+
<ex2:simple1>Simple Entry Value (NS2)</ex2:simple1>
|
26
|
+
<ex3:simple3><ContinuityOfCareRecord xmlns="urn:astm-org:CCR">Simple Entry Value (NS2)</ContinuityOfCareRecord></ex3:simple3>
|
27
|
+
<category term="atom" scheme="http://example.org" label="Atom" ex:attribute="extension" />
|
28
|
+
</entry>
|
29
|
+
|
30
|
+
</feed>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:custom='http://single.custom.namespace'>
|
3
|
+
<id>https://custom.namespace/id/1</id>
|
4
|
+
<link rel='self' type='application/atom+xml' href='https://single.custom.namespace/id/1'/>
|
5
|
+
<custom:singleproperty name='foo' value='bar'/>
|
6
|
+
</entry>
|
data/spec/property.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
module Atom
|
2
|
+
module Extensions
|
3
|
+
class Property
|
4
|
+
include Atom::Xml::Parseable
|
5
|
+
|
6
|
+
namespace "http://custom.namespace"
|
7
|
+
attribute :name, :value
|
8
|
+
|
9
|
+
def initialize(name = nil, value = nil)
|
10
|
+
if name && value
|
11
|
+
initialize_with_o :name => name, :value => value
|
12
|
+
else
|
13
|
+
initialize_with_o(name) { yield if block_given? }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize_with_o(o = nil)
|
18
|
+
case o
|
19
|
+
when String, XML::Reader
|
20
|
+
parse o, :once => true
|
21
|
+
when Hash
|
22
|
+
o.each do |name,value|
|
23
|
+
self.send :"#{name}=", value
|
24
|
+
end
|
25
|
+
else
|
26
|
+
yield(self) if block_given?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 6
|
8
|
+
- 4
|
9
|
+
version: 0.6.4
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Peerworks
|
@@ -10,55 +15,55 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date:
|
18
|
+
date: 2010-04-02 00:00:00 +10:30
|
14
19
|
default_executable:
|
15
20
|
dependencies:
|
16
21
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
18
|
-
|
19
|
-
|
20
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
25
|
requirements:
|
22
26
|
- - ">="
|
23
27
|
- !ruby/object:Gem::Version
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
name: hoe
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
28
31
|
type: :development
|
29
|
-
|
30
|
-
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: libxml-ruby
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
38
|
- - ">="
|
33
39
|
- !ruby/object:Gem::Version
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
40
|
+
segments:
|
41
|
+
- 1
|
42
|
+
- 1
|
43
|
+
- 2
|
44
|
+
version: 1.1.2
|
45
|
+
type: :runtime
|
46
|
+
version_requirements: *id002
|
47
|
+
description: A fast Atom Syndication and Publication API based on libxml
|
48
|
+
email: seangeo@gmail.com
|
38
49
|
executables: []
|
39
50
|
|
40
51
|
extensions: []
|
41
52
|
|
42
53
|
extra_rdoc_files:
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- Manifest.txt
|
46
|
-
- README.txt
|
47
|
-
- website/index.txt
|
54
|
+
- LICENSE
|
55
|
+
- README.rdoc
|
48
56
|
files:
|
57
|
+
- .gitignore
|
49
58
|
- History.txt
|
50
|
-
-
|
51
|
-
-
|
52
|
-
- README.txt
|
59
|
+
- LICENSE
|
60
|
+
- README.rdoc
|
53
61
|
- Rakefile
|
54
|
-
-
|
55
|
-
- config/requirements.rb
|
62
|
+
- VERSION.yml
|
56
63
|
- lib/atom.rb
|
64
|
+
- lib/atom/configuration.rb
|
57
65
|
- lib/atom/pub.rb
|
58
|
-
- lib/atom/version.rb
|
59
66
|
- lib/atom/xml/parser.rb
|
60
|
-
- lib/atom/configuration.rb
|
61
|
-
- setup.rb
|
62
67
|
- spec/app/member_entry.atom
|
63
68
|
- spec/app/service.xml
|
64
69
|
- spec/atom/pub_spec.rb
|
@@ -83,49 +88,50 @@ files:
|
|
83
88
|
- spec/fixtures/complex_single_entry.atom
|
84
89
|
- spec/fixtures/created_entry.atom
|
85
90
|
- spec/fixtures/entry.atom
|
91
|
+
- spec/fixtures/entry_with_custom_extensions.atom
|
92
|
+
- spec/fixtures/entry_with_simple_extensions.atom
|
93
|
+
- spec/fixtures/entry_with_single_custom_extension.atom
|
86
94
|
- spec/fixtures/multiple_entry.atom
|
87
95
|
- spec/fixtures/simple_single_entry.atom
|
88
96
|
- spec/fixtures/with_stylesheet.atom
|
89
97
|
- spec/paging/first_paged_feed.atom
|
90
98
|
- spec/paging/last_paged_feed.atom
|
91
99
|
- spec/paging/middle_paged_feed.atom
|
100
|
+
- spec/property.rb
|
92
101
|
- spec/spec.opts
|
93
102
|
- spec/spec_helper.rb
|
94
|
-
- tasks/deployment.rake
|
95
|
-
- tasks/environment.rake
|
96
|
-
- tasks/rspec.rake
|
97
|
-
- tasks/website.rake
|
98
|
-
- website/index.html
|
99
|
-
- website/index.txt
|
100
|
-
- website/javascripts/rounded_corners_lite.inc.js
|
101
|
-
- website/stylesheets/screen.css
|
102
|
-
- website/template.rhtml
|
103
103
|
has_rdoc: true
|
104
|
-
homepage: http://ratom
|
104
|
+
homepage: http://github.com/seangeo/ratom
|
105
|
+
licenses: []
|
106
|
+
|
105
107
|
post_install_message:
|
106
108
|
rdoc_options:
|
107
|
-
- --
|
108
|
-
- README.txt
|
109
|
+
- --charset=UTF-8
|
109
110
|
require_paths:
|
110
111
|
- lib
|
111
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
114
|
- - ">="
|
114
115
|
- !ruby/object:Gem::Version
|
116
|
+
segments:
|
117
|
+
- 0
|
115
118
|
version: "0"
|
116
|
-
version:
|
117
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
120
|
requirements:
|
119
121
|
- - ">="
|
120
122
|
- !ruby/object:Gem::Version
|
123
|
+
segments:
|
124
|
+
- 0
|
121
125
|
version: "0"
|
122
|
-
version:
|
123
126
|
requirements: []
|
124
127
|
|
125
128
|
rubyforge_project: ratom
|
126
|
-
rubygems_version: 1.3.
|
129
|
+
rubygems_version: 1.3.6
|
127
130
|
signing_key:
|
128
|
-
specification_version:
|
131
|
+
specification_version: 3
|
129
132
|
summary: Atom Syndication and Publication API
|
130
|
-
test_files:
|
131
|
-
|
133
|
+
test_files:
|
134
|
+
- spec/atom/pub_spec.rb
|
135
|
+
- spec/atom_spec.rb
|
136
|
+
- spec/property.rb
|
137
|
+
- spec/spec_helper.rb
|
data/Manifest.txt
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
License.txt
|
3
|
-
Manifest.txt
|
4
|
-
README.txt
|
5
|
-
Rakefile
|
6
|
-
config/hoe.rb
|
7
|
-
config/requirements.rb
|
8
|
-
lib/atom.rb
|
9
|
-
lib/atom/pub.rb
|
10
|
-
lib/atom/version.rb
|
11
|
-
lib/atom/xml/parser.rb
|
12
|
-
lib/atom/configuration.rb
|
13
|
-
setup.rb
|
14
|
-
spec/app/member_entry.atom
|
15
|
-
spec/app/service.xml
|
16
|
-
spec/atom/pub_spec.rb
|
17
|
-
spec/atom_spec.rb
|
18
|
-
spec/conformance/baseuri.atom
|
19
|
-
spec/conformance/divtest.atom
|
20
|
-
spec/conformance/linktests.xml
|
21
|
-
spec/conformance/nondefaultnamespace-baseline.atom
|
22
|
-
spec/conformance/nondefaultnamespace-xhtml.atom
|
23
|
-
spec/conformance/nondefaultnamespace.atom
|
24
|
-
spec/conformance/ordertest.xml
|
25
|
-
spec/conformance/title/html-cdata.atom
|
26
|
-
spec/conformance/title/html-entity.atom
|
27
|
-
spec/conformance/title/html-ncr.atom
|
28
|
-
spec/conformance/title/text-cdata.atom
|
29
|
-
spec/conformance/title/text-entity.atom
|
30
|
-
spec/conformance/title/text-ncr.atom
|
31
|
-
spec/conformance/title/xhtml-entity.atom
|
32
|
-
spec/conformance/title/xhtml-ncr.atom
|
33
|
-
spec/conformance/unknown-namespace.atom
|
34
|
-
spec/conformance/xmlbase.atom
|
35
|
-
spec/fixtures/complex_single_entry.atom
|
36
|
-
spec/fixtures/created_entry.atom
|
37
|
-
spec/fixtures/entry.atom
|
38
|
-
spec/fixtures/multiple_entry.atom
|
39
|
-
spec/fixtures/simple_single_entry.atom
|
40
|
-
spec/fixtures/with_stylesheet.atom
|
41
|
-
spec/paging/first_paged_feed.atom
|
42
|
-
spec/paging/last_paged_feed.atom
|
43
|
-
spec/paging/middle_paged_feed.atom
|
44
|
-
spec/spec.opts
|
45
|
-
spec/spec_helper.rb
|
46
|
-
tasks/deployment.rake
|
47
|
-
tasks/environment.rake
|
48
|
-
tasks/rspec.rake
|
49
|
-
tasks/website.rake
|
50
|
-
website/index.html
|
51
|
-
website/index.txt
|
52
|
-
website/javascripts/rounded_corners_lite.inc.js
|
53
|
-
website/stylesheets/screen.css
|
54
|
-
website/template.rhtml
|
data/config/hoe.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
require 'atom/version'
|
2
|
-
|
3
|
-
AUTHOR = ['Peerworks', 'Sean Geoghegan'] # can also be an array of Authors
|
4
|
-
EMAIL = "sean@peerworks.org"
|
5
|
-
DESCRIPTION = "Atom Syndication and Publication API"
|
6
|
-
GEM_NAME = 'ratom' # what ppl will type to install your gem
|
7
|
-
RUBYFORGE_PROJECT = 'ratom' # The unix name for your project
|
8
|
-
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
9
|
-
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
10
|
-
|
11
|
-
@config_file = "~/.rubyforge/user-config.yml"
|
12
|
-
@config = nil
|
13
|
-
RUBYFORGE_USERNAME = "sgeo"
|
14
|
-
def rubyforge_username
|
15
|
-
unless @config
|
16
|
-
begin
|
17
|
-
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
18
|
-
rescue
|
19
|
-
puts <<-EOS
|
20
|
-
ERROR: No rubyforge config file found: #{@config_file}
|
21
|
-
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
22
|
-
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
23
|
-
EOS
|
24
|
-
exit
|
25
|
-
end
|
26
|
-
end
|
27
|
-
RUBYFORGE_USERNAME.replace @config["username"]
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
REV = nil
|
32
|
-
# UNCOMMENT IF REQUIRED:
|
33
|
-
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
|
34
|
-
VERS = Atom::VERSION::STRING + (REV ? ".#{REV}" : "")
|
35
|
-
RDOC_OPTS = ['--quiet', '--title', 'atom documentation',
|
36
|
-
"--opname", "index.html",
|
37
|
-
"--line-numbers",
|
38
|
-
"--main", "README",
|
39
|
-
"--inline-source"]
|
40
|
-
|
41
|
-
class Hoe
|
42
|
-
def extra_deps
|
43
|
-
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
44
|
-
@extra_deps
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Generate all the Rake tasks
|
49
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
50
|
-
hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
51
|
-
p.author = AUTHOR
|
52
|
-
p.description = DESCRIPTION
|
53
|
-
p.email = EMAIL
|
54
|
-
p.summary = DESCRIPTION
|
55
|
-
p.url = HOMEPATH
|
56
|
-
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
57
|
-
p.test_globs = ["test/**/test_*.rb"]
|
58
|
-
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
|
59
|
-
|
60
|
-
# == Optional
|
61
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
62
|
-
# An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
|
63
|
-
p.extra_deps = [['libxml-ruby', '>= 1.1.2']]
|
64
|
-
|
65
|
-
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
70
|
-
PATH = RUBYFORGE_PROJECT
|
71
|
-
hoe.remote_rdoc_dir = PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,'')
|
72
|
-
hoe.rsync_args = '-av --delete --ignore-errors'
|
data/config/requirements.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
include FileUtils
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
%w[rake hoe newgem rubigen].each do |req_gem|
|
6
|
-
begin
|
7
|
-
require req_gem
|
8
|
-
rescue LoadError
|
9
|
-
puts "This Rakefile requires the '#{req_gem}' RubyGem."
|
10
|
-
puts "Installation: gem install #{req_gem} -y"
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
|
16
|
-
|
17
|
-
require 'atom'
|
data/lib/atom/version.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# Copyright (c) 2008 The Kaphan Foundation
|
2
|
-
#
|
3
|
-
# For licensing information see LICENSE.txt.
|
4
|
-
#
|
5
|
-
# Please visit http://www.peerworks.org/contact for further information.
|
6
|
-
#
|
7
|
-
module Atom #:nodoc:
|
8
|
-
module VERSION #:nodoc:
|
9
|
-
MAJOR = 0
|
10
|
-
MINOR = 6
|
11
|
-
TINY = 3
|
12
|
-
|
13
|
-
STRING = [MAJOR, MINOR, TINY].join('.')
|
14
|
-
end
|
15
|
-
end
|