atomutil 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.txt +2 -19
- data/lib/atomutil.rb +4 -8
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- data/website/index.html +18 -48
- metadata +53 -37
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.0.7 2008-08-29
|
2
|
+
|
3
|
+
* bugfix: fix where it checks the response code is OK or No Content when updating resource.
|
4
|
+
fix Element::to_s because last version of REXML::Document::to_s doesn't accept any param.
|
5
|
+
|
1
6
|
== 0.0.6 2008-05-01
|
2
7
|
|
3
8
|
Removed dependency on REXML::Formatters::Pretty,
|
data/README.txt
CHANGED
@@ -551,8 +551,8 @@ Then feed includes
|
|
551
551
|
At first, construct appropriate authorizer
|
552
552
|
At this time, let's assume that we're requried WSSE Authentication.
|
553
553
|
Of cource, you can choose other authorizer,
|
554
|
-
for example,
|
555
|
-
and in future,
|
554
|
+
for example, Atom::Auth::Basic(Basic authentication),
|
555
|
+
and in future, Atom::Auth::OAuth, Atom::Auth::OpenID, and etc.
|
556
556
|
|
557
557
|
auth = Atompub::Auth::Wsse.new :username => 'myname', :password => 'mypass'
|
558
558
|
|
@@ -612,23 +612,6 @@ and in future, Atompub::Auth::OAuth, Atompub::Auth::OpenID, and etc.
|
|
612
612
|
|
613
613
|
feed_contains_media_entreis = client.get_feed( media_collection_uri )
|
614
614
|
|
615
|
-
== CONTROL CACHING
|
616
|
-
|
617
|
-
To handle data for controlling cache, for example, ETag or If-Modified-Since,
|
618
|
-
Set Atompub::SimpleCache class's object for client initialization.
|
619
|
-
If you don't pass, Atompub::AbstractCache is set by default.
|
620
|
-
|
621
|
-
SimpleCache provides a simple on-memory caching, merely using hash to
|
622
|
-
store Etag and If-Modified-Since data.
|
623
|
-
|
624
|
-
Define new class inheriting AbstractCache,
|
625
|
-
if you need more flexible cache controller, for example,
|
626
|
-
using file, database, or memcached, etc.
|
627
|
-
|
628
|
-
cache = Atompub::SimpleCache.new
|
629
|
-
auth = Atompub::Auth::Wsse.new :username => 'username', :password => 'password'
|
630
|
-
client = Atompub::Client.new :auth => auth, :cache => cache
|
631
|
-
|
632
615
|
= TO DO
|
633
616
|
|
634
617
|
* More document
|
data/lib/atomutil.rb
CHANGED
@@ -55,7 +55,7 @@ module AtomUtil
|
|
55
55
|
module VERSION#:nodoc:
|
56
56
|
MAJOR = 0
|
57
57
|
MINOR = 0
|
58
|
-
TINY =
|
58
|
+
TINY = 7
|
59
59
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
60
60
|
end
|
61
61
|
end
|
@@ -588,16 +588,12 @@ module Atom
|
|
588
588
|
@elem.attributes[name.to_s] = value
|
589
589
|
end
|
590
590
|
# Convert to XML-Document and return it as string
|
591
|
-
def to_s(
|
591
|
+
def to_s(*)
|
592
592
|
doc = REXML::Document.new
|
593
593
|
decl = REXML::XMLDecl.new("1.0", "utf-8")
|
594
594
|
doc.add decl
|
595
595
|
doc.add_element @elem.deep_clone
|
596
|
-
|
597
|
-
doc.to_s(0)
|
598
|
-
else
|
599
|
-
doc.to_s
|
600
|
-
end
|
596
|
+
doc.to_s
|
601
597
|
end
|
602
598
|
private
|
603
599
|
# Get a xpath string to traverse child elements with namespace and name.
|
@@ -1607,7 +1603,7 @@ module Atompub
|
|
1607
1603
|
@res = http.request(@req)
|
1608
1604
|
case @res
|
1609
1605
|
when Net::HTTPSuccess
|
1610
|
-
warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class
|
1606
|
+
warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
|
1611
1607
|
unless @res.body.nil?
|
1612
1608
|
@rc = Atom::MediaType::ENTRY.is_a?(@res['Content-Type']) ? Atom::Entry.new(:stream => @res.body) : @res.body
|
1613
1609
|
@cache.put uri.to_s, {
|
data/script/destroy
CHANGED
File without changes
|
data/script/generate
CHANGED
File without changes
|
data/script/txt2html
CHANGED
File without changes
|
data/website/index.html
CHANGED
@@ -33,56 +33,26 @@
|
|
33
33
|
<h1>atomutil</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/atomutil"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/atomutil" class="numbers">0.0.
|
36
|
+
<a href="http://rubyforge.org/projects/atomutil" class="numbers">0.0.7</a>
|
37
37
|
</div>
|
38
|
-
<h1
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
<h2>Forum</h2>
|
57
|
-
|
58
|
-
|
59
|
-
<p><a href="http://groups.google.com/group/atomutil">http://groups.google.com/group/atomutil</a></p>
|
60
|
-
|
61
|
-
|
62
|
-
<p><span class="caps">TODO</span> – create Google Group – atomutil</p>
|
63
|
-
|
64
|
-
|
65
|
-
<h2>How to submit patches</h2>
|
66
|
-
|
67
|
-
|
68
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
69
|
-
|
70
|
-
|
71
|
-
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/atomutil/trunk</code> for anonymous access.</p>
|
72
|
-
|
73
|
-
|
74
|
-
<h2>License</h2>
|
75
|
-
|
76
|
-
|
77
|
-
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
78
|
-
|
79
|
-
|
80
|
-
<h2>Contact</h2>
|
81
|
-
|
82
|
-
|
83
|
-
<p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/atomutil">forum</a></p>
|
38
|
+
<h1>&#x2192; ‘atomutil’</h1>
|
39
|
+
<h2>What</h2>
|
40
|
+
<h2>Installing</h2>
|
41
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">atomutil</span></pre></p>
|
42
|
+
<h2>The basics</h2>
|
43
|
+
<h2>Demonstration of usage</h2>
|
44
|
+
<h2>Forum</h2>
|
45
|
+
<p><a href="http://groups.google.com/group/atomutil">http://groups.google.com/group/atomutil</a></p>
|
46
|
+
<p><span class="caps">TODO</span> – create Google Group – atomutil</p>
|
47
|
+
<h2>How to submit patches</h2>
|
48
|
+
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
49
|
+
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/atomutil/trunk</code> for anonymous access.</p>
|
50
|
+
<h2>License</h2>
|
51
|
+
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
52
|
+
<h2>Contact</h2>
|
53
|
+
<p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/atomutil">forum</a></p>
|
84
54
|
<p class="coda">
|
85
|
-
<a href="FIXME email">FIXME full name</a>,
|
55
|
+
<a href="FIXME email">FIXME full name</a>, 29th August 2008<br>
|
86
56
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
87
57
|
</p>
|
88
58
|
</div>
|
metadata
CHANGED
@@ -1,33 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.2
|
3
|
-
specification_version: 1
|
4
2
|
name: atomutil
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2008-05-12 00:00:00 +09:00
|
8
|
-
summary: Utilities for AtomPub / Atom Syndication Format
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: lyo.kato atmark gmail.com
|
12
|
-
homepage: http://atomutil.rubyforge.org
|
13
|
-
rubyforge_project: atomutil
|
14
|
-
description: Utilities for AtomPub / Atom Syndication Format
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.0.7
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Lyo Kato
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-08-29 00:00:00 +09:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.7.0
|
24
|
+
version:
|
25
|
+
description: Utilities for AtomPub / Atom Syndication Format
|
26
|
+
email: lyo.kato atmark gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- History.txt
|
33
|
+
- License.txt
|
34
|
+
- Manifest.txt
|
35
|
+
- README.txt
|
36
|
+
- website/index.txt
|
31
37
|
files:
|
32
38
|
- History.txt
|
33
39
|
- License.txt
|
@@ -64,22 +70,32 @@ files:
|
|
64
70
|
- website/javascripts/rounded_corners_lite.inc.js
|
65
71
|
- website/stylesheets/screen.css
|
66
72
|
- website/template.rhtml
|
67
|
-
|
68
|
-
|
73
|
+
has_rdoc: true
|
74
|
+
homepage: http://atomutil.rubyforge.org
|
75
|
+
post_install_message:
|
69
76
|
rdoc_options:
|
70
77
|
- --main
|
71
78
|
- README.txt
|
72
|
-
|
73
|
-
-
|
74
|
-
|
75
|
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: "0"
|
86
|
+
version:
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
92
|
+
version:
|
82
93
|
requirements: []
|
83
94
|
|
84
|
-
|
95
|
+
rubyforge_project: atomutil
|
96
|
+
rubygems_version: 1.2.0
|
97
|
+
signing_key:
|
98
|
+
specification_version: 2
|
99
|
+
summary: Utilities for AtomPub / Atom Syndication Format
|
100
|
+
test_files: []
|
85
101
|
|