lib/nanoc3/extra/chick.rb in nanoc3-3.1.0a2 vs lib/nanoc3/extra/chick.rb in nanoc3-3.1.0a3
- old
+ new
@@ -2,14 +2,18 @@
require 'rack'
require 'rack/cache'
module Nanoc3::Extra
- # CHiCk is a caching HTTP client that uses Rack::Cache.
+ # @deprecated Use a HTTP library such as
+ # [Net::HTTP](http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/) or
+ # [Curb](http://curb.rubyforge.org/) instead.
module CHiCk
- # CHiCk::Client provides a simple API for issuing HTTP requests.
+ # @deprecated Use a HTTP library such as
+ # [Net::HTTP](http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/) or
+ # [Curb](http://curb.rubyforge.org/) instead.
class Client
DEFAULT_OPTIONS = {
:cache => {
:metastore => 'file:tmp/rack/cache.meta',
@@ -52,12 +56,13 @@
[ status, headers, body ]
end
end
- # CHiCk::CacheController sets the Cache-Control header (and more
- # specifically, max-age) to limit the number of necessary requests.
+ # @deprecated Use a HTTP library such as
+ # [Net::HTTP](http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/) or
+ # [Curb](http://curb.rubyforge.org/) instead.
class CacheController
def initialize(app, options={})
@app = app
@options = options
@@ -71,11 +76,12 @@
res
end
end
- # CHiCk::RackClient performs the actual HTTP requests. It does not perform
- # any caching.
+ # @deprecated Use a HTTP library such as
+ # [Net::HTTP](http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/) or
+ # [Curb](http://curb.rubyforge.org/) instead.
class RackClient
METHOD_TO_CLASS_MAPPING = {
'DELETE' => Net::HTTP::Delete,
'GET' => Net::HTTP::Get,