diff --git a/Rakefile b/Rakefile index 11898ae..b5d6ca4 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ require 'fileutils' include FileUtils NAME = "camping" -VERS = "1.5" +VERS = "1.4.115" CLEAN.include ['**/.*.sw?', '*.gem', '.config'] RDOC_OPTS = ['--quiet', '--title', "Camping, the Documentation", "--template", "extras/flipbook_rdoc.rb", @@ -59,7 +59,7 @@ spec = s.executables = ['camping'] s.add_dependency('activerecord', '>=1.14.2') - s.add_dependency('markaby', '>=0.5') + s.add_dependency('markaby', '>0.4') s.add_dependency('metaid') s.required_ruby_version = '>= 1.8.2' diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index 57051f5..46d0ca5 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -430,7 +430,7 @@ def service(*a) # Used by the web server to convert the current request to a string. If you need to # alter the way Camping builds HTTP headers, consider overriding this method. def to_s - "Status: #{@status}\n#{@headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}*"\n"}*"\n"}\n\n#{@body}" + "Status: #{@status}\n#{@headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}}*"\n"}\n#{@body}" end def markaby #:nodoc: diff --git a/lib/camping.rb b/lib/camping.rb index fe8de99..41212be 100644 --- a/lib/camping.rb +++ b/lib/camping.rb @@ -23,7 +23,7 @@ module Base;include Helpers;attr_accessor :input,:cookies,:env,:headers,:body, @k.dup,q.dup end;def service *a;@body=send(@method,*a)if respond_to?@method @headers["Set-Cookie"]=@cookies.map{|k,v|"#{k}=#{C.escape(v)}; path=#{self/"/"}\ " if v != @k[k]}.compact;self end;def to_s;"Status: #{@status}\n#{@headers.map{ -|k,v|[*v].map{|x|"#{k}: #{x}"}*"\n"}*"\n"}\n\n#{@body}" end;def markaby;Mab.new( +|k,v|[*v].map{|x|"#{k}: #{x}"}}*"\n"}\n#{@body}" end;def markaby;Mab.new( instance_variables.map{|iv|[iv[1..-1],instance_variable_get(iv)]}) end;def markaview m,*a,&b;h=markaby;h.send m,*a,&b;h.to_s end end;class R;include Base end;module Controllers;class NotFound;def get p;r(404,div{h1 "Cam\ping Problem!"