diff --git a/Rakefile b/Rakefile index 30db642..c40e5c2 100644 --- a/Rakefile +++ b/Rakefile @@ -59,7 +59,7 @@ spec = s.homepage = 'http://code.whytheluckystiff.net/camping/' s.executables = ['camping'] - s.add_dependency('activerecord', '>=1.14.2') + s.add_dependency('activesupport', '>1.3.1') s.add_dependency('markaby', '>0.4') s.add_dependency('metaid') s.required_ruby_version = '>= 1.8.2' diff --git a/lib/camping.rb b/lib/camping.rb index 6284e82..034fd70 100644 --- a/lib/camping.rb +++ b/lib/camping.rb @@ -1,4 +1,4 @@ -%w[active_record markaby metaid tempfile uri].map{|l|require l} +%w[active_support markaby metaid tempfile uri].map{|l|require l} module Camping;Apps=[];C=self;S=IO.read(__FILE__).sub(/S=I.+$/,'') P="Cam\ping Problem!";module Helpers;def R c,*g;p=/\(.+?\)/;g.inject(c. urls.find{|x|x.scan(p).size==g.size}.dup){|s,a|s.sub p,C.escape((a[ @@ -45,9 +45,8 @@ def qs_parse q,d='&;';m=proc{|_,o,n|o.u(n,&m)rescue([*o ]||"GET")).service *a;rescue Exception=>x;X::ServerError.new(r,e,'get').service( k,m,x)end;def method_missing m,c,*a;k=X.const_get c;k.new('', H['HTTP_HOST','','SCRIPT_NAME','','HTTP_COOKIE',''],m.to_s).service *a;end -end;module Views;include X,Helpers end;module Models;A= -ActiveRecord;Base=A::Base;def Base.table_name_prefix;"#{name[/\w+/]}_". -downcase.sub(/^(#{A}|camping)_/i,'')end end;class Mab