Skip to content

Commit

Permalink
Converted over to use Sinatra::OutputBuffer gem.
Browse files Browse the repository at this point in the history
Instead of encapsulating the Output buffering in this extension I am instead using the generic Sinatra::OutputBuffer extension. This keeps the code base smaller, leaner and reduces name clashes.

The Sinatra::OutputBuffer extension is based upon Nathan Esquenazi's code in the Padrino framework [github.com/padrino/padrino-framework] and the SinatraMore gem [github.com/nesquena/sinatra_more].
  • Loading branch information
kematzy committed Mar 2, 2010
1 parent 877e7ce commit 6d4dde6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 159 deletions.
14 changes: 5 additions & 9 deletions README.rdoc
Expand Up @@ -30,14 +30,18 @@ This Gem depends upon the following:
=== Runtime:

* sinatra ( >= 1.0.a )
* sinatra-outputbuffer[http://github.com/kematzy/sinatra-outputbuffer] (>= 0.1.0)

Optionals:

* sinatra-settings[http://github.com/kematzy/sinatra-settings] (>= 0.1.1) # to view default settings in a browser display.

=== Development & Tests:

* sinatra-tests (>= 0.1.6)
* rspec (>= 1.3.0 )
* rack-test (>= 0.5.3)
* rspec_hpricot_matchers (>= 0.1.0)
* sinatra-tests (>= 0.1.6)
* fileutils
* sass
* ostruct
Expand Down Expand Up @@ -376,14 +380,6 @@ See LICENSE for details.

=== Credits

Included in this gem is code from <tt>SinatraMore::OutputHelpers</tt>, taken from the
<tt>sinatra_more</tt> gem [ http://github.com/nesquena/sinatra_more/ ] by Nathan Esquenazi.

The code was renamed to Sinatra::Output to prevent any extension clashes.

Copyright (c) 2009 Nathan Esquenazi. Released under the MIT License.


A big <b>Thank You!</b> goes to rtomayko[http://github/rtomayko], blakemizerany[http://github.com/blakemizerany/]
and others working on the Sinatra framework.

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -11,7 +11,7 @@ begin
gem.homepage = "http://github.com/kematzy/sinatra-cache"
gem.authors = ["kematzy"]
gem.add_dependency('sinatra', '>=1.0.a')
# gem.add_dependency('dependency', '>=x.x.x')
gem.add_dependency('sinatra-outputbuffer', '>=0.1.0')
gem.add_development_dependency "sinatra-tests", ">= 0.1.6"
gem.add_development_dependency "rspec", ">= 1.3.0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
Expand Down
3 changes: 2 additions & 1 deletion lib/sinatra/cache.rb
@@ -1,5 +1,6 @@

require 'sinatra/base'
require 'sinatra/outputbuffer'

module Sinatra
module Cache
Expand All @@ -8,6 +9,6 @@ def self.version; "Sinatra::Cache v#{VERSION}"; end
end #/ Cache
end #/ Sinatra

%w(templates output cache/helpers).each do |lib|
%w(templates cache/helpers).each do |lib|
require "sinatra/#{lib}"
end
2 changes: 1 addition & 1 deletion lib/sinatra/cache/helpers.rb
Expand Up @@ -629,7 +629,7 @@ def log(scope, msg)
#
#
def self.registered(app)
app.helpers Sinatra::Output::Helpers
app.register(Sinatra::OutputBuffer)
app.helpers Cache::Helpers

## CONFIGURATIONS::
Expand Down
147 changes: 0 additions & 147 deletions lib/sinatra/output.rb

This file was deleted.

0 comments on commit 6d4dde6

Please sign in to comment.