atomutil 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/atomutil.gemspec +1 -1
- data/lib/atomutil.rb +8 -8
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/atomutil.gemspec
CHANGED
data/lib/atomutil.rb
CHANGED
@@ -55,7 +55,7 @@ module AtomUtil
|
|
55
55
|
module VERSION#:nodoc:
|
56
56
|
MAJOR = 0
|
57
57
|
MINOR = 1
|
58
|
-
TINY =
|
58
|
+
TINY = 1
|
59
59
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
60
60
|
end
|
61
61
|
end
|
@@ -1339,7 +1339,7 @@ module Atompub
|
|
1339
1339
|
#
|
1340
1340
|
def get_service(service_uri)
|
1341
1341
|
get_contents_except_resources(service_uri) do |res|
|
1342
|
-
warn "Bad Content Type" unless Atom::MediaType::SERVICE.is_a?(@res['Content-Type'])
|
1342
|
+
#warn "Bad Content Type" unless Atom::MediaType::SERVICE.is_a?(@res['Content-Type'])
|
1343
1343
|
@rc = Atom::Service.new :stream => @res.body
|
1344
1344
|
@rc.workspaces.each do |workspace|
|
1345
1345
|
workspace.collections.each do |collection|
|
@@ -1359,7 +1359,7 @@ module Atompub
|
|
1359
1359
|
#
|
1360
1360
|
def get_categories(categories_uri)
|
1361
1361
|
get_contents_except_resources(categories_uri) do |res|
|
1362
|
-
warn "Bad Content Type" unless Atom::MediaType::CATEGORIES.is_a?(@res['Content-Type'])
|
1362
|
+
#warn "Bad Content Type" unless Atom::MediaType::CATEGORIES.is_a?(@res['Content-Type'])
|
1363
1363
|
@rc = Atom::Categories.new :stream => @res.body
|
1364
1364
|
end
|
1365
1365
|
@rc
|
@@ -1372,7 +1372,7 @@ module Atompub
|
|
1372
1372
|
#
|
1373
1373
|
def get_feed(feed_uri)
|
1374
1374
|
get_contents_except_resources(feed_uri) do |res|
|
1375
|
-
warn "Bad Content Type" unless Atom::MediaType::FEED.is_a?(@res['Content-Type'])
|
1375
|
+
#warn "Bad Content Type" unless Atom::MediaType::FEED.is_a?(@res['Content-Type'])
|
1376
1376
|
@rc = Atom::Feed.new :stream => res.body
|
1377
1377
|
end
|
1378
1378
|
@rc
|
@@ -1567,8 +1567,8 @@ module Atompub
|
|
1567
1567
|
@res = http.request(@req)
|
1568
1568
|
case @res
|
1569
1569
|
when Net::HTTPSuccess
|
1570
|
-
warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPCreated
|
1571
|
-
warn "Bad Content Type: #{@res['Content-Type']}" unless Atom::MediaType::ENTRY.is_a?(@res['Content-Type'])
|
1570
|
+
#warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPCreated
|
1571
|
+
#warn "Bad Content Type: #{@res['Content-Type']}" unless Atom::MediaType::ENTRY.is_a?(@res['Content-Type'])
|
1572
1572
|
if @res['Location'].nil?
|
1573
1573
|
raise ResponseError, "No Location"
|
1574
1574
|
end
|
@@ -1603,7 +1603,7 @@ module Atompub
|
|
1603
1603
|
@res = http.request(@req)
|
1604
1604
|
case @res
|
1605
1605
|
when Net::HTTPSuccess
|
1606
|
-
warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
|
1606
|
+
#warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
|
1607
1607
|
unless @res.body.nil?
|
1608
1608
|
@rc = Atom::MediaType::ENTRY.is_a?(@res['Content-Type']) ? Atom::Entry.new(:stream => @res.body) : @res.body
|
1609
1609
|
@cache.put uri.to_s, {
|
@@ -1626,7 +1626,7 @@ module Atompub
|
|
1626
1626
|
@res = http.request(@req)
|
1627
1627
|
case @res
|
1628
1628
|
when Net::HTTPSuccess
|
1629
|
-
warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
|
1629
|
+
#warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
|
1630
1630
|
else
|
1631
1631
|
raise RequestError, "Failed to delete resource. #{@res.code}"
|
1632
1632
|
end
|
metadata
CHANGED