Skip to content

Commit

Permalink
* lib/camping-unabridged.rb: remove most of the postamble docs, exce…
Browse files Browse the repository at this point in the history
…pt when talking about CGI. for the rest,

   The Camping Server is recommended.
 * RakeFile: we'll skip the custom rdoc template until RubyGems supports it.
  • Loading branch information
_why committed Sep 1, 2006
1 parent 6819ecf commit f062c5b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 40 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= 1.5
=== 13th July, 2006
=== 1st Sep, 2006

* Camping::Apps stores constants for all loaded apps.
* Camping::Apps stores an array of classes for all loaded apps.
* bin/camping can be given a directory. Like: <tt>camping examples/</tt>
* Console mode -- thank zimbatm. Use: camping -C yourapp.rb
* Call controllers with Camping.method_missing.
Expand Down Expand Up @@ -38,6 +38,7 @@
include Balloon::Models
when camping -C balloon.rb gets run, the models all get included in main.)
* And, of course, many other bugfixes from myself and the loyal+kind zimbatm...
* Markaby updated to 0.5. (See its CHANGELOG.)

= 1.4.2
=== 18th May, 2006
Expand Down
7 changes: 0 additions & 7 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ A skeletal Camping blog could look like this:
end
end

if __FILE__ == $0
Blog::Models::Base.establish_connection :adapter => 'sqlite3',
:database => 'blog3.db'
Blog::Models::Base.logger = Logger.new('camping.log')
puts Blog.run
end

Some things you might have noticed:

* Camping::Models uses ActiveRecord to do its work. We love ActiveRecord!
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil
VERS = ENV['VERSION'] || ("1.4" + (REV ? ".#{REV}" : ""))
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
RDOC_OPTS = ['--quiet', '--title', "Camping, the Documentation",
"--template", "extras/flipbook_rdoc.rb",
"--opname", "index.html",
"--line-numbers",
"--main", "README",
Expand Down
1 change: 0 additions & 1 deletion extras/flipbook_rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def generate_html

# this method is defined in the template file
write_extra_pages if defined? write_extra_pages
RDoc.send :remove_const, :Page # clean up for other templates
end

def gen_into(list)
Expand Down
45 changes: 16 additions & 29 deletions lib/camping-unabridged.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,25 @@
#
# * Camping::Helpers which can be used in controllers and views.
#
# == The postamble
# == The Camping Server
#
# Most Camping applications contain the entire application in a single script.
# The script begins by requiring Camping, then fills each of the three modules
# described above with classes and methods. Finally, a postamble puts the wheels
# in motion.
# How do you run Camping apps? Oh, uh... The Camping Server!
#
# if __FILE__ == $0
# Camping::Models::Base.establish_connection :adapter => 'sqlite3',
# :database => 'blog3.db'
# Camping::Models::Base.logger = Logger.new('camping.log')
# Camping.create if Camping.respond_to? :create
# puts Camping.run
# end
# The Camping Server is, firstly and thusly, a set of rules. At the very least, The Camping Server must:
#
# In the postamble, your job is to setup Camping::Models::Base (see: ActiveRecord::Base)
# and call Camping::run in a request loop. The above postamble is for a standard
# CGI setup, where the web server manages the request loop and calls the script once
# for every request.
# * Load all Camping apps in a directory.
# * Load new apps that appear in that directory.
# * Mount those apps according to their filename. (e.g. blog.rb is mounted at /blog.)
# * Run each app's <tt>create</tt> method upon startup.
# * Reload the app if its modification time changes.
# * Reload the app if it requires any files under the same directory and one of their modification times changes.
# * Support the X-Sendfile header.
#
# For other configurations, see
# http://code.whytheluckystiff.net/camping/wiki/PostAmbles
# In fact, Camping comes with its own little The Camping Server.
#
# At a command prompt, run: <tt>camping examples/</tt> and the entire <tt>examples/</tt> directory will be served.
#
# Configurations also exist for Apache and Lighttpd. See http://code.whytheluckystiff.net/camping/wiki/TheCampingServer.
#
# == The <tt>create</tt> method
#
Expand Down Expand Up @@ -658,17 +655,7 @@ def kp(s); c = qs_parse(s, ';,'); end
# at the center, passing in the read +r+ and write +w+ streams. You will also need to mimick or
# pass in the <tt>ENV</tt> replacement as part of your wrapper.
#
# if __FILE__ == $0
# require 'fcgi'
# Camping::Models::Base.establish_connection :adapter => 'sqlite3',
# :database => 'blog3.db'
# Camping::Models::Base.logger = Logger.new('camping.log')
# FCGI.each do |req|
# req.out << Camping.run req.in, req.env
# req.finish
# end
# end
# end
# See Camping::FastCGI and Camping::WEBrick for examples.
#
def run(r=$stdin,e=ENV)
X.M
Expand Down

0 comments on commit f062c5b

Please sign in to comment.