public
Description: the 4k pocket full-of-gags web microframework
Homepage: http://code.whytheluckystiff.net/camping/
Clone URL: git://github.com/why/camping.git
 * lib/camping-unabridged.rb: remove most of the postamble docs, except 
 when talking about CGI.  for the rest,
   The Camping Server is recommended.
 * RakeFile: we'll skip the custom rdoc template until RubyGems supports 
 it.
why (author)
Fri Sep 01 00:48:45 -0700 2006
commit  f062c5be22beda627d328962bcf9284cbfc77f4b
tree    e75e5e53ff3587602ed3a0fe969f9f4ff8245ec3
parent  6819ecfb5e7b168499308e9a5699917c8d1c35e9
...
1
2
 
3
4
 
5
6
7
...
38
39
40
 
41
42
43
...
1
 
2
3
 
4
5
6
7
...
38
39
40
41
42
43
44
0
@@ -1,7 +1,7 @@
0
 = 1.5
0
-=== 13th July, 2006
0
+=== 1st Sep, 2006
0
 
0
-* Camping::Apps stores constants for all loaded apps.
0
+* Camping::Apps stores an array of classes for all loaded apps.
0
 * bin/camping can be given a directory. Like: <tt>camping examples/</tt>
0
 * Console mode -- thank zimbatm. Use: camping -C yourapp.rb
0
 * Call controllers with Camping.method_missing.
0
@@ -38,6 +38,7 @@
0
   include Balloon::Models
0
   when camping -C balloon.rb gets run, the models all get included in main.)
0
 * And, of course, many other bugfixes from myself and the loyal+kind zimbatm...
0
+* Markaby updated to 0.5. (See its CHANGELOG.)
0
 
0
 = 1.4.2
0
 === 18th May, 2006
0
...
47
48
49
50
51
52
53
54
55
56
57
58
59
...
47
48
49
 
 
 
 
 
 
 
50
51
52
0
@@ -47,13 +47,6 @@ A skeletal Camping blog could look like this:
0
     end
0
   end
0
 
0
- if __FILE__ == $0
0
- Blog::Models::Base.establish_connection :adapter => 'sqlite3',
0
- :database => 'blog3.db'
0
- Blog::Models::Base.logger = Logger.new('camping.log')
0
- puts Blog.run
0
- end
0
-
0
 Some things you might have noticed:
0
 
0
 * Camping::Models uses ActiveRecord to do its work. We love ActiveRecord!
...
10
11
12
13
14
15
16
...
10
11
12
 
13
14
15
0
@@ -10,7 +10,6 @@ REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil
0
 VERS = ENV['VERSION'] || ("1.4" + (REV ? ".#{REV}" : ""))
0
 CLEAN.include ['**/.*.sw?', '*.gem', '.config']
0
 RDOC_OPTS = ['--quiet', '--title', "Camping, the Documentation",
0
- "--template", "extras/flipbook_rdoc.rb",
0
     "--opname", "index.html",
0
     "--line-numbers",
0
     "--main", "README",
...
18
19
20
21
22
23
24
...
18
19
20
 
21
22
23
0
@@ -18,7 +18,6 @@ class HTMLGenerator
0
       
0
       # this method is defined in the template file
0
       write_extra_pages if defined? write_extra_pages
0
- RDoc.send :remove_const, :Page # clean up for other templates
0
     end
0
 
0
     def gen_into(list)
...
42
43
44
45
 
46
47
48
49
50
 
51
52
53
54
55
56
57
58
 
59
60
61
62
63
 
 
 
 
 
 
 
64
65
66
 
 
 
 
 
67
68
69
...
658
659
660
661
662
663
664
665
666
667
668
669
670
671
 
672
673
674
...
42
43
44
 
45
46
 
 
 
 
47
48
 
 
 
 
 
 
 
49
50
 
 
 
 
51
52
53
54
55
56
57
58
 
 
59
60
61
62
63
64
65
66
...
655
656
657
 
 
 
 
 
 
 
 
 
 
 
658
659
660
661
0
@@ -42,28 +42,25 @@
0
 #
0
 # * Camping::Helpers which can be used in controllers and views.
0
 #
0
-# == The postamble
0
+# == The Camping Server
0
 #
0
-# Most Camping applications contain the entire application in a single script.
0
-# The script begins by requiring Camping, then fills each of the three modules
0
-# described above with classes and methods. Finally, a postamble puts the wheels
0
-# in motion.
0
+# How do you run Camping apps? Oh, uh... The Camping Server!
0
 #
0
-# if __FILE__ == $0
0
-# Camping::Models::Base.establish_connection :adapter => 'sqlite3',
0
-# :database => 'blog3.db'
0
-# Camping::Models::Base.logger = Logger.new('camping.log')
0
-# Camping.create if Camping.respond_to? :create
0
-# puts Camping.run
0
-# end
0
+# The Camping Server is, firstly and thusly, a set of rules. At the very least, The Camping Server must:
0
 #
0
-# In the postamble, your job is to setup Camping::Models::Base (see: ActiveRecord::Base)
0
-# and call Camping::run in a request loop. The above postamble is for a standard
0
-# CGI setup, where the web server manages the request loop and calls the script once
0
-# for every request.
0
+# * Load all Camping apps in a directory.
0
+# * Load new apps that appear in that directory.
0
+# * Mount those apps according to their filename. (e.g. blog.rb is mounted at /blog.)
0
+# * Run each app's <tt>create</tt> method upon startup.
0
+# * Reload the app if its modification time changes.
0
+# * Reload the app if it requires any files under the same directory and one of their modification times changes.
0
+# * Support the X-Sendfile header.
0
 #
0
-# For other configurations, see
0
-# http://code.whytheluckystiff.net/camping/wiki/PostAmbles
0
+# In fact, Camping comes with its own little The Camping Server.
0
+#
0
+# At a command prompt, run: <tt>camping examples/</tt> and the entire <tt>examples/</tt> directory will be served.
0
+#
0
+# Configurations also exist for Apache and Lighttpd. See http://code.whytheluckystiff.net/camping/wiki/TheCampingServer.
0
 #
0
 # == The <tt>create</tt> method
0
 #
0
@@ -658,17 +655,7 @@ module Camping
0
     # at the center, passing in the read +r+ and write +w+ streams. You will also need to mimick or
0
     # pass in the <tt>ENV</tt> replacement as part of your wrapper.
0
     #
0
- # if __FILE__ == $0
0
- # require 'fcgi'
0
- # Camping::Models::Base.establish_connection :adapter => 'sqlite3',
0
- # :database => 'blog3.db'
0
- # Camping::Models::Base.logger = Logger.new('camping.log')
0
- # FCGI.each do |req|
0
- # req.out << Camping.run req.in, req.env
0
- # req.finish
0
- # end
0
- # end
0
- # end
0
+ # See Camping::FastCGI and Camping::WEBrick for examples.
0
     #
0
     def run(r=$stdin,e=ENV)
0
       X.M

Comments

    No one has commented yet.