Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @state is now an alias of @env['rack.session']
* Camping.use injects a Rack middleware.
* Update Flipbook to RDoc 2.4
* Removed old examples.
* Removed old examples.
* Updated examples/blog.rb
* Camping::Apps returns!
* Session-cookies now timeout naturally (thanks jenna!)
Expand All @@ -24,7 +24,7 @@
r404 : called when a controller was not found
r500 : called on uncaught exception
r501 : called on undefined method

All of those can be overridden at your taste.

* Markaby no longer required. Like AR, is it autoloaded on (Mab) usage.
Expand All @@ -36,42 +36,42 @@
= 1.5
=== 3rd Oct, 2006

* Camping::Apps stores an array of classes 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
* Console mode -- thank zimbatm. Use: camping -C yourapp.rb
* Call controllers with Camping.method_missing.

Tepee.get(:Index) #=> (Response)
Blog.post(:Delete, id) #=> (Response)
Blog.post(:Delete, id) #=> (Response)

Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'})
#=> #<Blog::Controllers::Login @user=... >
Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'})
#=> #<Blog::Controllers::Login @user=... >

Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'})
#=> #<Blog::Controllers::Info @env={'HTTP_HOST'=>'wagon'} ...>
Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'})
#=> #<Blog::Controllers::Info @env={'HTTP_HOST'=>'wagon'} ...>

* Using \r\n instead of \n on output. FastCGI has these needs.
* ActiveRecord no longer required or installed.
* If you refer to Models::Base, however, ActiveRecord will be loaded with autoload. (see lib/camping/db.rb)
* Using \r\n instead of \n on output. FastCGI has these needs.
* ActiveRecord no longer required or installed.
* If you refer to Models::Base, however, ActiveRecord will be loaded with autoload. (see lib/camping/db.rb)
* new Camping::FastCGI.serve which will serve a whole directory of apps
(see http://code.whytheluckystiff.net/camping/wiki/TheCampingServer)
* ~/.campingrc can contain database connection info if you want your default to be something other than SQLite.

database:
adapter: mysql
username: camping
socket: /tmp/mysql.sock
password: NOFORESTFIRES
database: camping

* controllers are now *ordered*. uses the inherited hook to keep track of all
classes created with R. those classes are scanned, in order, when a request is
made. any other controllers are handled first. so if you plan on overriding the
urls method, be sure to subclass from R().
* Console mode will load .irbrc in the working directory, if present.
(for example, in my ~/git/balloon directory, i have this in the .irbrc:
include Balloon::Models
when camping -C balloon.rb gets run, the models all get included in main.)
(see http://code.whytheluckystiff.net/camping/wiki/TheCampingServer)
* ~/.campingrc can contain database connection info if you want your default to be something other than SQLite.

database:
adapter: mysql
username: camping
socket: /tmp/mysql.sock
password: NOFORESTFIRES
database: camping

* controllers are now *ordered*. uses the inherited hook to keep track of all
classes created with R. those classes are scanned, in order, when a request is
made. any other controllers are handled first. so if you plan on overriding the
urls method, be sure to subclass from R().
* Console mode will load .irbrc in the working directory, if present.
(for example, in my ~/git/balloon directory, i have this in the .irbrc:
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.)

Expand Down
6 changes: 3 additions & 3 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ got it going.
A skeletal Camping blog could look like this:

require 'camping'

Camping.goes :Blog

module Blog::Models
Expand Down Expand Up @@ -49,7 +49,7 @@ A skeletal Camping blog could look like this:
end
end
end

== Installation

Interested yet? Luckily it's quite easy to install Camping. We'll be using
Expand All @@ -69,7 +69,7 @@ need to install +markaby+, and if you're going to use the database you need

gem install markaby
gem install activerecord

== Learning

First of all, you should read {the first chapters}[link:book/01_introduction.html]
Expand All @@ -81,7 +81,7 @@ documentation for all the different parts of Camping.
useful tricks that we've collected over the years. Don't be afraid to share
your own discoveries; the more, the better!

And if there's anything you're wondering about, don't be shy, but rather
And if there's anything you're wondering about, don't be shy, but rather
subscribe to {the mailing list}[http://rubyforge.org/mailman/listinfo/camping-list]
and ask there. We also have an IRC channel over at Freenode, so if you feel
like chatting with us, you should join {#camping @ irc.freenode.net}[http://java.freenode.net/?channel=camping].
Expand Down
28 changes: 14 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ VERS = ENV['VERSION'] || (REV.zero? ? BRANCH : [BRANCH, REV] * '.')

CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'test/test.log', '.*.pt']
RDOC_OPTS = ["--line-numbers", "--quiet", "--main", "README"]

## Packaging
spec =
Gem::Specification.new do |s|
Expand All @@ -38,14 +38,14 @@ spec =
s.required_ruby_version = '>= 1.8.2'

s.files = %w(COPYING README Rakefile) +
Dir.glob("{bin,doc,test,lib,extras,book}/**/*") +
Dir.glob("{bin,doc,test,lib,extras,book}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")

s.require_path = "lib"
s.bindir = "bin"
end
end

omni =
Gem::Specification.new do |s|
Expand All @@ -61,7 +61,7 @@ omni =
s.add_dependency('mongrel')
s.add_dependency('RedCloth')
end

## RDoc

begin
Expand All @@ -85,16 +85,16 @@ Rake::RDocTask.new(:docs) do |rdoc|
puts "** Camping needs RDoc 2.4 in order to use the Flipbook template."
end
end

rdoc.inline_source = false # --inline-source is deprecated
rdoc.rdoc_dir = 'doc'
rdoc.title = "Camping, a Microframework"
rdoc.rdoc_files.add ['README', 'lib/camping-unabridged.rb', 'lib/camping/**/*.rb', 'book/*']
end

task :rubygems_docs do
require 'rubygems/doc_manager'

def spec.installation_path; '.' end
def spec.full_gem_path; '.' end
manager = Gem::DocManager.new(spec)
Expand Down Expand Up @@ -135,15 +135,15 @@ task :diff do
require 'ruby_parser'
u = Tempfile.new('unabridged')
m = Tempfile.new('mural')

u << Ruby2Ruby.new.process(RubyParser.new.parse(File.read("lib/camping.rb")))
m << Ruby2Ruby.new.process(RubyParser.new.parse(File.read("lib/camping-unabridged.rb")))

u.flush
m.flush

sh "diff -u #{u.path} #{m.path} | less"

u.delete
m.delete
end
Expand All @@ -159,11 +159,11 @@ namespace :check do
require 'ruby_parser'
u = RubyParser.new.parse(File.read("lib/camping-unabridged.rb"))
m = RubyParser.new.parse(File.read("lib/camping.rb"))

u.reject! do |sexp|
sexp.is_a?(Sexp) and sexp[1] == s(:gvar, :$LOADED_FEATURES)
end

unless u == m
STDERR.puts "camping.rb and camping-unabridged.rb are not synchronized."
error = true
Expand Down Expand Up @@ -194,7 +194,7 @@ namespace :check do
i += 1
end
end

task :exit do
exit 1 if error
end
Expand Down
Loading